Lines Matching full:ifindex
33 int ifindex; member
58 int ifindex; member
226 static int netlink_get_class(int sock, unsigned int nl_pid, int ifindex, in netlink_get_class() argument
237 .t.tcm_ifindex = ifindex, in netlink_get_class()
265 static int netlink_get_qdisc(int sock, unsigned int nl_pid, int ifindex, in netlink_get_qdisc() argument
276 .t.tcm_ifindex = ifindex, in netlink_get_qdisc()
304 static int netlink_get_filter(int sock, unsigned int nl_pid, int ifindex, int handle, in netlink_get_filter() argument
315 .t.tcm_ifindex = ifindex, in netlink_get_filter()
383 netinfo->devices[netinfo->used_len].ifindex = ifinfo->ifi_index; in dump_link_nlmsg()
436 filter_info->devname, filter_info->ifindex); in dump_filter_nlmsg()
476 ret = bpf_prog_query_opts(dev->ifindex, loc, &optq); in __show_dev_tc_bpf()
482 NET_DUMP_UINT("ifindex", "(%u)", (unsigned int)dev->ifindex); in __show_dev_tc_bpf()
535 ret = netlink_get_class(sock, nl_pid, dev->ifindex, in show_dev_tc_bpf_classic()
541 ret = netlink_get_qdisc(sock, nl_pid, dev->ifindex, in show_dev_tc_bpf_classic()
547 filter_info.ifindex = dev->ifindex; in show_dev_tc_bpf_classic()
550 ret = netlink_get_filter(sock, nl_pid, dev->ifindex, in show_dev_tc_bpf_classic()
560 ret = netlink_get_filter(sock, nl_pid, dev->ifindex, handle, in show_dev_tc_bpf_classic()
567 ret = netlink_get_filter(sock, nl_pid, dev->ifindex, handle, in show_dev_tc_bpf_classic()
574 ret = netlink_get_filter(sock, nl_pid, dev->ifindex, handle, in show_dev_tc_bpf_classic()
622 int ifindex; in net_parse_dev() local
627 ifindex = if_nametoindex(**argv); in net_parse_dev()
628 if (!ifindex) in net_parse_dev()
637 return ifindex; in net_parse_dev()
641 int ifindex, bool overwrite) in do_attach_detach_xdp() argument
654 return bpf_xdp_attach(ifindex, progfd, flags, NULL); in do_attach_detach_xdp()
669 static int do_attach_tcx(int progfd, enum net_attach_type attach_type, int ifindex) in do_attach_tcx() argument
673 return bpf_prog_attach(progfd, ifindex, type, 0); in do_attach_tcx()
686 int progfd, ifindex, err = 0; in do_attach() local
704 ifindex = net_parse_dev(&argc, &argv); in do_attach()
705 if (ifindex < 1) { in do_attach()
726 err = do_attach_detach_xdp(progfd, attach_type, ifindex, overwrite); in do_attach()
731 err = do_attach_tcx(progfd, attach_type, ifindex); in do_attach()
753 int progfd, ifindex, err = 0; in do_detach() local
766 ifindex = net_parse_dev(&argc, &argv); in do_detach()
767 if (ifindex < 1) in do_detach()
777 err = do_attach_detach_xdp(progfd, attach_type, ifindex, NULL); in do_detach()
782 err = do_detach_tcx(ifindex, attach_type); in do_detach()