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
Most of IPv4 ioctls have been implemented into the IPv6 stack. Some
other where added:
- SIOCDELADDR: deletes an interface address. The previous
assertion that adding an address to an interface deletes its old address
does not hold anymore with the IPv6 multiaddressing scheme.
- SIOCADDTUNNEL, SIOCDELTUNNEL: adds/deletes a configured tunnel.
- SIOCGIFINDEX: gets the index for a given interface.
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:
- igmpv6: multicast IPv6 addresses that have been joined
on each device.
- ndcache: the IPv6 neighbor cache.
- raw6: raw sockets statistics.
- route6: the IPv6 routing table.
- snmp6: Simple Network Management Protocol statistics,
partially used so far.
- sockstat6: socket statistics.
- udp6: datagram socket statistics.
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
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.
Last modified: Mon Jan 20 17:37:54 MET