#include <linux/bpf.h>
#include <linux/bpf_mprog.h>
#include <linux/netdevice.h>
#include <net/tcx.h>
int tcx_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog)
{ … }
int tcx_prog_detach(const union bpf_attr *attr, struct bpf_prog *prog)
{ … }
void tcx_uninstall(struct net_device *dev, bool ingress)
{ … }
int tcx_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr)
{ … }
static int tcx_link_prog_attach(struct bpf_link *link, u32 flags, u32 id_or_fd,
u64 revision)
{ … }
static void tcx_link_release(struct bpf_link *link)
{ … }
static int tcx_link_update(struct bpf_link *link, struct bpf_prog *nprog,
struct bpf_prog *oprog)
{ … }
static void tcx_link_dealloc(struct bpf_link *link)
{ … }
static void tcx_link_fdinfo(const struct bpf_link *link, struct seq_file *seq)
{ … }
static int tcx_link_fill_info(const struct bpf_link *link,
struct bpf_link_info *info)
{ … }
static int tcx_link_detach(struct bpf_link *link)
{ … }
static const struct bpf_link_ops tcx_link_lops = …;
static int tcx_link_init(struct tcx_link *tcx,
struct bpf_link_primer *link_primer,
const union bpf_attr *attr,
struct net_device *dev,
struct bpf_prog *prog)
{ … }
int tcx_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
{ … }