Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 70) sorted by relevance

123

/hostap-3.7.0/src/ap/
Dvlan_ioctl.c21 int fd; in vlan_rem() local
31 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { in vlan_rem()
42 if (ioctl(fd, SIOCSIFVLAN, &if_request) < 0) { in vlan_rem()
45 close(fd); in vlan_rem()
49 close(fd); in vlan_rem()
64 int fd; in vlan_add() local
77 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { in vlan_add()
92 if (ioctl(fd, SIOCSIFVLAN, &if_request) == 0 && in vlan_add()
96 if (ioctl(fd, SIOCSIFVLAN, &if_request) == 0 && in vlan_add()
99 close(fd); in vlan_add()
[all …]
Dvlan_full.c135 int fd; in br_delif() local
141 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { in br_delif()
147 if (linux_br_del_if(fd, br_name, if_name) == 0) in br_delif()
156 close(fd); in br_delif()
166 if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0 && errno != EINVAL) { in br_delif()
171 close(fd); in br_delif()
176 close(fd); in br_delif()
190 int fd; in br_addif() local
196 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { in br_addif()
202 if (linux_br_add_if(fd, br_name, if_name) == 0) in br_addif()
[all …]
Dvlan_ifconfig.c21 int fd; in ifconfig_helper() local
24 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { in ifconfig_helper()
33 if (ioctl(fd, SIOCGIFFLAGS, &ifr) != 0) { in ifconfig_helper()
37 close(fd); in ifconfig_helper()
46 if (ioctl(fd, SIOCSIFFLAGS, &ifr) != 0) { in ifconfig_helper()
50 close(fd); in ifconfig_helper()
54 close(fd); in ifconfig_helper()
/hostap-3.7.0/src/wps/
Dhttp_server.c24 int fd; member
33 int fd; member
61 static struct http_request * http_request_init(struct http_server *srv, int fd, in http_request_init() argument
76 req->fd = fd; in http_request_init()
79 req->hread = httpread_create(req->fd, http_request_cb, req, in http_request_init()
116 close(req->fd); in http_request_deinit()
141 res = send(req->fd, wpabuf_head(resp), wpabuf_len(resp), 0); in http_request_send()
207 conn = accept(srv->fd, (struct sockaddr *) &addr, &addr_len); in http_server_cb()
243 srv->fd = socket(AF_INET, SOCK_STREAM, 0); in http_server_init()
244 if (srv->fd < 0) in http_server_init()
[all …]
/hostap-3.7.0/src/l2_packet/
Dl2_packet_privsep.c19 int fd; /* UNIX domain socket for privsep access */ member
46 if (sendmsg(l2->fd, &msg, 0) < 0) { in wpa_priv_cmd()
84 if (sendmsg(l2->fd, &msg, 0) < 0) { in l2_packet_send()
165 l2->fd = socket(PF_UNIX, SOCK_DGRAM, 0); in l2_packet_init()
166 if (l2->fd < 0) { in l2_packet_init()
177 if (bind(l2->fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in l2_packet_init()
192 FD_SET(l2->fd, &rfds); in l2_packet_init()
195 res = select(l2->fd + 1, &rfds, NULL, NULL, &tv); in l2_packet_init()
201 if (FD_ISSET(l2->fd, &rfds)) { in l2_packet_init()
202 res = recv(l2->fd, reply, sizeof(reply), 0); in l2_packet_init()
[all …]
Dl2_packet_zephyr.c31 int fd; member
51 ret = send(l2->fd, buf, len, 0); in l2_packet_send()
66 ret = sendto(l2->fd, buf, len, 0, (struct sockaddr *) &ll, in l2_packet_send()
146 l2->fd = socket(AF_PACKET, l2_hdr ? SOCK_RAW : SOCK_DGRAM, in l2_packet_init()
148 if (l2->fd < 0) { in l2_packet_init()
164 ret = bind(l2->fd, (const struct sockaddr *) &ll, sizeof(ll)); in l2_packet_init()
170 eloop_register_read_sock(l2->fd, l2_packet_receive, l2, NULL); in l2_packet_init()
178 if (l2->fd >= 0) in l2_packet_init()
179 close(l2->fd); in l2_packet_init()
202 if (l2->fd >= 0) { in l2_packet_deinit()
[all …]
Dl2_packet_linux.c23 int fd; /* packet socket for EAPOL frames */ member
125 ret = send(l2->fd, buf, len, 0); in l2_packet_send()
137 ret = sendto(l2->fd, buf, len, 0, (struct sockaddr *) &ll, in l2_packet_send()
292 l2->fd = socket(PF_PACKET, l2_hdr ? SOCK_RAW : SOCK_DGRAM, in l2_packet_init()
294 if (l2->fd < 0) { in l2_packet_init()
302 if (ioctl(l2->fd, SIOCGIFINDEX, &ifr) < 0) { in l2_packet_init()
305 close(l2->fd); in l2_packet_init()
316 bind(l2->fd, (struct sockaddr *) &ll, sizeof(ll)) < 0) { in l2_packet_init()
319 close(l2->fd); in l2_packet_init()
324 if (ioctl(l2->fd, SIOCGIFHWADDR, &ifr) < 0) { in l2_packet_init()
[all …]
Dl2_packet_none.c26 int fd; member
86 l2->fd = -1; in l2_packet_init()
87 if (rx_callback && l2->fd >= 0) in l2_packet_init()
88 eloop_register_read_sock(l2->fd, l2_packet_receive, l2, NULL); in l2_packet_init()
111 if (l2->fd >= 0) { in l2_packet_deinit()
112 eloop_unregister_read_sock(l2->fd); in l2_packet_deinit()
/hostap-3.7.0/src/drivers/
Drfkill.c49 int fd; member
62 len = read(rfkill->fd, &event, sizeof(event)); in rfkill_receive()
126 rfkill->fd = open("/dev/rfkill", O_RDONLY); in rfkill_init()
127 if (rfkill->fd < 0) { in rfkill_init()
133 if (fcntl(rfkill->fd, F_SETFL, O_NONBLOCK) < 0) { in rfkill_init()
140 len = read(rfkill->fd, &event, sizeof(event)); in rfkill_init()
189 eloop_register_read_sock(rfkill->fd, rfkill_receive, rfkill, NULL); in rfkill_init()
194 close(rfkill->fd); in rfkill_init()
208 if (rfkill->fd >= 0) { in rfkill_deinit()
209 eloop_unregister_read_sock(rfkill->fd); in rfkill_deinit()
[all …]
Ddriver_roboswitch.c61 int fd, is_5350; member
93 if (ioctl(drv->fd, SIOCGMIIREG, &drv->ifr) < 0) { in wpa_driver_roboswitch_mdio_read()
111 if (ioctl(drv->fd, SIOCSMIIREG, &drv->ifr) < 0) { in wpa_driver_roboswitch_mdio_write()
397 drv->fd = socket(PF_INET, SOCK_DGRAM, 0); in wpa_driver_roboswitch_init()
398 if (drv->fd < 0) { in wpa_driver_roboswitch_init()
406 if (ioctl(drv->fd, SIOCGMIIPHY, &drv->ifr) < 0) { in wpa_driver_roboswitch_init()
472 close(drv->fd); in wpa_driver_roboswitch_deinit()
/hostap-3.7.0/wpa_supplicant/dbus/
Ddbus_common.c103 int fd; in add_watch() local
109 fd = dbus_watch_get_unix_fd(watch); in add_watch()
111 if (eloop_register_sock(fd, EVENT_TYPE_EXCEPTION, in add_watch()
116 eloop_register_sock(fd, EVENT_TYPE_READ, process_watch_read, in add_watch()
120 eloop_register_sock(fd, EVENT_TYPE_WRITE, process_watch_write, in add_watch()
133 int fd; in remove_watch() local
136 fd = dbus_watch_get_unix_fd(watch); in remove_watch()
138 eloop_unregister_sock(fd, EVENT_TYPE_EXCEPTION); in remove_watch()
141 eloop_unregister_sock(fd, EVENT_TYPE_READ); in remove_watch()
143 eloop_unregister_sock(fd, EVENT_TYPE_WRITE); in remove_watch()
/hostap-3.7.0/wpa_supplicant/
Dmain.c131 static int fd[3] = { -1, -1, -1 }; in wpa_supplicant_fd_workaround() local
140 fd[i] = open("/dev/null", O_RDWR); in wpa_supplicant_fd_workaround()
141 if (fd[i] > 2) { in wpa_supplicant_fd_workaround()
142 close(fd[i]); in wpa_supplicant_fd_workaround()
143 fd[i] = -1; in wpa_supplicant_fd_workaround()
149 if (fd[i] >= 0) { in wpa_supplicant_fd_workaround()
150 close(fd[i]); in wpa_supplicant_fd_workaround()
151 fd[i] = -1; in wpa_supplicant_fd_workaround()
Dwpa_priv.c31 int fd; member
214 sendto(iface->fd, buf, pos - buf, 0, (struct sockaddr *) from, fromlen); in wpa_priv_get_scan_results2()
223 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_get_scan_results2()
237 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_cmd_get_scan_results()
353 sendto(iface->fd, bssid, ETH_ALEN, 0, (struct sockaddr *) from, in wpa_priv_cmd_get_bssid()
358 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_cmd_get_bssid()
380 sendto(iface->fd, ssid, sizeof(ssid), 0, (struct sockaddr *) from, in wpa_priv_cmd_get_ssid()
385 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_cmd_get_ssid()
439 sendto(iface->fd, &capa, sizeof(capa), 0, (struct sockaddr *) from, in wpa_priv_cmd_get_capa()
444 sendto(iface->fd, "", 0, 0, (struct sockaddr *) from, fromlen); in wpa_priv_cmd_get_capa()
[all …]
/hostap-3.7.0/src/utils/
Deloop.c217 ev.data.fd = sock; in eloop_sock_queue()
435 static struct pollfd * find_pollfd(struct pollfd **pollfds_map, int fd, int mx) in find_pollfd() argument
437 if (fd < mx && fd >= 0) in find_pollfd()
438 return pollfds_map[fd]; in find_pollfd()
452 int fd; in eloop_sock_table_set_fds() local
460 fd = readers->table[i].sock; in eloop_sock_table_set_fds()
461 assert(fd >= 0 && fd < max_pollfd_map); in eloop_sock_table_set_fds()
462 pollfds[nxt].fd = fd; in eloop_sock_table_set_fds()
465 pollfds_map[fd] = &(pollfds[nxt]); in eloop_sock_table_set_fds()
476 fd = writers->table[i].sock; in eloop_sock_table_set_fds()
[all …]
/hostap-3.7.0/tests/hwsim/
Dtest_wmediumd.py129 fd, fn = tempfile.mkstemp()
131 f = os.fdopen(fd, 'w')
154 fd, fn = tempfile.mkstemp()
156 f = os.fdopen(fd, 'w')
252 fd, fn = tempfile.mkstemp()
254 f = os.fdopen(fd, 'w')
334 fd, fn = tempfile.mkstemp()
336 f = os.fdopen(fd, 'w')
469 fd, fn = tempfile.mkstemp()
471 f = os.fdopen(fd, 'w')
Drfkill.py130 fd = rfk.fileno()
131 flgs = fcntl.fcntl(fd, fcntl.F_GETFL)
132 fcntl.fcntl(fd, fcntl.F_SETFL, flgs | os.O_NONBLOCK)
/hostap-3.7.0/src/common/
Dwpa_helpers.c103 int fd, ret; in get_wpa_cli_event2() local
110 fd = wpa_ctrl_get_fd(mon); in get_wpa_cli_event2()
111 if (fd < 0) in get_wpa_cli_event2()
119 FD_SET(fd, &rfd); in get_wpa_cli_event2()
122 ret = select(fd + 1, &rfd, NULL, NULL, &tv); in get_wpa_cli_event2()
/hostap-3.7.0/tests/hwsim/auth_serv/
Docsp-responder.pem17 6e:a1:43:33:b5:fd:02:fe:1f:c8:23:04:8b:8c:51:
24 ff:36:6f:42:27:d8:4b:c6:e1:be:f8:08:cf:ac:fd:
28 b8:04:d4:d6:93:62:fd:af:f9:b4:1d:f4:96:3e:9b:
46 fe:b6:a0:cd:68:6b:3a:fd:a5:cc:63:e3:b2:90:70:bd:85:d8:
53 c0:a1:f0:25:39:30:ef:44:79:ad:8b:18:fd:06:4c:c0:4b:62:
Dsha512-server.pem17 d3:4a:14:fb:3e:5c:50:a2:84:b3:2e:fd:09:cd:c4:
36 bd:89:af:c8:a3:84:a0:27:b5:89:98:fd:3c:58:f4:
43 f6:77:d0:76:5c:fc:3c:63:2e:fd:3f:42:41:36:72:
64 60:82:4a:d7:e9:a5:6e:cb:ec:4b:79:d4:48:3f:e3:fd:1f:e2:
71 d6:60:ca:b5:d5:8d:ff:fd:57:6b:fb:05:23:62:8f:4e:bf:03:
74 5b:3f:0c:47:f2:a3:54:5d:e0:3a:0c:eb:77:3b:d5:fd:03:1e:
Dca-incorrect.pem18 5f:58:c7:35:22:b6:9c:20:40:fd:f5:f4:f9:4c:74:
45 ec:fa:35:53:f9:7c:fd:e1:1e:b0:ec:bc:44:45:6e:47:26:9a:
55 c8:1c:9b:bd:e6:c1:22:c8:34:17:fd:64:3a:3f:30:75:36:18:
57 81:fd:5e:97:5d:c5:d1:dd:f1:61:2d:f5:ce:06:7f:4d:2e:a4:
Drsa3072-server.pem30 d0:f7:7e:40:4d:3d:fd:ad:2f:cf:40:dd:d4:c0:6b:
40 67:fd:93:cb:b2:7a:b5:56:61:9e:2f:ce:69:fa:fa:
74 a3:43:a5:50:80:fd:11:1d:2c:ff:27:8d:e9:71:6d:c6:01:20:
75 0d:9a:5e:6c:c6:11:83:da:cc:fd:dd:a3:59:5c:b1:64:e1:81:
/hostap-3.7.0/src/crypto/
Drandom.c222 int fd; in random_pool_ready() local
258 fd = open("/dev/random", O_RDONLY | O_NONBLOCK); in random_pool_ready()
259 if (fd < 0) { in random_pool_ready()
266 res = read(fd, stub_key + stub_key_avail, in random_pool_ready()
274 close(fd); in random_pool_ready()
/hostap-3.7.0/wpa_supplicant/examples/
Dp2p-nfc.py372 fd = sys.stdin.fileno()
373 termios.tcsetattr(fd, termios.TCSADRAIN, prev_tcgetattr)
380 fd = sys.stdin.fileno()
381 prev_tcgetattr = termios.tcgetattr(fd)
384 tty.setraw(fd)
386 [i, o, e] = select.select([fd], [], [], 0.05)
390 termios.tcsetattr(fd, termios.TCSADRAIN, prev_tcgetattr)
/hostap-3.7.0/tests/hwsim/vm/
Dvm-run.sh166 ssl0=fd:0,fd:1 \
167 ssl1=fd:100 \
Dinside.sh52 ln -s /proc/self/fd/0 /dev/stdin
53 ln -s /proc/self/fd/1 /dev/stdout
54 ln -s /proc/self/fd/2 /dev/stderr

123