Support bitmask notation for address netmask

Added support for bitmask notation for the netmasks when setting src/dst addresses (x.x.x.x/16).
Expanded address test to match the change.
This fails for inputs such as imask=17 (0x1ffff instead of 0x80ffff).
I changed things to make it look a bit better, but couldn't think of a much more elegant solution:
socket.htonl((2**imask-1) << (32-imask))