LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-27-2014, 08:53 PM   #1
georgewhr
Member
 
Registered: Nov 2012
Location: SF Bay Area
Posts: 47

Rep: Reputation: Disabled
Cast to tcphdr from sk_buff


I recetnly found an operation that cast sk_buff to tcphdr as below:

tcp = (struct tcphdr *)((sb->data) + (sb->nh.iph->ihl * 4));

Can any body explain how that works? Why that is multiple of 4?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
netfilter hook---kernel module---skb_transport_header--- tcphdr fields wrong values abhishek@LQ Linux - Networking 4 05-26-2010 06:21 AM
netfilter hook---kernel module---skb_transport_header--- tcphdr fields wrong values abhishek@LQ Linux - Security 1 04-01-2010 08:07 AM
error: ‘struct tcphdr’ has no member named ‘th_flags’ nasim751 Linux - Software 0 04-17-2008 05:55 AM
tcphdr venkatesh111 Programming 1 04-02-2006 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration