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

RE: netlink




Hi,

I would like to ask a few follow-up questions about the netlink/rtnetlink
and traffic control elements.

----------------------------------------------------
Andrew Do-Sung Jun
Network Architecture Laboratory (NAL)
Department of Electrical and Computer Engineering
University of Toronto
Toronto, Ontario, Canada  M5S 3G4
Phone: (416)978-4829	Fax: (416)978-4425
Email: ajun@comm.utoronto.ca | ajun@nal.utoronto.ca
URL: www.comm.utoronto.ca/~ajun/
----------------------------------------------------



> >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;

It seems to me that netlink is a message passing mechanism between a user
process (such as TC) and the kernel, which is different from a system 
call. Then, which kernel mechanism/process is responsible for receiving
and processing the message, and how is it triggered to work at all?
(As far as I understand, all the parts of the Linux kernel, including the
scheduler and the bottom-half handlers, are operated/activated through 
system calls and interrupts.)


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

Again, who is actually responsible for the management? (Any daemons?)
Are the traffic control elements are implemented independently or as
a part of a network device driver?


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


If I want to extend/modify the netlink/rtnetlink functionality (the
kernel side), what do we have to do?  Any documentation available?  If
not, which source code to look at?


I appreciate your help in advance.

	- Andrew