next up previous contents
Next: Protocol Registration Up: Netlink sockets Previous: Netlink sockets   Contents

An Overview of netlink sockets

Netlink is used to transfer information between kernel modules and user space processes, it provides kernel/user space bidirectional communication links. It consists of a standard sockets based interface for user processes and an internal kernel API for kernel modules.

A netlink socket in the user space can be created by

 
sock_fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);

The domain is AF_NETLINK, the type of socket is SOCK_RAW, however netlink is a datagram oriented service. Both SOCK_RAW and SOCK_DGRAM are valid values for socket_type but the netlink protocol does not distinguish between datagram and raw sockets.

Netlink_family selects the kernel module or netlink group to communicate with. The currently assigned netlink families are:


next up previous contents
Next: Protocol Registration Up: Netlink sockets Previous: Netlink sockets   Contents
Gowri Dhandapani
1999-10-03