struct packet_type.func() prototype

From: Jan Kasprzak (kas@informatics.muni.cz)
Date: Tue Mar 07 2000 - 10:14:01 EST


        Hello,

        during my working on the syncppp.c modifications I tried
to dig into the way input packets are processed. I have two questions
about the struct packet_type, and its input processing function
- the struct packet_type.func(), which is defined as follows (in
<linux/netdevice.h>):

int (*func) (struct sk_buff *, struct net_device *, struct packet_type *);

The first question is - what is this function expected to return?
Most instances of this function simply returns zero. This function
is called from several places in linux/net/core/dev.c, but the return value
is ignored.

And the second one: What is the third parameter for? It seems it is
always called with the struct packet_type * corresponding to
skb->protocol. Syncppp and ipv4 do not use this parameter (according
to quick look at the source code, I might have missed something).

        Thanks,

-Yenya

-- 
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz>       http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz   0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\             Czech Linux Homepage:  http://www.linux.cz/              ///
 Its purely bandwidth.  If it was 40 instances of Miguel reading web pages
flat out over 100baseT you would definitely be right. But its not...  (Alan)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:22 EST