about summary refs log tree commit diff stats
path: root/src/libwifi/gen/management/reassoc_request.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libwifi/gen/management/reassoc_request.h')
-rw-r--r--src/libwifi/gen/management/reassoc_request.h41
1 files changed, 39 insertions, 2 deletions
diff --git a/src/libwifi/gen/management/reassoc_request.h b/src/libwifi/gen/management/reassoc_request.h index 3db971f..04dbb14 100644 --- a/src/libwifi/gen/management/reassoc_request.h +++ b/src/libwifi/gen/management/reassoc_request.h
@@ -20,11 +20,48 @@
20#include "../../core/frame/management/common.h" 20#include "../../core/frame/management/common.h"
21#include "../../core/frame/management/reassoc_request.h" 21#include "../../core/frame/management/reassoc_request.h"
22 22
23int libwifi_create_reassoc_req(struct libwifi_reassoc_req *reassoc_req, const unsigned char receiver[6], 23/**
24 const unsigned char transmitter[6], const unsigned char current_ap[6], 24 * Create a new libwifi reassociation request
25 *
26 * @param reassoc_req A new libwifi_reassoc_req struct
27 * @param receiver The receiver MAC address
28 * @param transmitter The transmitter MAC address
29 * @param address3 The address 3 frame field value, typically the BSSID
30 * @param current_ap The current AP BSSID
31 * @param ssid The desired BSS SSID
32 * @param channel The desired channel
33 * @return Zero on success, or negative error
34 */
35int libwifi_create_reassoc_req(struct libwifi_reassoc_req *reassoc_req,
36 const unsigned char receiver[6],
37 const unsigned char transmitter[6],
38 const unsigned char address3[6],
39 const unsigned char current_ap[6],
25 const char *ssid, uint8_t channel); 40 const char *ssid, uint8_t channel);
41
42/**
43 * Get the length of a given libwifi_reassoc_req
44 *
45 * @param reassoc_req A libwifi_reassoc_req struct
46 * @return The length of the given libwifi_reassoc_req, or negative error
47 */
26size_t libwifi_get_reassoc_req_length(struct libwifi_reassoc_req *reassoc_req); 48size_t libwifi_get_reassoc_req_length(struct libwifi_reassoc_req *reassoc_req);
49
50/**
51 * Dump a libwifi_reassoc_req into a raw format for packet injection.
52 *
53 * @param reassoc_req A libwifi_reassoc_req struct
54 * @param buf The buffer to dump into
55 * @param buf_len The length of the supplied buffer
56 * @return The amount of bytes dumped, or negative error
57 */
27size_t libwifi_dump_reassoc_req(struct libwifi_reassoc_req *reassoc_req, unsigned char *buf, size_t buf_len); 58size_t libwifi_dump_reassoc_req(struct libwifi_reassoc_req *reassoc_req, unsigned char *buf, size_t buf_len);
59
60/**
61 * Free any memory claimed by a libwifi_reassoc_req back to the system.
62 *
63 * @param reassoc_req A libwifi_reassoc_req
64 */
28void libwifi_free_reassoc_req(struct libwifi_reassoc_req *reassoc_req); 65void libwifi_free_reassoc_req(struct libwifi_reassoc_req *reassoc_req);
29 66
30#endif /* LIBWIFI_GEN_REASSOCREQUEST_H */ 67#endif /* LIBWIFI_GEN_REASSOCREQUEST_H */