3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

wscutil: Add wsc_build_wsc_ack

This commit is contained in:
Denis Kenzior 2016-09-08 21:33:40 -05:00
parent 9c9ecfa239
commit 983d598d1d
2 changed files with 22 additions and 0 deletions

View File

@ -2304,6 +2304,27 @@ done:
return ret;
}
uint8_t *wsc_build_wsc_ack(const struct wsc_ack *ack, size_t *out_len)
{
struct wsc_attr_builder *builder;
uint8_t *ret;
builder = wsc_attr_builder_new(256);
build_version(builder, 0x10);
build_message_type(builder, WSC_MESSAGE_TYPE_WSC_ACK);
build_enrollee_nonce(builder, ack->enrollee_nonce);
build_registrar_nonce(builder, ack->registrar_nonce);
if (!ack->version2)
goto done;
START_WFA_VENDOR_EXTENSION();
done:
ret = wsc_attr_builder_free(builder, false, out_len);
return ret;
}
uint8_t *wsc_build_nack(const struct wsc_nack *nack, size_t *out_len)
{
struct wsc_attr_builder *builder;

View File

@ -602,6 +602,7 @@ uint8_t *wsc_build_m7_encrypted_settings(
uint8_t *wsc_build_m8(const struct wsc_m8 *m8, const uint8_t *encrypted,
size_t encrypted_len, size_t *out_len);
uint8_t *wsc_build_wsc_ack(const struct wsc_ack *ack, size_t *out_len);
uint8_t *wsc_build_nack(const struct wsc_nack *nack, size_t *out_len);
uint8_t *wsc_build_wsc_done(const struct wsc_done *done, size_t *out_len);