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:
parent
cfe1c3f1ef
commit
662bd57522
3 changed files with 12 additions and 7 deletions
|
@ -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 :
|
wps_build_dev_password_id(ie, pbc ? DEV_PW_PUSHBUTTON :
|
||||||
DEV_PW_DEFAULT) ||
|
DEV_PW_DEFAULT) ||
|
||||||
wps_build_version2(ie) ||
|
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 &&
|
(req_type == WPS_REQ_ENROLLEE &&
|
||||||
wps_build_req_to_enroll(ie))) {
|
wps_build_req_to_enroll(ie))) {
|
||||||
wpabuf_free(ie);
|
wpabuf_free(ie);
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
#include "wps_dev_attr.h"
|
#include "wps_dev_attr.h"
|
||||||
|
|
||||||
|
|
||||||
static int wps_build_manufacturer(struct wps_device_data *dev,
|
int wps_build_manufacturer(struct wps_device_data *dev, struct wpabuf *msg)
|
||||||
struct wpabuf *msg)
|
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
wpa_printf(MSG_DEBUG, "WPS: * Manufacturer");
|
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,
|
int wps_build_model_name(struct wps_device_data *dev, struct wpabuf *msg)
|
||||||
struct wpabuf *msg)
|
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
wpa_printf(MSG_DEBUG, "WPS: * Model Name");
|
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,
|
int wps_build_model_number(struct wps_device_data *dev, struct wpabuf *msg)
|
||||||
struct wpabuf *msg)
|
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
wpa_printf(MSG_DEBUG, "WPS: * Model Number");
|
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;
|
size_t len;
|
||||||
wpa_printf(MSG_DEBUG, "WPS: * Device Name");
|
wpa_printf(MSG_DEBUG, "WPS: * Device Name");
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
|
|
||||||
struct wps_parse_attr;
|
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_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_os_version(struct wps_device_data *dev, struct wpabuf *msg);
|
||||||
int wps_build_rf_bands(struct wps_device_data *dev, struct wpabuf *msg);
|
int wps_build_rf_bands(struct wps_device_data *dev, struct wpabuf *msg);
|
||||||
|
|
Loading…
Reference in a new issue