diff options
author | David Brodski <david@brodski.eu> | 2011-04-05 09:02:16 +0000 |
---|---|---|
committer | David Brodski <david@brodski.eu> | 2011-04-05 09:02:16 +0000 |
commit | 71e79d72a1da156a1bde9b3346e40f7a7f547f26 (patch) | |
tree | b1bedd9856c58460e45ee6ae0af930856f03a8d5 /src/transport/plugin_transport_wlan.h | |
parent | b64c94d386f0fa6a057c96cf3906a24a39f27b2e (diff) | |
download | gnunet-71e79d72a1da156a1bde9b3346e40f7a7f547f26.tar.gz gnunet-71e79d72a1da156a1bde9b3346e40f7a7f547f26.zip |
Some fixes
Diffstat (limited to 'src/transport/plugin_transport_wlan.h')
-rw-r--r-- | src/transport/plugin_transport_wlan.h | 61 |
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 | */ | ||
49 | struct 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 | */ | ||
76 | struct 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 | ||
107 | struct 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 | |||
165 | struct 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; |