Break out socket primitives (socket, listen, accept, ...) to allow Erlang to create and access Unix sockets. Any type of unprivileged socket can be created without spawning the setuid helper. Warning: because listen/2 is now a wrapper around the listen(2), the procket:listen/1,2 has been renamed to procket:open/1,2.
Retrieve a list of interfaces by parsing the output of /proc/net/dev. The device list can also be retrieved by using ioctl(SIOCGIFCONF), but this requires passing in a struct with a pointer to a buffer. Possibly there could be an NIF allocator that returns the integer pointing to the memory and a corresponding free().
Add functions to return the MAC address of a device or lookup an IP address in the ARP cache. Since I couldn't get the ioctl(SIOCGARP) version to work, packet simply parses the output of /proc/net/arp. packet:arplookup(Socket, Device, IP) is sort of hacky; it throws away the first 2 arguments. I left them in since they'll probably be needed for the BSD version.