libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
radiotap.h
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 * http://www.apache.org/licenses/LICENSE-2.0
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 */
15
16#ifndef LIBWIFI_CORE_RADIOTAP_H
17#define LIBWIFI_CORE_RADIOTAP_H
18
19#include <stdint.h>
20
21#define LIBWIFI_MAX_RADIOTAP_LEN 128
22#define LIBWIFI_MAX_RADIOTAP_ANTENNAS 16
23
29 uint16_t flags;
30 uint16_t freq;
31} __attribute__((packed));
32
38 int8_t signal;
39} __attribute__((packed));
40
45 uint8_t known;
46 uint8_t flags;
47 uint8_t mcs;
48} __attribute__((packed));
49
54 uint64_t timestamp;
55 uint16_t accuracy;
56 uint8_t unit;
57 uint8_t flags;
58} __attribute__((packed));
59
61 // Header
62 uint32_t present;
63 // Body
65 int8_t rate_raw;
66 float rate;
69 int8_t signal;
70 uint8_t flags;
72 uint16_t rx_flags;
73 uint16_t tx_flags;
75 int8_t tx_power;
77 uint8_t rts_retries;
78 uint8_t data_retries;
79 // Other
80 uint8_t length;
81} __attribute__((packed));
82
83#endif /* LIBWIFI_CORE_RADIOTAP_H */
#define LIBWIFI_MAX_RADIOTAP_ANTENNAS
Definition: radiotap.h:22
enum ieee80211_radiotap_presence __attribute__
The radiotap antenna field consists of an antenna number and signal in dBm.
Definition: radiotap.h:36
A channel field in radiotap consists of a 2-byte wide flags sub-field and a 2-byte wide frequency fie...
Definition: radiotap.h:28
uint32_t extended_flags
Definition: radiotap.h:71
struct libwifi_radiotap_timestamp timestamp
Definition: radiotap.h:76
uint8_t data_retries
Definition: radiotap.h:78
struct libwifi_radiotap_antenna antennas[LIBWIFI_MAX_RADIOTAP_ANTENNAS]
Definition: radiotap.h:68
struct libwifi_radiotap_channel channel
Definition: radiotap.h:64
uint8_t antenna_count
Definition: radiotap.h:67
struct libwifi_radiotap_mcs mcs
Definition: radiotap.h:74
The radiotap MCS field is made up of 3 2-byte fields.
Definition: radiotap.h:44
The radiotap timestamp field consists of a timestamp field, accuracy, unit and flags.
Definition: radiotap.h:53