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