aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2013-06-26 17:13:01 +0000
committerGabor X Toth <*@tg-x.net>2013-06-26 17:13:01 +0000
commitbb7b311515f189f38a990892ee11baffb5608ccb (patch)
treeb593225acaf9c3b1fc63e816aa66360c2202f71c /src
parent2fc296b9df9bb7559f044a1769da8d2e43771b39 (diff)
multicast message types and api docs
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_multicast_service.h16
-rw-r--r--src/include/gnunet_protocols.h70
2 files changed, 77 insertions, 9 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h
index f58d38bab4..39987f043f 100644
--- a/src/include/gnunet_multicast_service.h
+++ b/src/include/gnunet_multicast_service.h
@@ -22,6 +22,7 @@
* @file include/gnunet_multicast_service.h
* @brief multicast service; establish tunnels to distant peers
* @author Christian Grothoff
+ * @author tg(x)
*/
#ifndef GNUNET_MULTICAST_SERVICE_H
@@ -71,7 +72,7 @@ enum GNUNET_MULTICAST_JoinPolicy
* distributed to current group members. This includes the group
* state as well as transient messages.
*/
- GNUNET_MULTICAST_JP_PRIVATE = 1
+ GNUNET_MULTICAST_JP_PRIVATE = 1,
#if IDEAS_FOR_FUTURE
/**
@@ -82,7 +83,13 @@ enum GNUNET_MULTICAST_JoinPolicy
* guaranteed, the presistent group state can be synchronized freely
* immediately, prior to origin confirmation.
*/
- GNUNET_MULTICAST_JP_OPEN = 2
+ GNUNET_MULTICAST_JP_OPEN = 2,
+
+ /**
+ * Origin must approve membership to the group, but past messages can be
+ * freely distributed to members.
+ */
+ GNUNET_MULTICAST_JP_CLOSED = 3,
#endif
};
@@ -187,6 +194,11 @@ struct GNUNET_MULTICAST_MessageHeader
/**
* Counter that monotonically increases whenever a member leaves the group.
+ *
+ * It has significance in case of replay requests: when a member has missed
+ * messages and gets a replay request: in this case if the @a group_generation
+ * is still the same before and after the missed messages, it means that no
+ * @e join or @a leave operations happened during the missed messages.
*/
uint64_t group_generation GNUNET_PACKED;
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 85c643f7de..a91398249a 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -24,6 +24,13 @@
* @author Christian Grothoff
*/
+/*******************************************************************************
+ * TODO: we need a way to register message types centrally (via some webpage).
+ * For now: unofficial extensions should start at 48k, internal extensions
+ * define here should leave some room (4-10 additional messages to the previous
+ * extension).
+ ******************************************************************************/
+
#ifndef GNUNET_PROTOCOLS_H
#define GNUNET_PROTOCOLS_H
@@ -1872,13 +1879,6 @@ extern "C"
*/
/*******************************************************************************
- * TODO: we need a way to register message types centrally (via some webpage).
- * For now: unofficial extensions should start at 48k, internal extensions
- * define here should leave some room (4-10 additional messages to the previous
- * extension).
- ******************************************************************************/
-
-/*******************************************************************************
* EXPERIMENTATION message types
******************************************************************************/
@@ -1913,6 +1913,62 @@ extern "C"
*/
+
+
+/* WIP: no numbers assigned yet */
+
+/*******************************************************************************
+ * MULTICAST message types
+ ******************************************************************************/
+
+/**
+ * Multicast message, from origin to all members
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE
+
+/**
+ * A peer joined the group.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_JOIN
+
+/**
+ * A peer left the group.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_LEAVE
+
+/**
+ * Message from a peer to origin.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_PEER_MESSAGE
+
+/**
+ * A peer wants to join the group.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_PEER_JOIN
+
+/**
+ * A peer wants to leave the group.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_PEER_LEAVE
+
+/**
+ * Group terminated.
+ */
+#define GNUNET_MESSAGE_TYPE_MULTICAST_GROUP_END
+
+/*******************************************************************************
+ * PSYC message types
+ ******************************************************************************/
+
+/*******************************************************************************
+ * PSYCSTORE message types
+ ******************************************************************************/
+
+/*******************************************************************************
+ * SOCIAL message types
+ ******************************************************************************/
+
+
/**
* Type used to match 'all' message types.
*/