RE: dev.c - how can i get IPheader's ID without skb->nh.iph->id which fails here

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

 



> -----Original Message-----
> From: Adam Flizikowski [mailto:adam_fli@poczta.onet.pl] 
>
> So how can i get this "id" field aletrnatively (without calling
> skb-?nh.iph->id) ????

You can not access the IP header this way until something has set the
pointer.  The device driver calling netif_rx() has no idea about IP, so it
does not set the pointer.  For all you know, the packet may not be IP, but
something completely different (IT'S...).  Either examine the packet *after*
the IP protocol handler has processed it and set the pointer, or parse
skb->data yourself to find the IP information (blah!).

(Is that correct gurus?)

-- 
Dan Eble <dane@aiinet.com>  _____  .
                           |  _  |/|
Applied Innovation Inc.    | |_| | |            "All Protocols MUST be odd"
http://www.aiinet.com/     |__/|_|_|              -- RFC 1661 (PPP)
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux