3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-30 06:02:39 +01:00

wscutil: add wsc_build_association_request

This commit is contained in:
Denis Kenzior 2016-09-13 17:23:43 -05:00
parent da36b87531
commit 77abdb7d96
2 changed files with 25 additions and 0 deletions

View File

@ -2050,6 +2050,27 @@ done:
return ret;
}
uint8_t *wsc_build_association_request(
const struct wsc_association_request *association_request,
size_t *out_len)
{
struct wsc_attr_builder *builder;
uint8_t *ret;
builder = wsc_attr_builder_new(128);
build_version(builder, 0x10);
build_request_type(builder, association_request->request_type);
if (!association_request->version2)
goto done;
START_WFA_VENDOR_EXTENSION();
done:
ret = wsc_attr_builder_free(builder, false, out_len);
return ret;
}
uint8_t *wsc_build_m1(const struct wsc_m1 *m1, size_t *out_len)
{
struct wsc_attr_builder *builder;

View File

@ -590,6 +590,10 @@ int wsc_parse_wsc_done(const uint8_t *pdu, uint32_t len, struct wsc_done *out);
uint8_t *wsc_build_probe_request(const struct wsc_probe_request *probe_request,
size_t *out_len);
uint8_t *wsc_build_association_request(
const struct wsc_association_request *association_request,
size_t *out_len);
uint8_t *wsc_build_m1(const struct wsc_m1 *m1, size_t *out_len);
uint8_t *wsc_build_m2(const struct wsc_m2 *m2, size_t *out_len);
uint8_t *wsc_build_m3(const struct wsc_m3 *m3, size_t *out_len);