Home
last modified time | relevance | path

Searched refs:ctrl (Results 1 – 25 of 48) sorted by relevance

12

/hostap-latest/src/common/
Dwpa_ctrl.c105 struct wpa_ctrl *ctrl; in wpa_ctrl_open2() local
115 ctrl = os_zalloc(sizeof(*ctrl)); in wpa_ctrl_open2()
116 if (ctrl == NULL) in wpa_ctrl_open2()
119 ctrl->s = socket(PF_UNIX, SOCK_DGRAM, 0); in wpa_ctrl_open2()
120 if (ctrl->s < 0) { in wpa_ctrl_open2()
121 os_free(ctrl); in wpa_ctrl_open2()
125 ctrl->local.sun_family = AF_UNIX; in wpa_ctrl_open2()
129 ret = os_snprintf(ctrl->local.sun_path, in wpa_ctrl_open2()
130 sizeof(ctrl->local.sun_path), in wpa_ctrl_open2()
134 ret = os_snprintf(ctrl->local.sun_path, in wpa_ctrl_open2()
[all …]
Dwpa_helpers.c25 struct wpa_ctrl *ctrl; in wpa_open_ctrl() local
28 ctrl = wpa_ctrl_open(buf); in wpa_open_ctrl()
29 if (ctrl == NULL) in wpa_open_ctrl()
31 return ctrl; in wpa_open_ctrl()
37 struct wpa_ctrl *ctrl; in wpa_command() local
42 ctrl = wpa_open_ctrl(ifname); in wpa_command()
43 if (ctrl == NULL) in wpa_command()
46 if (wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len, NULL) < 0) { in wpa_command()
48 wpa_ctrl_close(ctrl); in wpa_command()
51 wpa_ctrl_close(ctrl); in wpa_command()
[all …]
Ddpp_tcp.c25 struct dpp_controller *ctrl; member
141 struct dpp_relay_controller *ctrl; in dpp_relay_add_controller() local
147 ctrl = os_zalloc(sizeof(*ctrl)); in dpp_relay_add_controller()
148 if (!ctrl) in dpp_relay_add_controller()
150 dl_list_init(&ctrl->conn); in dpp_relay_add_controller()
151 ctrl->global = dpp; in dpp_relay_add_controller()
152 os_memcpy(&ctrl->ipaddr, config->ipaddr, sizeof(*config->ipaddr)); in dpp_relay_add_controller()
153 os_memcpy(ctrl->pkhash, config->pkhash, SHA256_MAC_LEN); in dpp_relay_add_controller()
154 ctrl->msg_ctx = config->msg_ctx; in dpp_relay_add_controller()
155 ctrl->cb_ctx = config->cb_ctx; in dpp_relay_add_controller()
[all …]
Dwpa_ctrl.h561 void wpa_ctrl_close(struct wpa_ctrl *ctrl);
590 int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len,
605 int wpa_ctrl_attach(struct wpa_ctrl *ctrl);
617 int wpa_ctrl_detach(struct wpa_ctrl *ctrl);
634 int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len);
647 int wpa_ctrl_pending(struct wpa_ctrl *ctrl);
663 int wpa_ctrl_get_fd(struct wpa_ctrl *ctrl);
683 char * wpa_ctrl_get_remote_ifname(struct wpa_ctrl *ctrl);
686 int wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd);
687 int wpa_ctrl_command_interactive(struct wpa_ctrl *ctrl, const char *cmd);
[all …]
Dnan_de.c211 u8 ctrl = type; in nan_de_tx_sdf() local
238 wpabuf_put_u8(buf, ctrl); in nan_de_tx_sdf()
857 u8 ctrl = 0; in nan_de_rx_subscribe() local
901 ctrl |= NAN_SRV_CTRL_PUBLISH; in nan_de_rx_subscribe()
902 wpabuf_put_u8(buf, ctrl); in nan_de_rx_subscribe()
981 u8 instance_id, req_instance_id, ctrl; in nan_de_rx_sda() local
1001 ctrl = *sda; in nan_de_rx_sda()
1002 type = ctrl & NAN_SRV_CTRL_TYPE_MASK; in nan_de_rx_sda()
1006 ctrl, type); in nan_de_rx_sda()
1016 if (ctrl & NAN_SRV_CTRL_BINDING_BITMAP) { in nan_de_rx_sda()
[all …]
/hostap-latest/wpa_supplicant/
Dwpa_cli_cmds.c39 static int wpa_cli_cmd(struct wpa_ctrl *ctrl, const char *cmd, int min_args, in wpa_cli_cmd() argument
68 ret = wpa_ctrl_command_interactive(ctrl, buf); in wpa_cli_cmd()
70 ret = wpa_ctrl_command(ctrl, buf); in wpa_cli_cmd()
203 static int wpa_cli_cmd_set_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_set_network() argument
217 return wpa_cli_cmd(ctrl, "SET_NETWORK", 3, argc, argv); in wpa_cli_cmd_set_network()
221 static int wpa_cli_cmd_get_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_network() argument
235 return wpa_cli_cmd(ctrl, "GET_NETWORK", 2, argc, argv); in wpa_cli_cmd_get_network()
238 static int wpa_cli_cmd_list_networks(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_networks() argument
241 return wpa_cli_cmd(ctrl, "LIST_NETWORKS", 0, argc, argv); in wpa_cli_cmd_list_networks()
245 static int wpa_cli_cmd_select_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_select_network() argument
[all …]
Dwpa_cli.c79 static void update_creds(struct wpa_ctrl *ctrl);
80 static void update_networks(struct wpa_ctrl *ctrl);
81 static void update_stations(struct wpa_ctrl *ctrl);
82 static void update_ifnames(struct wpa_ctrl *ctrl);
231 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print) in _wpa_ctrl_command() argument
249 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, in _wpa_ctrl_command()
273 int wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd) in wpa_ctrl_command() argument
275 static int wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd) in wpa_ctrl_command()
311 static int wpa_cli_cmd(struct wpa_ctrl *ctrl, const char *cmd, int min_args, in wpa_cli_cmd() argument
332 ret = wpa_ctrl_command(ctrl, buf); in wpa_cli_cmd()
[all …]
Dlibwpa_test.c15 struct wpa_ctrl *ctrl; in main() local
17 ctrl = wpa_ctrl_open("foo"); in main()
18 if (!ctrl) in main()
20 if (wpa_ctrl_attach(ctrl) == 0) in main()
21 wpa_ctrl_detach(ctrl); in main()
22 if (wpa_ctrl_pending(ctrl)) { in main()
27 wpa_ctrl_recv(ctrl, buf, &len); in main()
29 wpa_ctrl_close(ctrl); in main()
Dwpa_cli_zephyr.c44 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print, char *resp) in _wpa_ctrl_command() argument
62 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, wpa_cli_msg_cb); in _wpa_ctrl_command()
92 static int wpa_ctrl_command_resp(struct wpa_ctrl *ctrl, const char *cmd, char *resp) in wpa_ctrl_command_resp() argument
94 return _wpa_ctrl_command(ctrl, cmd, 0, resp); in wpa_ctrl_command_resp()
126 static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl, struct wpa_supplicant *wpa_s) in wpa_cli_recv_pending() argument
128 while (wpa_ctrl_pending(ctrl) > 0) { in wpa_cli_recv_pending()
133 if (wpa_ctrl_recv(ctrl, buf, &hlen) == 0 && in wpa_cli_recv_pending()
141 if (wpa_ctrl_recv(ctrl, buf + sizeof(int), &plen) == 0) { in wpa_cli_recv_pending()
364 int wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd) in wpa_ctrl_command() argument
366 return _wpa_ctrl_command(ctrl, cmd, 0, NULL); in wpa_ctrl_command()
[all …]
Dctrl_iface_unix.c1179 const char *ctrl = global->params.ctrl_interface; in wpas_global_ctrl_iface_open_sock() local
1182 wpa_printf(MSG_DEBUG, "Global control interface '%s'", ctrl); in wpas_global_ctrl_iface_open_sock()
1185 if (os_strncmp(ctrl, "@android:", 9) == 0) { in wpas_global_ctrl_iface_open_sock()
1186 priv->sock = android_get_control_socket(ctrl + 9); in wpas_global_ctrl_iface_open_sock()
1189 "socket '%s'", ctrl + 9); in wpas_global_ctrl_iface_open_sock()
1193 ctrl + 9); in wpas_global_ctrl_iface_open_sock()
1198 if (os_strncmp(ctrl, "@abstract:", 10) != 0) { in wpas_global_ctrl_iface_open_sock()
1204 priv->sock = android_get_control_socket(ctrl); in wpas_global_ctrl_iface_open_sock()
1208 ctrl); in wpas_global_ctrl_iface_open_sock()
1227 if (os_strncmp(ctrl, "@abstract:", 10) == 0) { in wpas_global_ctrl_iface_open_sock()
[all …]
Deapol_test.py25 self.ctrl = wpaspy.Ctrl(os.path.join(wpas_ctrl, ifname))
26 if "PONG" not in self.ctrl.request("PING"):
56 return self.ctrl.request(cmd, timeout=timeout)
128 if args.ctrl:
130 wpas_ctrl = args.ctrl
/hostap-latest/hostapd/
Dhostapd_cli_cmds.c23 static int hostapd_cli_cmd(struct wpa_ctrl *ctrl, const char *cmd, in hostapd_cli_cmd() argument
52 ret = hostapd_ctrl_command_interactive(ctrl, buf); in hostapd_cli_cmd()
54 ret = hostapd_ctrl_command(ctrl, buf); in hostapd_cli_cmd()
61 static int hostapd_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) in hostapd_cli_cmd_set() argument
72 return hostapd_cli_cmd(ctrl, cmd, 0, argc, argv); in hostapd_cli_cmd_set()
75 return hostapd_cli_cmd(ctrl, "SET", 2, argc, argv); in hostapd_cli_cmd_set()
117 static int hostapd_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc, in hostapd_cli_cmd_disassociate() argument
131 return hostapd_ctrl_command(ctrl, buf); in hostapd_cli_cmd_disassociate()
135 static int hostapd_cli_cmd_deauthenticate(struct wpa_ctrl *ctrl, int argc, in hostapd_cli_cmd_deauthenticate() argument
149 return hostapd_ctrl_command(ctrl, buf); in hostapd_cli_cmd_deauthenticate()
[all …]
Dhostapd_cli.c48 static void update_stations(struct wpa_ctrl *ctrl);
82 static void register_event_handler(struct wpa_ctrl *ctrl) in register_event_handler() argument
88 !eloop_register_read_sock(wpa_ctrl_get_fd(ctrl), in register_event_handler()
95 static void unregister_event_handler(struct wpa_ctrl *ctrl) in unregister_event_handler() argument
100 eloop_unregister_read_sock(wpa_ctrl_get_fd(ctrl)); in unregister_event_handler()
193 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print) in _wpa_ctrl_command() argument
204 ret = wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len, in _wpa_ctrl_command()
221 static inline int wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd) in wpa_ctrl_command() argument
223 return _wpa_ctrl_command(ctrl, cmd, 1); in wpa_ctrl_command()
227 static int hostapd_cli_cmd(struct wpa_ctrl *ctrl, const char *cmd, in hostapd_cli_cmd() argument
[all …]
Dhostapd_cli_zephyr.c162 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print, char *resp) in _wpa_ctrl_command() argument
180 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, hostapd_cli_msg_cb); in _wpa_ctrl_command()
210 int hostapd_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd) in hostapd_ctrl_command() argument
212 return _wpa_ctrl_command(ctrl, cmd, 0, NULL); in hostapd_ctrl_command()
215 int hostapd_ctrl_command_interactive(struct wpa_ctrl *ctrl, const char *cmd) in hostapd_ctrl_command_interactive() argument
217 return _wpa_ctrl_command(ctrl, cmd, 1, NULL); in hostapd_ctrl_command_interactive()
250 static void hostapd_cli_recv_pending(struct wpa_ctrl *ctrl, struct hostapd_data *hapd) in hostapd_cli_recv_pending() argument
252 while (wpa_ctrl_pending(ctrl) > 0) { in hostapd_cli_recv_pending()
257 if (wpa_ctrl_recv(ctrl, buf, &hlen) == 0 && in hostapd_cli_recv_pending()
265 if (wpa_ctrl_recv(ctrl, buf + sizeof(int), &plen) == 0) { in hostapd_cli_recv_pending()
Dhostapd_cli_zephyr.h17 int hostapd_request(struct wpa_ctrl *ctrl, int argc, char *argv[]);
18 int hostapd_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd);
19 int hostapd_ctrl_command_interactive(struct wpa_ctrl *ctrl, const char *cmd);
/hostap-latest/wpaspy/
Dwpaspy.c17 struct wpa_ctrl *ctrl; member
30 self->ctrl = wpa_ctrl_open(path); in wpaspy_open()
31 if (self->ctrl == NULL) in wpaspy_open()
40 if (self->ctrl) { in wpaspy_close()
42 wpa_ctrl_detach(self->ctrl); in wpaspy_close()
43 wpa_ctrl_close(self->ctrl); in wpaspy_close()
44 self->ctrl = NULL; in wpaspy_close()
62 ret = wpa_ctrl_request(self->ctrl, cmd, strlen(cmd), buf, &buflen, in wpaspy_request()
85 ret = wpa_ctrl_attach(self->ctrl); in wpaspy_attach()
101 ret = wpa_ctrl_detach(self->ctrl); in wpaspy_detach()
[all …]
Dtest.py38 for ctrl in ifaces:
40 wpas = wpaspy.Ctrl(ctrl)
/hostap-latest/wpa_supplicant/wpa_gui-qt4/
Daddinterface.cpp59 struct wpa_ctrl *ctrl; in addInterfaces() local
64 ctrl = wpa_ctrl_open(NULL); in addInterfaces()
65 if (ctrl == NULL) in addInterfaces()
69 ret = wpa_ctrl_request(ctrl, "INTERFACE_LIST", 14, buf, &len, NULL); in addInterfaces()
71 wpa_ctrl_close(ctrl); in addInterfaces()
76 wpa_ctrl_close(ctrl); in addInterfaces()
188 struct wpa_ctrl *ctrl; in interfaceSelected() local
205 ctrl = wpa_ctrl_open(NULL); in interfaceSelected()
206 if (ctrl == NULL) in interfaceSelected()
210 ret = wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len, NULL); in interfaceSelected()
[all …]
/hostap-latest/src/fst/
Dfst.c134 struct fst_ctrl_handle * fst_global_add_ctrl(const struct fst_ctrl *ctrl) in fst_global_add_ctrl() argument
138 if (!ctrl) in fst_global_add_ctrl()
145 if (ctrl->init && ctrl->init()) { in fst_global_add_ctrl()
150 h->ctrl = *ctrl; in fst_global_add_ctrl()
160 if (h->ctrl.deinit) in fst_global_del_ctrl()
161 h->ctrl.deinit(); in fst_global_del_ctrl()
Dfst_internal.h34 struct fst_ctrl ctrl; member
45 if (__fst_ctrl_h->ctrl.clb) \
46 __fst_ctrl_h->ctrl.clb(__VA_ARGS__);\
/hostap-latest/tests/hwsim/
Dhostapd.py41 self.ctrl = wpaspy.Ctrl(global_ctrl)
45 self.ctrl = wpaspy.Ctrl(hostname, port)
66 return self.ctrl.request(cmd, timeout)
142 self.ctrl.terminate()
143 self.ctrl = None
149 def __init__(self, ifname, bssidx=0, hostname=None, ctrl=hapd_ctrl, argument
155 self.ctrl = wpaspy.Ctrl(os.path.join(ctrl, ifname))
156 self.mon = wpaspy.Ctrl(os.path.join(ctrl, ifname))
159 self.ctrl = wpaspy.Ctrl(hostname, port)
186 self.ctrl.close()
[all …]
/hostap-latest/doc/
Dp2p_arch.dot17 gui_ctrl [label="ctrl i/f"];
23 ctrl_iface [label="ctrl i/f"];
Dp2p_arch2.dot17 gui_ctrl [label="ctrl i/f"];
23 ctrl_iface [label="ctrl i/f"];
/hostap-latest/wpa_supplicant/examples/
Ddpp-qrcode.py35 for ctrl in ifaces:
37 wpas = wpaspy.Ctrl(ctrl)
Dp2p-nfc.py64 for ctrl in ifaces:
66 if ifname not in ctrl:
69 print("Trying to use control interface " + ctrl)
70 wpas = wpaspy.Ctrl(ctrl)

12