xref: /netbsd-src/external/bsd/wpa/dist/src/common/wpa_helpers.h (revision 3c260e60464a854d43a997892d1e6c468d47919a)
1*3c260e60Schristos /*
2*3c260e60Schristos  * wpa_supplicant ctrl_iface helpers
3*3c260e60Schristos  * Copyright (c) 2010-2011, Atheros Communications, Inc.
4*3c260e60Schristos  * Copyright (c) 2011-2012, Qualcomm Atheros, Inc.
5*3c260e60Schristos  *
6*3c260e60Schristos  * This software may be distributed under the terms of the BSD license.
7*3c260e60Schristos  * See README for more details.
8*3c260e60Schristos  */
9*3c260e60Schristos 
10*3c260e60Schristos #ifndef WPA_HELPERS_H
11*3c260e60Schristos #define WPA_HELPERS_H
12*3c260e60Schristos 
13*3c260e60Schristos int wpa_command(const char *ifname, const char *cmd);
14*3c260e60Schristos int wpa_command_resp(const char *ifname, const char *cmd,
15*3c260e60Schristos 		     char *resp, size_t resp_size);
16*3c260e60Schristos int get_wpa_status(const char *ifname, const char *field, char *obuf,
17*3c260e60Schristos 		   size_t obuf_size);
18*3c260e60Schristos 
19*3c260e60Schristos struct wpa_ctrl * open_wpa_mon(const char *ifname);
20*3c260e60Schristos int wait_ip_addr(const char *ifname, int timeout);
21*3c260e60Schristos int get_wpa_cli_event(struct wpa_ctrl *mon,
22*3c260e60Schristos 		      const char *event, char *buf, size_t buf_size);
23*3c260e60Schristos int get_wpa_cli_event2(struct wpa_ctrl *mon,
24*3c260e60Schristos 		       const char *event, const char *event2,
25*3c260e60Schristos 		       char *buf, size_t buf_size);
26*3c260e60Schristos 
27*3c260e60Schristos int add_network(const char *ifname);
28*3c260e60Schristos int set_network(const char *ifname, int id, const char *field,
29*3c260e60Schristos 		const char *value);
30*3c260e60Schristos int set_network_quoted(const char *ifname, int id, const char *field,
31*3c260e60Schristos 		       const char *value);
32*3c260e60Schristos int add_cred(const char *ifname);
33*3c260e60Schristos int set_cred(const char *ifname, int id, const char *field, const char *value);
34*3c260e60Schristos int set_cred_quoted(const char *ifname, int id, const char *field,
35*3c260e60Schristos 		    const char *value);
36*3c260e60Schristos 
37*3c260e60Schristos #endif /* WPA_HELPERS_H */
38