aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-14 15:02:53 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-14 15:02:53 +0000
commit09923f6cb3e8ff97586824c57f34d7d38e0c0986 (patch)
tree66ade3702ca8500100acfa05b139cd463d456fee /src/transport/plugin_transport_wlan.h
parentf326fb85c52d9b7c13023c98795674c379269349 (diff)
downloadgnunet-09923f6cb3e8ff97586824c57f34d7d38e0c0986.tar.gz
gnunet-09923f6cb3e8ff97586824c57f34d7d38e0c0986.zip
-fixing some of the issues from #1939 -- untested
Diffstat (limited to 'src/transport/plugin_transport_wlan.h')
-rw-r--r--src/transport/plugin_transport_wlan.h69
1 files changed, 68 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_wlan.h b/src/transport/plugin_transport_wlan.h
index 9e1bc4f22..c220c829d 100644
--- a/src/transport/plugin_transport_wlan.h
+++ b/src/transport/plugin_transport_wlan.h
@@ -76,10 +76,67 @@ static const struct GNUNET_TRANSPORT_WLAN_MacAddress bc_all_mac = {
76 {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} 76 {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
77}; 77};
78 78
79GNUNET_NETWORK_STRUCT_BEGIN
79 80
80struct Radiotap_Send 81/**
82 * generic definitions for IEEE 802.11 frames
83 */
84struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame
81{ 85{
82 /** 86 /**
87 * 802.11 Frame Control field,
88 */
89 uint16_t frame_control;
90
91 /**
92 * Microseconds to reserve link (duration), 0 by default
93 */
94 uint16_t duration;
95
96 /**
97 * Address 1: destination address in ad-hoc mode or AP, BSSID if station,
98 */
99 struct GNUNET_TRANSPORT_WLAN_MacAddress addr1;
100
101 /**
102 * Address 2: source address if in ad-hoc-mode or station, BSSID if AP
103 */
104 struct GNUNET_TRANSPORT_WLAN_MacAddress addr2;
105
106 /**
107 * Address 3: BSSID in ad-hoc mode, Destination if station, source if AP
108 */
109 struct GNUNET_TRANSPORT_WLAN_MacAddress addr3;
110
111 /**
112 * 802.11 sequence control field.
113 */
114 uint16_t sequence_control;
115
116 /**
117 * Link layer control (LLC). Set to a GNUnet-specific value.
118 */
119 u_int8_t llc[4];
120
121 /* payload */
122
123} GNUNET_PACKED;
124
125
126
127/**
128 * Message from the plugin to the WLAN helper: send the given message with the
129 * given connection parameters.
130 */
131struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage
132{
133
134 /**
135 * Type is 'GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA'.
136 */
137 struct GNUNET_MessageHeader header;
138
139 /**
83 * wlan send rate 140 * wlan send rate
84 */ 141 */
85 uint8_t rate; 142 uint8_t rate;
@@ -94,8 +151,18 @@ struct Radiotap_Send
94 * 0 is max power. Monotonically nondecreasing with lower power levels. 151 * 0 is max power. Monotonically nondecreasing with lower power levels.
95 */ 152 */
96 uint16_t tx_power; 153 uint16_t tx_power;
154
155 /**
156 * IEEE Frame to transmit (the sender MAC address will be overwritten by the helper as it does not
157 * trust the plugin to set it correctly).
158 */
159 struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame frame;
160
161 /* actual payload follows */
97}; 162};
98 163
164GNUNET_NETWORK_STRUCT_END
165
99 166
100/** 167/**
101 * struct to represent infos gathered form the radiotap fields, see RadiotapHeader for more Infos 168 * struct to represent infos gathered form the radiotap fields, see RadiotapHeader for more Infos