aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_wlan.h')
-rw-r--r--src/transport/plugin_transport_wlan.h48
1 files changed, 37 insertions, 11 deletions
diff --git a/src/transport/plugin_transport_wlan.h b/src/transport/plugin_transport_wlan.h
index 3f8e82404..96aa434ee 100644
--- a/src/transport/plugin_transport_wlan.h
+++ b/src/transport/plugin_transport_wlan.h
@@ -34,6 +34,25 @@
34 */ 34 */
35#define MAC_ADDR_SIZE 6 35#define MAC_ADDR_SIZE 6
36 36
37/**
38 * Value for "Management" in the 'frame_control' field of the
39 * struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame.
40 */
41#define IEEE80211_FC0_TYPE_MGT 0x00
42
43/**
44 * Value for "Control" in the 'frame_control' field of the
45 * struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame.
46 */
47#define IEEE80211_FC0_TYPE_CTL 0x04
48
49/**
50 * Value for DATA in the 'frame_control' field of the
51 * struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame.
52 */
53#define IEEE80211_FC0_TYPE_DATA 0x08
54
55
37GNUNET_NETWORK_STRUCT_BEGIN 56GNUNET_NETWORK_STRUCT_BEGIN
38 57
39/** 58/**
@@ -68,7 +87,13 @@ struct GNUNET_TRANSPORT_WLAN_HelperControlMessage
68struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame 87struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame
69{ 88{
70 /** 89 /**
71 * 802.11 Frame Control field, 90 * 802.11 Frame Control field. A bitmask. The overall field is a
91 * 16-bit mask of the respecitve fields. The lowest two bits should
92 * be 0, then comes the "type" (2 bits, see IEEE80211_FC0_TYPE_*
93 * constants), followed by 4-bit subtype (all zeros for ad-hoc),
94 * followed by various flags (to DS, from DS, more frag, retry,
95 * power management, more data, WEP, strict), all of which we also
96 * keep at zero.
72 */ 97 */
73 uint16_t frame_control GNUNET_PACKED; 98 uint16_t frame_control GNUNET_PACKED;
74 99
@@ -93,7 +118,8 @@ struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame
93 struct GNUNET_TRANSPORT_WLAN_MacAddress addr3; 118 struct GNUNET_TRANSPORT_WLAN_MacAddress addr3;
94 119
95 /** 120 /**
96 * 802.11 sequence control field. 121 * 802.11 sequence control field; contains fragment number an sequence
122 * number (we set this to all zeros).
97 */ 123 */
98 uint16_t sequence_control GNUNET_PACKED; 124 uint16_t sequence_control GNUNET_PACKED;
99 125
@@ -162,46 +188,46 @@ struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage
162 struct GNUNET_MessageHeader header; 188 struct GNUNET_MessageHeader header;
163 189
164 /** 190 /**
165 * FIXME: not initialized properly so far. (supposed to contain 191 * Information about which of the fields below are actually valid.
166 * information about which of the fields below are actually valid). 192 * 0 for none. FIXME: not properly initialized so far (always zero).
167 */ 193 */
168 uint32_t ri_present GNUNET_PACKED; 194 uint32_t ri_present GNUNET_PACKED;
169 195
170 /** 196 /**
171 * IEEE80211_RADIOTAP_TSFT 197 * IEEE80211_RADIOTAP_TSFT, 0 if unknown.
172 */ 198 */
173 uint64_t ri_mactime GNUNET_PACKED; 199 uint64_t ri_mactime GNUNET_PACKED;
174 200
175 /** 201 /**
176 * from radiotap 202 * from radiotap
177 * either IEEE80211_RADIOTAP_DBM_ANTSIGNAL 203 * either IEEE80211_RADIOTAP_DBM_ANTSIGNAL
178 * or IEEE80211_RADIOTAP_DB_ANTSIGNAL 204 * or IEEE80211_RADIOTAP_DB_ANTSIGNAL, 0 if unknown.
179 */ 205 */
180 int32_t ri_power GNUNET_PACKED; 206 int32_t ri_power GNUNET_PACKED;
181 207
182 /** 208 /**
183 * either IEEE80211_RADIOTAP_DBM_ANTNOISE 209 * either IEEE80211_RADIOTAP_DBM_ANTNOISE
184 * or IEEE80211_RADIOTAP_DB_ANTNOISE 210 * or IEEE80211_RADIOTAP_DB_ANTNOISE, 0 if unknown.
185 */ 211 */
186 int32_t ri_noise GNUNET_PACKED; 212 int32_t ri_noise GNUNET_PACKED;
187 213
188 /** 214 /**
189 * IEEE80211_RADIOTAP_CHANNEL 215 * IEEE80211_RADIOTAP_CHANNEL, 0 if unknown.
190 */ 216 */
191 uint32_t ri_channel GNUNET_PACKED; 217 uint32_t ri_channel GNUNET_PACKED;
192 218
193 /** 219 /**
194 * Frequency we use. FIXME: not properly initialized so far! 220 * Frequency we use. 0 if unknown.
195 */ 221 */
196 uint32_t ri_freq GNUNET_PACKED; 222 uint32_t ri_freq GNUNET_PACKED;
197 223
198 /** 224 /**
199 * IEEE80211_RADIOTAP_RATE * 50000 225 * IEEE80211_RADIOTAP_RATE * 50000, 0 if unknown.
200 */ 226 */
201 uint32_t ri_rate GNUNET_PACKED; 227 uint32_t ri_rate GNUNET_PACKED;
202 228
203 /** 229 /**
204 * IEEE80211_RADIOTAP_ANTENNA 230 * IEEE80211_RADIOTAP_ANTENNA, 0 if unknown.
205 */ 231 */
206 uint32_t ri_antenna GNUNET_PACKED; 232 uint32_t ri_antenna GNUNET_PACKED;
207 233