V6 netmask

Some functions that mirage/tuntap#6 needs.