libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
Go to the documentation of this file.
1/* Copyright 2021 The libwifi Authors
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
19#include "../../core/frame/management/beacon.h"
28int libwifi_set_beacon_ssid(struct libwifi_beacon *beacon, const char *ssid);
37int libwifi_set_beacon_channel(struct libwifi_beacon *beacon, uint8_t channel);
45size_t libwifi_get_beacon_length(struct libwifi_beacon *beacon);
61int libwifi_create_beacon(struct libwifi_beacon *beacon,
62 const unsigned char receiver[6],
63 const unsigned char transmitter[6],
64 const unsigned char address3[6],
65 const char *ssid,
66 uint8_t channel);
76size_t libwifi_dump_beacon(struct libwifi_beacon *beacon, unsigned char *buf, size_t buf_len);
83void libwifi_free_beacon(struct libwifi_beacon *beacon);
85#endif /* LIBWIFI_GEN_BEACON_H */
struct libwifi_radiotap_channel channel
Definition: radiotap.h:3
int libwifi_create_beacon(struct libwifi_beacon *beacon, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], const char *ssid, uint8_t channel)
Generate a populated libwifi beacon.
Definition: beacon.c:81
size_t libwifi_dump_beacon(struct libwifi_beacon *beacon, unsigned char *buf, size_t buf_len)
Dump a struct libwifi_beacon into a raw format for packet injection.
Definition: beacon.c:114
int libwifi_set_beacon_channel(struct libwifi_beacon *beacon, uint8_t channel)
Set the channel of a struct libwifi_beacon.
Definition: beacon.c:60
int libwifi_set_beacon_ssid(struct libwifi_beacon *beacon, const char *ssid)
Set the SSID of a struct libwifi_beacon.
Definition: beacon.c:42
void libwifi_free_beacon(struct libwifi_beacon *beacon)
Free any memory claimed by a struct libwifi_beacon back to the system.
Definition: beacon.c:137
size_t libwifi_get_beacon_length(struct libwifi_beacon *beacon)
Calculate the length of a given struct libwifi_beacon.
Definition: beacon.c:33