[PATCH] Added Support for Registrar Configuration Methods under WFA Vendor Extension Subelements

Rahul Jain rahul.jain at samsung.com
Tue Mar 4 22:18:34 EST 2014


hi,
[PATCH] Added Support for Registrar Configuration Methods under WFA
Vendor Extension Subelements as per latest Techinical Standards.

From b02373d5c79fd4e26ea2da1093f51f25c6084e4a Mon Sep 17 00:00:00 2001
From: Rahul Jain <rahul.jain at samsung.com>
Date: Wed, 26 Feb 2014 17:39:49 +0530
Subject: [PATCH] Added Support for Registrar Configuration Methods under WFA
 Vendor Extension Subelements


Signed-off-by: Rahul Jain <rahul.jain at samsung.com>
---
 src/wps/wps_attr_parse.c |    8 ++++++++
 src/wps/wps_attr_parse.h |    1 +
 src/wps/wps_defs.h       |    3 ++-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/wps/wps_attr_parse.c b/src/wps/wps_attr_parse.c
index 1ebcfe9..8aefdd6 100644
--- a/src/wps/wps_attr_parse.c
+++ b/src/wps/wps_attr_parse.c
@@ -59,6 +59,14 @@ static int wps_set_vendor_ext_wfa_subelem(struct wps_parse_attr *attr,
 		}
 		attr->settings_delay_time = pos;
 		break;
+	case WFA_ELEM_REGISTRAR_CONFIGURATION_METHODS:
+		if (len != 2) {
+			wpa_printf(MSG_DEBUG, "WPS: Invalid Registrar Configuration Methods "
+				   "length %u", len);
+			return -1;
+		}
+		attr->registrar_configuration_methods= pos;
+		break;
 	default:
 		wpa_printf(MSG_MSGDUMP, "WPS: Skipped unknown WFA Vendor "
 			   "Extension subelement %u", id);
diff --git a/src/wps/wps_attr_parse.h b/src/wps/wps_attr_parse.h
index eeb08d1..82c4739 100644
--- a/src/wps/wps_attr_parse.h
+++ b/src/wps/wps_attr_parse.h
@@ -55,6 +55,7 @@ struct wps_parse_attr {
 	const u8 *network_key_shareable; /* 1 octet (Bool) */
 	const u8 *request_to_enroll; /* 1 octet (Bool) */
 	const u8 *ap_channel; /* 2 octets */
+	const u8 *registrar_configuration_methods; /* 2 octets */
 
 	/* variable length fields */
 	const u8 *manufacturer;
diff --git a/src/wps/wps_defs.h b/src/wps/wps_defs.h
index 614c398..d3c3209 100644
--- a/src/wps/wps_defs.h
+++ b/src/wps/wps_defs.h
@@ -146,7 +146,8 @@ enum {
 	WFA_ELEM_AUTHORIZEDMACS = 0x01,
 	WFA_ELEM_NETWORK_KEY_SHAREABLE = 0x02,
 	WFA_ELEM_REQUEST_TO_ENROLL = 0x03,
-	WFA_ELEM_SETTINGS_DELAY_TIME = 0x04
+	WFA_ELEM_SETTINGS_DELAY_TIME = 0x04,
+	WFA_ELEM_REGISTRAR_CONFIGURATION_METHODS = 0x05
 };
 
 /* Device Password ID */
-- 
1.7.9.5

From b02373d5c79fd4e26ea2da1093f51f25c6084e4a Mon Sep 17 00:00:00 2001
From: Rahul Jain <rahul.jain at samsung.com>
Date: Wed, 26 Feb 2014 17:39:49 +0530
Subject: [PATCH] Added Support for Registrar Configuration Methods under WFA
 Vendor Extension Subelements


Signed-off-by: Rahul Jain <rahul.jain at samsung.com>
---
 src/wps/wps_attr_parse.c |    8 ++++++++
 src/wps/wps_attr_parse.h |    1 +
 src/wps/wps_defs.h       |    3 ++-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/wps/wps_attr_parse.c b/src/wps/wps_attr_parse.c
index 1ebcfe9..8aefdd6 100644
--- a/src/wps/wps_attr_parse.c
+++ b/src/wps/wps_attr_parse.c
@@ -59,6 +59,14 @@ static int wps_set_vendor_ext_wfa_subelem(struct wps_parse_attr *attr,
 		}
 		attr->settings_delay_time = pos;
 		break;
+	case WFA_ELEM_REGISTRAR_CONFIGURATION_METHODS:
+		if (len != 2) {
+			wpa_printf(MSG_DEBUG, "WPS: Invalid Registrar Configuration Methods "
+				   "length %u", len);
+			return -1;
+		}
+		attr->registrar_configuration_methods= pos;
+		break;
 	default:
 		wpa_printf(MSG_MSGDUMP, "WPS: Skipped unknown WFA Vendor "
 			   "Extension subelement %u", id);
diff --git a/src/wps/wps_attr_parse.h b/src/wps/wps_attr_parse.h
index eeb08d1..82c4739 100644
--- a/src/wps/wps_attr_parse.h
+++ b/src/wps/wps_attr_parse.h
@@ -55,6 +55,7 @@ struct wps_parse_attr {
 	const u8 *network_key_shareable; /* 1 octet (Bool) */
 	const u8 *request_to_enroll; /* 1 octet (Bool) */
 	const u8 *ap_channel; /* 2 octets */
+   const u8 *registrar_configuration_methods; /* 2 octets */
 
 	/* variable length fields */
 	const u8 *manufacturer;
diff --git a/src/wps/wps_defs.h b/src/wps/wps_defs.h
index 614c398..d3c3209 100644
--- a/src/wps/wps_defs.h
+++ b/src/wps/wps_defs.h
@@ -146,7 +146,8 @@ enum {
 	WFA_ELEM_AUTHORIZEDMACS = 0x01,
 	WFA_ELEM_NETWORK_KEY_SHAREABLE = 0x02,
 	WFA_ELEM_REQUEST_TO_ENROLL = 0x03,
-	WFA_ELEM_SETTINGS_DELAY_TIME = 0x04
+	WFA_ELEM_SETTINGS_DELAY_TIME = 0x04,
+	WFA_ELEM_REGISTRAR_CONFIGURATION_METHODS = 0x05
 };
 
 /* Device Password ID */
-- 
1.7.9.5

Thanks
-Rahul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-Support-for-Registrar-Configuration-Methods-un.patch
Type: application/octet-stream
Size: 2045 bytes
Desc: not available
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20140305/407ae7a4/attachment-0001.obj>


More information about the HostAP mailing list