Re: Doubt on dev field in struct packet_type

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

 



On 7/16/07, Rajendra Stalekar <rajendra.stalekar@xxxxxxxxx> wrote:
Hi,

In the struct packet_type, the description for struct net_device *dev , is
said to be the parameter which would allow to have different protocol
handlers for different devices or one protocol handler for a specific
device.

I don't understand how this can be done, because the frames which comes to
us through an interface , is not processed but queued into the
input_pkt_queue before being processed by the driver, so only when the
driver processes frames will can it notify the network layer which protocol
handler to execute.

I am not able to understand you clearly here.
BTW driver's interrupt handler is the first routine which gets the
packet isn't it.
So technically speaking you cannot say that driver processes packet
after it is put in the input_pkt_queue. It is queued there but is
moved to the correct queue by the driver's poll method (in new drivers
i mean).


So it means that we need to have all the protocol handlers for all devices.

What do you mean by We? Driver author or what?
Do you mean packet type handler ?
If so, then it is invoked in deliver_skb() depending on the type of
the packet i guess. So you don't have to worry about type of the
packet's handler. Just set the correct type and forget. Thats the
advantage of an object oriented approach.

I am still not very clear in what you asked.
Or may be i am disillusioned. :)

Feel free to rectify me.

Thanks
--psr


I would appreciate if you could provide an explanantion on this.





Regards,

Rajendra Stalekar(extn 2016)

Location:- Akruti

Mobile no:- +91 9860501143






--
play the game

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux