first = member AND mask last = first OR (NOT mask)
You probably want to remove the broadcast address from this range?
Also, read perlop to prevent confusion about bitwise operators; and grep/perldoc -q around for packing and unpacking an IP address in a binary.
In reply to Re: algorithm for network address enumeration
by gaal
in thread algorithm for network address enumeration
by knave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |