[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28651 - gnunet/src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28651 - gnunet/src/include |
Date: |
Thu, 15 Aug 2013 13:53:20 +0200 |
Author: tg
Date: 2013-08-15 13:53:19 +0200 (Thu, 15 Aug 2013)
New Revision: 28651
Modified:
gnunet/src/include/gnunet_multicast_service.h
gnunet/src/include/gnunet_psyc_service.h
gnunet/src/include/gnunet_social_service.h
Log:
moved policies from multicast to psyc layer
Modified: gnunet/src/include/gnunet_multicast_service.h
===================================================================
--- gnunet/src/include/gnunet_multicast_service.h 2013-08-15 11:29:41 UTC
(rev 28650)
+++ gnunet/src/include/gnunet_multicast_service.h 2013-08-15 11:53:19 UTC
(rev 28651)
@@ -55,67 +55,7 @@
*/
struct GNUNET_MULTICAST_Origin;
-/**
- * Policy flags for the group.
- */
-enum GNUNET_MULTICAST_GroupFlags
-{
- /**
- * Admission must be confirmed by the origin.
- */
- GNUNET_MULTICAST_GROUP_ADMISSION_CONTROL = 1 << 0,
- /**
- * Past messages are only available to peers who were a member at the time
- * they were sent to the group.
- */
- GNUNET_MULTICAST_GROUP_RESTRICTED_HISTORY = 1 << 1,
-};
-
-/**
- * Group membership policies.
- */
-enum GNUNET_MULTICAST_GroupPolicy
-{
- /**
- * Anyone can join the group, without announcing his presence;
- * all messages are always public and can be distributed freely.
- * Joins may be announced, but this is not required.
- */
- GNUNET_MULTICAST_GROUP_ANONYMOUS = 0,
-
- /**
- * Origin must approve membership to the group, messages must only be
- * distributed to current group members. This includes the group
- * state as well as transient messages.
- */
- GNUNET_MULTICAST_GROUP_PRIVATE
- = GNUNET_MULTICAST_GROUP_ADMISSION_CONTROL
- | GNUNET_MULTICAST_GROUP_RESTRICTED_HISTORY,
-
-#if IDEAS_FOR_FUTURE
- /**
- * Anyone can freely join the group (no approval required);
- * however, messages must only be distributed to current group
- * members, so the origin must still acknowledge that the member
- * joined before transient messages are delivered. As approval is
- * guaranteed, the presistent group state can be synchronized freely
- * immediately, prior to origin confirmation.
- */
- GNUNET_MULTICAST_GROUP_OPEN
- = GNUNET_MULTICAST_GROUP_RESTRICTED_HISTORY,
-
- /**
- * Origin must approve membership to the group, but past messages can be
- * freely distributed to members.
- */
- GNUNET_MULTICAST_GROUP_CLOSED
- = GNUNET_MULTICAST_GROUP_ADMISSION_CONTROL,
-,
-#endif
-
-};
-
enum GNUNET_MULTICAST_MessageFlags
{
/**
@@ -544,21 +484,17 @@
* Will advertise the origin in the P2P overlay network under the respective
* public key so that other peer can find this peer to join it. Peers that
* issue GNUNET_MULTICAST_member_join() can then transmit a join request to
- * either an existing group member (if the @a policy is permissive) or to
- * the origin. If the joining is approved, the member is cleared for @e replay
- * and will begin to receive messages transmitted to the group. If joining is
- * disapproved, the failed candidate will be given a response. Members in the
- * group can send messages to the origin (one at a time).
+ * either an existing group member or to the origin. If the joining is
+ * approved, the member is cleared for @e replay and will begin to receive
+ * messages transmitted to the group. If joining is disapproved, the failed
+ * candidate will be given a response. Members in the group can send messages
+ * to the origin (one at a time).
*
* @param cfg Configuration to use.
* @param priv_key ECC key that will be used to sign messages for this
* multicast session; public key is used to identify the multicast
group;
* FIXME: we'll likely want to use NOT the p521 curve here, but a
cheaper
* one in the future.
- * @param policy Group policy specifying join and history restrictions.
- * FIXME: needed? Ít would be enough to have this on the PSYC layer, as
- * access control to enforce the policy is done by the membership test
- * and join request callbacks of the API.
* @param last_fragment_id Last fragment ID to continue counting fragments from
* when restarting the origin. 0 for a new group.
* @param join_cb Function called to approve / disapprove joining of a peer.
@@ -574,7 +510,6 @@
struct GNUNET_MULTICAST_Origin *
GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
const struct GNUNET_CRYPTO_EccPrivateKey
*priv_key,
- enum GNUNET_MULTICAST_GroupPolicy policy,
uint64_t last_fragment_id,
GNUNET_MULTICAST_JoinCallback join_cb,
GNUNET_MULITCAST_MembershipTestCallback test_cb,
Modified: gnunet/src/include/gnunet_psyc_service.h
===================================================================
--- gnunet/src/include/gnunet_psyc_service.h 2013-08-15 11:29:41 UTC (rev
28650)
+++ gnunet/src/include/gnunet_psyc_service.h 2013-08-15 11:53:19 UTC (rev
28651)
@@ -96,6 +96,68 @@
#define GNUNET_PSYC_VERSION 0x00000000
+/**
+ * Policy flags for a channel.
+ */
+enum GNUNET_PSYC_ChannelFlags
+{
+ /**
+ * Admission must be confirmed by the master.
+ */
+ GNUNET_PSYC_CHANNEL_ADMISSION_CONTROL = 1 << 0,
+
+ /**
+ * Past messages are only available to slaves who were admitted at the time
+ * they were sent to the channel.
+ */
+ GNUNET_PSYC_CHANNEL_RESTRICTED_HISTORY = 1 << 1,
+};
+
+/**
+ * PSYC channel policies.
+ */
+enum GNUNET_PSYC_Policy
+{
+ /**
+ * Anyone can join the channel, without announcing his presence;
+ * all messages are always public and can be distributed freely.
+ * Joins may be announced, but this is not required.
+ */
+ GNUNET_PSYC_CHANNEL_ANONYMOUS = 0,
+
+ /**
+ * The master must approve membership to the channel, messages must only be
+ * distributed to current channel slaves. This includes the channel
+ * state as well as transient messages.
+ */
+ GNUNET_PSYC_CHANNEL_PRIVATE
+ = GNUNET_PSYC_CHANNEL_ADMISSION_CONTROL
+ | GNUNET_PSYC_CHANNEL_RESTRICTED_HISTORY,
+
+#if IDEAS_FOR_FUTURE
+ /**
+ * Anyone can freely join the channel (no approval required);
+ * however, messages must only be distributed to current channel
+ * slaves, so the master must still acknowledge that the slave
+ * joined before transient messages are delivered. As approval is
+ * guaranteed, the presistent channel state can be synchronized freely
+ * immediately, prior to master confirmation.
+ */
+ GNUNET_PSYC_CHANNEL_OPEN
+ = GNUNET_PSYC_CHANNEL_RESTRICTED_HISTORY,
+
+ /**
+ * The master must approve joins to the channel, but past messages can be
+ * freely distributed to slaves.
+ */
+ GNUNET_PSYC_CHANNEL_CLOSED
+ = GNUNET_PSYC_CHANNEL_ADMISSION_CONTROL,
+,
+#endif
+
+};
+
+
enum GNUNET_PSYC_MessageFlags
{
/**
@@ -246,8 +308,8 @@
* a file with the private key(s) when setting up their own channels
* FIXME: we'll likely want to use NOT the p521 curve here, but a
cheaper
* one in the future.
- * @param policy Group policy specifying join and history restrictions.
- * Used to automate group management decisions.
+ * @param policy Channel policy specifying join and history restrictions.
+ * Used to automate join decisions.
* @param method Function to invoke on messages received from slaves.
* @param join_cb Function to invoke when a peer wants to join.
* @param cls Closure for @a method and @a join_cb.
@@ -256,7 +318,7 @@
struct GNUNET_PSYC_Master *
GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
const struct GNUNET_CRYPTO_EccPrivateKey
*channel_key,
- enum GNUNET_MULTICAST_GroupPolicy policy,
+ enum GNUNET_PSYC_Policy policy,
GNUNET_PSYC_Method method,
GNUNET_PSYC_JoinCallback join_cb,
void *cls);
Modified: gnunet/src/include/gnunet_social_service.h
===================================================================
--- gnunet/src/include/gnunet_social_service.h 2013-08-15 11:29:41 UTC (rev
28650)
+++ gnunet/src/include/gnunet_social_service.h 2013-08-15 11:53:19 UTC (rev
28651)
@@ -210,7 +210,7 @@
struct GNUNET_SOCIAL_Home *
GNUNET_SOCIAL_home_enter (const struct GNUNET_CONFIGURATION_Handle *cfg,
const char *home_keyfile,
- enum GNUNET_MULTICAST_GroupPolicy policy,
+ enum GNUNET_PSYC_Policy policy,
struct GNUNET_IDENTITY_Ego *ego,
struct GNUNET_SOCIAL_Slicer *slicer,
GNUNET_SOCIAL_AnswerDoorCallback listener_cb,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28651 - gnunet/src/include,
gnunet <=