• Where is options field stored in sk_buff?

    From Kailiang Ying@21:1/5 to All on Wed Dec 7 12:24:01 2016
    Both ip and tcp header can contains options field. I am wondering where is options field stored in kernel packet data structure sk_buff?

    Originally, I thought the data should be inside sk_buff->cb. When I spoof a tcp timestamp options packet and use loadable kernel module to print out the sk_buff->cb. The sk_buff->cb are all zero. Any idea where does options field stored in sk_buff?

    Thanks for any response

    Kailiang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kailiang Ying@21:1/5 to All on Wed Dec 7 13:28:46 2016
    Here I mean optional field like Maximum Segment Size, timestamp, Window Scale

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jorgen Grahn@21:1/5 to Kailiang Ying on Thu Dec 8 21:36:36 2016
    On Wed, 2016-12-07, Kailiang Ying wrote:
    Both ip and tcp header can contains options field. I am wondering
    where is options field stored in kernel packet data structure
    sk_buff?

    You mean the /Linux/ kernel sk_buff. Other operating systems
    represent network packets in different ways.

    Originally, I thought the data should be inside sk_buff->cb. When I
    spoof a tcp timestamp options packet and use loadable kernel module
    to print out the sk_buff->cb. The sk_buff->cb are all zero. Any idea
    where does options field stored in sk_buff?

    The best way to find out is probably to read existing Linux kernel
    code which uses those fields. The tcp and the netfilter code, for
    example. I don't think any books describe that; there are probably
    only a handful of people in the world who would need such a book.

    Some books describe struct sk_buff in more general terms.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)