2 This file is part of GNUnet.
3 Copyright (C) 2012, 2013 GNUnet e.V.
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your 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 Affero General Public License for more details.
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * @author Gabor X Toth
21 * @author Christian Grothoff
24 * Multicast service; multicast messaging via CADET
26 * @defgroup multicast Multicast service
27 * Multicast messaging via CADET.
31 #ifndef GNUNET_MULTICAST_SERVICE_H
32 #define GNUNET_MULTICAST_SERVICE_H
37 #if 0 /* keep Emacsens' auto-indent happy */
42 #include "gnunet_util_lib.h"
43 #include "gnunet_transport_service.h"
46 * Version number of GNUnet-multicast API.
48 #define GNUNET_MULTICAST_VERSION 0x00000000
51 * Opaque handle for a multicast group member.
53 struct GNUNET_MULTICAST_Member;
56 * Handle for the origin of a multicast group.
58 struct GNUNET_MULTICAST_Origin;
61 enum GNUNET_MULTICAST_MessageFlags
64 * First fragment of a message.
66 GNUNET_MULTICAST_MESSAGE_FIRST_FRAGMENT = 1 << 0,
69 * Last fragment of a message.
71 GNUNET_MULTICAST_MESSAGE_LAST_FRAGMENT = 1 << 1,
74 * OR'ed flags if message is not fragmented.
76 GNUNET_MULTICAST_MESSAGE_NOT_FRAGMENTED
77 = GNUNET_MULTICAST_MESSAGE_FIRST_FRAGMENT
78 | GNUNET_MULTICAST_MESSAGE_LAST_FRAGMENT,
81 * Historic message, used only locally when replaying messages from local
84 GNUNET_MULTICAST_MESSAGE_HISTORIC = 1 << 30
89 GNUNET_NETWORK_STRUCT_BEGIN
92 * Header of a multicast message fragment.
94 * This format is public as the replay mechanism must replay message fragments using the
95 * same format. This is needed as we want to integrity-check message fragments within
96 * the multicast layer to avoid multicasting mal-formed messages.
98 struct GNUNET_MULTICAST_MessageHeader
102 * Header for all multicast message fragments from the origin.
104 struct GNUNET_MessageHeader header;
107 * Number of hops this message fragment has taken since the origin.
109 * Helpful to determine shortest paths to the origin among honest peers for
110 * unicast requests from members. Updated at each hop and thus not signed and
113 uint32_t hop_counter GNUNET_PACKED;
116 * ECC signature of the message fragment.
118 * Signature must match the public key of the multicast group.
120 struct GNUNET_CRYPTO_EddsaSignature signature;
123 * Purpose for the signature and size of the signed data.
125 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
128 * Number of the message fragment, monotonically increasing starting from 1.
130 uint64_t fragment_id GNUNET_PACKED;
133 * Byte offset of this @e fragment of the @e message.
135 uint64_t fragment_offset GNUNET_PACKED;
138 * Number of the message this fragment belongs to.
140 * Set in GNUNET_MULTICAST_origin_to_all().
142 uint64_t message_id GNUNET_PACKED;
145 * Counter that monotonically increases whenever a member parts the group.
147 * Set in GNUNET_MULTICAST_origin_to_all().
149 * It has significance in case of replay requests: when a member has missed
150 * messages and gets a replay request: in this case if the @a group_generation
151 * is still the same before and after the missed messages, it means that no
152 * @e join or @e part operations happened during the missed messages.
154 uint64_t group_generation GNUNET_PACKED;
157 * Flags for this message fragment.
159 * @see enum GNUNET_MULTICAST_MessageFlags
161 uint32_t flags GNUNET_PACKED;
163 /* Followed by message body. */
168 * Header of a request from a member to the origin.
170 struct GNUNET_MULTICAST_RequestHeader
173 * Header for all requests from a member to the origin.
175 struct GNUNET_MessageHeader header;
178 * Public key of the sending member.
180 struct GNUNET_CRYPTO_EcdsaPublicKey member_pub_key;
183 * ECC signature of the request fragment.
185 * Signature must match the public key of the multicast group.
187 struct GNUNET_CRYPTO_EcdsaSignature signature;
190 * Purpose for the signature and size of the signed data.
192 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
195 * Number of the request fragment.
196 * Monotonically increasing from 1.
198 uint64_t fragment_id GNUNET_PACKED;
201 * Byte offset of this @e fragment of the @e request.
203 uint64_t fragment_offset GNUNET_PACKED;
206 * Number of the request this fragment belongs to.
208 * Set in GNUNET_MULTICAST_origin_to_all().
210 uint64_t request_id GNUNET_PACKED;
213 * Flags for this request.
215 enum GNUNET_MULTICAST_MessageFlags flags GNUNET_PACKED;
217 /* Followed by request body. */
220 GNUNET_NETWORK_STRUCT_END
224 * Maximum size of a multicast message fragment.
226 #define GNUNET_MULTICAST_FRAGMENT_MAX_SIZE (63 * 1024)
228 #define GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD \
229 (GNUNET_MULTICAST_FRAGMENT_MAX_SIZE \
230 - sizeof (struct GNUNET_MULTICAST_MessageHeader))
234 * Handle that identifies a join request.
236 * Used to match calls to #GNUNET_MULTICAST_JoinRequestCallback to the
237 * corresponding calls to #GNUNET_MULTICAST_join_decision().
239 struct GNUNET_MULTICAST_JoinHandle;
243 * Function to call with the decision made for a join request.
245 * Must be called once and only once in response to an invocation of the
246 * #GNUNET_MULTICAST_JoinRequestCallback.
249 * Join request handle.
251 * #GNUNET_YES if the join is approved,
252 * #GNUNET_NO if it is disapproved,
253 * #GNUNET_SYSERR if we cannot answer the request.
255 * Number of relays given.
257 * Array of suggested peers that might be useful relays to use
258 * when joining the multicast group (essentially a list of peers that
259 * are already part of the multicast group and might thus be willing
260 * to help with routing). If empty, only this local peer (which must
261 * be the multicast origin) is a good candidate for building the
262 * multicast tree. Note that it is unnecessary to specify our own
263 * peer identity in this array.
265 * Message to send in response to the joining peer;
266 * can also be used to redirect the peer to a different group at the
267 * application layer; this response is to be transmitted to the
268 * peer that issued the request even if admission is denied.
270 struct GNUNET_MULTICAST_ReplayHandle *
271 GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh,
273 uint16_t relay_count,
274 const struct GNUNET_PeerIdentity *relays,
275 const struct GNUNET_MessageHeader *join_resp);
279 * Method called whenever another peer wants to join the multicast group.
281 * Implementations of this function must call GNUNET_MULTICAST_join_decision()
286 * @param member_pub_key
287 * Public key of the member requesting join.
289 * Application-dependent join message from the new member.
291 * Join handle to pass to GNUNET_MULTICAST_join_decison().
294 (*GNUNET_MULTICAST_JoinRequestCallback) (void *cls,
295 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key,
296 const struct GNUNET_MessageHeader *join_msg,
297 struct GNUNET_MULTICAST_JoinHandle *jh);
301 * Method called to inform about the decision in response to a join request.
303 * If @a is_admitted is not #GNUNET_YES, then the multicast service disconnects
304 * the client and the multicast member handle returned by
305 * GNUNET_MULTICAST_member_join() is invalidated.
310 * #GNUNET_YES or #GNUNET_NO or #GNUNET_SYSERR
312 * The peer we are connected to and the join decision is from.
314 * Number of peers in the @a relays array.
316 * Peer identities of members of the group, which serve as relays
317 * and can be used to join the group at. If empty, only the origin can
318 * be used to connect to the group.
320 * Application-dependent join message from the origin.
323 (*GNUNET_MULTICAST_JoinDecisionCallback) (void *cls,
325 const struct GNUNET_PeerIdentity *peer,
326 uint16_t relay_count,
327 const struct GNUNET_PeerIdentity *relays,
328 const struct GNUNET_MessageHeader *join_msg);
332 * Function called whenever a group member has transmitted a request
333 * to the origin (other than joining or leaving).
335 * FIXME: need to distinguish between origin cancelling a message (some fragments
336 * were sent, then the rest 'discarded') and the case where we got disconnected;
337 * right now, both would mean 'msg' is NULL, but they could be quite different...
338 * So the semantics from the receiver side of
339 * GNUNET_MULTICAST_member_to_origin_cancel() are not clear here. Maybe we
340 * should do something with the flags in this case?
343 * Closure (set from GNUNET_MULTICAST_origin_start).
345 * Identity of the sender.
347 * Request to the origin.
349 * Flags for the request.
352 (*GNUNET_MULTICAST_RequestCallback) (void *cls,
353 const struct GNUNET_MULTICAST_RequestHeader *req);
357 * Function called whenever a group member is receiving a message fragment from
360 * If admission to the group is denied, this function is called once with the
361 * response of the @e origin (as given to GNUNET_MULTICAST_join_decision()) and
362 * then a second time with NULL to indicate that the connection failed for good.
364 * FIXME: need to distinguish between origin cancelling a message (some fragments
365 * were sent, then the rest 'discarded') and the case where we got disconnected;
366 * right now, both would mean 'msg' is NULL, but they could be quite different...
367 * So the semantics from the receiver side of
368 * GNUNET_MULTICAST_origin_to_all_cancel() are not clear here.
371 * Closure (set from GNUNET_MULTICAST_member_join())
373 * Message from the origin, NULL if the origin shut down
374 * (or we were kicked out, and we should thus call
375 * GNUNET_MULTICAST_member_part() next)
378 (*GNUNET_MULTICAST_MessageCallback) (void *cls,
379 const struct GNUNET_MULTICAST_MessageHeader *msg);
383 * Opaque handle to a replay request from the multicast service.
385 struct GNUNET_MULTICAST_ReplayHandle;
389 * Functions with this signature are called whenever the multicast service needs
390 * a message fragment to be replayed by fragment_id.
392 * Implementations of this function MUST call GNUNET_MULTICAST_replay() ONCE
393 * (with a message or an error); however, if the origin is destroyed or the
394 * group is left, the replay handle must no longer be used.
397 * Closure (set from GNUNET_MULTICAST_origin_start()
398 * or GNUNET_MULTICAST_member_join()).
399 * @param member_pub_key
400 * The member requesting replay.
402 * Which message fragment should be replayed.
404 * Flags for the replay.
406 * Handle to pass to message transmit function.
409 (*GNUNET_MULTICAST_ReplayFragmentCallback) (void *cls,
410 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key,
411 uint64_t fragment_id,
413 struct GNUNET_MULTICAST_ReplayHandle *rh);
416 * Functions with this signature are called whenever the multicast service needs
417 * a message fragment to be replayed by message_id and fragment_offset.
419 * Implementations of this function MUST call GNUNET_MULTICAST_replay() ONCE
420 * (with a message or an error); however, if the origin is destroyed or the
421 * group is left, the replay handle must no longer be used.
424 * Closure (set from GNUNET_MULTICAST_origin_start()
425 * or GNUNET_MULTICAST_member_join()).
426 * @param member_pub_key
427 * The member requesting replay.
429 * Which message should be replayed.
430 * @param fragment_offset
431 * Offset of the fragment within of @a message_id to be replayed.
433 * Flags for the replay.
435 * Handle to pass to message transmit function.
438 (*GNUNET_MULTICAST_ReplayMessageCallback) (void *cls,
439 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key,
441 uint64_t fragment_offset,
443 struct GNUNET_MULTICAST_ReplayHandle *rh);
447 * Possible error codes during replay.
449 enum GNUNET_MULTICAST_ReplayErrorCode
453 * Everything is fine.
455 GNUNET_MULTICAST_REC_OK = 0,
458 * Message fragment not found in the message store.
460 * Either discarded if it is too old, or not arrived yet if this member has
461 * missed some messages.
463 GNUNET_MULTICAST_REC_NOT_FOUND = 1,
466 * Fragment ID counter was larger than the highest counter this
467 * replay function has ever encountered; thus it is likely the
468 * origin never sent it and we're at the HEAD of the multicast
469 * stream as far as this node is concerned.
473 GNUNET_MULTICAST_REC_PAST_HEAD = 2,
476 * Access is denied to the requested fragment, membership test did not pass.
478 GNUNET_MULTICAST_REC_ACCESS_DENIED = 3,
481 * Internal error (i.e. database error). Try some other peer.
483 GNUNET_MULTICAST_REC_INTERNAL_ERROR = 4
489 * Replay a message fragment for the multicast group.
492 * Replay handle identifying which replay operation was requested.
494 * Replayed message fragment, NULL if not found / an error occurred.
496 * Error code. See enum GNUNET_MULTICAST_ReplayErrorCode
497 * If not #GNUNET_MULTICAST_REC_OK, the replay handle is invalidated.
500 GNUNET_MULTICAST_replay_response (struct GNUNET_MULTICAST_ReplayHandle *rh,
501 const struct GNUNET_MessageHeader *msg,
502 enum GNUNET_MULTICAST_ReplayErrorCode ec);
506 * Indicate the end of the replay session.
508 * Invalidates the replay handle.
510 * @param rh Replay session to end.
513 GNUNET_MULTICAST_replay_response_end (struct GNUNET_MULTICAST_ReplayHandle *rh);
517 * Function called to provide data for a transmission for a replay.
519 * @see GNUNET_MULTICAST_replay2()
522 (*GNUNET_MULTICAST_ReplayTransmitNotify) (void *cls,
528 * Replay a message for the multicast group.
531 * Replay handle identifying which replay operation was requested.
533 * Function to call to get the message.
535 * Closure for @a notify.
538 GNUNET_MULTICAST_replay_response2 (struct GNUNET_MULTICAST_ReplayHandle *rh,
539 GNUNET_MULTICAST_ReplayTransmitNotify notify,
544 * Start a multicast group.
546 * Peers that issue GNUNET_MULTICAST_member_join() can transmit a join request
547 * to either an existing group member or to the origin. If the joining is
548 * approved, the member is cleared for @e replay and will begin to receive
549 * messages transmitted to the group. If joining is disapproved, the failed
550 * candidate will be given a response. Members in the group can send messages
553 * TODO: This function could optionally offer to advertise the origin in the
554 * P2P overlay network(where?) under the respective public key so that other
555 * peers can find an alternate PeerId to join it. Higher level protocols may
556 * however provide other means of solving the problem of the offline host
557 * (see secushare specs about that) and therefore merely need a way to provide
558 * a list of possible PeerIds.
561 * Configuration to use.
563 * ECC key that will be used to sign messages for this
564 * multicast session; public key is used to identify the multicast group;
565 * @param max_fragment_id
566 * Maximum fragment ID already sent to the group.
568 * @param join_request_cb
569 * Function called to approve / disapprove joining of a peer.
570 * @param replay_frag_cb
571 * Function that can be called to replay a message fragment.
572 * @param replay_msg_cb
573 * Function that can be called to replay a message.
575 * Function called with message fragments from group members.
577 * Function called with the message fragments sent to the
578 * network by GNUNET_MULTICAST_origin_to_all(). These message fragments
579 * should be stored for answering replay requests later.
581 * Closure for the various callbacks that follow.
583 * @return Handle for the origin, NULL on error.
585 struct GNUNET_MULTICAST_Origin *
586 GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
587 const struct GNUNET_CRYPTO_EddsaPrivateKey *priv_key,
588 uint64_t max_fragment_id,
589 GNUNET_MULTICAST_JoinRequestCallback join_request_cb,
590 GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb,
591 GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb,
592 GNUNET_MULTICAST_RequestCallback request_cb,
593 GNUNET_MULTICAST_MessageCallback message_cb,
597 * Function called to provide data for a transmission from the origin to all
600 * Note that returning #GNUNET_OK or #GNUNET_SYSERR (but not #GNUNET_NO)
601 * invalidates the respective transmission handle.
605 * @param[in,out] data_size
606 * Initially set to the number of bytes available in
607 * @a data, should be set to the number of bytes written to data.
609 * Where to write the body of the message to give to the
610 * method. The function must copy at most @a data_size bytes to @a data.
612 * @return #GNUNET_SYSERR on error (fatal, aborts transmission)
613 * #GNUNET_NO on success, if more data is to be transmitted later.
614 * Should be used if @a data_size was not big enough to take all the
615 * data. If 0 is returned in @a data_size the transmission is paused,
616 * and can be resumed with GNUNET_MULTICAST_origin_to_all_resume().
617 * #GNUNET_YES if this completes the transmission (all data supplied)
618 * @deprecated should move to MQ-style API!
621 (*GNUNET_MULTICAST_OriginTransmitNotify) (void *cls,
627 * Handle for a request to send a message to all multicast group members
630 struct GNUNET_MULTICAST_OriginTransmitHandle;
634 * Send a message to the multicast group.
637 * Handle to the multicast group.
639 * Application layer ID for the message. Opaque to multicast.
640 * @param group_generation
641 * Group generation of the message. Documented in
642 * struct GNUNET_MULTICAST_MessageHeader.
644 * Function to call to get the message.
646 * Closure for @a notify.
648 * @return NULL on error (i.e. request already pending).
649 * @deprecated should move to MQ-style API!
651 struct GNUNET_MULTICAST_OriginTransmitHandle *
652 GNUNET_MULTICAST_origin_to_all (struct GNUNET_MULTICAST_Origin *origin,
654 uint64_t group_generation,
655 GNUNET_MULTICAST_OriginTransmitNotify notify,
661 * Resume message transmission to multicast group.
663 * @param th Transmission to cancel.
666 GNUNET_MULTICAST_origin_to_all_resume (struct GNUNET_MULTICAST_OriginTransmitHandle *th);
670 * Cancel request for message transmission to multicast group.
672 * @param th Transmission to cancel.
675 GNUNET_MULTICAST_origin_to_all_cancel (struct GNUNET_MULTICAST_OriginTransmitHandle *th);
679 * Stop a multicast group.
681 * @param origin Multicast group to stop.
684 GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin,
685 GNUNET_ContinuationCallback stop_cb,
690 * Join a multicast group.
692 * The entity joining is always the local peer. Further information about the
693 * candidate can be provided in @a join_msg. If the join fails, the
694 * @a message_cb is invoked with a (failure) response and then with NULL. If
695 * the join succeeds, outstanding (state) messages and ongoing multicast
696 * messages will be given to the @a message_cb until the member decides to part
697 * the group. The @a mem_test_cb and @a replay_cb functions may be called at
698 * anytime by the multicast service to support relaying messages to other
699 * members of the group.
702 * Configuration to use.
704 * ECC public key that identifies the group to join.
705 * @param member_pub_key
706 * ECC key that identifies the member
707 * and used to sign requests sent to the origin.
709 * Peer ID of the origin to send unicast requsets to. If NULL,
710 * unicast requests are sent back via multiple hops on the reverse path
711 * of multicast messages.
713 * Number of peers in the @a relays array.
715 * Peer identities of members of the group, which serve as relays
716 * and can be used to join the group at. and send the @a join_request to.
717 * If empty, the @a join_request is sent directly to the @a origin.
719 * Application-dependent join message to be passed to the peer @a origin.
720 * @param join_request_cb
721 * Function called to approve / disapprove joining of a peer.
722 * @param join_decision_cb
723 * Function called to inform about the join decision.
724 * @param replay_frag_cb
725 * Function that can be called to replay message fragments
726 * this peer already knows from this group. NULL if this
727 * client is unable to support replay.
728 * @param replay_msg_cb
729 * Function that can be called to replay message fragments
730 * this peer already knows from this group. NULL if this
731 * client is unable to support replay.
733 * Function to be called for all message fragments we
734 * receive from the group, excluding those our @a replay_cb
737 * Closure for callbacks.
739 * @return Handle for the member, NULL on error.
741 struct GNUNET_MULTICAST_Member *
742 GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
743 const struct GNUNET_CRYPTO_EddsaPublicKey *group_key,
744 const struct GNUNET_CRYPTO_EcdsaPrivateKey *member_pub_key,
745 const struct GNUNET_PeerIdentity *origin,
746 uint16_t relay_count,
747 const struct GNUNET_PeerIdentity *relays,
748 const struct GNUNET_MessageHeader *join_request,
749 GNUNET_MULTICAST_JoinRequestCallback join_request_cb,
750 GNUNET_MULTICAST_JoinDecisionCallback join_decision_cb,
751 GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb,
752 GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb,
753 GNUNET_MULTICAST_MessageCallback message_cb,
757 * Handle for a replay request.
759 struct GNUNET_MULTICAST_MemberReplayHandle;
763 * Request a fragment to be replayed by fragment ID.
765 * Useful if messages below the @e max_known_fragment_id given when joining are
766 * needed and not known to the client.
771 * ID of a message fragment that this client would like to see replayed.
773 * Additional flags for the replay request.
774 * It is used and defined by GNUNET_MULTICAST_ReplayFragmentCallback
776 * @return Replay request handle, NULL on error.
778 struct GNUNET_MULTICAST_MemberReplayHandle *
779 GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *member,
780 uint64_t fragment_id,
785 * Request a message fr to be replayed.
787 * Useful if messages below the @e max_known_fragment_id given when joining are
788 * needed and not known to the client.
793 * ID of the message this client would like to see replayed.
794 * @param fragment_offset
795 * Offset of the fragment within the message to replay.
797 * Additional flags for the replay request.
798 * It is used & defined by GNUNET_MULTICAST_ReplayMessageCallback
800 * @return Replay request handle, NULL on error.
802 struct GNUNET_MULTICAST_MemberReplayHandle *
803 GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *member,
805 uint64_t fragment_offset,
810 * Cancel a replay request.
816 GNUNET_MULTICAST_member_replay_cancel (struct GNUNET_MULTICAST_MemberReplayHandle *rh);
820 * Part a multicast group.
822 * Disconnects from all group members and invalidates the @a member handle.
824 * An application-dependent part message can be transmitted beforehand using
825 * #GNUNET_MULTICAST_member_to_origin())
831 GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member,
832 GNUNET_ContinuationCallback part_cb,
837 * Function called to provide data for a transmission from a member to the origin.
839 * Note that returning #GNUNET_OK or #GNUNET_SYSERR (but not #GNUNET_NO)
840 * invalidates the respective transmission handle.
844 * @param[in,out] data_size
845 * Initially set to the number of bytes available in
846 * @a data, should be set to the number of bytes written to data.
848 * Where to write the body of the message to give to the
849 * method. The function must copy at most @a data_size bytes to @a data.
851 * @return #GNUNET_SYSERR on error (fatal, aborts transmission)
852 * #GNUNET_NO on success, if more data is to be transmitted later.
853 * Should be used if @a data_size was not big enough to take all the
854 * data. If 0 is returned in @a data_size the transmission is paused,
855 * and can be resumed with GNUNET_MULTICAST_member_to_origin_resume().
856 * #GNUNET_YES if this completes the transmission (all data supplied)
857 * @deprecated should move to MQ-style API!
860 (*GNUNET_MULTICAST_MemberTransmitNotify) (void *cls,
866 * Handle for a message to be delivered from a member to the origin.
868 struct GNUNET_MULTICAST_MemberTransmitHandle;
872 * Send a message to the origin of the multicast group.
877 * Application layer ID for the request. Opaque to multicast.
879 * Callback to call to get the message.
881 * Closure for @a notify.
883 * @return Handle to cancel request, NULL on error (i.e. request already pending).
884 * @deprecated should move to MQ-style API!
886 struct GNUNET_MULTICAST_MemberTransmitHandle *
887 GNUNET_MULTICAST_member_to_origin (struct GNUNET_MULTICAST_Member *member,
889 GNUNET_MULTICAST_MemberTransmitNotify notify,
894 * Resume message transmission to origin.
897 * Transmission to cancel.
900 GNUNET_MULTICAST_member_to_origin_resume (struct GNUNET_MULTICAST_MemberTransmitHandle *th);
904 * Cancel request for message transmission to origin.
907 * Transmission to cancel.
910 GNUNET_MULTICAST_member_to_origin_cancel (struct GNUNET_MULTICAST_MemberTransmitHandle *th);
913 #if 0 /* keep Emacsens' auto-indent happy */
920 /* ifndef GNUNET_MULTICAST_SERVICE_H */
923 /** @} */ /* end of group */