projects
/
libeap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fcac668
)
WPS ER: Store AP UUID in binary format for future use
author
Jouni Malinen
<j@w1.fi>
Sun, 15 Nov 2009 09:07:20 +0000
(11:07 +0200)
committer
Jouni Malinen
<j@w1.fi>
Sun, 15 Nov 2009 09:07:20 +0000
(11:07 +0200)
src/wps/wps_er.c
patch
|
blob
|
history
diff --git
a/src/wps/wps_er.c
b/src/wps/wps_er.c
index
70169ba
..
2bd428f
100644
(file)
--- a/
src/wps/wps_er.c
+++ b/
src/wps/wps_er.c
@@
-64,6
+64,7
@@
struct wps_er_ap {
char *location;
struct http_client *http;
char *location;
struct http_client *http;
+ u8 uuid[WPS_UUID_LEN];
char *friendly_name;
char *manufacturer;
char *manufacturer_url;
char *friendly_name;
char *manufacturer;
char *manufacturer_url;
@@
-277,6
+278,7
@@
static void wps_er_parse_device_description(struct wps_er_ap *ap,
{
/* Note: reply includes null termination after the buffer data */
const char *data = wpabuf_head(reply);
{
/* Note: reply includes null termination after the buffer data */
const char *data = wpabuf_head(reply);
+ char *pos;
wpa_hexdump_ascii(MSG_MSGDUMP, "WPS ER: Device info",
wpabuf_head(reply), wpabuf_len(reply));
wpa_hexdump_ascii(MSG_MSGDUMP, "WPS ER: Device info",
wpabuf_head(reply), wpabuf_len(reply));
@@
-309,6
+311,11
@@
static void wps_er_parse_device_description(struct wps_er_ap *ap,
ap->udn = xml_get_first_item(data, "UDN");
wpa_printf(MSG_DEBUG, "WPS ER: UDN='%s'", ap->udn);
ap->udn = xml_get_first_item(data, "UDN");
wpa_printf(MSG_DEBUG, "WPS ER: UDN='%s'", ap->udn);
+ pos = os_strstr(ap->udn, "uuid:");
+ if (pos) {
+ pos += 5;
+ uuid_str2bin(pos, ap->uuid);
+ }
ap->upc = xml_get_first_item(data, "UPC");
wpa_printf(MSG_DEBUG, "WPS ER: UPC='%s'", ap->upc);
ap->upc = xml_get_first_item(data, "UPC");
wpa_printf(MSG_DEBUG, "WPS ER: UPC='%s'", ap->upc);