WPS 2.0: Add device attributes into Probe Request

Add Manufacturer, Model Name, Model Number, and Device Name attributes
into the WSC IE in the Probe Request frames.
This commit is contained in:
Jouni Malinen 2009-12-23 01:10:25 +02:00 committed by Jouni Malinen
parent cfe1c3f1ef
commit 662bd57522
3 changed files with 12 additions and 7 deletions

View file

@ -450,6 +450,10 @@ struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev,
wps_build_dev_password_id(ie, pbc ? DEV_PW_PUSHBUTTON :
DEV_PW_DEFAULT) ||
wps_build_version2(ie) ||
wps_build_manufacturer(dev, ie) ||
wps_build_model_name(dev, ie) ||
wps_build_model_number(dev, ie) ||
wps_build_dev_name(dev, ie) ||
(req_type == WPS_REQ_ENROLLEE &&
wps_build_req_to_enroll(ie))) {
wpabuf_free(ie);

View file

@ -19,8 +19,7 @@
#include "wps_dev_attr.h"
static int wps_build_manufacturer(struct wps_device_data *dev,
struct wpabuf *msg)
int wps_build_manufacturer(struct wps_device_data *dev, struct wpabuf *msg)
{
size_t len;
wpa_printf(MSG_DEBUG, "WPS: * Manufacturer");
@ -42,8 +41,7 @@ static int wps_build_manufacturer(struct wps_device_data *dev,
}
static int wps_build_model_name(struct wps_device_data *dev,
struct wpabuf *msg)
int wps_build_model_name(struct wps_device_data *dev, struct wpabuf *msg)
{
size_t len;
wpa_printf(MSG_DEBUG, "WPS: * Model Name");
@ -65,8 +63,7 @@ static int wps_build_model_name(struct wps_device_data *dev,
}
static int wps_build_model_number(struct wps_device_data *dev,
struct wpabuf *msg)
int wps_build_model_number(struct wps_device_data *dev, struct wpabuf *msg)
{
size_t len;
wpa_printf(MSG_DEBUG, "WPS: * Model Number");
@ -121,7 +118,7 @@ int wps_build_primary_dev_type(struct wps_device_data *dev, struct wpabuf *msg)
}
static int wps_build_dev_name(struct wps_device_data *dev, struct wpabuf *msg)
int wps_build_dev_name(struct wps_device_data *dev, struct wpabuf *msg)
{
size_t len;
wpa_printf(MSG_DEBUG, "WPS: * Device Name");

View file

@ -17,6 +17,10 @@
struct wps_parse_attr;
int wps_build_manufacturer(struct wps_device_data *dev, struct wpabuf *msg);
int wps_build_model_name(struct wps_device_data *dev, struct wpabuf *msg);
int wps_build_model_number(struct wps_device_data *dev, struct wpabuf *msg);
int wps_build_dev_name(struct wps_device_data *dev, struct wpabuf *msg);
int wps_build_device_attrs(struct wps_device_data *dev, struct wpabuf *msg);
int wps_build_os_version(struct wps_device_data *dev, struct wpabuf *msg);
int wps_build_rf_bands(struct wps_device_data *dev, struct wpabuf *msg);