Add converting function for netmask