|
Hi, I would like to query which XDP program (if any) is attached to an interface and trying to figure out if there is support for that. I managed to make it work by extending the wrappers around the main PS. There is a |
Replies: 1 comment 7 replies
|
Without further information, it might be hard to get from a Link to an interface. In addition, Link is only supported for Linux kernel version 5.7 and newer iirc. Instead of querying the |
Without further information, it might be hard to get from a Link to an interface. In addition, Link is only supported for Linux kernel version 5.7 and newer iirc.
Instead of querying the
BPFsyscall, I would recomment to walk the interfaces usingrtnetlink. As shown in the example, one can query all interfaces quite easily and then further check theXDPelement in theLinkAttributesin the returnedLinkMessage.LinkXDPholdsFD, which can be used as argument toNewProgramFromFD()to resolve the eBPF program.