Home | History | Annotate | Download | only in common
      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 
     13 int wpa_command(const char *ifname, const char *cmd);
     14 int wpa_command_resp(const char *ifname, const char *cmd,
     15 		     char *resp, size_t resp_size);
     16 int get_wpa_status(const char *ifname, const char *field, char *obuf,
     17 		   size_t obuf_size);
     18 
     19 struct wpa_ctrl * open_wpa_mon(const char *ifname);
     20 int wait_ip_addr(const char *ifname, int timeout);
     21 int get_wpa_cli_event(struct wpa_ctrl *mon,
     22 		      const char *event, char *buf, size_t buf_size);
     23 int get_wpa_cli_event2(struct wpa_ctrl *mon,
     24 		       const char *event, const char *event2,
     25 		       char *buf, size_t buf_size);
     26 
     27 int add_network(const char *ifname);
     28 int set_network(const char *ifname, int id, const char *field,
     29 		const char *value);
     30 int set_network_quoted(const char *ifname, int id, const char *field,
     31 		       const char *value);
     32 int add_cred(const char *ifname);
     33 int set_cred(const char *ifname, int id, const char *field, const char *value);
     34 int set_cred_quoted(const char *ifname, int id, const char *field,
     35 		    const char *value);
     36 
     37 #endif /* WPA_HELPERS_H */
     38