Lines Matching refs:ifindex
19 static unsigned int ifindex; variable
34 .ifindex = ifindex, in cleanup()
49 err = bpf_xdp_attach(ifindex, -1, 0, NULL); in cleanup()
57 err = bpf_xdp_attach(ifindex, -1, XDP_FLAGS_REPLACE, &opts); in cleanup()
91 static void parse_options(int argc, char *argv[], unsigned int *ifindex, __u32 *prog_id, in parse_options() argument
114 *ifindex = 0; in parse_options()
133 *ifindex = if_nametoindex(optarg); in parse_options()
134 if (*ifindex == 0) in parse_options()
182 if (*ifindex != 0 && *prog_id != 0) in parse_options()
184 if (*ifindex == 0 && *prog_id == 0) in parse_options()
188 static int syncookie_attach(const char *argv0, unsigned int ifindex, bool tc) in syncookie_attach() argument
232 .ifindex = ifindex, in syncookie_attach()
253 err = bpf_xdp_attach(ifindex, prog_fd, in syncookie_attach()
372 parse_options(argc, argv, &ifindex, &prog_id, &tcpipopts, &ports, in main()
377 err = bpf_xdp_query_id(ifindex, 0, &prog_id); in main()
385 err = syncookie_attach(argv[0], ifindex, tc); in main()