Discussion:
Where is options field stored in sk_buff?
(too old to reply)
Kailiang Ying
2016-12-07 20:24:01 UTC
Permalink
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
Kailiang Ying
2016-12-07 21:28:46 UTC
Permalink
Here I mean optional field like Maximum Segment Size, timestamp, Window Scale
Jorgen Grahn
2016-12-08 21:36:36 UTC
Permalink
Post by Kailiang Ying
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.
Post by Kailiang Ying
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 .
Loading...