Packet rcv question
Hi,
I have a question regarding dev.c::netif_receive_skb(struct sk_buff *skb).
Supposedly this function delivers incoming packets to various protocols
(IP, ARP, ...)
I am looking at the following loop:
list_for_each_entry_rcu(ptype, &ptype_all, list) {
if (!ptype->dev || ptype->dev == skb->dev) {
if (pt_prev)
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = ptype;
}
}
and don't understand why the delivery of a given packet type depends on
the next packet type in the list.
Why not to use
ret = deliver_skb (skb, ptype, orig_dev);
What did I miss?
Thanks!
|