aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/cadet.h')
-rw-r--r--src/cadet/cadet.h53
1 files changed, 27 insertions, 26 deletions
diff --git a/src/cadet/cadet.h b/src/cadet/cadet.h
index f6cc860cc..ff3e47d19 100644
--- a/src/cadet/cadet.h
+++ b/src/cadet/cadet.h
@@ -27,29 +27,29 @@
27#define CADET_H_ 27#define CADET_H_
28 28
29#ifdef __cplusplus 29#ifdef __cplusplus
30extern "C" 30extern "C" {
31{ 31#if 0 /* keep Emacsens' auto-indent happy */
32#if 0 /* keep Emacsens' auto-indent happy */
33} 32}
34#endif 33#endif
35#endif 34#endif
36 35
37#include <stdint.h> 36#include <stdint.h>
38 37
39#if !defined(GNUNET_CULL_LOGGING) 38#if ! defined(GNUNET_CULL_LOGGING)
40 #define CADET_TIMING_START \ 39#define CADET_TIMING_START \
41 struct GNUNET_TIME_Absolute __timestamp;\ 40 struct GNUNET_TIME_Absolute __timestamp; \
42 __timestamp = GNUNET_TIME_absolute_get() 41 __timestamp = GNUNET_TIME_absolute_get ()
43 42
44 #define CADET_TIMING_END \ 43#define CADET_TIMING_END \
45 struct GNUNET_TIME_Relative __duration;\ 44 struct GNUNET_TIME_Relative __duration; \
46 __duration = GNUNET_TIME_absolute_get_duration (__timestamp);\ 45 __duration = GNUNET_TIME_absolute_get_duration (__timestamp); \
47 LOG (GNUNET_ERROR_TYPE_INFO, " %s duration %s\n",\ 46 LOG (GNUNET_ERROR_TYPE_INFO, \
48 __FUNCTION__,\ 47 " %s duration %s\n", \
49 GNUNET_STRINGS_relative_time_to_string (__duration, GNUNET_YES)); 48 __FUNCTION__, \
49 GNUNET_STRINGS_relative_time_to_string (__duration, GNUNET_YES));
50#else 50#else
51 #define CADET_TIMING_START 51#define CADET_TIMING_START
52 #define CADET_TIMING_END 52#define CADET_TIMING_END
53#endif 53#endif
54 54
55 55
@@ -68,17 +68,17 @@ extern "C"
68/** 68/**
69 * Minimum value for channel IDs of local clients. 69 * Minimum value for channel IDs of local clients.
70 */ 70 */
71#define GNUNET_CADET_LOCAL_CHANNEL_ID_CLI 0x80000000U 71#define GNUNET_CADET_LOCAL_CHANNEL_ID_CLI 0x80000000U
72 72
73/** 73/**
74 * FIXME. 74 * FIXME.
75 */ 75 */
76#define HIGH_PID 0xFF000000 76#define HIGH_PID 0xFF000000
77 77
78/** 78/**
79 * FIXME. 79 * FIXME.
80 */ 80 */
81#define LOW_PID 0x00FFFFFF 81#define LOW_PID 0x00FFFFFF
82 82
83 83
84/** 84/**
@@ -199,6 +199,12 @@ struct GNUNET_CADET_LocalData
199 struct GNUNET_CADET_ClientChannelNumber ccn; 199 struct GNUNET_CADET_ClientChannelNumber ccn;
200 200
201 /** 201 /**
202 * Priority and preferences (an enum GNUNET_MQ_PriorityPreferences)
203 * of the message in NBO.
204 */
205 uint32_t pp GNUNET_PACKED;
206
207 /**
202 * Payload follows 208 * Payload follows
203 */ 209 */
204}; 210};
@@ -219,7 +225,6 @@ struct GNUNET_CADET_LocalAck
219 * ID of the channel allowed to send more data. 225 * ID of the channel allowed to send more data.
220 */ 226 */
221 struct GNUNET_CADET_ClientChannelNumber ccn; 227 struct GNUNET_CADET_ClientChannelNumber ccn;
222
223}; 228};
224 229
225 230
@@ -308,7 +313,6 @@ struct GNUNET_CADET_RequestChannelInfoMessage
308 * Target of the channel. 313 * Target of the channel.
309 */ 314 */
310 struct GNUNET_PeerIdentity target; 315 struct GNUNET_PeerIdentity target;
311
312}; 316};
313 317
314 318
@@ -358,7 +362,6 @@ struct GNUNET_CADET_LocalInfoPeers
358 * ID of the peer (can be local peer). 362 * ID of the peer (can be local peer).
359 */ 363 */
360 struct GNUNET_PeerIdentity destination; 364 struct GNUNET_PeerIdentity destination;
361
362}; 365};
363 366
364 367
@@ -465,9 +468,7 @@ GC_min_pid (uint32_t a, uint32_t b);
465 * @return The size of the output. 468 * @return The size of the output.
466 */ 469 */
467size_t 470size_t
468GC_bin2s (void *bin, 471GC_bin2s (void *bin, unsigned int len, char **output);
469 unsigned int len,
470 char **output);
471 472
472 473
473/** 474/**
@@ -483,7 +484,7 @@ GC_bin2s (void *bin,
483const char * 484const char *
484GC_m2s (uint16_t m); 485GC_m2s (uint16_t m);
485 486
486#if 0 /* keep Emacsens' auto-indent happy */ 487#if 0 /* keep Emacsens' auto-indent happy */
487{ 488{
488#endif 489#endif
489#ifdef __cplusplus 490#ifdef __cplusplus