Netlink Socket
Netlink socket (described in RFC 3549) is now the preferred interface between kernel and user-space for IP network configuration.
This is how to create a netlink socket:
socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
Different protocols to be used for Netlink are defined in
A steamy conversation on kerneltrap regarding the advantages of Netlink over Debugfs is found here - http://kerneltrap.org/node/6637