User/Kernel Communication Channels

Linux provides 4 ways for the user to communicate with the kernel. Namely, these are the ioctl and sysctl calls, the /proc/ file system, and the netlink mechanism. We present below a brief description of each of these features and how they are used in the IPv6-DRET stack.

The ioctl system calls

This system call allows to set or get different kernel parameters at the routing and interface levels. An ioctl call is performed via a socket and usually looks like:
> ioctl(socket, option, pointer)
were pointer points to some user memory to be read/written by the kernel.
Most of IPv4 ioctls have been implemented into the IPv6 stack. Some other where added:

The /proc/ file system

In Linux, this directory tree is a virtual file system that allows the user to access parts of the kernel memory. IPv6-DRET related information is stored in the /proc/net6 directory.
As of December 19, 96, 7 files appear in this directory:

The netlink communication channel

Netlink allows both way communication between the user and the kernel, through a given character device. The existing netlink service was enhanced to accomodate both IPv4 and IPv6 protocols.

Currently, route and interface updates are announced on the /dev/route device. The neighbor discovery daemons make use of this facility. However, note that a single daemon can be listening to the device at any time. This issue can be addressed either by multiplicating the number of such /dev/xxx devices or by designing a multiplexing/demultiplexing daemon.


This call allows the user to access (read/write) kernel tables. No IPv6-DRET feature uses this call yet.
Benoit Brodard
Last modified: Mon Jan 20 17:37:54 MET