mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 03:32:42 +01:00
wscutil: Add wsc_parse_association_request
This commit is contained in:
parent
022d24474b
commit
da36b87531
@ -1088,6 +1088,26 @@ done:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wsc_parse_association_request(const uint8_t *pdu, uint32_t len,
|
||||
struct wsc_association_request *out)
|
||||
{
|
||||
int r;
|
||||
struct wsc_wfa_ext_iter iter;
|
||||
uint8_t version;
|
||||
|
||||
memset(out, 0, sizeof(struct wsc_association_request));
|
||||
|
||||
r = wsc_parse_attrs(pdu, len, &out->version2, &iter, 0, NULL,
|
||||
REQUIRED(VERSION, &version),
|
||||
REQUIRED(REQUEST_TYPE, &out->request_type),
|
||||
WSC_ATTR_INVALID);
|
||||
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wsc_parse_association_response(const uint8_t *pdu, uint32_t len,
|
||||
struct wsc_association_response *out)
|
||||
{
|
||||
|
@ -399,6 +399,11 @@ struct wsc_probe_request {
|
||||
struct wsc_primary_device_type requested_device_type;
|
||||
};
|
||||
|
||||
struct wsc_association_request {
|
||||
bool version2;
|
||||
enum wsc_request_type request_type;
|
||||
};
|
||||
|
||||
struct wsc_association_response {
|
||||
bool version2;
|
||||
enum wsc_response_type response_type;
|
||||
@ -548,6 +553,8 @@ int wsc_parse_probe_response(const unsigned char *pdu, unsigned int len,
|
||||
struct wsc_probe_response *out);
|
||||
int wsc_parse_probe_request(const unsigned char *pdu, unsigned int len,
|
||||
struct wsc_probe_request *out);
|
||||
int wsc_parse_association_request(const uint8_t *pdu, uint32_t len,
|
||||
struct wsc_association_request *out);
|
||||
int wsc_parse_association_response(const uint8_t *pdu, uint32_t len,
|
||||
struct wsc_association_response *out);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user