1*cd4e3c3eSJouni Malinen /* 2*cd4e3c3eSJouni Malinen * Sigma Control API DUT (station/AP) 3*cd4e3c3eSJouni Malinen * Copyright (c) 2010, Atheros Communications, Inc. 4*cd4e3c3eSJouni Malinen * Copyright (c) 2012-2014, Qualcomm Atheros, Inc. 5*cd4e3c3eSJouni Malinen * All Rights Reserved. 6*cd4e3c3eSJouni Malinen * Licensed under the Clear BSD license. See README for more details. 7*cd4e3c3eSJouni Malinen */ 8*cd4e3c3eSJouni Malinen 9*cd4e3c3eSJouni Malinen #ifndef WPA_HELPERS_H 10*cd4e3c3eSJouni Malinen #define WPA_HELPERS_H 11*cd4e3c3eSJouni Malinen 12*cd4e3c3eSJouni Malinen char * get_main_ifname(void); 13*cd4e3c3eSJouni Malinen char * get_station_ifname(void); 14*cd4e3c3eSJouni Malinen void dut_ifc_reset(struct sigma_dut *dut); 15*cd4e3c3eSJouni Malinen 16*cd4e3c3eSJouni Malinen int wpa_command(const char *ifname, const char *cmd); 17*cd4e3c3eSJouni Malinen int wpa_command_resp(const char *ifname, const char *cmd, 18*cd4e3c3eSJouni Malinen char *resp, size_t resp_size); 19*cd4e3c3eSJouni Malinen int get_wpa_status(const char *ifname, const char *field, char *obuf, 20*cd4e3c3eSJouni Malinen size_t obuf_size); 21*cd4e3c3eSJouni Malinen void remove_wpa_networks(const char *ifname); 22*cd4e3c3eSJouni Malinen 23*cd4e3c3eSJouni Malinen struct wpa_ctrl * open_wpa_mon(const char *ifname); 24*cd4e3c3eSJouni Malinen int wait_ip_addr(struct sigma_dut *dut, const char *ifname, int timeout); 25*cd4e3c3eSJouni Malinen int get_wpa_cli_event(struct sigma_dut *dut, struct wpa_ctrl *mon, 26*cd4e3c3eSJouni Malinen const char *event, char *buf, size_t buf_size); 27*cd4e3c3eSJouni Malinen int get_wpa_cli_event2(struct sigma_dut *dut, struct wpa_ctrl *mon, 28*cd4e3c3eSJouni Malinen const char *event, const char *event2, 29*cd4e3c3eSJouni Malinen char *buf, size_t buf_size); 30*cd4e3c3eSJouni Malinen int get_wpa_cli_events(struct sigma_dut *dut, struct wpa_ctrl *mon, 31*cd4e3c3eSJouni Malinen const char **events, char *buf, size_t buf_size); 32*cd4e3c3eSJouni Malinen 33*cd4e3c3eSJouni Malinen int add_network(const char *ifname); 34*cd4e3c3eSJouni Malinen int set_network(const char *ifname, int id, const char *field, 35*cd4e3c3eSJouni Malinen const char *value); 36*cd4e3c3eSJouni Malinen int set_network_quoted(const char *ifname, int id, const char *field, 37*cd4e3c3eSJouni Malinen const char *value); 38*cd4e3c3eSJouni Malinen int add_cred(const char *ifname); 39*cd4e3c3eSJouni Malinen int set_cred(const char *ifname, int id, const char *field, const char *value); 40*cd4e3c3eSJouni Malinen int set_cred_quoted(const char *ifname, int id, const char *field, 41*cd4e3c3eSJouni Malinen const char *value); 42*cd4e3c3eSJouni Malinen 43*cd4e3c3eSJouni Malinen int start_sta_mode(struct sigma_dut *dut); 44*cd4e3c3eSJouni Malinen void stop_sta_mode(struct sigma_dut *dut); 45*cd4e3c3eSJouni Malinen 46*cd4e3c3eSJouni Malinen #endif /* WPA_HELPERS_H */ 47