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.h61
1 files changed, 60 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_wlan.h b/src/transport/plugin_transport_wlan.h
index d03bacd82..979e466bf 100644
--- a/src/transport/plugin_transport_wlan.h
+++ b/src/transport/plugin_transport_wlan.h
@@ -43,7 +43,55 @@ struct Wlan_Helper_Control_Message
43 struct MacAddress mac; 43 struct MacAddress mac;
44}; 44};
45 45
46/**
47 * Header for messages which need fragmentation
48 */
49struct FragmentationHeader
50{
51
52 struct GNUNET_MessageHeader header;
53
54 /**
55 * ID of message, to distinguish between the messages, picked randomly.
56 */
57 uint32_t message_id GNUNET_PACKED;
58
59 /**
60 * Offset or number of this fragment, for fragmentation/segmentation (design choice, TBD)
61 */
62 uint16_t fragment_off_or_num GNUNET_PACKED;
63
64 /**
65 * CRC of fragment (for error checking)
66 */
67 uint16_t message_crc GNUNET_PACKED;
68
69// followed by payload
70
71};
72
73/**
74 * Header for messages which need fragmentation
75 */
76struct WlanHeader
77{
46 78
79 struct GNUNET_MessageHeader header;
80
81 /**
82 * checksum/error correction
83 */
84 uint32_t crc GNUNET_PACKED;
85
86 /**
87 * To whom are we talking to (set to our identity
88 * if we are still waiting for the welcome message)
89 */
90 struct GNUNET_PeerIdentity target;
91
92// followed by payload
93
94};
47 95
48/* Wlan IEEE80211 header default */ 96/* Wlan IEEE80211 header default */
49//Informations (in German) http://www.umtslink.at/content/WLAN_macheader-196.html 97//Informations (in German) http://www.umtslink.at/content/WLAN_macheader-196.html
@@ -104,7 +152,18 @@ struct Radiotap_Send
104 uint16_t tx_power; 152 uint16_t tx_power;
105}; 153};
106 154
107struct rx_info { 155// bit field defines for ri_present
156
157#define has_noise 1
158#define has_power 2
159#define has_channel 4
160
161/**
162 * struct to represent infos gathered form the radiotap fields
163 */
164
165struct Radiotap_rx {
166 uint32_t ri_present;
108 uint64_t ri_mactime; 167 uint64_t ri_mactime;
109 int32_t ri_power; 168 int32_t ri_power;
110 int32_t ri_noise; 169 int32_t ri_noise;