*/
#define GNUNET_MULTICAST_VERSION 0x00000000
-/**
- * Maximum size of a multicast message fragment.
- */
-#define GNUNET_MULTICAST_FRAGMENT_MAX_SIZE 63 * 1024
-
/**
* Opaque handle for a multicast group member.
*/
*/
GNUNET_MULTICAST_MESSAGE_NOT_FRAGMENTED
= GNUNET_MULTICAST_MESSAGE_FIRST_FRAGMENT
- | GNUNET_MULTICAST_MESSAGE_LAST_FRAGMENT
+ | GNUNET_MULTICAST_MESSAGE_LAST_FRAGMENT,
+
+ /**
+ * Historic message, used only locally when replaying messages from local
+ * storage.
+ */
+ GNUNET_MULTICAST_MESSAGE_HISTORIC = 1 << 30
+
};
*
* Signature must match the public key of the multicast group.
*/
- struct GNUNET_CRYPTO_EccSignature signature;
+ struct GNUNET_CRYPTO_EddsaSignature signature;
/**
* Purpose for the signature and size of the signed data.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
/**
- * Number of the message fragment, monotonically increasing.
+ * Number of the message fragment, monotonically increasing starting from 1.
*/
uint64_t fragment_id GNUNET_PACKED;
/**
* Flags for this message fragment.
+ *
+ * @see enum GNUNET_MULTICAST_MessageFlags
*/
uint32_t flags GNUNET_PACKED;
GNUNET_NETWORK_STRUCT_END
+/**
+ * Maximum size of a multicast message fragment.
+ */
+#define GNUNET_MULTICAST_FRAGMENT_MAX_SIZE 63 * 1024
+
+#define GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD \
+ GNUNET_MULTICAST_FRAGMENT_MAX_SIZE \
+ - sizeof (struct GNUNET_MULTICAST_MessageHeader)
+
/**
* Handle that identifies a join request.
*/
typedef void
(*GNUNET_MULTICAST_JoinCallback) (void *cls,
- const struct GNUNET_CRYPTO_EccPublicSignKey *member_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
const struct GNUNET_MessageHeader *join_req,
struct GNUNET_MULTICAST_JoinHandle *jh);
*/
typedef void
(*GNUNET_MULTICAST_MembershipTestCallback) (void *cls,
- const struct GNUNET_CRYPTO_EccPublicSignKey *member_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
uint64_t message_id,
uint64_t group_generation,
struct GNUNET_MULTICAST_MembershipTestHandle *mth);
*/
typedef void
(*GNUNET_MULTICAST_RequestCallback) (void *cls,
- const struct GNUNET_CRYPTO_EccPublicSignKey *member_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
const struct GNUNET_MessageHeader *req,
enum GNUNET_MULTICAST_MessageFlags flags);
*/
typedef void
(*GNUNET_MULTICAST_ReplayFragmentCallback) (void *cls,
- const struct GNUNET_CRYPTO_EccPublicSignKey *member_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
uint64_t fragment_id,
uint64_t flags,
struct GNUNET_MULTICAST_ReplayHandle *rh);
*/
typedef void
(*GNUNET_MULTICAST_ReplayMessageCallback) (void *cls,
- const struct GNUNET_CRYPTO_EccPublicSignKey *member_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
uint64_t message_id,
uint64_t fragment_offset,
uint64_t flags,
*/
struct GNUNET_MULTICAST_Origin *
GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const struct GNUNET_CRYPTO_EccPrivateKey *priv_key,
+ const struct GNUNET_CRYPTO_EddsaPrivateKey *priv_key,
uint64_t next_fragment_id,
GNUNET_MULTICAST_JoinCallback join_cb,
GNUNET_MULTICAST_MembershipTestCallback mem_test_cb,
*/
struct GNUNET_MULTICAST_Member *
GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const struct GNUNET_CRYPTO_EccPublicSignKey *group_key,
- const struct GNUNET_CRYPTO_EccPrivateKey *member_key,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *group_key,
+ const struct GNUNET_CRYPTO_EddsaPrivateKey *member_key,
const struct GNUNET_PeerIdentity *origin,
uint32_t relay_count,
const struct GNUNET_PeerIdentity *relays,