On Tue, Oct 19, 2021 at 8:13 AM Federico Parola <federico.par...@polito.it> wrote: > > Dear all, > how can I access the payload of the packet in a program attached to the > TC egress hook (SCHED_CLS attached to clsact qdisc)? > ctx->data_end points to the end of the L4 header, while on the ingress > hook it points to the end of the packet (tested on kernel v5.14).
This could be the case that linear data only covers up to the end of L4 header. In such cases, you can use bpf_skb_pull_data() helper to get more data into linear region and after that your ctx->data_end will point to much later packet data. > > Best regards, > Federico Parola > > > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#2003): https://lists.iovisor.org/g/iovisor-dev/message/2003 Mute This Topic: https://lists.iovisor.org/mt/86442134/21656 Group Owner: iovisor-dev+ow...@lists.iovisor.org Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-