aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-05-04 22:18:42 +0200
committerChristian Grothoff <christian@grothoff.org>2019-05-04 22:18:42 +0200
commitc3cba3c672e5a5a3b3376ac993af8296c9746aaf (patch)
treea2a1286fae9f70ea44add99f0334f42c75c1ae28 /src
parent80f480c752fd8dfa1be51d78fce314d9f0650b50 (diff)
downloadgnunet-c3cba3c672e5a5a3b3376ac993af8296c9746aaf.tar.gz
gnunet-c3cba3c672e5a5a3b3376ac993af8296c9746aaf.zip
note on ChannelOption deprecation
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_cadet_service.h84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/include/gnunet_cadet_service.h b/src/include/gnunet_cadet_service.h
index da914ac9e..a11c5f3cb 100644
--- a/src/include/gnunet_cadet_service.h
+++ b/src/include/gnunet_cadet_service.h
@@ -36,9 +36,8 @@
36#define GNUNET_CADET_SERVICE_H 36#define GNUNET_CADET_SERVICE_H
37 37
38#ifdef __cplusplus 38#ifdef __cplusplus
39extern "C" 39extern "C" {
40{ 40#if 0 /* keep Emacsens' auto-indent happy */
41#if 0 /* keep Emacsens' auto-indent happy */
42} 41}
43#endif 42#endif
44#endif 43#endif
@@ -98,25 +97,28 @@ struct GNUNET_CADET_ChannelTunnelNumber
98/** 97/**
99 * Channel options. Second line indicates filed in the 98 * Channel options. Second line indicates filed in the
100 * CadetChannelInfo union carrying the answer. 99 * CadetChannelInfo union carrying the answer.
100 *
101 * @deprecated we should replace channel options with per-envelope
102 * options, and then re-use the options from `enum GNUNET_MQ_PriorityPreferences`.
101 */ 103 */
102enum GNUNET_CADET_ChannelOption 104enum GNUNET_CADET_ChannelOption
103{ 105{
104 /** 106 /**
105 * Default options: unreliable, default buffering, not out of order. 107 * Default options: unreliable, default buffering, not out of order.
106 */ 108 */
107 GNUNET_CADET_OPTION_DEFAULT = 0x0, 109 GNUNET_CADET_OPTION_DEFAULT = 0x0,
108 110
109 /** 111 /**
110 * Disable buffering on intermediate nodes (for minimum latency). 112 * Disable buffering on intermediate nodes (for minimum latency).
111 * Yes/No. 113 * Yes/No.
112 */ 114 */
113 GNUNET_CADET_OPTION_NOBUFFER = 0x1, 115 GNUNET_CADET_OPTION_NOBUFFER = 0x1,
114 116
115 /** 117 /**
116 * Enable channel reliability, lost messages will be retransmitted. 118 * Enable channel reliability, lost messages will be retransmitted.
117 * Yes/No. 119 * Yes/No.
118 */ 120 */
119 GNUNET_CADET_OPTION_RELIABLE = 0x2, 121 GNUNET_CADET_OPTION_RELIABLE = 0x2,
120 122
121 /** 123 /**
122 * Enable out of order delivery of messages. 124 * Enable out of order delivery of messages.
@@ -129,7 +131,7 @@ enum GNUNET_CADET_ChannelOption
129 * Only for use in @c GNUNET_CADET_channel_get_info 131 * Only for use in @c GNUNET_CADET_channel_get_info
130 * struct GNUNET_PeerIdentity *peer 132 * struct GNUNET_PeerIdentity *peer
131 */ 133 */
132 GNUNET_CADET_OPTION_PEER = 0x8 134 GNUNET_CADET_OPTION_PEER = 0x8
133 135
134}; 136};
135 137
@@ -146,10 +148,10 @@ enum GNUNET_CADET_ChannelOption
146 * - Each the #GNUNET_MQ_MessageCallback handlers for each message 148 * - Each the #GNUNET_MQ_MessageCallback handlers for each message
147 * received on the @a channel. 149 * received on the @a channel.
148 */ 150 */
149typedef void * 151typedef void *(*GNUNET_CADET_ConnectEventHandler) (
150(*GNUNET_CADET_ConnectEventHandler) (void *cls, 152 void *cls,
151 struct GNUNET_CADET_Channel *channel, 153 struct GNUNET_CADET_Channel *channel,
152 const struct GNUNET_PeerIdentity *source); 154 const struct GNUNET_PeerIdentity *source);
153 155
154 156
155/** 157/**
@@ -163,9 +165,9 @@ typedef void *
163 * @param cls Channel closure. 165 * @param cls Channel closure.
164 * @param channel Connection to the other end (henceforth invalid). 166 * @param channel Connection to the other end (henceforth invalid).
165 */ 167 */
166typedef void 168typedef void (*GNUNET_CADET_DisconnectEventHandler) (
167(*GNUNET_CADET_DisconnectEventHandler) (void *cls, 169 void *cls,
168 const struct GNUNET_CADET_Channel *channel); 170 const struct GNUNET_CADET_Channel *channel);
169 171
170 172
171/** 173/**
@@ -182,10 +184,10 @@ typedef void
182 * @param window_size New window size. If the is more messages than buffer size 184 * @param window_size New window size. If the is more messages than buffer size
183 * this value will be negative. -- FIXME: make unsigned, we never call negative? 185 * this value will be negative. -- FIXME: make unsigned, we never call negative?
184 */ 186 */
185typedef void 187typedef void (*GNUNET_CADET_WindowSizeEventHandler) (
186(*GNUNET_CADET_WindowSizeEventHandler) (void *cls, 188 void *cls,
187 const struct GNUNET_CADET_Channel *channel, 189 const struct GNUNET_CADET_Channel *channel,
188 int window_size); 190 int window_size);
189 191
190 192
191/** 193/**
@@ -323,7 +325,6 @@ const struct GNUNET_HashCode *
323GC_u2h (uint32_t port); 325GC_u2h (uint32_t port);
324 326
325 327
326
327/** 328/**
328 * Union to retrieve info about a channel. 329 * Union to retrieve info about a channel.
329 */ 330 */
@@ -352,7 +353,7 @@ union GNUNET_CADET_ChannelInfo
352 */ 353 */
353const union GNUNET_CADET_ChannelInfo * 354const union GNUNET_CADET_ChannelInfo *
354GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel, 355GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel,
355 enum GNUNET_CADET_ChannelOption option, 356 enum GNUNET_CADET_ChannelOption option,
356 ...); 357 ...);
357 358
358 359
@@ -393,9 +394,9 @@ struct GNUNET_CADET_ChannelInternals
393 * @param cls Closure. 394 * @param cls Closure.
394 * @param info internal details, NULL for end of list 395 * @param info internal details, NULL for end of list
395 */ 396 */
396typedef void 397typedef void (*GNUNET_CADET_ChannelCB) (
397(*GNUNET_CADET_ChannelCB) (void *cls, 398 void *cls,
398 const struct GNUNET_CADET_ChannelInternals *info); 399 const struct GNUNET_CADET_ChannelInternals *info);
399 400
400 401
401/** 402/**
@@ -465,9 +466,9 @@ struct GNUNET_CADET_PeerListEntry
465 * @param cls Closure. 466 * @param cls Closure.
466 * @param ple information about a peer, or NULL on "EOF". 467 * @param ple information about a peer, or NULL on "EOF".
467 */ 468 */
468typedef void 469typedef void (*GNUNET_CADET_PeersCB) (
469(*GNUNET_CADET_PeersCB) (void *cls, 470 void *cls,
470 const struct GNUNET_CADET_PeerListEntry *ple); 471 const struct GNUNET_CADET_PeerListEntry *ple);
471 472
472 473
473/** 474/**
@@ -488,8 +489,8 @@ struct GNUNET_CADET_PeersLister;
488 */ 489 */
489struct GNUNET_CADET_PeersLister * 490struct GNUNET_CADET_PeersLister *
490GNUNET_CADET_list_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, 491GNUNET_CADET_list_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
491 GNUNET_CADET_PeersCB callback, 492 GNUNET_CADET_PeersCB callback,
492 void *callback_cls); 493 void *callback_cls);
493 494
494 495
495/** 496/**
@@ -528,7 +529,6 @@ struct GNUNET_CADET_PeerPathDetail
528 * path ends with the destination peer (given in @e peer). 529 * path ends with the destination peer (given in @e peer).
529 */ 530 */
530 const struct GNUNET_PeerIdentity *path; 531 const struct GNUNET_PeerIdentity *path;
531
532}; 532};
533 533
534 534
@@ -539,9 +539,9 @@ struct GNUNET_CADET_PeerPathDetail
539 * @param cls Closure. 539 * @param cls Closure.
540 * @param ppd details about a path to the peer, NULL for end of information 540 * @param ppd details about a path to the peer, NULL for end of information
541 */ 541 */
542typedef void 542typedef void (*GNUNET_CADET_PathCB) (
543(*GNUNET_CADET_PathCB) (void *cls, 543 void *cls,
544 const struct GNUNET_CADET_PeerPathDetail *ppd); 544 const struct GNUNET_CADET_PeerPathDetail *ppd);
545 545
546 546
547/** 547/**
@@ -561,9 +561,9 @@ struct GNUNET_CADET_GetPath;
561 */ 561 */
562struct GNUNET_CADET_GetPath * 562struct GNUNET_CADET_GetPath *
563GNUNET_CADET_get_path (const struct GNUNET_CONFIGURATION_Handle *cfg, 563GNUNET_CADET_get_path (const struct GNUNET_CONFIGURATION_Handle *cfg,
564 const struct GNUNET_PeerIdentity *id, 564 const struct GNUNET_PeerIdentity *id,
565 GNUNET_CADET_PathCB callback, 565 GNUNET_CADET_PathCB callback,
566 void *callback_cls); 566 void *callback_cls);
567 567
568 568
569/** 569/**
@@ -617,9 +617,9 @@ struct GNUNET_CADET_TunnelDetails
617 * @param cls Closure. 617 * @param cls Closure.
618 * @param td tunnel details, NULL for end of list 618 * @param td tunnel details, NULL for end of list
619 */ 619 */
620typedef void 620typedef void (*GNUNET_CADET_TunnelsCB) (
621(*GNUNET_CADET_TunnelsCB) (void *cls, 621 void *cls,
622 const struct GNUNET_CADET_TunnelDetails *td); 622 const struct GNUNET_CADET_TunnelDetails *td);
623 623
624 624
625/** 625/**
@@ -640,8 +640,8 @@ struct GNUNET_CADET_ListTunnels;
640 */ 640 */
641struct GNUNET_CADET_ListTunnels * 641struct GNUNET_CADET_ListTunnels *
642GNUNET_CADET_list_tunnels (const struct GNUNET_CONFIGURATION_Handle *cfg, 642GNUNET_CADET_list_tunnels (const struct GNUNET_CONFIGURATION_Handle *cfg,
643 GNUNET_CADET_TunnelsCB callback, 643 GNUNET_CADET_TunnelsCB callback,
644 void *callback_cls); 644 void *callback_cls);
645 645
646 646
647/** 647/**
@@ -654,7 +654,7 @@ void *
654GNUNET_CADET_list_tunnels_cancel (struct GNUNET_CADET_ListTunnels *lt); 654GNUNET_CADET_list_tunnels_cancel (struct GNUNET_CADET_ListTunnels *lt);
655 655
656 656
657#if 0 /* keep Emacsens' auto-indent happy */ 657#if 0 /* keep Emacsens' auto-indent happy */
658{ 658{
659#endif 659#endif
660#ifdef __cplusplus 660#ifdef __cplusplus
@@ -664,6 +664,6 @@ GNUNET_CADET_list_tunnels_cancel (struct GNUNET_CADET_ListTunnels *lt);
664/* ifndef GNUNET_CADET_SERVICE_H */ 664/* ifndef GNUNET_CADET_SERVICE_H */
665#endif 665#endif
666 666
667/** @} */ /* end of group */ 667/** @} */ /* end of group */
668 668
669/* end of gnunet_cadet_service.h */ 669/* end of gnunet_cadet_service.h */