libbpf-bootstrap
libbpf-bootstrap copied to clipboard
Discussion about socket examples
Greeting,
Thanks for the hard work and great examples.
Since there are more and more SEC types now supported by the kernel:
https://github.com/libbpf/libbpf/blob/4eb6485c08867edaa5a0a81c64ddb23580420340/src/libbpf.c#L9002-L9081
I think it would be great if we could cover more SEC types.
I wonder if I can add an example about SEC(socket), which can get an insight about how to retrieve data from __sk_buff, maybe start from most used UDP and TCP on top of IP protocol.
Do you think it's a good idea?
Sure, sounds like a good idea, if you can keep it simple and not require extra tools (like iproute2) to run it to get some data/output and that won't cause host system misbehaving (e.g., if you start dropping packets). Please give it a try!
Sorry for being late, finally open a PR for porting some simple idea, please see: #97. Thanks you very much!
Addressed by https://github.com/libbpf/libbpf-bootstrap/pull/97