/netbsd-src/usr.bin/rump_dhcpclient/ |
H A D | configure.c | 73 (srt || (!rt->iface || in find_route() 74 rt->iface->metric == r->iface->metric)) && in find_route() 116 desc_route("removing", f, f->iface->name); in route_deleted() 126 n_route(struct rt *rt, const struct interface *iface) in n_route() argument 131 !(iface->state->options->options & DHCPCD_GATEWAY)) in n_route() 134 desc_route("adding", rt, iface->name); in n_route() 135 if (!add_route(iface, &rt->dest, &rt->net, &rt->gate, iface->metric)) in n_route() 139 if (rt->dest.s_addr == (iface->addr.s_addr & iface->net.s_addr) && in n_route() 140 rt->net.s_addr == iface->net.s_addr && in n_route() 146 fprintf(stderr, "%s: add_route failed: %d\n", iface->name, errno); in n_route() [all …]
|
H A D | bpf.c | 53 open_socket(struct interface *iface, int protocol) in open_socket() argument 90 strlcpy(ifr.ifr_name, iface->name, sizeof(ifr.ifr_name)); in open_socket() 97 if (iface->buffer_size != (size_t)buf_len) { in open_socket() 98 free(iface->buffer); in open_socket() 99 iface->buffer_size = buf_len; in open_socket() 100 iface->buffer = xmalloc(buf_len); in open_socket() 101 iface->buffer_len = iface->buffer_pos = 0; in open_socket() 114 fdp = &iface->arp_fd; in open_socket() 118 fdp = &iface->raw_fd; in open_socket() 130 free(iface->buffer); in open_socket() [all …]
|
H A D | net.h | 85 const struct interface *iface; member 100 #define get_mtu(iface) do_mtu(iface, 0) argument 101 #define set_mtu(iface, mtu) do_mtu(iface, mtu) argument 115 #define add_address(iface, addr, net, brd) \ argument 116 if_address(iface, addr, net, brd, 1) 117 #define del_address(iface, addr, net) \ argument 118 if_address(iface, addr, net, NULL, -1) 119 #define has_address(iface, addr, net) \ argument 120 do_address(iface, addr, net, NULL, 0) 121 #define get_address(iface, addr, net, dst) \ argument [all …]
|
H A D | net.c | 187 struct interface *iface = NULL; in init_interface() local 194 iface = xzalloc(sizeof(*iface)); in init_interface() 195 strlcpy(iface->name, ifname, sizeof(iface->name)); in init_interface() 196 iface->flags = ifr.ifr_flags; in init_interface() 199 iface->metric = 200 + if_nametoindex(iface->name); in init_interface() 200 if (getifssid(ifname, iface->ssid) != -1) { in init_interface() 201 iface->wireless = 1; in init_interface() 202 iface->metric += 100; in init_interface() 216 iface->raw_fd = -1; in init_interface() 217 iface->udp_fd = -1; in init_interface() [all …]
|
/netbsd-src/external/bsd/wpa/dist/src/ap/ |
H A D | eth_p_oui.c | 33 struct eth_p_oui_iface *iface; member 53 struct eth_p_oui_iface *iface = ctx; in eth_p_rx() local 73 dl_list_for_each(receiver, &iface->receiver, in eth_p_rx() 91 struct eth_p_oui_iface *iface; in eth_p_oui_register() local 104 interfaces = hapd->iface->interfaces; in eth_p_oui_register() 106 dl_list_for_each(iface, &interfaces->eth_p_oui, struct eth_p_oui_iface, in eth_p_oui_register() 108 if (os_strcmp(iface->ifname, ifname) != 0) in eth_p_oui_register() 115 iface = os_zalloc(sizeof(*iface)); in eth_p_oui_register() 116 if (!iface) in eth_p_oui_register() 119 os_strlcpy(iface->ifname, ifname, sizeof(iface->ifname)); in eth_p_oui_register() [all …]
|
H A D | ap_list.h | 35 void ap_list_process_beacon(struct hostapd_iface *iface, 40 int ap_list_init(struct hostapd_iface *iface); 41 void ap_list_deinit(struct hostapd_iface *iface); 42 void ap_list_timer(struct hostapd_iface *iface); 44 static inline int ap_list_init(struct hostapd_iface *iface) in ap_list_init() argument 49 static inline void ap_list_deinit(struct hostapd_iface *iface) in ap_list_deinit() argument 53 static inline void ap_list_timer(struct hostapd_iface *iface) in ap_list_timer() argument
|
/netbsd-src/usr.sbin/altq/libaltq/ |
H A D | qop_fifoq.c | 171 struct fifoq_interface iface; in fifoq_attach() local 183 memset(&iface, 0, sizeof(iface)); in fifoq_attach() 184 strncpy(iface.fifoq_ifname, ifinfo->ifname, IFNAMSIZ); in fifoq_attach() 186 if (ioctl(fifoq_fd, FIFOQ_IF_ATTACH, &iface) < 0) in fifoq_attach() 193 strncpy(conf.iface.fifoq_ifname, ifinfo->ifname, IFNAMSIZ); in fifoq_attach() 199 LOG(LOG_INFO, 0, "fifoq attached to %s", iface.fifoq_ifname); in fifoq_attach() 207 struct fifoq_interface iface; in fifoq_detach() local 209 memset(&iface, 0, sizeof(iface)); in fifoq_detach() 210 strncpy(iface.fifoq_ifname, ifinfo->ifname, IFNAMSIZ); in fifoq_detach() 212 if (ioctl(fifoq_fd, FIFOQ_IF_DETACH, &iface) < 0) in fifoq_detach() [all …]
|
H A D | qop_wfq.c | 204 struct wfq_interface iface; in wfq_attach() local 216 memset(&iface, 0, sizeof(iface)); in wfq_attach() 217 strncpy(iface.wfq_ifacename, ifinfo->ifname, IFNAMSIZ); in wfq_attach() 219 if (ioctl(wfq_fd, WFQ_IF_ATTACH, &iface) < 0) in wfq_attach() 227 strncpy(conf.iface.wfq_ifacename, ifinfo->ifname, IFNAMSIZ); in wfq_attach() 237 LOG(LOG_INFO, 0, "wfq attached to %s", iface.wfq_ifacename); in wfq_attach() 245 struct wfq_interface iface; in wfq_detach() local 247 memset(&iface, 0, sizeof(iface)); in wfq_detach() 248 strncpy(iface.wfq_ifacename, ifinfo->ifname, IFNAMSIZ); in wfq_detach() 250 if (ioctl(wfq_fd, WFQ_IF_DETACH, &iface) < 0) in wfq_detach() [all …]
|
H A D | qop_blue.c | 200 struct blue_interface iface; in blue_attach() local 212 memset(&iface, 0, sizeof(iface)); in blue_attach() 213 strncpy(iface.blue_ifname, ifinfo->ifname, IFNAMSIZ); in blue_attach() 215 if (ioctl(blue_fd, BLUE_IF_ATTACH, &iface) < 0) in blue_attach() 221 strncpy(conf.iface.blue_ifname, ifinfo->ifname, IFNAMSIZ); in blue_attach() 231 LOG(LOG_INFO, 0, "blue attached to %s", iface.blue_ifname); in blue_attach() 239 struct blue_interface iface; in blue_detach() local 241 memset(&iface, 0, sizeof(iface)); in blue_detach() 242 strncpy(iface.blue_ifname, ifinfo->ifname, IFNAMSIZ); in blue_detach() 244 if (ioctl(blue_fd, BLUE_IF_DETACH, &iface) < 0) in blue_detach() [all …]
|
H A D | qop_priq.c | 349 struct priq_interface iface; in priq_attach() local 351 memset(&iface, 0, sizeof(iface)); in priq_attach() 352 strncpy(iface.ifname, ifinfo->ifname, IFNAMSIZ); in priq_attach() 362 memset(&iface, 0, sizeof(iface)); in priq_attach() 363 strncpy(iface.ifname, ifinfo->ifname, IFNAMSIZ); in priq_attach() 364 iface.arg = ifinfo->bandwidth; in priq_attach() 366 if (ioctl(priq_fd, PRIQ_IF_ATTACH, &iface) < 0) in priq_attach() 374 struct priq_interface iface; in priq_detach() local 376 memset(&iface, 0, sizeof(iface)); in priq_detach() 377 strncpy(iface.ifname, ifinfo->ifname, IFNAMSIZ); in priq_detach() [all …]
|
H A D | qop_red.c | 229 struct red_interface iface; in red_attach() local 241 memset(&iface, 0, sizeof(iface)); in red_attach() 242 strncpy(iface.red_ifname, ifinfo->ifname, IFNAMSIZ); in red_attach() 244 if (ioctl(red_fd, RED_IF_ATTACH, &iface) < 0) in red_attach() 250 strncpy(conf.iface.red_ifname, ifinfo->ifname, IFNAMSIZ); in red_attach() 261 LOG(LOG_INFO, 0, "red attached to %s", iface.red_ifname); in red_attach() 269 struct red_interface iface; in red_detach() local 271 memset(&iface, 0, sizeof(iface)); in red_detach() 272 strncpy(iface.red_ifname, ifinfo->ifname, IFNAMSIZ); in red_detach() 274 if (ioctl(red_fd, RED_IF_DETACH, &iface) < 0) in red_detach() [all …]
|
H A D | qop_rio.c | 273 struct rio_interface iface; in rio_attach() local 286 memset(&iface, 0, sizeof(iface)); in rio_attach() 287 strncpy(iface.rio_ifname, ifinfo->ifname, IFNAMSIZ); in rio_attach() 289 if (ioctl(rio_fd, RIO_IF_ATTACH, &iface) < 0) in rio_attach() 295 strncpy(conf.iface.rio_ifname, ifinfo->ifname, IFNAMSIZ); in rio_attach() 305 LOG(LOG_INFO, 0, "rio attached to %s", iface.rio_ifname); in rio_attach() 313 struct rio_interface iface; in rio_detach() local 315 memset(&iface, 0, sizeof(iface)); in rio_detach() 316 strncpy(iface.rio_ifname, ifinfo->ifname, IFNAMSIZ); in rio_detach() 318 if (ioctl(rio_fd, RIO_IF_DETACH, &iface) < 0) in rio_detach() [all …]
|
H A D | qop_jobs.c | 530 strncpy(attach.iface.jobs_ifname, ifinfo->ifname, IFNAMSIZ); in jobs_attach() 541 attach.iface.jobs_ifname, in jobs_attach() 551 struct jobs_interface iface; in jobs_detach() local 553 memset(&iface, 0, sizeof(iface)); in jobs_detach() 554 strncpy(iface.jobs_ifname, ifinfo->ifname, IFNAMSIZ); in jobs_detach() 556 if (ioctl(jobs_fd, JOBS_IF_DETACH, &iface) < 0) in jobs_detach() 569 struct jobs_interface iface; in jobs_enable() local 571 memset(&iface, 0, sizeof(iface)); in jobs_enable() 572 strncpy(iface.jobs_ifname, ifinfo->ifname, IFNAMSIZ); in jobs_enable() 574 if (ioctl(jobs_fd, JOBS_ENABLE, &iface) < 0) in jobs_enable() [all …]
|
H A D | qop_cdnr.c | 669 struct cdnr_interface iface; in cdnr_attach() local 679 memset(&iface, 0, sizeof(iface)); in cdnr_attach() 680 strncpy(iface.cdnr_ifname, ifinfo->ifname+1, IFNAMSIZ); in cdnr_attach() 682 if (ioctl(cdnr_fd, CDNR_IF_ATTACH, &iface) < 0) in cdnr_attach() 685 LOG(LOG_INFO, 0, "conditioner attached to %s", iface.cdnr_ifname); in cdnr_attach() 693 struct cdnr_interface iface; in cdnr_detach() local 695 memset(&iface, 0, sizeof(iface)); in cdnr_detach() 696 strncpy(iface.cdnr_ifname, ifinfo->ifname+1, IFNAMSIZ); in cdnr_detach() 698 if (ioctl(cdnr_fd, CDNR_IF_DETACH, &iface) < 0) in cdnr_detach() 711 struct cdnr_interface iface; in cdnr_enable() local [all …]
|
/netbsd-src/usr.sbin/wiconfig/ |
H A D | wiconfig.c | 151 wi_apscan(char *iface) in wi_apscan() argument 163 if (iface == NULL) in wi_apscan() 169 flags = get_if_flags(s, iface); in wi_apscan() 171 flags = set_if_flags(s, iface, flags | IFF_UP); in wi_apscan() 182 wi_setval(iface, &wreq); in wi_apscan() 195 strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); in wi_apscan() 211 set_if_flags(s, iface, flags); in wi_apscan() 284 set_if_flags(s, iface, flags); in wi_apscan() 290 wi_getval(char *iface, struct wi_req *wreq) in wi_getval() argument 298 strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); in wi_getval() [all …]
|
/netbsd-src/usr.sbin/iwictl/ |
H A D | iwictl.c | 62 char *iface = NULL; in main() local 67 iface = argv[1]; in main() 77 iface = optarg; in main() 89 if (iface == NULL) in main() 93 get_radio_state(iface); in main() 96 get_statistics(iface); in main() 111 do_req(const char *iface, unsigned long req, void *data) in do_req() argument 121 (void)strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); in do_req() 132 get_radio_state(const char *iface) in get_radio_state() argument 136 if (do_req(iface, SIOCGRADIO, &radio) == -1) in get_radio_state() [all …]
|
/netbsd-src/external/bsd/wpa/dist/hostapd/logwatch/ |
H A D | hostapd | 29 if (my ($iface,$mac,$layer,$details) = ($line =~ /(.*?): STA (.*?) (.*?): (.*?)$/i)) { 34 $hostapd{$iface}->{$mac}->{$layer}->{$details}++; 41 foreach my $iface (sort keys %hostapd) { 42 print "Interface $iface:\n"; 43 foreach my $mac (sort keys %{$hostapd{$iface}}) { 45 foreach my $layer (sort keys %{$hostapd{$iface}->{$mac}}) { 47 foreach my $details (sort keys %{$hostapd{$iface}->{$mac}->{$layer}}) { 49 my $count = $hostapd{$iface}->{$mac}->{$layer}->{$details};
|
/netbsd-src/external/bsd/wpa/dist/wpa_supplicant/binder/ |
H A D | supplicant.cpp | 46 struct wpa_interface iface; in CreateInterface() local 48 os_memset(&iface, 0, sizeof(iface)); in CreateInterface() 49 iface.driver = os_strdup(android::String8(driver).string()); in CreateInterface() 50 iface.ifname = os_strdup(android::String8(ifname).string()); in CreateInterface() 51 iface.confname = os_strdup(android::String8(confname).string()); in CreateInterface() 52 iface.bridge_ifname = in CreateInterface() 55 wpa_s = wpa_supplicant_add_iface(wpa_global_, &iface, NULL); in CreateInterface() 77 os_free((void *)iface.driver); in CreateInterface() 78 os_free((void *)iface.ifname); in CreateInterface() 79 os_free((void *)iface.confname); in CreateInterface() [all …]
|
/netbsd-src/usr.sbin/ipwctl/ |
H A D | ipwctl.c | 63 const char *iface; in main() local 69 iface = optarg; in main() 72 iface = argv[1]; in main() 75 iface = "ipw0"; in main() 85 get_radio_state(iface); in main() 93 get_statistics(iface); in main() 108 do_req(const char *iface, unsigned long req, void *data) in do_req() argument 118 strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); in do_req() 128 get_radio_state(const char *iface) in get_radio_state() argument 132 if (do_req(iface, SIOCGRADIO, &radio) == -1) { in get_radio_state() [all …]
|
/netbsd-src/external/gpl3/gcc.old/dist/libphobos/libdruntime/rt/ |
H A D | cast_.d | 89 foreach (iface; oc.interfaces) in _d_isbaseof2() 91 if (iface.classinfo is c || _d_isbaseof2(iface.classinfo, c, offset)) in _d_isbaseof2() 93 offset += iface.offset; in _d_isbaseof2() 114 foreach (iface; oc.interfaces) in _d_isbaseof() 116 if (iface.classinfo is c || _d_isbaseof(iface.classinfo, c)) in _d_isbaseof() 135 foreach (iface; typeid(o).interfaces) in _d_interface_vtbl() 137 if (iface.classinfo is ic) in _d_interface_vtbl() 138 return cast(void*) iface.vtbl; in _d_interface_vtbl()
|
/netbsd-src/external/bsd/openresolv/dist/ |
H A D | resolvconf.in | 153 case "$iface" in 158 if [ -e "$PRIVATEDIR/$iface" ]; then 163 case "$iface" in 188 iface="${line#\# resolv.conf from *}" 190 if private_iface "$iface"; then 743 *) cmd="$OPT"; iface="$OPTARG";; 747 args="$iface${iface:+ }$*" 786 make_vars "$iface" 793 if [ -z "$iface" ]; then 808 case "$iface" in [all …]
|
/netbsd-src/sys/altq/ |
H A D | altq_cdnr.h | 82 struct cdnr_interface iface; member 89 struct cdnr_interface iface; member 95 struct cdnr_interface iface; member 104 struct cdnr_interface iface; member 110 struct cdnr_interface iface; member 118 struct cdnr_interface iface; member 130 struct cdnr_interface iface; member 138 struct cdnr_interface iface; member 147 struct cdnr_interface iface; member 159 struct cdnr_interface iface; member [all …]
|
/netbsd-src/external/bsd/ipf/dist/ |
H A D | mkfilters | 94 ($iface = $_) =~ s/^([a-zA-Z]+\d+).*/$1/; 95 $ifaces{$iface} = $iface; 100 ($inet{$iface} = $_) =~ s/.*inet ([^ ]+) \-\-\> ([^ ]+).*/$1/; 101 ($ppp{$iface} = $_) =~ s/.*inet ([^ ]+) \-\-\> ([^ ]+).*/$2/; 103 ($inet{$iface} = $_) =~ s/.*inet ([^ ]+).*/$1/; 109 $netmask{$iface} = $mask; 112 ($bcast{$iface} = $_) =~ s/.*broadcast ([^ ]+).*/$1/;
|
/netbsd-src/sys/dev/usb/ |
H A D | usbdi.c | 147 usbd_dump_iface(struct usbd_interface *iface) in usbd_dump_iface() argument 150 USBHIST_CALLARGS(usbdebug, "iface %#jx", (uintptr_t)iface, 0, 0, 0); in usbd_dump_iface() 152 if (iface == NULL) in usbd_dump_iface() 155 (uintptr_t)iface->ui_dev, (uintptr_t)iface->ui_idesc, in usbd_dump_iface() 156 iface->ui_index, 0); in usbd_dump_iface() 158 iface->ui_altindex, 0, 0, 0); in usbd_dump_iface() 228 usbd_open_pipe(struct usbd_interface *iface, uint8_t address, in usbd_open_pipe() argument 231 return (usbd_open_pipe_ival(iface, address, flags, pipe, in usbd_open_pipe() 236 usbd_open_pipe_ival(struct usbd_interface *iface, uint8_t address, in usbd_open_pipe_ival() argument 247 (uintptr_t)iface, address, flags, 0); in usbd_open_pipe_ival() [all …]
|
/netbsd-src/external/bsd/dhcpcd/dist/src/ |
H A D | ipv6nd.c | 442 struct interface *ifp = ia->iface; in ipv6nd_sendadvertisement() 527 ctx = ia->iface->ctx; in ipv6nd_advertise() 549 iaf->iface->metric > iap->iface->metric) in ipv6nd_advertise() 557 ifp = iaf->iface; in ipv6nd_advertise() 608 if (rap->iface == ifp && rap->willexpire) in ipv6nd_expire() 623 if (rap->iface == ifp) in ipv6nd_startexpire() 658 if (ra1->iface->metric > ra2->iface->metric) in ipv6nd_sortrouters() 690 .iface = ifp, in ipv6nd_applyra() 697 if (rap->iface == ifp) in ipv6nd_applyra() 740 loginfox("%s: %s is %s", rap->iface->name, rap->sfrom, in ipv6nd_neighbour() [all …]
|