Find the answer to your Linux question:
Results 1 to 3 of 3
Like Tree2Likes
  • 1 Post By gregm
  • 1 Post By docbop
I am trying to understand the implementation of TCP/IP stack in the linux kernel space. And I came across multiple-thing which I am not sure about. 1. What is meaning ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2014
    Posts
    16

    Question TCP/IP stack data structure in the Linux kernel space


    I am trying to understand the implementation of TCP/IP stack in the linux kernel space. And I came across multiple-thing which I am not sure about.

    1. What is meaning of non-linear sk_buff, and how does it differ from linear sk_buff?

    2. If I want to get the timestamp option in the TCP header to obtain Timestamp value and timestamp reply, how can I extract it from sk_buff using tcphdr structure?

    3. Changing the value of the timestamp requires, recalculating the TCP checksum ,right? So how can I do that in terms of functions required in the coding?

  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    1,660
    1) non-linear sk_buff indicates that the buf refers to paged data
    2) if any options exist they immediately follow the tcphdr - so you can calculate the position from the length of the tcphdr struct
    3) To understand what needs to happen to recalculate the checksum I recommend a web search. It does need to be done but you may be able xor the bytes you changed with the checksum.
    ha-as likes this.

  3. #3
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    949
    Here's a description appear it's a wrapper around a standard TCPIP packet.

    How SKBs work
    ha-as likes this.
    A lion does not lose sleep, over the opinion of sheep.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •