wpa_cli: Add a 'raw' command for sending unprocessed data

This can be used to test new control interface commands and to use
commands that may not yet be supported by wpa_cli.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-08-25 13:33:29 +03:00
parent 39ee845f92
commit 27b80b5b4c
1 changed files with 10 additions and 0 deletions

View File

@ -2091,6 +2091,14 @@ static int wpa_cli_cmd_autoscan(struct wpa_ctrl *ctrl, int argc, char *argv[])
#endif /* CONFIG_AUTOSCAN */
static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
if (argc == 0)
return -1;
return wpa_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]);
}
enum wpa_cli_cmd_flags {
cli_cmd_flag_none = 0x00,
cli_cmd_flag_sensitive = 0x01
@ -2488,6 +2496,8 @@ static struct wpa_cli_cmd wpa_cli_commands[] = {
{ "autoscan", wpa_cli_cmd_autoscan, cli_cmd_flag_none,
"[params] = Set or unset (if none) autoscan parameters" },
#endif /* CONFIG_AUTOSCAN */
{ "raw", wpa_cli_cmd_raw, cli_cmd_flag_sensitive,
"<params..> = Sent unprocessed command" },
{ NULL, NULL, cli_cmd_flag_none, NULL }
};