Pascal ANELLI

Linux Networking Kernel features

Last update: January 1998


* 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.


* Sysctl

This call allows the user to access (read/write) kernel tables. No IPv6-DRET feature uses this call yet.

* Simple Interface Transition

The Simple Interface Transition mechanism allows two remote IPv6 hosts to communicate by encapsulating IPv6 packets inside IPv4 packets.
Use of such tunnels can be either automatic or configured. In the IPv6-DRET implementation, the sit0 device is reserved for automatic tunneling, i.e. the destination of packets sent on this device is IPv4-compatible. ctX devices are configured individually with an end-point address. The maximum number of configured tunnels is seven.