Lines Matching +full:cs +full:- +full:dev +full:- +full:assoc
3 * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
61 if (iface->drv_priv) { in wpa_priv_cmd_register()
63 if (iface->driver->deinit) in wpa_priv_cmd_register()
64 iface->driver->deinit(iface->drv_priv); in wpa_priv_cmd_register()
65 iface->drv_priv = NULL; in wpa_priv_cmd_register()
66 if (iface->drv_global_priv) { in wpa_priv_cmd_register()
67 iface->driver->global_deinit(iface->drv_global_priv); in wpa_priv_cmd_register()
68 iface->drv_global_priv = NULL; in wpa_priv_cmd_register()
70 iface->wpas_registered = 0; in wpa_priv_cmd_register()
74 if (iface->l2[i]) { in wpa_priv_cmd_register()
77 l2_packet_deinit(iface->l2[i]); in wpa_priv_cmd_register()
78 iface->l2[i] = NULL; in wpa_priv_cmd_register()
82 if (iface->driver->init2) { in wpa_priv_cmd_register()
83 if (iface->driver->global_init) { in wpa_priv_cmd_register()
84 iface->drv_global_priv = in wpa_priv_cmd_register()
85 iface->driver->global_init(iface->ctx); in wpa_priv_cmd_register()
86 if (!iface->drv_global_priv) { in wpa_priv_cmd_register()
92 iface->drv_global_priv = NULL; in wpa_priv_cmd_register()
94 iface->drv_priv = iface->driver->init2(iface, iface->ifname, in wpa_priv_cmd_register()
95 iface->drv_global_priv); in wpa_priv_cmd_register()
96 } else if (iface->driver->init) { in wpa_priv_cmd_register()
97 iface->drv_priv = iface->driver->init(iface, iface->ifname); in wpa_priv_cmd_register()
101 if (iface->drv_priv == NULL) { in wpa_priv_cmd_register()
107 "'%s'", iface->driver_name, iface->ifname); in wpa_priv_cmd_register()
109 os_memcpy(&iface->drv_addr, from, fromlen); in wpa_priv_cmd_register()
110 iface->drv_addr_len = fromlen; in wpa_priv_cmd_register()
111 iface->wpas_registered = 1; in wpa_priv_cmd_register()
113 if (iface->driver->set_param && in wpa_priv_cmd_register()
114 iface->driver->set_param(iface->drv_priv, NULL) < 0) { in wpa_priv_cmd_register()
123 if (iface->drv_priv) { in wpa_priv_cmd_unregister()
124 if (iface->driver->deinit) in wpa_priv_cmd_unregister()
125 iface->driver->deinit(iface->drv_priv); in wpa_priv_cmd_unregister()
126 iface->drv_priv = NULL; in wpa_priv_cmd_unregister()
127 if (iface->drv_global_priv) { in wpa_priv_cmd_unregister()
128 iface->driver->global_deinit(iface->drv_global_priv); in wpa_priv_cmd_unregister()
129 iface->drv_global_priv = NULL; in wpa_priv_cmd_unregister()
131 iface->wpas_registered = 0; in wpa_priv_cmd_unregister()
144 if (iface->drv_priv == NULL) in wpa_priv_cmd_scan()
155 if (scan->num_ssids > WPAS_MAX_SCAN_SSIDS) { in wpa_priv_cmd_scan()
159 params.num_ssids = scan->num_ssids; in wpa_priv_cmd_scan()
160 for (i = 0; i < scan->num_ssids; i++) { in wpa_priv_cmd_scan()
161 params.ssids[i].ssid = scan->ssids[i]; in wpa_priv_cmd_scan()
162 params.ssids[i].ssid_len = scan->ssid_lens[i]; in wpa_priv_cmd_scan()
165 if (scan->num_freqs > PRIVSEP_MAX_SCAN_FREQS) { in wpa_priv_cmd_scan()
169 if (scan->num_freqs) { in wpa_priv_cmd_scan()
170 for (i = 0; i < scan->num_freqs; i++) in wpa_priv_cmd_scan()
171 freqs[i] = scan->freqs[i]; in wpa_priv_cmd_scan()
176 if (iface->driver->scan2) in wpa_priv_cmd_scan()
177 iface->driver->scan2(iface->drv_priv, ¶ms); in wpa_priv_cmd_scan()
190 if (iface->driver->get_scan_results) in wpa_priv_get_scan_results2()
191 res = iface->driver->get_scan_results(iface->drv_priv, NULL); in wpa_priv_get_scan_results2()
193 res = iface->driver->get_scan_results2(iface->drv_priv); in wpa_priv_get_scan_results2()
202 val = res->num; in wpa_priv_get_scan_results2()
206 for (i = 0; i < res->num; i++) { in wpa_priv_get_scan_results2()
207 struct wpa_scan_res *r = res->res[i]; in wpa_priv_get_scan_results2()
208 val = sizeof(*r) + r->ie_len + r->beacon_ie_len; in wpa_priv_get_scan_results2()
209 if (end - pos < (int) sizeof(int) + val) in wpa_priv_get_scan_results2()
217 sendto(iface->fd, buf, pos - buf, 0, (struct sockaddr *) from, fromlen); in wpa_priv_get_scan_results2()
226 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_get_scan_results2()
234 if (iface->drv_priv == NULL) in wpa_priv_cmd_get_scan_results()
237 if (iface->driver->get_scan_results || iface->driver->get_scan_results2) in wpa_priv_cmd_get_scan_results()
240 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_cmd_get_scan_results()
251 if (iface->drv_priv == NULL || iface->driver->authenticate == NULL) in wpa_priv_cmd_authenticate()
260 if (sizeof(*auth) + auth->ie_len + auth->auth_data_len > len) { in wpa_priv_cmd_authenticate()
266 params.freq = auth->freq; in wpa_priv_cmd_authenticate()
267 params.bssid = auth->bssid; in wpa_priv_cmd_authenticate()
268 params.ssid = auth->ssid; in wpa_priv_cmd_authenticate()
269 if (auth->ssid_len > SSID_MAX_LEN) in wpa_priv_cmd_authenticate()
271 params.ssid_len = auth->ssid_len; in wpa_priv_cmd_authenticate()
272 params.auth_alg = auth->auth_alg; in wpa_priv_cmd_authenticate()
274 if (auth->wep_key_len[i]) { in wpa_priv_cmd_authenticate()
275 params.wep_key[i] = auth->wep_key[i]; in wpa_priv_cmd_authenticate()
276 params.wep_key_len[i] = auth->wep_key_len[i]; in wpa_priv_cmd_authenticate()
279 params.wep_tx_keyidx = auth->wep_tx_keyidx; in wpa_priv_cmd_authenticate()
280 params.local_state_change = auth->local_state_change; in wpa_priv_cmd_authenticate()
281 params.p2p = auth->p2p; in wpa_priv_cmd_authenticate()
282 if (auth->ie_len) { in wpa_priv_cmd_authenticate()
284 params.ie_len = auth->ie_len; in wpa_priv_cmd_authenticate()
286 if (auth->auth_data_len) { in wpa_priv_cmd_authenticate()
287 params.auth_data = ((u8 *) (auth + 1)) + auth->ie_len; in wpa_priv_cmd_authenticate()
288 params.auth_data_len = auth->auth_data_len; in wpa_priv_cmd_authenticate()
291 res = iface->driver->authenticate(iface->drv_priv, ¶ms); in wpa_priv_cmd_authenticate()
292 wpa_printf(MSG_DEBUG, "drv->authenticate: res=%d", res); in wpa_priv_cmd_authenticate()
300 struct privsep_cmd_associate *assoc; in wpa_priv_cmd_associate() local
304 if (iface->drv_priv == NULL || iface->driver->associate == NULL) in wpa_priv_cmd_associate()
307 if (len < sizeof(*assoc)) { in wpa_priv_cmd_associate()
312 assoc = buf; in wpa_priv_cmd_associate()
313 if (sizeof(*assoc) + assoc->wpa_ie_len > len) { in wpa_priv_cmd_associate()
319 bssid = assoc->bssid; in wpa_priv_cmd_associate()
322 params.ssid = assoc->ssid; in wpa_priv_cmd_associate()
323 if (assoc->ssid_len > SSID_MAX_LEN) in wpa_priv_cmd_associate()
325 params.ssid_len = assoc->ssid_len; in wpa_priv_cmd_associate()
326 params.freq.mode = assoc->hwmode; in wpa_priv_cmd_associate()
327 params.freq.freq = assoc->freq; in wpa_priv_cmd_associate()
328 params.freq.channel = assoc->channel; in wpa_priv_cmd_associate()
329 if (assoc->wpa_ie_len) { in wpa_priv_cmd_associate()
330 params.wpa_ie = (u8 *) (assoc + 1); in wpa_priv_cmd_associate()
331 params.wpa_ie_len = assoc->wpa_ie_len; in wpa_priv_cmd_associate()
333 params.pairwise_suite = assoc->pairwise_suite; in wpa_priv_cmd_associate()
334 params.group_suite = assoc->group_suite; in wpa_priv_cmd_associate()
335 params.key_mgmt_suite = assoc->key_mgmt_suite; in wpa_priv_cmd_associate()
336 params.auth_alg = assoc->auth_alg; in wpa_priv_cmd_associate()
337 params.mode = assoc->mode; in wpa_priv_cmd_associate()
339 res = iface->driver->associate(iface->drv_priv, ¶ms); in wpa_priv_cmd_associate()
340 wpa_printf(MSG_DEBUG, "drv->associate: res=%d", res); in wpa_priv_cmd_associate()
349 if (iface->drv_priv == NULL) in wpa_priv_cmd_get_bssid()
352 if (iface->driver->get_bssid == NULL || in wpa_priv_cmd_get_bssid()
353 iface->driver->get_bssid(iface->drv_priv, bssid) < 0) in wpa_priv_cmd_get_bssid()
356 sendto(iface->fd, bssid, ETH_ALEN, 0, (struct sockaddr *) from, in wpa_priv_cmd_get_bssid()
361 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_cmd_get_bssid()
371 if (iface->drv_priv == NULL) in wpa_priv_cmd_get_ssid()
374 if (iface->driver->get_ssid == NULL) in wpa_priv_cmd_get_ssid()
378 res = iface->driver->get_ssid(iface->drv_priv, &ssid[sizeof(int)]); in wpa_priv_cmd_get_ssid()
383 sendto(iface->fd, ssid, sizeof(ssid), 0, (struct sockaddr *) from, in wpa_priv_cmd_get_ssid()
388 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_cmd_get_ssid()
399 if (iface->drv_priv == NULL || iface->driver->set_key == NULL) in wpa_priv_cmd_set_key()
410 p.ifname = iface->ifname; in wpa_priv_cmd_set_key()
411 p.alg = params->alg; in wpa_priv_cmd_set_key()
412 p.addr = params->addr; in wpa_priv_cmd_set_key()
413 p.key_idx = params->key_idx; in wpa_priv_cmd_set_key()
414 p.set_tx = params->set_tx; in wpa_priv_cmd_set_key()
415 p.seq = params->seq_len ? params->seq : NULL; in wpa_priv_cmd_set_key()
416 p.seq_len = params->seq_len; in wpa_priv_cmd_set_key()
417 p.key = params->key_len ? params->key : NULL; in wpa_priv_cmd_set_key()
418 p.key_len = params->key_len; in wpa_priv_cmd_set_key()
419 p.key_flag = params->key_flag; in wpa_priv_cmd_set_key()
420 p.link_id = -1; in wpa_priv_cmd_set_key()
422 res = iface->driver->set_key(iface->drv_priv, &p); in wpa_priv_cmd_set_key()
423 wpa_printf(MSG_DEBUG, "drv->set_key: res=%d", res); in wpa_priv_cmd_set_key()
432 if (iface->drv_priv == NULL) in wpa_priv_cmd_get_capa()
435 if (iface->driver->get_capa == NULL || in wpa_priv_cmd_get_capa()
436 iface->driver->get_capa(iface->drv_priv, &capa) < 0) in wpa_priv_cmd_get_capa()
443 sendto(iface->fd, &capa, sizeof(capa), 0, (struct sockaddr *) from, in wpa_priv_cmd_get_capa()
448 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_cmd_get_capa()
456 struct wpa_priv_interface *iface = l2_ctx->parent; in wpa_priv_l2_rx()
468 msg.msg_name = &iface->l2_addr[l2_ctx->idx]; in wpa_priv_l2_rx()
469 msg.msg_namelen = iface->l2_addr_len[l2_ctx->idx]; in wpa_priv_l2_rx()
471 if (sendmsg(iface->fd, &msg, 0) < 0) { in wpa_priv_l2_rx()
509 if (!iface->l2[idx]) in wpa_priv_cmd_l2_register()
517 os_memcpy(&iface->l2_addr[idx], from, fromlen); in wpa_priv_cmd_l2_register()
518 iface->l2_addr_len[idx] = fromlen; in wpa_priv_cmd_l2_register()
520 iface->l2_ctx[idx].idx = idx; in wpa_priv_cmd_l2_register()
521 iface->l2_ctx[idx].parent = iface; in wpa_priv_cmd_l2_register()
522 iface->l2[idx] = l2_packet_init(iface->ifname, NULL, proto, in wpa_priv_cmd_l2_register()
523 wpa_priv_l2_rx, &iface->l2_ctx[idx], in wpa_priv_cmd_l2_register()
525 if (!iface->l2[idx]) { in wpa_priv_cmd_l2_register()
531 if (l2_packet_get_own_addr(iface->l2[idx], own_addr) < 0) { in wpa_priv_cmd_l2_register()
534 l2_packet_deinit(iface->l2[idx]); in wpa_priv_cmd_l2_register()
535 iface->l2[idx] = NULL; in wpa_priv_cmd_l2_register()
539 res = sendto(iface->fd, own_addr, ETH_ALEN, 0, in wpa_priv_cmd_l2_register()
552 if (iface->l2_addr_len[idx] == fromlen && in wpa_priv_cmd_l2_unregister()
553 os_memcmp(&iface->l2_addr[idx], from, fromlen) == 0) in wpa_priv_cmd_l2_unregister()
562 if (iface->l2[idx]) { in wpa_priv_cmd_l2_unregister()
563 l2_packet_deinit(iface->l2[idx]); in wpa_priv_cmd_l2_unregister()
564 iface->l2[idx] = NULL; in wpa_priv_cmd_l2_unregister()
575 if (iface->l2[idx]) in wpa_priv_cmd_l2_notify_auth_start()
576 l2_packet_notify_auth_start(iface->l2[idx]); in wpa_priv_cmd_l2_notify_auth_start()
591 if (iface->l2_addr_len[idx] == fromlen && in wpa_priv_cmd_l2_send()
592 os_memcmp(&iface->l2_addr[idx], from, fromlen) == 0) in wpa_priv_cmd_l2_send()
601 if (iface->l2[idx] == NULL) in wpa_priv_cmd_l2_send()
619 res = l2_packet_send(iface->l2[idx], dst_addr, proto, in wpa_priv_cmd_l2_send()
621 len - ETH_ALEN - 2); in wpa_priv_cmd_l2_send()
629 if (iface->drv_priv == NULL || iface->driver->set_country == NULL || in wpa_priv_cmd_set_country()
633 iface->driver->set_country(iface->drv_priv, buf); in wpa_priv_cmd_set_country()
661 cmd, iface->ifname); in wpa_priv_receive()
663 cmd_len = res - sizeof(int); in wpa_priv_receive()
724 if (iface->drv_priv) { in wpa_priv_interface_deinit()
725 if (iface->driver->deinit) in wpa_priv_interface_deinit()
726 iface->driver->deinit(iface->drv_priv); in wpa_priv_interface_deinit()
727 if (iface->drv_global_priv) in wpa_priv_interface_deinit()
728 iface->driver->global_deinit(iface->drv_global_priv); in wpa_priv_interface_deinit()
731 if (iface->fd >= 0) { in wpa_priv_interface_deinit()
732 eloop_unregister_read_sock(iface->fd); in wpa_priv_interface_deinit()
733 close(iface->fd); in wpa_priv_interface_deinit()
734 unlink(iface->sock_name); in wpa_priv_interface_deinit()
738 if (iface->l2[i]) in wpa_priv_interface_deinit()
739 l2_packet_deinit(iface->l2[i]); in wpa_priv_interface_deinit()
742 os_free(iface->ifname); in wpa_priv_interface_deinit()
743 os_free(iface->driver_name); in wpa_priv_interface_deinit()
744 os_free(iface->sock_name); in wpa_priv_interface_deinit()
765 iface->fd = -1; in wpa_priv_interface_init()
766 iface->ctx = ctx; in wpa_priv_interface_init()
768 len = pos - params; in wpa_priv_interface_init()
769 iface->driver_name = dup_binstr(params, len); in wpa_priv_interface_init()
770 if (iface->driver_name == NULL) { in wpa_priv_interface_init()
776 if (os_strcmp(iface->driver_name, in wpa_priv_interface_init()
777 wpa_drivers[i]->name) == 0) { in wpa_priv_interface_init()
778 iface->driver = wpa_drivers[i]; in wpa_priv_interface_init()
782 if (iface->driver == NULL) { in wpa_priv_interface_init()
784 iface->driver_name); in wpa_priv_interface_init()
790 iface->ifname = os_strdup(pos); in wpa_priv_interface_init()
791 if (iface->ifname == NULL) { in wpa_priv_interface_init()
796 len = os_strlen(dir) + 1 + os_strlen(iface->ifname); in wpa_priv_interface_init()
797 iface->sock_name = os_malloc(len + 1); in wpa_priv_interface_init()
798 if (iface->sock_name == NULL) { in wpa_priv_interface_init()
803 os_snprintf(iface->sock_name, len + 1, "%s/%s", dir, iface->ifname); in wpa_priv_interface_init()
804 if (os_strlen(iface->sock_name) >= sizeof(addr.sun_path)) { in wpa_priv_interface_init()
809 iface->fd = socket(PF_UNIX, SOCK_DGRAM, 0); in wpa_priv_interface_init()
810 if (iface->fd < 0) { in wpa_priv_interface_init()
818 os_strlcpy(addr.sun_path, iface->sock_name, sizeof(addr.sun_path)); in wpa_priv_interface_init()
820 if (bind(iface->fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in wpa_priv_interface_init()
823 if (connect(iface->fd, (struct sockaddr *) &addr, in wpa_priv_interface_init()
826 "allow connections - assuming it was " in wpa_priv_interface_init()
828 if (unlink(iface->sock_name) < 0) { in wpa_priv_interface_init()
831 iface->sock_name, strerror(errno)); in wpa_priv_interface_init()
834 if (bind(iface->fd, (struct sockaddr *) &addr, in wpa_priv_interface_init()
837 "wpa-priv-iface-init: bind(PF_UNIX): %s", in wpa_priv_interface_init()
842 "socket '%s'", iface->sock_name); in wpa_priv_interface_init()
845 "in use - cannot override it"); in wpa_priv_interface_init()
847 "not used anymore", iface->sock_name); in wpa_priv_interface_init()
852 if (chmod(iface->sock_name, S_IRWXU | S_IRWXG | S_IRWXO) < 0) { in wpa_priv_interface_init()
857 eloop_register_read_sock(iface->fd, wpa_priv_receive, iface, NULL); in wpa_priv_interface_init()
881 msg.msg_name = &iface->drv_addr; in wpa_priv_send_event()
882 msg.msg_namelen = iface->drv_addr_len; in wpa_priv_send_event()
884 if (sendmsg(iface->fd, &msg, 0) < 0) { in wpa_priv_send_event()
887 return -1; in wpa_priv_send_event()
897 size_t buflen = sizeof(struct privsep_event_auth) + data->auth.ies_len; in wpa_priv_send_auth()
908 os_memcpy(auth->peer, data->auth.peer, ETH_ALEN); in wpa_priv_send_auth()
909 os_memcpy(auth->bssid, data->auth.bssid, ETH_ALEN); in wpa_priv_send_auth()
910 auth->auth_type = data->auth.auth_type; in wpa_priv_send_auth()
911 auth->auth_transaction = data->auth.auth_transaction; in wpa_priv_send_auth()
912 auth->status_code = data->auth.status_code; in wpa_priv_send_auth()
913 if (data->auth.ies) { in wpa_priv_send_auth()
914 os_memcpy(pos, data->auth.ies, data->auth.ies_len); in wpa_priv_send_auth()
915 auth->ies_len = data->auth.ies_len; in wpa_priv_send_auth()
932 buflen += data->assoc_info.req_ies_len + in wpa_priv_send_assoc()
933 data->assoc_info.resp_ies_len + in wpa_priv_send_assoc()
934 data->assoc_info.beacon_ies_len; in wpa_priv_send_assoc()
943 if (data && data->assoc_info.req_ies) { in wpa_priv_send_assoc()
944 len = data->assoc_info.req_ies_len; in wpa_priv_send_assoc()
947 os_memcpy(pos, data->assoc_info.req_ies, len); in wpa_priv_send_assoc()
955 if (data && data->assoc_info.resp_ies) { in wpa_priv_send_assoc()
956 len = data->assoc_info.resp_ies_len; in wpa_priv_send_assoc()
959 os_memcpy(pos, data->assoc_info.resp_ies, len); in wpa_priv_send_assoc()
967 if (data && data->assoc_info.beacon_ies) { in wpa_priv_send_assoc()
968 len = data->assoc_info.beacon_ies_len; in wpa_priv_send_assoc()
971 os_memcpy(pos, data->assoc_info.beacon_ies, len); in wpa_priv_send_assoc()
996 ievent = data->interface_status.ievent; in wpa_priv_send_interface_status()
997 maxlen = sizeof(data->interface_status.ifname); in wpa_priv_send_interface_status()
998 ifname = data->interface_status.ifname; in wpa_priv_send_interface_status()
1023 if (data == NULL || data->ft_ies.ies == NULL) in wpa_priv_send_ft_response()
1026 len = sizeof(int) + ETH_ALEN + data->ft_ies.ies_len; in wpa_priv_send_ft_response()
1032 os_memcpy(pos, &data->ft_ies.ft_action, sizeof(int)); in wpa_priv_send_ft_response()
1034 os_memcpy(pos, data->ft_ies.target_ap, ETH_ALEN); in wpa_priv_send_ft_response()
1036 os_memcpy(pos, data->ft_ies.ies, data->ft_ies.ies_len); in wpa_priv_send_ft_response()
1050 wpa_printf(MSG_DEBUG, "%s - event=%d", __func__, event); in wpa_supplicant_event()
1052 if (!iface->wpas_registered) { in wpa_supplicant_event()
1074 &data->michael_mic_failure.unicast, in wpa_supplicant_event()
1092 &data->pmkid_candidate, in wpa_supplicant_event()
1102 wpa_printf(MSG_DEBUG, "Unsupported driver event %d (%s) - TODO", in wpa_supplicant_event()
1118 for (iface = global->interfaces; iface; iface = iface->next) { in wpa_supplicant_event_global()
1119 if (os_strcmp(iface->ifname, data->interface_status.ifname) == in wpa_supplicant_event_global()
1123 if (iface && iface->driver->get_ifindex) { in wpa_supplicant_event_global()
1126 ifindex = iface->driver->get_ifindex(iface->drv_priv); in wpa_supplicant_event_global()
1127 if (ifindex != data->interface_status.ifindex) { in wpa_supplicant_event_global()
1130 iface->ifname, ifindex, in wpa_supplicant_event_global()
1131 data->interface_status.ifindex); in wpa_supplicant_event_global()
1160 msg.msg_name = &iface->drv_addr; in wpa_supplicant_rx_eapol()
1161 msg.msg_namelen = iface->drv_addr_len; in wpa_supplicant_rx_eapol()
1163 if (sendmsg(iface->fd, &msg, 0) < 0) in wpa_supplicant_rx_eapol()
1180 /* When started from pcmcia-cs scripts, wpa_supplicant might start with in wpa_priv_fd_workaround()
1186 s = open("/dev/null", O_RDWR); in wpa_priv_fd_workaround()
1199 "Copyright (c) 2007-2017, Jouni Malinen <j@w1.fi> and " in usage()
1203 " wpa_priv [-Bdd] [-c<ctrl dir>] [-P<pid file>] " in usage()
1213 int ret = -1; in main()
1221 return -1; in main()
1240 wpa_debug_level--; in main()
1268 iface->next = global.interfaces; in main()
1284 iface = iface->next; in main()