Lines Matching refs: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()
382 netinfo->devices[netinfo->used_len].ifindex = ifinfo->ifi_index; in dump_link_nlmsg()
433 filter_info->devname, filter_info->ifindex); in dump_filter_nlmsg()
473 ret = bpf_prog_query_opts(dev->ifindex, loc, &optq); in __show_dev_tc_bpf()
479 NET_DUMP_UINT("ifindex", "(%u)", dev->ifindex); in __show_dev_tc_bpf()
532 ret = netlink_get_class(sock, nl_pid, dev->ifindex, in show_dev_tc_bpf_classic()
538 ret = netlink_get_qdisc(sock, nl_pid, dev->ifindex, in show_dev_tc_bpf_classic()
544 filter_info.ifindex = dev->ifindex; in show_dev_tc_bpf_classic()
547 ret = netlink_get_filter(sock, nl_pid, dev->ifindex, in show_dev_tc_bpf_classic()
557 ret = netlink_get_filter(sock, nl_pid, dev->ifindex, handle, in show_dev_tc_bpf_classic()
564 ret = netlink_get_filter(sock, nl_pid, dev->ifindex, handle, in show_dev_tc_bpf_classic()
571 ret = netlink_get_filter(sock, nl_pid, dev->ifindex, handle, in show_dev_tc_bpf_classic()
619 int ifindex; in net_parse_dev() local
624 ifindex = if_nametoindex(**argv); in net_parse_dev()
625 if (!ifindex) in net_parse_dev()
634 return ifindex; in net_parse_dev()
638 int ifindex, bool overwrite) in do_attach_detach_xdp() argument
651 return bpf_xdp_attach(ifindex, progfd, flags, NULL); in do_attach_detach_xdp()
666 static int do_attach_tcx(int progfd, enum net_attach_type attach_type, int ifindex) in do_attach_tcx() argument
670 return bpf_prog_attach(progfd, ifindex, type, 0); in do_attach_tcx()
683 int progfd, ifindex, err = 0; in do_attach() local
701 ifindex = net_parse_dev(&argc, &argv); in do_attach()
702 if (ifindex < 1) { in do_attach()
723 err = do_attach_detach_xdp(progfd, attach_type, ifindex, overwrite); in do_attach()
728 err = do_attach_tcx(progfd, attach_type, ifindex); in do_attach()
750 int progfd, ifindex, err = 0; in do_detach() local
763 ifindex = net_parse_dev(&argc, &argv); in do_detach()
764 if (ifindex < 1) in do_detach()
774 err = do_attach_detach_xdp(progfd, attach_type, ifindex, NULL); in do_detach()
779 err = do_detach_tcx(ifindex, attach_type); in do_detach()