[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: netlink


>1)  Where can I get information (document, other than source codes)
>about 'netlik'?

Kick-off documentation:

>2) Is 'netlink' a collection of functions and data structures to be used
>during a system call, or a server process (daemon) whihc processes
>user/appication requests asynchronously?  In other words, when an
>application such as tc sends a netlink message to the kernel, is this
>message going to be sent, processed and returned or is this message
>going to be sent to a netlink daemon and let the netlink sever processes
>the requests?

Netlink/Rtnetlink is a socket-based interface available in Linux and used to
tranfer information between the user-level (mainly iproute2) and the kernel;
as you will find in the above links, in each netlink message you can insert
an rtnetlink message, which is used  to manage many kernel objects, such as
routing tables, or traffic control elements (queuing disciplines, filters,
and so on...).
To add/modify/remove each of these objects you should use the macros defined
in the kernel (see include/linux/netlink.h and include/linux/rtnetlink.h),
but it's rather difficult! BTW you can use the API defined in the iproute2
package (see libnetlink.c).
Best regards.
Fabrizio Salvatore

Fabrizio Salvatore
CoRiTeL  http://www.coritel.it  MAILTO:salvatore@coritel.it