Messages in this thread | | | Date | Tue, 7 Mar 2000 16:14:01 +0100 | From | Jan Kasprzak <> | Subject | struct packet_type.func() prototype |
| |
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/
| |