GNUnet  0.10.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  uint8_t mac[MAC_ADDR_SIZE];
63 };
64 
74 
79 };
80 
89 
94 
98  uint16_t type;
99 };
100 
101 
115  uint16_t frame_control GNUNET_PACKED;
116 
121 
126 
131 
136 
141  uint16_t sequence_control GNUNET_PACKED;
142 
146  u_int8_t llc[4];
147 
148  /* payload */
149 } GNUNET_PACKED;
150 
151 
152 
161  struct GNUNET_MessageHeader header;
162 
166  uint8_t rate;
167 
171  uint8_t antenna;
172 
177  uint16_t tx_power GNUNET_PACKED;
178 
184 
185  /* actual payload follows */
186 };
187 
188 
200  struct GNUNET_MessageHeader header;
201 
206  uint32_t ri_present GNUNET_PACKED;
207 
211  uint64_t ri_mactime GNUNET_PACKED;
212 
218  int32_t ri_power GNUNET_PACKED;
219 
224  int32_t ri_noise GNUNET_PACKED;
225 
229  uint32_t ri_channel GNUNET_PACKED;
230 
234  uint32_t ri_freq GNUNET_PACKED;
235 
239  uint32_t ri_rate GNUNET_PACKED;
240 
244  uint32_t ri_antenna GNUNET_PACKED;
245 
250 
251  /* followed by payload */
252 };
253 
255 
260  { 0x13, 0x22, 0x33, 0x44, 0x55, 0x66 }
261 };
262 
263 
268  { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
269 };
270 
271 #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...