Home
last modified time | relevance | path

Searched refs:if_index (Results 1 – 25 of 26) sorted by relevance

12

/external/ltp/testcases/network/lib6/
Din6_02.c107 int sub_i2ntest(unsigned int if_index) in sub_i2ntest() argument
112 TEST((ifname == if_indextoname(if_index, ifname))); in sub_i2ntest()
116 "but errno %d != ENXIO", if_index, TEST_RETURN, in sub_i2ntest()
120 tst_resm(TINFO, "if_indextoname(%d) returns NULL", if_index); in sub_i2ntest()
125 if (idx != if_index) { in sub_i2ntest()
128 if_index, ifname, ifname, idx); in sub_i2ntest()
131 tst_resm(TINFO, "if_indextoname(%d) returns \"%s\"", if_index, ifname); in sub_i2ntest()
195 for (i = 0; pini[i].if_index; ++i) { in initest()
196 p = if_indextoname(pini[i].if_index, buf); in initest()
200 pini[i].if_index, pini[i].if_name, in initest()
[all …]
/external/libnl/tests/
Dtest-create-ip6tnl.c10 int err, if_index; in main() local
24 if_index = rtnl_link_name2i(link_cache, "ens33"); in main()
25 if (!if_index) { in main()
37 rtnl_link_ip6_tnl_set_link(link, if_index); in main()
Dtest-create-ipvti.c10 int err, if_index; in main() local
24 if_index = rtnl_link_name2i(link_cache, "ens33"); in main()
25 if (!if_index) { in main()
37 rtnl_link_ipvti_set_link(link, if_index); in main()
Dtest-create-sit.c10 int err, if_index; in main() local
24 if_index = rtnl_link_name2i(link_cache, "eno16777736"); in main()
25 if (!if_index) { in main()
37 rtnl_link_sit_set_link(link, if_index); in main()
Dtest-create-ipip.c10 int err, if_index; in main() local
24 if_index = rtnl_link_name2i(link_cache, "eno16777736"); in main()
25 if (!if_index) { in main()
37 rtnl_link_ipip_set_link(link, if_index); in main()
Dtest-create-ipgre.c10 int err, if_index; in main() local
24 if_index = rtnl_link_name2i(link_cache, "eno16777736"); in main()
25 if (!if_index) { in main()
37 rtnl_link_ipgre_set_link(link, if_index); in main()
/external/wpa_supplicant_8/src/ap/
Dvlan_full.c137 int if_index; in br_delif() local
146 if_index = if_nametoindex(if_name); in br_delif()
148 if (if_index == 0) { in br_delif()
157 args[1] = if_index; in br_delif()
188 int if_index; in br_addif() local
197 if_index = if_nametoindex(if_name); in br_addif()
199 if (if_index == 0) { in br_addif()
208 args[1] = if_index; in br_addif()
/external/scapy/scapy/arch/windows/
D__init__.py704 def dev_from_index(self, if_index): argument
707 if iface.win_index == str(if_index):
709 if str(if_index) == "1":
713 raise ValueError("Unknown network interface index %r" % if_index)
775 def dev_from_index(if_index): argument
777 return IFACES.dev_from_index(if_index)
858 if_index = re.search(_pattern, _buffer[3]).group(1)
860 res[if_index] = if_metric
935 if_index = line[0]
936 iface = dev_from_index(if_index)
[all …]
/external/dnsmasq/src/
Dforward.c583 int if_index = 0; in receive_query() local
652 if_index = ((struct in_pktinfo *)CMSG_DATA(cmptr))->ipi_ifindex; in receive_query()
661 if_index = ((struct sockaddr_dl *)CMSG_DATA(cmptr))->sdl_index; in receive_query()
672 if_index =((struct in6_pktinfo *)CMSG_DATA(cmptr))->ipi6_ifindex; in receive_query()
679 if (!indextoname(listen->fd, if_index, ifr.ifr_name) || in receive_query()
680 !iface_check(listen->family, &dst_addr, ifr.ifr_name, &if_index)) in receive_query()
712 m, &source_addr, &dst_addr, if_index); in receive_query()
715 else if (forward_query(listen->fd, &source_addr, &dst_addr, if_index, in receive_query()
Dnetwork.c122 static int iface_allowed(struct irec **irecp, int if_index, in iface_allowed() argument
138 !indextoname(fd, if_index, ifr.ifr_name) || in iface_allowed()
213 int scope, int if_index, void *vparam) in iface_allowed_v6() argument
237 return iface_allowed((struct irec **)vparam, if_index, &addr, netmask); in iface_allowed_v6()
241 static int iface_allowed_v4(struct in_addr local, int if_index, in iface_allowed_v4() argument
255 return iface_allowed((struct irec **)vparam, if_index, &addr, netmask); in iface_allowed_v4()
Ddhcp.c27 static int complete_context(struct in_addr local, int if_index,
305 static int complete_context(struct in_addr local, int if_index, in complete_context() argument
335 if (if_index == param->ind && context->current == context) in complete_context()
/external/toybox/toys/pending/
Darping.c206 int if_index, recv_len; in arping_main() local
213 get_interface(TT.iface, &if_index, NULL, NULL); in arping_main()
214 src_pk.sll_ifindex = if_index; in arping_main()
Dip.c459 for (i = if_ni; i->if_index && i->if_name; i++) in get_ifaceindex()
461 index = i->if_index; in get_ifaceindex()
/external/autotest/server/
Dsite_linux_system.py465 if_index = len(self._interfaces)
466 while name_exists(if_name(if_index)):
467 if_index += 1
468 net_dev = NetDev(phy=phy, if_name=if_name(if_index),
/external/kernel-headers/original/uapi/linux/
Dnet_tstamp.h139 __u32 if_index; member
/external/scapy/test/
Dmock_windows.uts38 def dev_from_index_custom(if_index):
48 if iface.win_index == str(if_index):
50 raise ValueError("Unknown network interface index %r" % if_index)
/external/ipsec-tools/src/racoon/
Dgrabmyaddr.c288 for (p = p0; p && p->if_index && p->if_name; p++) { in if_maxindex()
289 if (max < p->if_index) in if_maxindex()
290 max = p->if_index; in if_maxindex()
/external/libnfnetlink/include/libnfnetlink/
Dlibnfnetlink.h231 unsigned int if_index,
/external/v8/src/ic/
Dkeyed-store-generic.cc920 Label if_index(this), if_unique_name(this), slow(this); in KeyedStoreGeneric() local
931 TryToName(name, &if_index, &var_index, &if_unique_name, &var_unique, &slow); in KeyedStoreGeneric()
933 Bind(&if_index); in KeyedStoreGeneric()
Daccessor-assembler.cc1655 Label if_index(this), if_unique_name(this), slow(this); in KeyedLoadICGeneric() local
1662 TryToName(p->name, &if_index, &var_index, &if_unique_name, &var_unique, in KeyedLoadICGeneric()
1665 Bind(&if_index); in KeyedLoadICGeneric()
/external/libnl/doc/
Droute.txt904 if ((err = rtnl_link_ipip_set_link(link, if_index)) < 0)
982 if ((err = rtnl_link_ipgre_set_link(link, if_index)) < 0)
1060 if ((err = rtnl_link_sit_set_link(link, if_index)) < 0)
1124 if ((err = rtnl_link_ipvti_set_link(link, if_index)) < 0)
1189 rtnl_link_ip6_tnl_set_link(link, if_index);
/external/libpcap/
Dpcap-dlpi.c1786 return (ifnet.if_index);
/external/python/cpython3/Modules/
Dsocketmodule.c6228 for (i = 0; ni[i].if_index != 0 && i < INT_MAX; i++) {
6230 ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
/external/python/cpython3/Doc/library/
Dsocket.rst851 .. function:: if_indextoname(if_index)
/external/python/cpython3/
Dconfigure.ac3772 ]], [[struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;]])],

12