about summary refs log tree commit diff stats
path: root/src/libwifi/gen/management/assoc_response.h
diff options
context:
space:
mode:
authorMarc <foxtrot@malloc.me>2022-01-28 23:21:55 +0000
committerMarc <foxtrot@malloc.me>2022-01-28 23:21:55 +0000
commit4c1232aaccdafcd213b615f7e8f36e5b5604fb59 (patch)
tree95c819fb528ec6e5af3451283a47fef148e07a6d /src/libwifi/gen/management/assoc_response.h
parenta9a46f40228429e128390d4d4979788e2778e8d0 (diff)
downloadlibwifi-4c1232aaccdafcd213b615f7e8f36e5b5604fb59.tar.gz
libwifi-4c1232aaccdafcd213b615f7e8f36e5b5604fb59.tar.bz2
libwifi-4c1232aaccdafcd213b615f7e8f36e5b5604fb59.zip
gen: Improve header comments, add ability to set Address 3 field for all management frames
Diffstat (limited to 'src/libwifi/gen/management/assoc_response.h')
-rw-r--r--src/libwifi/gen/management/assoc_response.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/libwifi/gen/management/assoc_response.h b/src/libwifi/gen/management/assoc_response.h index 07ad4b4..cac0171 100644 --- a/src/libwifi/gen/management/assoc_response.h +++ b/src/libwifi/gen/management/assoc_response.h
@@ -22,7 +22,8 @@
22 * Set the channel of a libwifi_assoc_resp. 22 * Set the channel of a libwifi_assoc_resp.
23 * 23 *
24 * @param assoc_resp A libwifi_assoc_resp 24 * @param assoc_resp A libwifi_assoc_resp
25 * @param channel The new channel 25 * @param channel The new channel
26 * @return Zero on success, or negative error
26 */ 27 */
27int libwifi_set_assoc_resp_channel(struct libwifi_assoc_resp *assoc_resp, uint8_t channel); 28int libwifi_set_assoc_resp_channel(struct libwifi_assoc_resp *assoc_resp, uint8_t channel);
28 29
@@ -30,7 +31,7 @@ int libwifi_set_assoc_resp_channel(struct libwifi_assoc_resp *assoc_resp, uint8_
30 * Calculate the length of a given libwifi_assoc_resp 31 * Calculate the length of a given libwifi_assoc_resp
31 * 32 *
32 * @param assoc_resp A libwifi_assoc_resp 33 * @param assoc_resp A libwifi_assoc_resp
33 * @return The length of the given assoc_resp 34 * @return The length of the given assoc_resp, or negative error
34 */ 35 */
35size_t libwifi_get_assoc_resp_length(struct libwifi_assoc_resp *assoc_resp); 36size_t libwifi_get_assoc_resp_length(struct libwifi_assoc_resp *assoc_resp);
36 37
@@ -40,22 +41,26 @@ size_t libwifi_get_assoc_resp_length(struct libwifi_assoc_resp *assoc_resp);
40 * A generated libwifi assoc_resp can be "dumped" into a buffer for packet injection 41 * A generated libwifi assoc_resp can be "dumped" into a buffer for packet injection
41 * via the libwifi_dump_assoc_resp. 42 * via the libwifi_dump_assoc_resp.
42 * 43 *
43 * @param assoc_resp A libwifi_assoc_resp 44 * @param assoc_resp A libwifi_assoc_resp
44 * @param receiver The receiver MAC address, aka address 1 45 * @param receiver The receiver MAC address, aka address 1
45 * @param transmitter The source MAC address, aka address 2 46 * @param transmitter The source MAC address, aka address 2
46 * @param channel The desired channel of the assoc_resp 47 * @param address3 The address 3 frame field value, typically the BSSID
47 * 48 * @param channel The desired channel of the assoc_resp
49 * @return Zero on success, or negative error
48 */ 50 */
49int libwifi_create_assoc_resp(struct libwifi_assoc_resp *assoc_resp, const unsigned char receiver[6], 51int libwifi_create_assoc_resp(struct libwifi_assoc_resp *assoc_resp,
50 const unsigned char transmitter[6], uint8_t channel); 52 const unsigned char receiver[6],
53 const unsigned char transmitter[6],
54 const unsigned char address3[6],
55 uint8_t channel);
51 56
52/** 57/**
53 * Dump a libwifi_assoc_resp into a raw format for packet injection. 58 * Dump a libwifi_assoc_resp into a raw format for packet injection.
54 * 59 *
55 * @param assoc_resp A libwifi_assoc_resp 60 * @param assoc_resp A libwifi_assoc_resp
56 * @param buf The output buffer for the frame data 61 * @param buf The output buffer for the frame data
57 * @param buf_len The length of the output buffer 62 * @param buf_len The length of the output buffer
58 * @return The length of the dumped assoc_resp 63 * @return The length of the dumped assoc_resp, or negative error
59 */ 64 */
60size_t libwifi_dump_assoc_resp(struct libwifi_assoc_resp *assoc_resp, unsigned char *buf, size_t buf_len); 65size_t libwifi_dump_assoc_resp(struct libwifi_assoc_resp *assoc_resp, unsigned char *buf, size_t buf_len);
61 66