aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-09-23 19:02:28 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-23 19:02:28 (GMT)
commit403b96fe4f31e4bf2ca7f2715da179bc7b025085 (patch)
tree53717a56fc209640cd8a2e73482748873ef18cac /hostapd/hostapd_cli.c
parent3981cb3cb81641813b1f51292032f2225ccdd70b (diff)
downloadhostap-403b96fe4f31e4bf2ca7f2715da179bc7b025085.zip
hostap-403b96fe4f31e4bf2ca7f2715da179bc7b025085.tar.gz
hostap-403b96fe4f31e4bf2ca7f2715da179bc7b025085.tar.bz2
WPS: Add hostapd_cli get_config command
This can be used by a WPS UI to display the current AP configuration.
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 5ca793b..c0d647f 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -97,6 +97,7 @@ static const char *commands_help =
#endif /* CONFIG_WPS_OOB */
" wps_ap_pin <cmd> [params..] enable/disable AP PIN\n"
#endif /* CONFIG_WPS */
+" get_config show current configuration\n"
" help show this usage help\n"
" interface [ifname] show interfaces/select interface\n"
" level <debug level> change debug level\n"
@@ -460,6 +461,13 @@ static int hostapd_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc,
#endif /* CONFIG_WPS */
+static int hostapd_cli_cmd_get_config(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "GET_CONFIG");
+}
+
+
static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, char *cmd,
char *addr, size_t addr_len)
{
@@ -642,6 +650,7 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
#endif /* CONFIG_WPS_OOB */
{ "wps_ap_pin", hostapd_cli_cmd_wps_ap_pin },
#endif /* CONFIG_WPS */
+ { "get_config", hostapd_cli_cmd_get_config },
{ "help", hostapd_cli_cmd_help },
{ "interface", hostapd_cli_cmd_interface },
{ "level", hostapd_cli_cmd_level },