[PATCH] Add Support on wpa_cli for vendor_elem_* commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Purushottam Kushwaha <p.kushwaha@xxxxxxxxxxx>
Signed-off-by: Avichal Agarwal <avichal.a@xxxxxxxxxxx>
Signed-off-by: Mayank Haarit <mayank.h@xxxxxxxxxxx>
---
 wpa_supplicant/wpa_cli.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 7ddae3d..a47bef6 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -66,6 +66,10 @@ static const char *const wpa_cli_full_license =
 "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
 "\n";
 
+#define VENDOR_ELEM_FRAME_ID "  0: probe req, 1: probe resp, 2: probe resp [go], " \
+	"3: beacon, 4: pd req, 5: pd resp, 6: go neg req, 7: go neg resp, "\
+	"8: go neg conf, 9: inv req, 10: inv resp, 11: assoc req, 12: assoc resp"
+
 static struct wpa_ctrl *ctrl_conn;
 static struct wpa_ctrl *mon_conn;
 static int wpa_cli_quit = 0;
@@ -2477,6 +2481,24 @@ static int wpa_cli_cmd_p2p_remove_client(struct wpa_ctrl *ctrl, int argc,
 	return wpa_cli_cmd(ctrl, "P2P_REMOVE_CLIENT", 1, argc, argv);
 }
 
+static int wpa_cli_cmd_vendor_elem_add(struct wpa_ctrl *ctrl, int argc,
+                                       char *argv[])
+{
+        return wpa_cli_cmd(ctrl, "VENDOR_ELEM_ADD", 2, argc, argv);
+}
+
+static int wpa_cli_cmd_vendor_elem_get(struct wpa_ctrl *ctrl, int argc,
+                                       char *argv[])
+{
+        return wpa_cli_cmd(ctrl, "VENDOR_ELEM_GET", 1, argc, argv);
+}
+
+static int wpa_cli_cmd_vendor_elem_remove(struct wpa_ctrl *ctrl, int argc,
+                                          char *argv[])
+{
+        return wpa_cli_cmd(ctrl, "VENDOR_ELEM_REMOVE", 2, argc, argv);
+}
+
 #endif /* CONFIG_P2P */
 
 #ifdef CONFIG_WIFI_DISPLAY
@@ -3248,6 +3270,18 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
 	{ "p2p_remove_client", wpa_cli_cmd_p2p_remove_client,
 	  wpa_cli_complete_p2p_peer, cli_cmd_flag_none,
 	  "<address|iface=address> = remove a peer from all groups" },
+        { "vendor_elem_add", wpa_cli_cmd_vendor_elem_add, NULL,
+          cli_cmd_flag_none,
+          "<frame id> <hexdump of elem(s)> = add vendor specific ie to frame(s)\n"
+          VENDOR_ELEM_FRAME_ID },
+        { "vendor_elem_get", wpa_cli_cmd_vendor_elem_get, NULL,
+          cli_cmd_flag_none,
+          "<frame id> = get vendor specific ie to frame(s)\n"
+          VENDOR_ELEM_FRAME_ID },
+        { "vendor_elem_remove", wpa_cli_cmd_vendor_elem_remove, NULL,
+          cli_cmd_flag_none,
+          "<frame id> <hexdump of elem(s)> = remove vendor specific ie in frame(s)\n"
+          VENDOR_ELEM_FRAME_ID },
 #endif /* CONFIG_P2P */
 #ifdef CONFIG_WIFI_DISPLAY
 	{ "wfd_subelem_set", wpa_cli_cmd_wfd_subelem_set, NULL,
-- 
1.9.1

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux