mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-02 09:22:32 +01:00
wscutil: Add wsc_build_nack
This commit is contained in:
parent
334ccfce0f
commit
00dac648aa
@ -1716,7 +1716,28 @@ done:
|
|||||||
|
|
||||||
ret = wsc_attr_builder_free(builder, false, out_len);
|
ret = wsc_attr_builder_free(builder, false, out_len);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t *wsc_build_nack(const struct wsc_nack *nack, 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_NACK);
|
||||||
|
build_enrollee_nonce(builder, nack->enrollee_nonce);
|
||||||
|
build_registrar_nonce(builder, nack->registrar_nonce);
|
||||||
|
build_configuration_error(builder, nack->configuration_error);
|
||||||
|
|
||||||
|
if (!nack->version2)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
START_WFA_VENDOR_EXTENSION();
|
||||||
|
|
||||||
|
done:
|
||||||
|
ret = wsc_attr_builder_free(builder, false, out_len);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wsc_uuid_from_addr(const uint8_t addr[], uint8_t *out_uuid)
|
bool wsc_uuid_from_addr(const uint8_t addr[], uint8_t *out_uuid)
|
||||||
|
@ -479,6 +479,8 @@ uint8_t *wsc_build_m3(const struct wsc_m3 *m3, size_t *out_len);
|
|||||||
uint8_t *wsc_build_m4(const struct wsc_m4 *m4, const uint8_t *encrypted,
|
uint8_t *wsc_build_m4(const struct wsc_m4 *m4, const uint8_t *encrypted,
|
||||||
size_t encrypted_len, size_t *out_len);
|
size_t encrypted_len, size_t *out_len);
|
||||||
|
|
||||||
|
uint8_t *wsc_build_nack(const struct wsc_nack *nack, size_t *out_len);
|
||||||
|
|
||||||
bool wsc_uuid_from_addr(const uint8_t addr[], uint8_t *out_uuid);
|
bool wsc_uuid_from_addr(const uint8_t addr[], uint8_t *out_uuid);
|
||||||
|
|
||||||
struct wsc_session_key {
|
struct wsc_session_key {
|
||||||
|
Loading…
Reference in New Issue
Block a user