Extracting UDP header from skb while forwarding

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

 



Hello All,

   My queuing discipline requires me to access destination port for UDP packets that I am sending. When I have machine A sending to machine B, a simple code like
struct udphdr* udp_header = udp_hdr(skb) works fine. 

 However, when I have A sending data to C through B (i.e. B as forwarding engine), I find that both, 
skb->transport_header and skb_network_header are equal when accessed from queuing discipline code. How can I access transport_header then? 

I tried extracting it from skb->data but the code keeps crashing. Could anyone please tell me how can I access transport header from queuing disciplines code then? I know machine B should not be looking at transport layer fields. But I need to do it for testing some functionality.

Thanks in advance!
Shrikrishna



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
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