diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-06-17 16:56:13 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-06-17 16:56:13 +0000 |
commit | 96e9d119d82102f01d246a8d8852bd8181915bec (patch) | |
tree | 2f44e9b322030a34169c4ae1a6c193033d953b3e /src/dv/dv.h | |
parent | cd3266defbd10d3d1ac5019113d11a58d8f004c5 (diff) | |
download | gnunet-96e9d119d82102f01d246a8d8852bd8181915bec.tar.gz gnunet-96e9d119d82102f01d246a8d8852bd8181915bec.zip |
alignment
Diffstat (limited to 'src/dv/dv.h')
-rw-r--r-- | src/dv/dv.h | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/src/dv/dv.h b/src/dv/dv.h index 41634e4eb..1c087f6d7 100644 --- a/src/dv/dv.h +++ b/src/dv/dv.h | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #include "gnunet_common.h" | 29 | #include "gnunet_common.h" |
30 | 30 | ||
31 | #define DEBUG_DV_GOSSIP GNUNET_NO | 31 | #define DEBUG_DV_GOSSIP GNUNET_YES |
32 | #define DEBUG_DV_GOSSIP_SEND GNUNET_NO | 32 | #define DEBUG_DV_GOSSIP_SEND GNUNET_NO |
33 | #define DEBUG_DV_GOSSIP_RECEIPT GNUNET_NO | 33 | #define DEBUG_DV_GOSSIP_RECEIPT GNUNET_NO |
34 | #define DEBUG_DV_MESSAGES GNUNET_NO | 34 | #define DEBUG_DV_MESSAGES GNUNET_NO |
@@ -46,7 +46,7 @@ typedef void (*GNUNET_DV_MessageReceivedHandler) (void *cls, | |||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * DV Message, contains a message that was received | 48 | * DV Message, contains a message that was received |
49 | * via DV for this peer! | 49 | * via DV for this peer! Internal. |
50 | * | 50 | * |
51 | * Sender address is copied to the end of this struct, | 51 | * Sender address is copied to the end of this struct, |
52 | * followed by the actual message received. | 52 | * followed by the actual message received. |
@@ -83,6 +83,7 @@ struct GNUNET_DV_MessageReceived | |||
83 | 83 | ||
84 | /** | 84 | /** |
85 | * DV Message, indicates that we have learned of a new DV level peer. | 85 | * DV Message, indicates that we have learned of a new DV level peer. |
86 | * Internal. | ||
86 | * | 87 | * |
87 | * Sender address is copied to the end of this struct. | 88 | * Sender address is copied to the end of this struct. |
88 | */ | 89 | */ |
@@ -116,7 +117,8 @@ struct GNUNET_DV_ConnectMessage | |||
116 | }; | 117 | }; |
117 | 118 | ||
118 | /** | 119 | /** |
119 | * Message to return result from a send attempt | 120 | * Message to return result from a send attempt. |
121 | * Internal. | ||
120 | */ | 122 | */ |
121 | struct GNUNET_DV_SendResultMessage | 123 | struct GNUNET_DV_SendResultMessage |
122 | { | 124 | { |
@@ -138,7 +140,8 @@ struct GNUNET_DV_SendResultMessage | |||
138 | }; | 140 | }; |
139 | 141 | ||
140 | /** | 142 | /** |
141 | * Message to send a message over DV via a specific peer | 143 | * Message to send a message over DV via a specific peer. |
144 | * Internal. | ||
142 | */ | 145 | */ |
143 | struct GNUNET_DV_SendMessage | 146 | struct GNUNET_DV_SendMessage |
144 | { | 147 | { |
@@ -200,7 +203,7 @@ typedef struct | |||
200 | /** | 203 | /** |
201 | * Cost from received from node to neighbor node, takes distance into account | 204 | * Cost from received from node to neighbor node, takes distance into account |
202 | */ | 205 | */ |
203 | unsigned int cost GNUNET_PACKED; | 206 | uint32_t cost GNUNET_PACKED; |
204 | 207 | ||
205 | /** | 208 | /** |
206 | * Identity of neighbor we learned information about | 209 | * Identity of neighbor we learned information about |
@@ -226,26 +229,31 @@ typedef struct | |||
226 | { | 229 | { |
227 | struct GNUNET_MessageHeader header; | 230 | struct GNUNET_MessageHeader header; |
228 | 231 | ||
232 | #if TRACK_MESSAGES | ||
233 | /** | ||
234 | * Unique ID for this message. | ||
235 | */ | ||
236 | uint32_t uid GNUNET_PACKED; | ||
237 | #else | ||
238 | /* | ||
239 | * Alignment. | ||
240 | */ | ||
241 | uint32_t reserved GNUNET_PACKED; | ||
242 | #endif | ||
243 | |||
229 | /** | 244 | /** |
230 | * Identity of peer that ultimately sent the message. | 245 | * Identity of peer that ultimately sent the message. |
231 | * Should be looked up in the set of 'neighbor_id's of | 246 | * Should be looked up in the set of 'neighbor_id's of |
232 | * the referring peer. | 247 | * the referring peer. |
233 | */ | 248 | */ |
234 | unsigned int sender GNUNET_PACKED; | 249 | uint32_t sender GNUNET_PACKED; |
235 | 250 | ||
236 | /** | 251 | /** |
237 | * Identity of neighbor this message is going to. Should | 252 | * Identity of neighbor this message is going to. Should |
238 | * be looked up in the set of our own identifiers for | 253 | * be looked up in the set of our own identifiers for |
239 | * neighbors! | 254 | * neighbors! |
240 | */ | 255 | */ |
241 | unsigned int recipient GNUNET_PACKED; | 256 | uint32_t recipient GNUNET_PACKED; |
242 | |||
243 | #if TRACK_MESSAGES | ||
244 | /** | ||
245 | * Unique ID for this message. | ||
246 | */ | ||
247 | unsigned int uid GNUNET_PACKED; | ||
248 | #endif | ||
249 | 257 | ||
250 | } p2p_dv_MESSAGE_Data; | 258 | } p2p_dv_MESSAGE_Data; |
251 | 259 | ||