unix, test: add netmask to interface information.

Including implementation for darwin, linux, netbsd, and sunos, but only the code for darwin has been tested because of the lack of test environment. Test code is included.