Communicating with the kernel

One of the first things olsrd does after setting up various variables based on either a configuration file, command line arguments or just default values(often a mix of these), is to validate and configure communication interface information. This requires fetching information from the kernel. The task of communicating with kernel mechanisms can seem daunting to someone that have never worked on such a low level on a Linux system before. Luckily the GNU/Linux system is made up of open-source components, therefore one is free to study all source code. Studying kernel and library header-files and reading source-code of applications that include the operations one wishes to implement, is a smart thing to do to when facing such new ground. A look at the source of the standard Unix network interface configuration tool ifconfig, is highly recommended when getting into network interface configuration.

To be able to communicate with drivers running in kernel-space, two approaches are used. The first is the ioctl(2) system call. The second is the proc pseudo file-system.



Subsections
Andreas 2004-07-29