/freebsd-current/usr.sbin/arp/ |
H A D | arp.h | 6 int print_entries_nl(uint32_t ifindex, struct in_addr addr); 18 int print_entries_nl(uint32_t ifindex, struct in_addr addr); 19 int delete_nl(uint32_t ifindex, char *host); 20 int set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl,
|
H A D | arp_netlink.c | 55 get_link_info(struct snl_state *ss, uint32_t ifindex, argument 65 ifmsg->ifi_index = ifindex; 83 has_l2(struct snl_state *ss, uint32_t ifindex) argument 87 if (!get_link_info(ss, ifindex, &link)) 125 /* No route found, unable to guess ifindex */ 157 /* No nexthop found, unable to guess ifindex */ 169 fix_ifindex(struct snl_state *ss, uint32_t ifindex, struct in_addr addr) argument 171 if (ifindex == 0) 172 ifindex = guess_ifindex(ss, get_myfib(), addr); 173 return (ifindex); 271 print_entries_nl(uint32_t ifindex, struct in_addr addr) argument 330 delete_nl(uint32_t ifindex, char *host) argument 379 set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl, char *host) argument [all...] |
/freebsd-current/usr.sbin/ndp/ |
H A D | ndp.h | 22 int print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag); 23 int delete_nl(uint32_t ifindex, char *host, bool warn); 24 int set_nl(uint32_t ifindex, struct sockaddr_in6 *dst, struct sockaddr_dl *sdl,
|
H A D | ndp_netlink.c | 68 get_link_info(struct snl_state *ss, uint32_t ifindex, argument 78 ifmsg->ifi_index = ifindex; 96 has_l2(struct snl_state *ss, uint32_t ifindex) argument 100 if (!get_link_info(ss, ifindex, &link)) 161 /* No route found, unable to guess ifindex */ 193 /* No nexthop found, unable to guess ifindex */ 205 fix_ifindex(struct snl_state *ss, uint32_t ifindex, const struct sockaddr_in6 *sa) argument 207 if (ifindex == 0) 208 ifindex = guess_ifindex(ss, get_myfib(), sa); 209 return (ifindex); 314 print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag) argument 395 delete_nl(uint32_t ifindex, char *host, bool warn) argument 467 set_nl(uint32_t ifindex, struct sockaddr_in6 *dst, struct sockaddr_dl *sdl, char *host) argument [all...] |
/freebsd-current/lib/libc/net/ |
H A D | if_indextoname.c | 47 * char *if_indextoname(unsigned int ifindex, char *ifname); 61 if_indextoname(unsigned int ifindex, char *ifname) argument 66 if (ifindex == 0) { 77 ifindex == LLINDEX((struct sockaddr_dl*)ifa->ifa_addr))
|
H A D | sourcefilter.c | 86 int ifindex; local 92 ifindex = 0; 97 * supplied IPv4 address. We should really use the ifindex 121 ifindex = LLINDEX(&psu->sdl); 125 assert(ifindex != 0); 129 return (ifindex); 149 uint32_t ifindex; local 161 ifindex = __inaddr_to_index(interface.s_addr); 162 if (ifindex == 0) { 188 err = setsourcefilter(s, ifindex, (struc 218 uint32_t ifindex, onumsrc; local [all...] |
/freebsd-current/usr.bin/netstat/ |
H A D | common.c | 91 int ifindex = 0, size; local 100 * since we need #ifindex -> if_xname match 111 ifindex = sdl->sdl_index; 113 if (ifindex >= ifmap_size) { 114 size = roundup2(ifindex + 1, 32) * 122 ifmap_size = roundup2(ifindex + 1, 32); 125 if (*ifmap[ifindex].ifname != '\0') 128 strlcpy(ifmap[ifindex].ifname, ifa->ifa_name, IFNAMSIZ);
|
/freebsd-current/sbin/ifconfig/ |
H A D | af_nd6.c | 102 int ifindex; local 109 /* ifindex = 0 means to remove default if */ 110 ifindex = 0; 113 } else if ((ifindex = if_nametoindex(ndifreq.ifname)) == 0) { 118 ndifreq.ifindex = ifindex; 128 unsigned int ifindex; local 133 ifindex = if_nametoindex(ndifreq.ifname); 139 return (ndifreq.ifindex == ifindex); [all...] |
/freebsd-current/sys/netpfil/ipfw/ |
H A D | ip_fw_iface.c | 65 uint16_t ifindex); 67 uint16_t ifindex); 179 * Retrieves ifindex for given @name. 181 * Returns ifindex or 0. 187 int ifindex; local 189 ifindex = 0; 192 ifindex = ifp->if_index; 196 return (ifindex); 350 iif->ifindex = ipfw_kiflookup(name); 351 if (iif->ifindex ! 419 handle_ifattach(struct ip_fw_chain *ch, struct ipfw_iface *iif, uint16_t ifindex) argument 440 handle_ifdetach(struct ip_fw_chain *ch, struct ipfw_iface *iif, uint16_t ifindex) argument [all...] |
/freebsd-current/contrib/wpa/src/drivers/ |
H A D | netlink.h | 25 int netlink_send_oper_ifla(struct netlink_data *netlink, int ifindex,
|
H A D | driver_wired_common.h | 25 int wired_multicast_membership(int sock, int ifindex, const u8 *addr, int add);
|
H A D | linux_ioctl.c | 153 int ifindex; local 155 ifindex = if_nametoindex(ifname); 156 if (ifindex == 0) 161 ifr.ifr_ifindex = ifindex; 178 int ifindex; local 180 ifindex = if_nametoindex(ifname); 181 if (ifindex == 0) 186 ifr.ifr_ifindex = ifindex;
|
H A D | netlink.c | 169 int netlink_send_oper_ifla(struct netlink_data *netlink, int ifindex, argument 191 req.ifinfo.ifi_index = ifindex; 214 wpa_printf(MSG_DEBUG, "netlink: Operstate: ifindex=%d linkmode=%d (%s), operstate=%d (%s)", 215 ifindex, linkmode, linkmode_str(linkmode),
|
/freebsd-current/usr.sbin/rtsold/ |
H A D | cap_sendmsg.c | 83 sendpacket(int sock, struct sockaddr_in6 *dst, uint32_t ifindex, int hoplimit, argument 111 pi->ipi6_ifindex = ifindex; 124 probe_defrouters(uint32_t ifindex, uint32_t linkid) argument 133 if (ifindex == 0) 158 if (ifindex != p->if_index) 164 (void)sendpacket(probesock, &dst, ifindex, 1, NULL, 0); 172 rssend(uint32_t ifindex, uint32_t linkid, const void *data, size_t len) argument 187 n = sendpacket(rssock, &dst, ifindex, 255, data, len); 202 nvlist_add_number(nvl, "ifindex", ifinfo->sdl->sdl_index); 226 nvlist_add_number(nvl, "ifindex", ifinf 259 uint32_t ifindex, linkid; local [all...] |
/freebsd-current/sys/netlink/route/ |
H A D | iface_drivers.c | 112 * Saves the resulting ifindex and ifname to report them 123 uint32_t ifindex = (uint32_t)if_getindex(ifp); local 126 sizeof(ifindex) + NL_ITEM_ALIGN(ifname_len + 1); 134 nla->nla_len = sizeof(struct nlattr) + sizeof(ifindex); 136 memcpy(NLA_DATA(nla), &ifindex, sizeof(ifindex)); local
|
/freebsd-current/usr.sbin/mtest/ |
H A D | mtest.c | 154 __ifindex_to_primary_ip(const uint32_t ifindex, struct in_addr *pina) argument 162 assert(ifindex != 0); 165 if (if_indextoname(ifindex, ifname) == NULL) 281 * Return the ifindex of ifname, or 0 if any parse element failed. 289 uint32_t ifindex; local 298 ifindex = if_nametoindex(str2); 299 if (ifindex == 0) 330 ifindex = 0; 334 ifindex = 0; 341 return (ifindex); 386 uint32_t fmode, ifindex; local [all...] |
/freebsd-current/contrib/bsnmp/snmp_mibII/ |
H A D | mibII_rcvaddr.c | 40 mib_find_rcvaddr(u_int ifindex, const u_char *addr, size_t addrlen) argument 45 if (rcv->ifindex == ifindex && 66 rcv->ifindex = ifp->index;
|
H A D | mibII_ipaddr.c | 53 u_int ifindex; member in struct:update 92 if ((ifa = mib_create_ifa(upd->ifindex, upd->addr, upd->mask, bcast)) 101 * Modify the netmask or broadcast address. The ifindex cannot be 109 if ((ifp = mib_find_if(ifa->ifindex)) == NULL) 111 if ((upd->set & UPD_IFINDEX) && upd->ifindex != ifa->ifindex) 168 /* non existing entry - must have ifindex */ 174 if ((upd->set & UPD_IFINDEX) && upd->ifindex == 0) { 272 if (ifa->ifindex != (u_int)value->v.integer && 277 upd->ifindex [all...] |
H A D | snmp_mibII.h | 47 * Interfaces are indexed by ifindex. This is not the same as the index 49 * RFC requires, that an ifindex is not to be re-used for ANOTHER dynamically 50 * interfaces once the interface was deleted. The system's ifindex is in 56 u_int index; /* the logical ifindex */ 99 u_int ifindex; member in struct:mibifa 110 u_int ifindex; member in struct:mibrcvaddr
|
/freebsd-current/usr.sbin/rtadvd/ |
H A D | if.c | 164 get_next_msg(char *buf, char *lim, int ifindex, size_t *lenp, int filter) argument 210 if (ifindex && SDL(gw)->sdl_index != ifindex) 237 if (ifindex && ifam->ifam_index != ifindex) 342 int ifindex; local 345 ifindex = if_nametoindex(ifname); 347 if (ifindex != 0) { 348 if (ifindex == ifi->ifi_ifindex) 411 update_ifinfo(struct ifilist_head_t *ifi_head, int ifindex) argument 658 sock_mc_join(struct sockinfo *s, int ifindex) argument 695 sock_mc_leave(struct sockinfo *s, int ifindex) argument [all...] |
/freebsd-current/contrib/ntp/libntp/lib/isc/include/isc/ |
H A D | interfaceiter.h | 59 unsigned int ifindex; /*%< Interface index for IP(V6)_MULTICAST_IF. */ member in struct:isc_interface
|
/freebsd-current/tests/sys/net/routing/ |
H A D | test_rtsock_l3.c | 46 /* Update ifindex cache */ 47 c->ifindex = if_nametoindex(c->ifname); 210 verify_route_message_extra(struct rt_msghdr *rtm, int ifindex, int rtm_flags) argument 212 RTSOCK_ATF_REQUIRE_MSG(rtm, rtm->rtm_index == ifindex, 213 "expected ifindex %d, got %d", ifindex, rtm->rtm_index); 230 verify_link_gateway(struct rt_msghdr *rtm, int ifindex) argument 239 RTSOCK_ATF_REQUIRE_MSG(rtm, sdl->sdl_index == ifindex, "GW ifindex is %d", sdl->sdl_index); 296 verify_route_message_extra(rtm, c->ifindex, RTF_U [all...] |
/freebsd-current/tests/sys/netlink/ |
H A D | test_rtnl_ifaddr.py | 123 # Family and ifindex has been checked already 145 # Family and ifindex has been checked already 165 # Verify that ifindex is not emmbedded 199 msg.base_hdr.ifa_index = iface.ifindex 203 def get_ifa_list(self, ifindex=0, family=0): 207 msg.base_hdr.ifa_index = ifindex 217 def setup_dummy_carp(self, ifindex: int, vhid: int): 226 msg.add_nla(NlAttrU32(CarpAttrType.CARP_NL_IFINDEX, ifindex)) 246 lst = self.get_ifa_list(iface.ifindex, self.get_family_from_ip(ifa.ip)) 281 lst = self.get_ifa_list(iface.ifindex, sel [all...] |
/freebsd-current/tests/sys/netinet6/ |
H A D | test_ip6_output.py | 34 ifindex = socket.if_nametoindex(ifname) 35 addr_tuple = (ip, port, 0, ifindex) 37 ifindex = socket.if_nametoindex(ifname) 38 mreq = socket.inet_pton(socket.AF_INET6, ip) + struct.pack("I", ifindex) 41 addr_tuple = ("::", port, 0, ifindex) 422 ifindex = socket.if_nametoindex(os_ifname) 423 optval = struct.pack("I", ifindex) 466 ifindex = socket.if_nametoindex(os_ifname) 469 addr_tuple = (ip, self.DEFAULT_PORT, 0, ifindex) 473 ifindex [all...] |
/freebsd-current/contrib/ntp/libntp/lib/isc/unix/ |
H A D | interfaceiter.c | 193 unsigned int ifindex; local 208 address, &ifindex, &prefix, &scope, &flags, name); 241 iter->current.ifindex = ifindex; 244 (isc_uint32_t)ifindex);
|