On 7/16/07, Rajendra Stalekar <rajendra.stalekar@xxxxxxxxx> wrote:
-----Original Message----- From: pradeep singh [mailto:2500.pradeep@xxxxxxxxx] Sent: Monday, July 16, 2007 3:47 PM To: rajendra.stalekar@xxxxxxxxx Cc: kernelnewbies@xxxxxxxxxxxx Subject: Re: Doubt on dev field in struct packet_type On 7/16/07, Rajendra Stalekar <rajendra.stalekar@xxxxxxxxx> wrote:
[snip]
>> What I meant by driver processing the packet implied that the poll method of the driver processing it. What I haven't got in your above statement is the "correct queue by the driver's poll method?" Isn't there only one kernel queue for the network layer to access?
accessing and moving are different.pkt_input_queue packets need to be moved to some where else i.e a different queue or in the same queue at the end prfereably(this is just and example)after they have been processed.
[...]
>> What I meant to ask, was the struct net_device *dev in packet_type structure mentioned that different protocol handlers for different devices or a protocol handler for a specific device? This is what I didn't get? Can you tell me what this field struct net_device *dev in packet_type structure do?
I dont know, but it is NULL. I guess it may be of use but i cant thing of why would i force a certain packet type to a net_device structure. May be useful for VLAN and bonding drivers, which are the only techniques seem to be bound to this field. Else there is no use of putting of net_device field there i think. You need to worry about handler, there is usually not a specific protocol handler for a device. A device tied to just one protocol looks too restrictive and i am not aware of such device(s). BTW driver author does not have to worry about protocol handlers, you just set the correct protocol type in your interrupt routine[refer my earlier reply], and the correct handler is invoked without driver's knowledge.
My other query is when do we use ptype_all and ptype_base?
packet types. Not evey packets received is of same type, some are arp apckets, some are ICMP, some raw packets and so on so forth. There two variables help you in finding the list of these packet types near to you in an easy way. Does this answer(s) your queries? thanks
Regards, Rajendra S. 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
-- 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