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