Converting IP masks and finding prefix lengths

sub pfxlen { return 32-(log((2**32)-$_[0])/log(2)); }
sub pfxmsk { return 2**32-(2**(32-$_[0])); }

Comments

    Leave a comment