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