intToMask only allows creating masks starting from MSB, since the IP types don't have a bits instance it's not possible to create a hostmask (starting from LSB) from such a mask.
See the doctests in the patch for examples.
Note: I only tested this on x86. I'm assuming the internal types always have host byte order if that's not true big endian platforms would probably break.
intToMask
only allows creating masks starting from MSB, since the IP types don't have a bits instance it's not possible to create a hostmask (starting from LSB) from such a mask.See the doctests in the patch for examples.
Note: I only tested this on x86. I'm assuming the internal types always have host byte order if that's not true big endian platforms would probably break.