[libbpf] Questions about XDP/TC


1. How do I attach `BPF_PROG_TYPE_SCHED_CLS`/`classifier` BPF programs to specific data path(i.e. ingress or egress) using libbpf ?
I found some comments related in the source:
The **BPF_F_INGRESS** value in *flags* is used to make the distinction (ingress path is selected if the flag is present, egress path otherwise).
How can I get that flag, am I missing something ?
2. How do I attach `XDP` BPF programs using specific mode(i.e. xdpgeneric/xdpdrv)?
I tried googling but most of them lead to tc/ip tools. Thanks in advance.

Join iovisor-dev@lists.iovisor.org to automatically receive all group messages.