blob: 67fbb5e360006d19b9dc46e1fffb670e3200ef1e [file] [log] [blame]
paul76b89b42004-11-06 17:13:09 +00001@node Kernel Interface
paul718e3742002-12-13 20:15:29 +00002@chapter Kernel Interface
3
4There are several different methods for reading kernel routing table
5information, updating kernel routing tables, and for looking up
6interfaces.
7
8@table @samp
9
10@item ioctl
11The @samp{ioctl} method is a very traditional way for reading or writing
12kernel information. @samp{ioctl} can be used for looking up interfaces
13and for modifying interface addresses, flags, mtu settings and other
14types of information. Also, @samp{ioctl} can insert and delete kernel
15routing table entries. It will soon be available on almost any platform
16which zebra supports, but it is a little bit ugly thus far, so if a
17better method is supported by the kernel, zebra will use that.
18
19@item sysctl
20@samp{sysctl} can lookup kernel information using MIB (Management
21Information Base) syntax. Normally, it only provides a way of getting
22information from the kernel. So one would usually want to change kernel
23information using another method such as @samp{ioctl}.
24
25@item proc filesystem
26@samp{proc filesystem} provides an easy way of getting kernel
27information.
28
29@item routing socket
30
31@item netlink
32On recent Linux kernels (2.0.x and 2.2.x), there is a kernel/user
33communication support called @code{netlink}. It makes asynchronous
paul7190f4e2003-08-12 12:40:20 +000034communication between kernel and Quagga possible, similar to a routing
paul718e3742002-12-13 20:15:29 +000035socket on BSD systems.
36
37Before you use this feature, be sure to select (in kernel configuration)
38the kernel/netlink support option 'Kernel/User network link driver' and
39'Routing messages'.
40
41Today, the /dev/route special device file is obsolete. Netlink
42communication is done by reading/writing over netlink socket.
43
paul7190f4e2003-08-12 12:40:20 +000044After the kernel configuration, please reconfigure and rebuild Quagga.
45You can use netlink as a dynamic routing update channel between Quagga
paul718e3742002-12-13 20:15:29 +000046and the kernel.
47@end table