Home
last modified time | relevance | path

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

12

/external/ltp/testcases/network/lib6/
Din6_02.c78 static int sub_if_indextoname_test(unsigned int if_index) in sub_if_indextoname_test() argument
83 TEST((ifname == if_indextoname(if_index, ifname))); in sub_if_indextoname_test()
88 if_index, TST_RET, TST_ERR); in sub_if_indextoname_test()
91 tst_res(TINFO, "if_indextoname(%d) returns NULL", if_index); in sub_if_indextoname_test()
96 if (idx != if_index) { in sub_if_indextoname_test()
99 if_index, ifname, ifname, idx); in sub_if_indextoname_test()
102 tst_res(TINFO, "if_indextoname(%d) returns '%s'", if_index, ifname); in sub_if_indextoname_test()
168 for (i = 0; pini[i].if_index; ++i) { in if_nameindex_test()
169 p = if_indextoname(pini[i].if_index, buf); in if_nameindex_test()
173 pini[i].if_index, pini[i].if_name, in if_nameindex_test()
[all …]
/external/libnl/tests/
Dtest-create-xfrmi.c9 int err, if_index; in main() local
23 if_index = rtnl_link_name2i(link_cache, "eth0"); in main()
24 if (!if_index) { in main()
37 rtnl_link_xfrmi_set_link(link, if_index); in main()
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-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-ipgretap.c10 int err, if_index; in main() local
24 if_index = rtnl_link_name2i(link_cache, "enp0s5"); in main()
25 if (!if_index) { in main()
37 rtnl_link_ipgre_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()
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-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()
/external/usrsctp/usrsctplib/netinet/
Dsctp_userspace.c99 sctp_userspace_get_mtu_from_ifn(uint32_t if_index, int af) in sctp_userspace_get_mtu_from_ifn() argument
105 if (if_indextoname(if_index, ifr.ifr_name) != NULL) { in sctp_userspace_get_mtu_from_ifn()
123 sctp_userspace_get_mtu_from_ifn(uint32_t if_index, int af) in sctp_userspace_get_mtu_from_ifn() argument
144 sctp_userspace_get_mtu_from_ifn(uint32_t if_index, int af) in sctp_userspace_get_mtu_from_ifn() argument
171 if (pAdapt->IfIndex == if_index) { in sctp_userspace_get_mtu_from_ifn()
Dsctp_bsd_addr.c631 ifn->if_index,
724 ifa->ifa_ifp->if_index, ifa->ifa_ifp->if_type, ifa->ifa_ifp->if_xname,
734 ifa->ifa_ifp->if_index,
/external/wpa_supplicant_8/src/ap/
Dvlan_full.c138 int if_index; in br_delif() local
150 if_index = if_nametoindex(if_name); in br_delif()
152 if (if_index == 0) { in br_delif()
161 args[1] = if_index; in br_delif()
193 int if_index; in br_addif() local
210 if_index = if_nametoindex(if_name); in br_addif()
212 if (if_index == 0) { in br_addif()
221 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/rust/crates/nix/src/net/
Dif_.rs11 let if_index = name.with_nix_path(|name| unsafe { libc::if_nametoindex(name.as_ptr()) })?; in if_nametoindex() localVariable
13 if if_index == 0 { in if_nametoindex()
16 Ok(if_index) in if_nametoindex()
/external/dnsmasq/src/
Dforward.c505 int if_index = 0; in receive_query() local
563 if_index = ((struct in_pktinfo*) CMSG_DATA(cmptr))->ipi_ifindex; in receive_query()
571 if_index = ((struct sockaddr_dl*) CMSG_DATA(cmptr))->sdl_index; in receive_query()
580 if_index = ((struct in6_pktinfo*) CMSG_DATA(cmptr))->ipi6_ifindex; in receive_query()
587 if (!indextoname(listen->fd, if_index, ifr.ifr_name) || in receive_query()
588 !iface_check(listen->family, &dst_addr, ifr.ifr_name, &if_index)) in receive_query()
616 &dst_addr, if_index); in receive_query()
618 } else if (forward_query(listen->fd, &source_addr, &dst_addr, if_index, header, (size_t) n, now, in receive_query()
Dnetwork.c103 static int iface_allowed(struct irec** irecp, int if_index, union mysockaddr* addr, in iface_allowed() argument
116 if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1 || !indextoname(fd, if_index, ifr.ifr_name) || in iface_allowed()
181 static int iface_allowed_v6(struct in6_addr* local, int scope, int if_index, void* vparam) { in iface_allowed_v6() argument
201 return iface_allowed((struct irec**) vparam, if_index, &addr, netmask); in iface_allowed_v6()
205 static int iface_allowed_v4(struct in_addr local, int if_index, struct in_addr netmask, in iface_allowed_v4() argument
215 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, struct in_addr netmask,
274 static int complete_context(struct in_addr local, int if_index, struct in_addr netmask, in complete_context() argument
298 if (if_index == param->ind && context->current == context) { in complete_context()
/external/toybox/toys/pending/
Darping.c205 int if_index, recv_len; in arping_main() local
212 get_interface(TT.iface, &if_index, NULL, NULL); in arping_main()
213 src_pk.sll_ifindex = if_index; in arping_main()
/external/ethtool/
Dnet_tstamp-copy.h138 __u32 if_index; member
/external/kernel-headers/original/uapi/linux/
Dnet_tstamp.h153 __u32 if_index; member
/external/libevent/
Devutil.c997 unsigned int if_index; in evutil_getaddrinfo_common_() local
1072 AF_INET6, nodename, &sin6.sin6_addr, &if_index)) { in evutil_getaddrinfo_common_()
1076 sin6.sin6_scope_id = if_index; in evutil_getaddrinfo_common_()
1995 unsigned if_index; in evutil_inet_pton_scope() local
2010 if_index = if_nametoindex(cp + 1); in evutil_inet_pton_scope()
2011 if (if_index == 0) { in evutil_inet_pton_scope()
2013 if_index = strtoul(cp + 1, &check, 10); in evutil_inet_pton_scope()
2017 *indexp = if_index; in evutil_inet_pton_scope()
2142 unsigned int if_index; in evutil_parse_sockaddr_port() local
2213 AF_INET6, addr_part, &sin6.sin6_addr, &if_index)) { in evutil_parse_sockaddr_port()
[all …]
/external/autotest/server/
Dsite_linux_system.py524 if_index = len(self._interfaces)
525 while name_exists(if_name(if_index)):
526 if_index += 1
527 net_dev = NetDev(phy=phy, if_name=if_name(if_index),
/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/bcc/src/cc/frontends/p4/
DREADME.md370 if_index = ipr.link_lookup(ifname=interface_name)[0]
371 ipr.tc("add", "ingress", if_index, "ffff:")
372 ipr.tc("add-filter", "bpf", if_index, ":1", fd=fn.fd,

12