GNUnet  0.11.x
plugin_transport_wlan.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2010, 2011 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
26 #ifndef PLUGIN_TRANSPORT_WLAN
27 #define PLUGIN_TRANSPORT_WLAN
28 
29 #include "gnunet_crypto_lib.h"
30 #include "gnunet_common.h"
31 
35 #define MAC_ADDR_SIZE 6
36 
41 #define IEEE80211_FC0_TYPE_MGT 0x00
42 
47 #define IEEE80211_FC0_TYPE_CTL 0x04
48 
53 #define IEEE80211_FC0_TYPE_DATA 0x08
54 
55 
57 
62 {
63  uint8_t mac[MAC_ADDR_SIZE];
64 };
65 
70 {
76 
81 };
82 
87 {
92 
97 
101  uint16_t type;
102 };
103 
104 
109 {
119  uint16_t frame_control GNUNET_PACKED;
120 
125 
130 
135 
140 
145  uint16_t sequence_control GNUNET_PACKED;
146 
150  u_int8_t llc[4];
151 
152  /* payload */
153 } GNUNET_PACKED;
154 
155 
161 {
165  struct GNUNET_MessageHeader header;
166 
170  uint8_t rate;
171 
175  uint8_t antenna;
176 
181  uint16_t tx_power GNUNET_PACKED;
182 
188 
189  /* actual payload follows */
190 };
191 
192 
201 {
205  struct GNUNET_MessageHeader header;
206 
211  uint32_t ri_present GNUNET_PACKED;
212 
216  uint64_t ri_mactime GNUNET_PACKED;
217 
223  int32_t ri_power GNUNET_PACKED;
224 
229  int32_t ri_noise GNUNET_PACKED;
230 
234  uint32_t ri_channel GNUNET_PACKED;
235 
239  uint32_t ri_freq GNUNET_PACKED;
240 
244  uint32_t ri_rate GNUNET_PACKED;
245 
249  uint32_t ri_antenna GNUNET_PACKED;
250 
255 
256  /* followed by payload */
257 };
258 
260 
265  { 0x13, 0x22, 0x33, 0x44, 0x55, 0x66 }
266 };
267 
268 
273  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
274 };
275 
276 #endif
#define MAC_ADDR_SIZE
Number fo bytes in a mac address.
uint8_t antenna
Antenna; the first antenna is 0.
generic definitions for IEEE 802.3 frames
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
Format of a WLAN Control Message.
Message from the WLAN helper to the plugin: we have received the given message with the given perform...
cryptographic primitives for GNUnet
static GNUNET_NETWORK_STRUCT_END const struct GNUNET_TRANSPORT_WLAN_MacAddress mac_bssid_gnunet
GNUnet bssid.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
generic definitions for IEEE 802.11 frames
static struct GNUNET_TIME_Relative duration
How long do we run the test?
Header for all communications.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
static const struct GNUNET_TRANSPORT_WLAN_MacAddress bc_all_mac
Broadcast MAC.
Message from the plugin to the WLAN helper: send the given message with the given connection paramete...