[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2.6.x kernels - use of exported symbols/functions
> do you know of the kernel API functions that are used to built a sk_buff?
>
> i am interested in where the kernel actually fills the struct sk_buff that
> is about to be transmitted by the network card.
> the struct is not filled in the driver level, because (i believe) the
> driver already gets a 'ready-to-take-off' sk_buff that can be send.
> maybe the function that calls the xmit() function of the corresponding
> driver, builts the sk_buff. but actually, i dont know for sure.
>
> there must be a function or several that are responsible for the correct
> filling of a sk_buff struct, depending on the desired packet, like syn or
> rst flag set.
>
> hope i've made myself clear enough.
There is a Kernel API called dev_queue_xmit. Actually
this function calls the xmit function of the device.
The layer upper to the driver is the network layer. So
each type of these fills the sk_buff, before giving
to the driver.
Eg:- IPv4, IPv6,etc... (it will be there in the
protocol specific codes).
---- net/ipv4/arp.c: dev_queue_xmit(skb);
Then calls the dev_queue_xmit. And I think dev_queue_xmit
handles the network QOS.
I've not gone deep into it. But went through the
code in brief.
Pls do try a grep in source...
Regards,
Shine Mohamed
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/