adding extended proxy support for http(s) client
[oweals/gnunet.git] / src / multicast / multicast.h
index 5a18af461f2ec3baa35307dcc03fb2daaf35cc0b..facf8f54e25f6832f0eb4dfb7f1722101ee599bf 100644 (file)
      Boston, MA 02111-1307, USA.
 */
 
-/** 
+/**
  * @file multicast/multicast.h
  * @brief multicast IPC messages
  * @author Christian Grothoff
+ * @author Gabor X Toth
  */
 #ifndef MULTICAST_H
 #define MULTICAST_H
 GNUNET_NETWORK_STRUCT_BEGIN
 
 
+/**
+ * Header of a join request sent to the origin or another member.
+ */
+struct GNUNET_MULTICAST_JoinRequest
+{
+  /**
+   * Header for the join request.
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * ECC signature of the rest of the fields of the join request.
+   *
+   * Signature must match the public key of the joining member.
+   */
+  struct GNUNET_CRYPTO_EddsaSignature signature;
+
+  /**
+   * Purpose for the signature and size of the signed data.
+   */
+  struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+  /**
+   * Public key of the target group.
+   */
+  struct GNUNET_CRYPTO_EddsaPublicKey group_key;
+
+  /**
+   * Public key of the joining member.
+   */
+  struct GNUNET_CRYPTO_EddsaPublicKey member_key;
+
+  /**
+   * Peer identity of the joining member.
+   */
+  struct GNUNET_PeerIdentity member_peer;
+
+  /* Followed by request body. */
+};
+
+
 /**
  * Message sent from the client to the service to notify the service
  * about a join decision.
  */
 struct MulticastJoinDecisionMessage
 {
-
   /**
    *
    */
@@ -57,7 +98,7 @@ struct MulticastJoinDecisionMessage
   uint32_t relay_count;
 
   /* followed by 'relay_count' peer identities */
-  
+
   /* followed by the join response message */
 
 };
@@ -156,7 +197,7 @@ struct MulticastOriginStartMessage
   /**
    * Private, non-ephemeral key for the mutlicast group.
    */
-  struct GNUNET_CRYPTO_EccPrivateKey group_key;
+  struct GNUNET_CRYPTO_EddsaPrivateKey group_key;
 
   /**
    * Last fragment ID, used to continue counting fragments if we resume operating
@@ -222,12 +263,12 @@ struct MulticastJoinMessage
   /**
    * Public non-ephemeral key of the mutlicast group.
    */
-  struct GNUNET_CRYPTO_EccPublicSignKey group_key;
+  struct GNUNET_CRYPTO_EddsaPublicKey group_key;
 
   /**
    * Our private key for the group.
    */
-  struct GNUNET_CRYPTO_EccPrivateKey member_key;
+  struct GNUNET_CRYPTO_EddsaPrivateKey member_key;
 
   /* followed by 'relay_count' `struct GNUNET_PeerIdentity`s */
 
@@ -243,7 +284,9 @@ struct MulticastReplayRequestMessage
 {
 
   /**
-   *
+   * The message type can be either
+   * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST or
+   * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL.
    */
   struct GNUNET_MessageHeader header;
 
@@ -253,17 +296,17 @@ struct MulticastReplayRequestMessage
   uint32_t uid;
 
   /**
-   * 
+   * ID of the message that is being requested.
    */
   uint64_t message_id;
 
   /**
-   * 
+   * Offset of the fragment that is being requested.
    */
   uint64_t fragment_offset;
 
   /**
-   * 
+   * Additional flags for the request.
    */
   uint64_t flags;
 
@@ -271,6 +314,60 @@ struct MulticastReplayRequestMessage
 
 
 
+/**
+ * Message sent from the client to the service to unicast to the group origin.
+ */
+struct MulticastUnicastToOriginMessage
+{
+
+  /**
+   *
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Reserved (always 0).
+   */
+  uint32_t reserved;
+
+  /**
+   * Message ID.
+   */
+  uint64_t message_id;
+
+  /**
+   * Total message size.
+   */
+  uint64_t total_size;
+
+  /* followed by payload */
+
+};
+
+
+/**
+ * Message sent from the client to the service to
+ * cancel unicast to the group origin.
+ */
+struct MulticastUnicastToOriginCancelMessage
+{
+
+  /**
+   *
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Reserved (always 0).
+   */
+  uint32_t reserved;
+
+  /**
+   * Message ID.
+   */
+  uint64_t message_id;
+
+};
 
 
 GNUNET_NETWORK_STRUCT_END