Re: Parsing TCP Header Options In XDP/BPF

Toke Høiland-Jørgensen <[email protected]>
Newsgroups org.kernel.vger.xdp-newbies
Message-ID <[email protected]>
Christian Deacon <[email protected]> writes:

> Hi everyone,
>
>
> I wasn't sure whether to submit this under XDP's mailing list or BPF's. 
> However, since it's an XDP program, I figured I'd start here. The issue 
> has to do with the BPF verifier, though.
>
>
> I am trying to parse TCP header options within XDP/BPF. In my case, I 
> want to locate the 'timestamps' option and read/write to the sender and 
> receive timestamps (the option's data, which is eight bytes in total I 
> believe).

We're doing just this in the 'pping' utility, see code here:
https://github.com/xdp-project/bpf-examples/blob/master/pping/pping_kern.c#L83

-Toke
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.