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