title: Modify the subnet mask of a network interface programmatically
body: <p>I want to modify the subnet mask of a network interface. I am able to get read the default mask using getifaddrs(). However, is there a way to write (and modify) ifa_netmask parameter? Does a socket function exist that can do the work? or maybe ioctl()?</p>