diff options
Diffstat (limited to 'src/multicast/multicast_api.c')
-rw-r--r-- | src/multicast/multicast_api.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c index 6a7cf98eb..3dbc07f5d 100644 --- a/src/multicast/multicast_api.c +++ b/src/multicast/multicast_api.c | |||
@@ -18,7 +18,7 @@ | |||
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file multicast/multicast_api.c | 22 | * @file multicast/multicast_api.c |
23 | * @brief multicast service; establish tunnels to distant peers | 23 | * @brief multicast service; establish tunnels to distant peers |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
@@ -30,7 +30,7 @@ | |||
30 | #include "gnunet_multicast_service.h" | 30 | #include "gnunet_multicast_service.h" |
31 | #include "multicast.h" | 31 | #include "multicast.h" |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Handle for a request to send a message to all multicast group members | 34 | * Handle for a request to send a message to all multicast group members |
35 | * (from the origin). | 35 | * (from the origin). |
36 | */ | 36 | */ |
@@ -45,7 +45,7 @@ struct GNUNET_MULTICAST_OriginMessageHandle | |||
45 | }; | 45 | }; |
46 | 46 | ||
47 | 47 | ||
48 | /** | 48 | /** |
49 | * Handle for the origin of a multicast group. | 49 | * Handle for the origin of a multicast group. |
50 | */ | 50 | */ |
51 | struct GNUNET_MULTICAST_Origin | 51 | struct GNUNET_MULTICAST_Origin |
@@ -65,7 +65,7 @@ struct GNUNET_MULTICAST_Origin | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Handle for a message to be delivered from a member to the origin. | 69 | * Handle for a message to be delivered from a member to the origin. |
70 | */ | 70 | */ |
71 | struct GNUNET_MULTICAST_MemberRequestHandle | 71 | struct GNUNET_MULTICAST_MemberRequestHandle |
@@ -73,7 +73,7 @@ struct GNUNET_MULTICAST_MemberRequestHandle | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | 75 | ||
76 | /** | 76 | /** |
77 | * Opaque handle for a multicast group member. | 77 | * Opaque handle for a multicast group member. |
78 | */ | 78 | */ |
79 | struct GNUNET_MULTICAST_Member | 79 | struct GNUNET_MULTICAST_Member |
@@ -83,12 +83,12 @@ struct GNUNET_MULTICAST_Member | |||
83 | 83 | ||
84 | GNUNET_NETWORK_STRUCT_BEGIN | 84 | GNUNET_NETWORK_STRUCT_BEGIN |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Header of a request from a member to the origin. | 87 | * Header of a request from a member to the origin. |
88 | */ | 88 | */ |
89 | struct GNUNET_MULTICAST_RequestHeader | 89 | struct GNUNET_MULTICAST_RequestHeader |
90 | { | 90 | { |
91 | /** | 91 | /** |
92 | * Header for all requests from a member to the origin. | 92 | * Header for all requests from a member to the origin. |
93 | */ | 93 | */ |
94 | struct GNUNET_MessageHeader header; | 94 | struct GNUNET_MessageHeader header; |
@@ -98,29 +98,29 @@ struct GNUNET_MULTICAST_RequestHeader | |||
98 | */ | 98 | */ |
99 | struct GNUNET_CRYPTO_EccPublicSignKey member_key; | 99 | struct GNUNET_CRYPTO_EccPublicSignKey member_key; |
100 | 100 | ||
101 | /** | 101 | /** |
102 | * ECC signature of the request fragment. | 102 | * ECC signature of the request fragment. |
103 | * | 103 | * |
104 | * Signature must match the public key of the multicast group. | 104 | * Signature must match the public key of the multicast group. |
105 | */ | 105 | */ |
106 | struct GNUNET_CRYPTO_EccSignature signature; | 106 | struct GNUNET_CRYPTO_EccSignature signature; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * Purpose for the signature and size of the signed data. | 109 | * Purpose for the signature and size of the signed data. |
110 | */ | 110 | */ |
111 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | 111 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * Number of the request fragment, monotonically increasing. | 114 | * Number of the request fragment, monotonically increasing. |
115 | */ | 115 | */ |
116 | uint64_t fragment_id GNUNET_PACKED; | 116 | uint64_t fragment_id GNUNET_PACKED; |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Byte offset of this @e fragment of the @e request. | 119 | * Byte offset of this @e fragment of the @e request. |
120 | */ | 120 | */ |
121 | uint64_t fragment_offset GNUNET_PACKED; | 121 | uint64_t fragment_offset GNUNET_PACKED; |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * Number of the request this fragment belongs to. | 124 | * Number of the request this fragment belongs to. |
125 | * | 125 | * |
126 | * Set in GNUNET_MULTICAST_origin_to_all(). | 126 | * Set in GNUNET_MULTICAST_origin_to_all(). |
@@ -135,24 +135,24 @@ struct GNUNET_MULTICAST_RequestHeader | |||
135 | /* Followed by request body. */ | 135 | /* Followed by request body. */ |
136 | }; | 136 | }; |
137 | 137 | ||
138 | /** | 138 | /** |
139 | * Header of a join request sent to the origin or another member. | 139 | * Header of a join request sent to the origin or another member. |
140 | */ | 140 | */ |
141 | struct GNUNET_MULTICAST_JoinRequest | 141 | struct GNUNET_MULTICAST_JoinRequest |
142 | { | 142 | { |
143 | /** | 143 | /** |
144 | * Header for the join request. | 144 | * Header for the join request. |
145 | */ | 145 | */ |
146 | struct GNUNET_MessageHeader header; | 146 | struct GNUNET_MessageHeader header; |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * ECC signature of the rest of the fields of the join request. | 149 | * ECC signature of the rest of the fields of the join request. |
150 | * | 150 | * |
151 | * Signature must match the public key of the joining member. | 151 | * Signature must match the public key of the joining member. |
152 | */ | 152 | */ |
153 | struct GNUNET_CRYPTO_EccSignature signature; | 153 | struct GNUNET_CRYPTO_EccSignature signature; |
154 | 154 | ||
155 | /** | 155 | /** |
156 | * Purpose for the signature and size of the signed data. | 156 | * Purpose for the signature and size of the signed data. |
157 | */ | 157 | */ |
158 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | 158 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; |
@@ -178,7 +178,7 @@ struct GNUNET_MULTICAST_JoinRequest | |||
178 | GNUNET_NETWORK_STRUCT_END | 178 | GNUNET_NETWORK_STRUCT_END |
179 | 179 | ||
180 | 180 | ||
181 | /** | 181 | /** |
182 | * Handle that identifies a join request. | 182 | * Handle that identifies a join request. |
183 | * | 183 | * |
184 | * Used to match calls to #GNUNET_MULTICAST_JoinCallback to the | 184 | * Used to match calls to #GNUNET_MULTICAST_JoinCallback to the |
@@ -189,7 +189,7 @@ struct GNUNET_MULTICAST_JoinHandle | |||
189 | }; | 189 | }; |
190 | 190 | ||
191 | 191 | ||
192 | /** | 192 | /** |
193 | * Function to call with the decision made for a join request. | 193 | * Function to call with the decision made for a join request. |
194 | * | 194 | * |
195 | * Must be called once and only once in response to an invocation of the | 195 | * Must be called once and only once in response to an invocation of the |
@@ -222,7 +222,7 @@ GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh, | |||
222 | } | 222 | } |
223 | 223 | ||
224 | 224 | ||
225 | /** | 225 | /** |
226 | * Handle to pass back for the answer of a membership test. | 226 | * Handle to pass back for the answer of a membership test. |
227 | */ | 227 | */ |
228 | struct GNUNET_MULTICAST_MembershipTestHandle | 228 | struct GNUNET_MULTICAST_MembershipTestHandle |
@@ -230,7 +230,7 @@ struct GNUNET_MULTICAST_MembershipTestHandle | |||
230 | }; | 230 | }; |
231 | 231 | ||
232 | 232 | ||
233 | /** | 233 | /** |
234 | * Call informing multicast about the decision taken for a membership test. | 234 | * Call informing multicast about the decision taken for a membership test. |
235 | * | 235 | * |
236 | * @param mth Handle that was given for the query. | 236 | * @param mth Handle that was given for the query. |
@@ -244,7 +244,7 @@ GNUNET_MULTICAST_membership_test_result (struct GNUNET_MULTICAST_MembershipTestH | |||
244 | } | 244 | } |
245 | 245 | ||
246 | 246 | ||
247 | /** | 247 | /** |
248 | * Opaque handle to a replay request from the multicast service. | 248 | * Opaque handle to a replay request from the multicast service. |
249 | */ | 249 | */ |
250 | struct GNUNET_MULTICAST_ReplayHandle | 250 | struct GNUNET_MULTICAST_ReplayHandle |
@@ -252,7 +252,7 @@ struct GNUNET_MULTICAST_ReplayHandle | |||
252 | }; | 252 | }; |
253 | 253 | ||
254 | 254 | ||
255 | /** | 255 | /** |
256 | * Replay a message fragment for the multicast group. | 256 | * Replay a message fragment for the multicast group. |
257 | * | 257 | * |
258 | * @param rh Replay handle identifying which replay operation was requested. | 258 | * @param rh Replay handle identifying which replay operation was requested. |
@@ -267,7 +267,7 @@ GNUNET_MULTICAST_replay_response (struct GNUNET_MULTICAST_ReplayHandle *rh, | |||
267 | } | 267 | } |
268 | 268 | ||
269 | 269 | ||
270 | /** | 270 | /** |
271 | * Indicate the end of the replay session. | 271 | * Indicate the end of the replay session. |
272 | * | 272 | * |
273 | * Invalidates the replay handle. | 273 | * Invalidates the replay handle. |
@@ -280,7 +280,7 @@ GNUNET_MULTICAST_replay_response_end (struct GNUNET_MULTICAST_ReplayHandle *rh) | |||
280 | } | 280 | } |
281 | 281 | ||
282 | 282 | ||
283 | /** | 283 | /** |
284 | * Replay a message for the multicast group. | 284 | * Replay a message for the multicast group. |
285 | * | 285 | * |
286 | * @param rh Replay handle identifying which replay operation was requested. | 286 | * @param rh Replay handle identifying which replay operation was requested. |
@@ -295,7 +295,7 @@ GNUNET_MULTICAST_replay_response2 (struct GNUNET_MULTICAST_ReplayHandle *rh, | |||
295 | } | 295 | } |
296 | 296 | ||
297 | 297 | ||
298 | /** | 298 | /** |
299 | * Start a multicast group. | 299 | * Start a multicast group. |
300 | * | 300 | * |
301 | * Will advertise the origin in the P2P overlay network under the respective | 301 | * Will advertise the origin in the P2P overlay network under the respective |
@@ -402,7 +402,7 @@ schedule_origin_to_all (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc | |||
402 | 402 | ||
403 | } | 403 | } |
404 | 404 | ||
405 | /** | 405 | /** |
406 | * Send a message to the multicast group. | 406 | * Send a message to the multicast group. |
407 | * | 407 | * |
408 | * @param origin Handle to the multicast group. | 408 | * @param origin Handle to the multicast group. |
@@ -433,7 +433,7 @@ GNUNET_MULTICAST_origin_to_all (struct GNUNET_MULTICAST_Origin *origin, | |||
433 | } | 433 | } |
434 | 434 | ||
435 | 435 | ||
436 | /** | 436 | /** |
437 | * Resume message transmission to multicast group. | 437 | * Resume message transmission to multicast group. |
438 | * | 438 | * |
439 | * @param mh Request to cancel. | 439 | * @param mh Request to cancel. |
@@ -445,7 +445,7 @@ GNUNET_MULTICAST_origin_to_all_resume (struct GNUNET_MULTICAST_OriginMessageHand | |||
445 | } | 445 | } |
446 | 446 | ||
447 | 447 | ||
448 | /** | 448 | /** |
449 | * Cancel request for message transmission to multicast group. | 449 | * Cancel request for message transmission to multicast group. |
450 | * | 450 | * |
451 | * @param mh Request to cancel. | 451 | * @param mh Request to cancel. |
@@ -456,7 +456,7 @@ GNUNET_MULTICAST_origin_to_all_cancel (struct GNUNET_MULTICAST_OriginMessageHand | |||
456 | } | 456 | } |
457 | 457 | ||
458 | 458 | ||
459 | /** | 459 | /** |
460 | * Stop a multicast group. | 460 | * Stop a multicast group. |
461 | * | 461 | * |
462 | * @param origin Multicast group to stop. | 462 | * @param origin Multicast group to stop. |
@@ -468,7 +468,7 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin) | |||
468 | } | 468 | } |
469 | 469 | ||
470 | 470 | ||
471 | /** | 471 | /** |
472 | * Join a multicast group. | 472 | * Join a multicast group. |
473 | * | 473 | * |
474 | * The entity joining is always the local peer. Further information about the | 474 | * The entity joining is always the local peer. Further information about the |
@@ -530,7 +530,7 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
530 | } | 530 | } |
531 | 531 | ||
532 | 532 | ||
533 | /** | 533 | /** |
534 | * Handle for a replay request. | 534 | * Handle for a replay request. |
535 | */ | 535 | */ |
536 | struct GNUNET_MULTICAST_MemberReplayHandle | 536 | struct GNUNET_MULTICAST_MemberReplayHandle |
@@ -538,7 +538,7 @@ struct GNUNET_MULTICAST_MemberReplayHandle | |||
538 | }; | 538 | }; |
539 | 539 | ||
540 | 540 | ||
541 | /** | 541 | /** |
542 | * Request a fragment to be replayed by fragment ID. | 542 | * Request a fragment to be replayed by fragment ID. |
543 | * | 543 | * |
544 | * Useful if messages below the @e max_known_fragment_id given when joining are | 544 | * Useful if messages below the @e max_known_fragment_id given when joining are |
@@ -561,7 +561,7 @@ GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *member, | |||
561 | } | 561 | } |
562 | 562 | ||
563 | 563 | ||
564 | /** | 564 | /** |
565 | * Request a message fragment to be replayed. | 565 | * Request a message fragment to be replayed. |
566 | * | 566 | * |
567 | * Useful if messages below the @e max_known_fragment_id given when joining are | 567 | * Useful if messages below the @e max_known_fragment_id given when joining are |
@@ -588,7 +588,7 @@ GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *member, | |||
588 | } | 588 | } |
589 | 589 | ||
590 | 590 | ||
591 | /** | 591 | /** |
592 | * Cancel a replay request. | 592 | * Cancel a replay request. |
593 | * | 593 | * |
594 | * @param rh Request to cancel. | 594 | * @param rh Request to cancel. |
@@ -599,7 +599,7 @@ GNUNET_MULTICAST_member_replay_cancel (struct GNUNET_MULTICAST_MemberReplayHandl | |||
599 | } | 599 | } |
600 | 600 | ||
601 | 601 | ||
602 | /** | 602 | /** |
603 | * Part a multicast group. | 603 | * Part a multicast group. |
604 | * | 604 | * |
605 | * Disconnects from all group members and invalidates the @a member handle. | 605 | * Disconnects from all group members and invalidates the @a member handle. |
@@ -616,9 +616,9 @@ GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member) | |||
616 | } | 616 | } |
617 | 617 | ||
618 | 618 | ||
619 | /** | 619 | /** |
620 | * Send a message to the origin of the multicast group. | 620 | * Send a message to the origin of the multicast group. |
621 | * | 621 | * |
622 | * @param member Membership handle. | 622 | * @param member Membership handle. |
623 | * @param message_id Application layer ID for the message. Opaque to multicast. | 623 | * @param message_id Application layer ID for the message. Opaque to multicast. |
624 | * @param notify Callback to call to get the message. | 624 | * @param notify Callback to call to get the message. |
@@ -635,7 +635,7 @@ GNUNET_MULTICAST_member_to_origin (struct GNUNET_MULTICAST_Member *member, | |||
635 | } | 635 | } |
636 | 636 | ||
637 | 637 | ||
638 | /** | 638 | /** |
639 | * Resume message transmission to origin. | 639 | * Resume message transmission to origin. |
640 | * | 640 | * |
641 | * @param rh Request to cancel. | 641 | * @param rh Request to cancel. |
@@ -647,7 +647,7 @@ GNUNET_MULTICAST_member_to_origin_resume (struct GNUNET_MULTICAST_MemberRequestH | |||
647 | } | 647 | } |
648 | 648 | ||
649 | 649 | ||
650 | /** | 650 | /** |
651 | * Cancel request for message transmission to origin. | 651 | * Cancel request for message transmission to origin. |
652 | * | 652 | * |
653 | * @param rh Request to cancel. | 653 | * @param rh Request to cancel. |