mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-02 09:22:32 +01:00
wscutil: Add parser for MAC_ADDRESS
This commit is contained in:
parent
29a0d9f066
commit
2aaff15987
@ -275,6 +275,15 @@ static bool extract_device_password_id(struct wsc_attr_iter *iter, void *data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool extract_mac_address(struct wsc_attr_iter *iter, void *data)
|
||||||
|
{
|
||||||
|
if (wsc_attr_iter_get_length(iter) != 6)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
memcpy(data, wsc_attr_iter_get_data(iter), 6);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool extract_manufacturer(struct wsc_attr_iter *iter, void *data)
|
static bool extract_manufacturer(struct wsc_attr_iter *iter, void *data)
|
||||||
{
|
{
|
||||||
return extract_ascii_string(iter, data, 64);
|
return extract_ascii_string(iter, data, 64);
|
||||||
@ -423,6 +432,8 @@ static attr_handler handler_for_type(enum wsc_attr type)
|
|||||||
return extract_device_name;
|
return extract_device_name;
|
||||||
case WSC_ATTR_DEVICE_PASSWORD_ID:
|
case WSC_ATTR_DEVICE_PASSWORD_ID:
|
||||||
return extract_device_password_id;
|
return extract_device_password_id;
|
||||||
|
case WSC_ATTR_MAC_ADDRESS:
|
||||||
|
return extract_mac_address;
|
||||||
case WSC_ATTR_MANUFACTURER:
|
case WSC_ATTR_MANUFACTURER:
|
||||||
return extract_manufacturer;
|
return extract_manufacturer;
|
||||||
case WSC_ATTR_MESSAGE_TYPE:
|
case WSC_ATTR_MESSAGE_TYPE:
|
||||||
|
Loading…
Reference in New Issue
Block a user