Blog

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])); }

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment replies are not available offline