2 This file is part of GNUnet.
3 (C) 2012, 2013 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file include/gnunet_multicast_service.h
23 * @brief multicast service; establish tunnels to distant peers
24 * @author Christian Grothoff
25 * @author Gabor X Toth
28 #ifndef GNUNET_MULTICAST_SERVICE_H
29 #define GNUNET_MULTICAST_SERVICE_H
34 #if 0 /* keep Emacsens' auto-indent happy */
39 #include "gnunet_util_lib.h"
40 #include "gnunet_transport_service.h"
43 * Version number of GNUnet-multicast API.
45 #define GNUNET_MULTICAST_VERSION 0x00000000
48 * Opaque handle for a multicast group member.
50 struct GNUNET_MULTICAST_Member;
53 * Handle for the origin of a multicast group.
55 struct GNUNET_MULTICAST_Origin;
58 enum GNUNET_MULTICAST_MessageFlags
61 * First fragment of a message.
63 GNUNET_MULTICAST_MESSAGE_FIRST_FRAGMENT = 1 << 0,
66 * Last fragment of a message.
68 GNUNET_MULTICAST_MESSAGE_LAST_FRAGMENT = 1 << 1,
71 * OR'ed flags if message is not fragmented.
73 GNUNET_MULTICAST_MESSAGE_NOT_FRAGMENTED
74 = GNUNET_MULTICAST_MESSAGE_FIRST_FRAGMENT
75 | GNUNET_MULTICAST_MESSAGE_LAST_FRAGMENT,
78 * Historic message, used only locally when replaying messages from local
81 GNUNET_MULTICAST_MESSAGE_HISTORIC = 1 << 30
86 GNUNET_NETWORK_STRUCT_BEGIN
89 * Header of a multicast message fragment.
91 * This format is public as the replay mechanism must replay message fragments using the
92 * same format. This is needed as we want to integrity-check message fragments within
93 * the multicast layer to avoid multicasting mal-formed messages.
95 struct GNUNET_MULTICAST_MessageHeader
99 * Header for all multicast message fragments from the origin.
101 struct GNUNET_MessageHeader header;
104 * Number of hops this message fragment has taken since the origin.
106 * Helpful to determine shortest paths to the origin among honest peers for
107 * unicast requests from members. Updated at each hop and thus not signed and
110 uint32_t hop_counter GNUNET_PACKED;
113 * ECC signature of the message fragment.
115 * Signature must match the public key of the multicast group.
117 struct GNUNET_CRYPTO_EddsaSignature signature;
120 * Purpose for the signature and size of the signed data.
122 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
125 * Number of the message fragment, monotonically increasing starting from 1.
127 uint64_t fragment_id GNUNET_PACKED;
130 * Byte offset of this @e fragment of the @e message.
132 uint64_t fragment_offset GNUNET_PACKED;
135 * Number of the message this fragment belongs to.
137 * Set in GNUNET_MULTICAST_origin_to_all().
139 uint64_t message_id GNUNET_PACKED;
142 * Counter that monotonically increases whenever a member parts the group.
144 * Set in GNUNET_MULTICAST_origin_to_all().
146 * It has significance in case of replay requests: when a member has missed
147 * messages and gets a replay request: in this case if the @a group_generation
148 * is still the same before and after the missed messages, it means that no
149 * @e join or @e part operations happened during the missed messages.
151 uint64_t group_generation GNUNET_PACKED;
154 * Flags for this message fragment.
156 * @see enum GNUNET_MULTICAST_MessageFlags
158 uint32_t flags GNUNET_PACKED;
160 /* Followed by message body. */
163 GNUNET_NETWORK_STRUCT_END
166 * Maximum size of a multicast message fragment.
168 #define GNUNET_MULTICAST_FRAGMENT_MAX_SIZE 63 * 1024
170 #define GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD \
171 GNUNET_MULTICAST_FRAGMENT_MAX_SIZE \
172 - sizeof (struct GNUNET_MULTICAST_MessageHeader)
176 * Handle that identifies a join request.
178 * Used to match calls to #GNUNET_MULTICAST_JoinCallback to the
179 * corresponding calls to #GNUNET_MULTICAST_join_decision().
181 struct GNUNET_MULTICAST_JoinHandle;
185 * Function to call with the decision made for a join request.
187 * Must be called once and only once in response to an invocation of the
188 * #GNUNET_MULTICAST_JoinCallback.
190 * @param jh Join request handle.
191 * @param is_admitted #GNUNET_YES if joining is approved,
192 * #GNUNET_NO if it is disapproved
193 * @param relay_count Number of relays given.
194 * @param relays Array of suggested peers that might be useful relays to use
195 * when joining the multicast group (essentially a list of peers that
196 * are already part of the multicast group and might thus be willing
197 * to help with routing). If empty, only this local peer (which must
198 * be the multicast origin) is a good candidate for building the
199 * multicast tree. Note that it is unnecessary to specify our own
200 * peer identity in this array.
201 * @param join_response Message to send in response to the joining peer;
202 * can also be used to redirect the peer to a different group at the
203 * application layer; this response is to be transmitted to the
204 * peer that issued the request even if admission is denied.
206 struct GNUNET_MULTICAST_ReplayHandle *
207 GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh,
209 unsigned int relay_count,
210 const struct GNUNET_PeerIdentity *relays,
211 const struct GNUNET_MessageHeader *join_response);
215 * Method called whenever another peer wants to join the multicast group.
217 * Implementations of this function must call GNUNET_MULTICAST_join_decision()
220 * @param cls Closure.
221 * @param peer Identity of the member that wants to join.
222 * @param join_req Application-dependent join message from the new member
223 * (might, for example, contain a user,
224 * bind user identity/pseudonym to peer identity, application-level
225 * message to origin, etc.).
226 * @param jh Join handle to pass to GNUNET_MULTICAST_join_decison().
229 (*GNUNET_MULTICAST_JoinCallback) (void *cls,
230 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
231 const struct GNUNET_MessageHeader *join_req,
232 struct GNUNET_MULTICAST_JoinHandle *jh);
236 * Handle to pass back for the answer of a membership test.
238 struct GNUNET_MULTICAST_MembershipTestHandle;
242 * Call informing multicast about the decision taken for a membership test.
244 * @param mth Handle that was given for the query.
245 * @param result #GNUNET_YES if peer was a member, #GNUNET_NO if peer was not a member,
246 * #GNUNET_SYSERR if we cannot answer the membership test.
249 GNUNET_MULTICAST_membership_test_result (struct GNUNET_MULTICAST_MembershipTestHandle *mth,
254 * Method called to test if a member was in the group at a particular time.
256 * It is called when a replay request is received to determine if the requested
257 * message can be replayed.
259 * @param cls Closure.
260 * @param member_key Identity of the member that we want to test.
261 * @param message_id Message ID for which to perform the test.
262 * @param group_generation Group generation of the message. It has relevance if
263 * the message consists of multiple fragments with different group
265 * @param mth Handle to give to GNUNET_MULTICAST_membership_test_answer().
268 (*GNUNET_MULTICAST_MembershipTestCallback) (void *cls,
269 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
271 uint64_t group_generation,
272 struct GNUNET_MULTICAST_MembershipTestHandle *mth);
276 * Function called whenever a group member has transmitted a request
277 * to the origin (other than joining or leaving).
279 * FIXME: need to distinguish between origin cancelling a message (some fragments
280 * were sent, then the rest 'discarded') and the case where we got disconnected;
281 * right now, both would mean 'msg' is NULL, but they could be quite different...
282 * So the semantics from the receiver side of
283 * GNUNET_MULTICAST_member_to_origin_cancel() are not clear here. Maybe we
284 * should do something with the flags in this case?
286 * @param cls Closure (set from GNUNET_MULTICAST_origin_start).
287 * @param sender Identity of the sender.
288 * @param req Request to the origin.
289 * @param flags Flags for the request.
292 (*GNUNET_MULTICAST_RequestCallback) (void *cls,
293 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
294 const struct GNUNET_MessageHeader *req,
295 enum GNUNET_MULTICAST_MessageFlags flags);
299 * Function called whenever a group member is receiving a message fragment from
302 * If admission to the group is denied, this function is called once with the
303 * response of the @e origin (as given to GNUNET_MULTICAST_join_decision()) and
304 * then a second time with NULL to indicate that the connection failed for good.
306 * FIXME: need to distinguish between origin cancelling a message (some fragments
307 * were sent, then the rest 'discarded') and the case where we got disconnected;
308 * right now, both would mean 'msg' is NULL, but they could be quite different...
309 * So the semantics from the receiver side of
310 * GNUNET_MULTICAST_origin_to_all_cancel() are not clear here.
312 * @param cls Closure (set from GNUNET_MULTICAST_member_join())
313 * @param msg Message from the origin, NULL if the origin shut down
314 * (or we were kicked out, and we should thus call
315 * GNUNET_MULTICAST_member_part() next)
318 (*GNUNET_MULTICAST_MessageCallback) (void *cls,
319 const struct GNUNET_MessageHeader *msg);
323 * Function called with the result of an asynchronous operation.
325 * @see GNUNET_MULTICAST_replay_fragment()
327 * @param result Result of the operation.
330 (*GNUNET_MULTICAST_ResultCallback) (void *cls,
335 * Opaque handle to a replay request from the multicast service.
337 struct GNUNET_MULTICAST_ReplayHandle;
341 * Functions with this signature are called whenever the multicast service needs
342 * a message fragment to be replayed by fragment_id.
344 * Implementations of this function MUST call GNUNET_MULTICAST_replay() ONCE
345 * (with a message or an error); however, if the origin is destroyed or the
346 * group is left, the replay handle must no longer be used.
348 * @param cls Closure (set from GNUNET_MULTICAST_origin_start()
349 * or GNUNET_MULTICAST_member_join()).
350 * @param member_key The member requesting replay.
351 * @param fragment_id Which message fragment should be replayed.
352 * @param flags Flags for the replay.
353 * @param rh Handle to pass to message transmit function.
356 (*GNUNET_MULTICAST_ReplayFragmentCallback) (void *cls,
357 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
358 uint64_t fragment_id,
360 struct GNUNET_MULTICAST_ReplayHandle *rh);
363 * Functions with this signature are called whenever the multicast service needs
364 * a message fragment to be replayed by message_id and fragment_offset.
366 * Implementations of this function MUST call GNUNET_MULTICAST_replay() ONCE
367 * (with a message or an error); however, if the origin is destroyed or the
368 * group is left, the replay handle must no longer be used.
370 * @param cls Closure (set from GNUNET_MULTICAST_origin_start()
371 * or GNUNET_MULTICAST_member_join()).
372 * @param member_key The member requesting replay.
373 * @param message_id Which message should be replayed.
374 * @param fragment_offset Offset of the fragment within of @a message_id to be replayed.
375 * @param flags Flags for the replay.
376 * @param rh Handle to pass to message transmit function.
379 (*GNUNET_MULTICAST_ReplayMessageCallback) (void *cls,
380 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
382 uint64_t fragment_offset,
384 struct GNUNET_MULTICAST_ReplayHandle *rh);
388 * Possible error codes during replay.
390 enum GNUNET_MULTICAST_ReplayErrorCode
394 * Everything is fine.
396 GNUNET_MULTICAST_REC_OK = 0,
399 * Message fragment not found in the message store.
401 * Either discarded if it is too old, or not arrived yet if this member has
402 * missed some messages.
404 GNUNET_MULTICAST_REC_NOT_FOUND = 1,
407 * Fragment ID counter was larger than the highest counter this
408 * replay function has ever encountered; thus it is likely the
409 * origin never sent it and we're at the HEAD of the multicast
410 * stream as far as this node is concerned.
414 GNUNET_MULTICAST_REC_PAST_HEAD = 2,
417 * Access is denied to the requested fragment, membership test did not pass.
419 GNUNET_MULTICAST_REC_ACCESS_DENIED = 3,
422 * Internal error (i.e. database error). Try some other peer.
424 GNUNET_MULTICAST_REC_INTERNAL_ERROR = 4
430 * Replay a message fragment for the multicast group.
432 * @param rh Replay handle identifying which replay operation was requested.
433 * @param msg Replayed message fragment, NULL if unknown/error.
434 * @param ec Error code.
437 GNUNET_MULTICAST_replay_response (struct GNUNET_MULTICAST_ReplayHandle *rh,
438 const struct GNUNET_MessageHeader *msg,
439 enum GNUNET_MULTICAST_ReplayErrorCode ec);
443 * Indicate the end of the replay session.
445 * Invalidates the replay handle.
447 * @param rh Replay session to end.
450 GNUNET_MULTICAST_replay_response_end (struct GNUNET_MULTICAST_ReplayHandle *rh);
454 * Function called to provide data for a transmission for a replay.
456 * @see GNUNET_MULTICAST_replay2()
459 (*GNUNET_MULTICAST_ReplayTransmitNotify) (void *cls,
465 * Replay a message for the multicast group.
467 * @param rh Replay handle identifying which replay operation was requested.
468 * @param notify Function to call to get the message.
469 * @param notify_cls Closure for @a notify.
472 GNUNET_MULTICAST_replay_response2 (struct GNUNET_MULTICAST_ReplayHandle *rh,
473 GNUNET_MULTICAST_ReplayTransmitNotify notify,
478 * Start a multicast group.
480 * Will advertise the origin in the P2P overlay network under the respective
481 * public key so that other peer can find this peer to join it. Peers that
482 * issue GNUNET_MULTICAST_member_join() can then transmit a join request to
483 * either an existing group member or to the origin. If the joining is
484 * approved, the member is cleared for @e replay and will begin to receive
485 * messages transmitted to the group. If joining is disapproved, the failed
486 * candidate will be given a response. Members in the group can send messages
487 * to the origin (one at a time).
489 * @param cfg Configuration to use.
490 * @param priv_key ECC key that will be used to sign messages for this
491 * multicast session; public key is used to identify the multicast group;
492 * @param next_fragment_id Next fragment ID to continue counting fragments from
493 * when restarting the origin. 1 for a new group.
494 * @param join_cb Function called to approve / disapprove joining of a peer.
495 * @param mem_test_cb Function multicast can use to test group membership.
496 * @param replay_frag_cb Function that can be called to replay a message fragment.
497 * @param replay_msg_cb Function that can be called to replay a message.
498 * @param request_cb Function called with message fragments from group members.
499 * @param message_cb Function called with the message fragments sent to the
500 * network by GNUNET_MULTICAST_origin_to_all(). These message fragments
501 * should be stored for answering replay requests later.
502 * @param cls Closure for the various callbacks that follow.
503 * @return Handle for the origin, NULL on error.
505 struct GNUNET_MULTICAST_Origin *
506 GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
507 const struct GNUNET_CRYPTO_EddsaPrivateKey *priv_key,
508 uint64_t next_fragment_id,
509 GNUNET_MULTICAST_JoinCallback join_cb,
510 GNUNET_MULTICAST_MembershipTestCallback mem_test_cb,
511 GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb,
512 GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb,
513 GNUNET_MULTICAST_RequestCallback request_cb,
514 GNUNET_MULTICAST_MessageCallback message_cb,
518 * Function called to provide data for a transmission from the origin to all
521 * Note that returning #GNUNET_OK or #GNUNET_SYSERR (but not #GNUNET_NO)
522 * invalidates the respective transmission handle.
524 * @param cls Closure.
525 * @param[in,out] data_size Initially set to the number of bytes available in
526 * @a data, should be set to the number of bytes written to data.
527 * @param[out] data Where to write the body of the message to give to the
528 * method. The function must copy at most @a data_size bytes to @a data.
529 * @return #GNUNET_SYSERR on error (fatal, aborts transmission)
530 * #GNUNET_NO on success, if more data is to be transmitted later.
531 * Should be used if @a data_size was not big enough to take all the
532 * data. If 0 is returned in @a data_size the transmission is paused,
533 * and can be resumed with GNUNET_MULTICAST_origin_to_all_resume().
534 * #GNUNET_YES if this completes the transmission (all data supplied)
537 (*GNUNET_MULTICAST_OriginTransmitNotify) (void *cls,
543 * Handle for a request to send a message to all multicast group members
546 struct GNUNET_MULTICAST_OriginMessageHandle;
550 * Send a message to the multicast group.
552 * @param origin Handle to the multicast group.
553 * @param message_id Application layer ID for the message. Opaque to multicast.
554 * @param group_generation Group generation of the message. Documented in
555 * GNUNET_MULTICAST_MessageHeader.
556 * @param notify Function to call to get the message.
557 * @param notify_cls Closure for @a notify.
558 * @return NULL on error (i.e. request already pending).
560 struct GNUNET_MULTICAST_OriginMessageHandle *
561 GNUNET_MULTICAST_origin_to_all (struct GNUNET_MULTICAST_Origin *origin,
563 uint64_t group_generation,
564 GNUNET_MULTICAST_OriginTransmitNotify notify,
570 * Resume message transmission to multicast group.
572 * @param mh Request to cancel.
575 GNUNET_MULTICAST_origin_to_all_resume (struct GNUNET_MULTICAST_OriginMessageHandle *mh);
579 * Cancel request for message transmission to multicast group.
581 * @param mh Request to cancel.
584 GNUNET_MULTICAST_origin_to_all_cancel (struct GNUNET_MULTICAST_OriginMessageHandle *mh);
588 * Stop a multicast group.
590 * @param origin Multicast group to stop.
593 GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin);
597 * Join a multicast group.
599 * The entity joining is always the local peer. Further information about the
600 * candidate can be provided in the @a join_request message. If the join fails, the
601 * @a message_cb is invoked with a (failure) response and then with NULL. If
602 * the join succeeds, outstanding (state) messages and ongoing multicast
603 * messages will be given to the @a message_cb until the member decides to part
604 * the group. The @a mem_test_cb and @a replay_cb functions may be called at
605 * anytime by the multicast service to support relaying messages to other
606 * members of the group.
608 * @param cfg Configuration to use.
609 * @param group_key ECC public key that identifies the group to join.
610 * @param member_key ECC key that identifies the member and used to sign
611 * requests sent to the origin.
612 * @param origin Peer ID of the origin to send unicast requsets to. If NULL,
613 * unicast requests are sent back via multiple hops on the reverse path
614 * of multicast messages.
615 * @param relay_count Number of peers in the @a relays array.
616 * @param relays Peer identities of members of the group, which serve as relays
617 * and can be used to join the group at. and send the @a join_request to.
618 * If empty, the @a join_request is sent directly to the @a origin.
619 * @param join_request Application-dependent join request to be passed to the peer
620 * @a relay (might, for example, contain a user, bind user
621 * identity/pseudonym to peer identity, application-level message to
623 * @param join_cb Function called to approve / disapprove joining of a peer.
624 * @param mem_test_cb Function multicast can use to test group membership.
625 * @param replay_frag_cb Function that can be called to replay message fragments
626 * this peer already knows from this group. NULL if this
627 * client is unable to support replay.
628 * @param replay_msg_cb Function that can be called to replay message fragments
629 * this peer already knows from this group. NULL if this
630 * client is unable to support replay.
631 * @param message_cb Function to be called for all message fragments we
632 * receive from the group, excluding those our @a replay_cb
634 * @param cls Closure for callbacks.
635 * @return Handle for the member, NULL on error.
637 struct GNUNET_MULTICAST_Member *
638 GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
639 const struct GNUNET_CRYPTO_EddsaPublicKey *group_key,
640 const struct GNUNET_CRYPTO_EddsaPrivateKey *member_key,
641 const struct GNUNET_PeerIdentity *origin,
642 uint32_t relay_count,
643 const struct GNUNET_PeerIdentity *relays,
644 const struct GNUNET_MessageHeader *join_request,
645 GNUNET_MULTICAST_JoinCallback join_cb,
646 GNUNET_MULTICAST_MembershipTestCallback mem_test_cb,
647 GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb,
648 GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb,
649 GNUNET_MULTICAST_MessageCallback message_cb,
653 * Handle for a replay request.
655 struct GNUNET_MULTICAST_MemberReplayHandle;
659 * Request a fragment to be replayed by fragment ID.
661 * Useful if messages below the @e max_known_fragment_id given when joining are
662 * needed and not known to the client.
664 * @param member Membership handle.
665 * @param fragment_id ID of a message fragment that this client would like to
667 * @param flags Additional flags for the replay request. It is used and defined
668 * by the replay callback. FIXME: which replay callback? FIXME: use enum?
669 * FIXME: why not pass reply cb here?
670 * @return Replay request handle, NULL on error.
672 struct GNUNET_MULTICAST_MemberReplayHandle *
673 GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *member,
674 uint64_t fragment_id,
679 * Request a message fr to be replayed.
681 * Useful if messages below the @e max_known_fragment_id given when joining are
682 * needed and not known to the client.
684 * @param member Membership handle.
685 * @param message_id ID of the message this client would like to see replayed.
686 * @param fragment_offset Offset of the fragment within the message to replay.
687 * @param flags Additional flags for the replay request. It is used & defined
688 * by the replay callback.
689 * @param result_cb Function to be called for the replayed message.
690 * @param result_cb_cls Closure for @a result_cb.
691 * @return Replay request handle, NULL on error.
693 struct GNUNET_MULTICAST_MemberReplayHandle *
694 GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *member,
696 uint64_t fragment_offset,
698 GNUNET_MULTICAST_ResultCallback result_cb,
699 void *result_cb_cls);
703 * Cancel a replay request.
705 * @param rh Request to cancel.
708 GNUNET_MULTICAST_member_replay_cancel (struct GNUNET_MULTICAST_MemberReplayHandle *rh);
712 * Part a multicast group.
714 * Disconnects from all group members and invalidates the @a member handle.
716 * An application-dependent part message can be transmitted beforehand using
717 * #GNUNET_MULTICAST_member_to_origin())
719 * @param member Membership handle.
722 GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member);
726 * Function called to provide data for a transmission from a member to the origin.
728 * Note that returning #GNUNET_OK or #GNUNET_SYSERR (but not #GNUNET_NO)
729 * invalidates the respective transmission handle.
731 * @param cls Closure.
732 * @param[in,out] data_size Initially set to the number of bytes available in
733 * @a data, should be set to the number of bytes written to data.
734 * @param[out] data Where to write the body of the message to give to the
735 * method. The function must copy at most @a data_size bytes to @a data.
736 * @return #GNUNET_SYSERR on error (fatal, aborts transmission)
737 * #GNUNET_NO on success, if more data is to be transmitted later.
738 * Should be used if @a data_size was not big enough to take all the
739 * data. If 0 is returned in @a data_size the transmission is paused,
740 * and can be resumed with GNUNET_MULTICAST_member_to_origin_resume().
741 * #GNUNET_YES if this completes the transmission (all data supplied)
744 (*GNUNET_MULTICAST_MemberTransmitNotify) (void *cls,
750 * Handle for a message to be delivered from a member to the origin.
752 struct GNUNET_MULTICAST_MemberRequestHandle;
756 * Send a message to the origin of the multicast group.
758 * @param member Membership handle.
759 * @param message_id Application layer ID for the message. Opaque to multicast.
760 * @param notify Callback to call to get the message.
761 * @param notify_cls Closure for @a notify.
762 * @return Handle to cancel request, NULL on error (i.e. request already pending).
764 struct GNUNET_MULTICAST_MemberRequestHandle *
765 GNUNET_MULTICAST_member_to_origin (struct GNUNET_MULTICAST_Member *member,
767 GNUNET_MULTICAST_MemberTransmitNotify notify,
772 * Resume message transmission to origin.
774 * @param rh Request to cancel.
777 GNUNET_MULTICAST_member_to_origin_resume (struct GNUNET_MULTICAST_MemberRequestHandle *rh);
781 * Cancel request for message transmission to origin.
783 * @param rh Request to cancel.
786 GNUNET_MULTICAST_member_to_origin_cancel (struct GNUNET_MULTICAST_MemberRequestHandle *rh);
789 #if 0 /* keep Emacsens' auto-indent happy */
796 /* ifndef GNUNET_MULTICAST_SERVICE_H */
798 /* end of gnunet_multicast_service.h */