Re: Attach BPF program to socket in BCC Python
Paul Chaignon
On Sat, Jul 07, 2018 at 09:18:44PM +0200, spyff wrote:
There's a BPF.attach_raw_socket method to help you with that. For examples, see https://github.com/iovisor/bcc/tree/master/examples/networking/http_filter, https://github.com/iovisor/bcc/tree/master/examples/networking/vlan_filter, and https://github.com/iovisor/bcc/blob/master/examples/networking/dns_matching/dns_matching.py. In C its easy with setsockopt SO_ATTACH_BPF but I'm not sure if its
|
|