aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2014-03-13 18:49:13 +0000
committerGabor X Toth <*@tg-x.net>2014-03-13 18:49:13 +0000
commit49fb1901d18e1e42c41b7cd8817e5778ed473470 (patch)
tree657826803c2a9b36448bad59672edca2b65a4748 /src/include
parentd309f70641efc038d4b23558030b0551c3101256 (diff)
downloadgnunet-49fb1901d18e1e42c41b7cd8817e5778ed473470.tar.gz
gnunet-49fb1901d18e1e42c41b7cd8817e5778ed473470.zip
PSYC: message types, documentation
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_multicast_service.h3
-rw-r--r--src/include/gnunet_protocols.h50
-rw-r--r--src/include/gnunet_psyc_service.h7
3 files changed, 43 insertions, 17 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h
index aa5597fd3..50dcf7aef 100644
--- a/src/include/gnunet_multicast_service.h
+++ b/src/include/gnunet_multicast_service.h
@@ -189,7 +189,8 @@ struct GNUNET_MULTICAST_RequestHeader
189 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 189 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
190 190
191 /** 191 /**
192 * Number of the request fragment, monotonically increasing. 192 * Number of the request fragment.
193 * Monotonically increasing from 1.
193 */ 194 */
194 uint64_t fragment_id GNUNET_PACKED; 195 uint64_t fragment_id GNUNET_PACKED;
195 196
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 88cf5a024..b67e3bdcb 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2126,64 +2126,84 @@ extern "C"
2126 * PSYC message types 2126 * PSYC message types
2127 ******************************************************************************/ 2127 ******************************************************************************/
2128 2128
2129#define GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE 680 2129/**
2130 * C: client
2131 * S: service
2132 * M: muticast
2133 */
2130 2134
2135/** S->C: result of an operation */
2136#define GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE 680
2131 2137
2138/** C->S: request to start a master */
2132#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_START 681 2139#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_START 681
2133 2140
2141/** S->C: master start acknowledgement */
2134#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK 682 2142#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK 682
2135 2143
2136#define GNUNET_MESSAGE_TYPE_PSYC_MASTER_STOP 683 2144/** C->S: request to start a master */
2137 2145#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN 683
2138 2146
2139#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN 684 2147/** S->C: slave join acknowledgement */
2140 2148#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 684
2141#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK 685
2142
2143#define GNUNET_MESSAGE_TYPE_PSYC_SLAVE_PART 686
2144 2149
2150/* 685-686 */
2145 2151
2152/** M->S->C: incoming join request from multicast */
2146#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687 2153#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST 687
2147 2154
2155/** C->S->M: decision about a join request */
2148#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION 688 2156#define GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION 688
2149 2157
2150 2158
2159/** C->S: request to remove channel slave from the membership database. */
2151#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_ADD 689 2160#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_ADD 689
2152 2161
2162/** C->S: request to add channel slave to the membership database */
2153#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_RM 690 2163#define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_RM 690
2154 2164
2155 2165
2166/** M<->S<->C: PSYC message which contains one or more message parts. */
2156#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE 691 2167#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE 691
2157 2168
2169/** Message part: method */
2158#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD 692 2170#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_METHOD 692
2159 2171
2172/** Message part: modifier */
2160#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER 693 2173#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER 693
2161 2174
2175/** Message part: modifier continuation */
2162#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT 694 2176#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT 694
2163 2177
2178/** Message part: data */
2164#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_DATA 695 2179#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_DATA 695
2165 2180
2181/** Message part: end of message */
2166#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END 696 2182#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END 696
2167 2183
2184/** Message part: message cancelled */
2168#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_CANCEL 697 2185#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_CANCEL 697
2169 2186
2187/** S->C: message acknowledgment */
2170#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK 698 2188#define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK 698
2171 2189
2190/* 699-700 */
2172 2191
2192/** C->S: client requests channel history from PSYCstore. */
2173#define GNUNET_MESSAGE_TYPE_PSYC_STORY_REQUEST 701 2193#define GNUNET_MESSAGE_TYPE_PSYC_STORY_REQUEST 701
2174 2194
2175#define GNUNET_MESSAGE_TYPE_PSYC_STORY_RESPONSE 702 2195/** S->C: result for a channel history request */
2196#define GNUNET_MESSAGE_TYPE_PSYC_STORY_RESULT 702
2176 2197
2177 2198
2199/** C->S: request best matching state variable from PSYCstore. */
2178#define GNUNET_MESSAGE_TYPE_PSYC_STATE_GET 703 2200#define GNUNET_MESSAGE_TYPE_PSYC_STATE_GET 703
2179 2201
2202/** C->S: request state variables with a given prefix from PSYCstore. */
2180#define GNUNET_MESSAGE_TYPE_PSYC_STATE_GET_PREFIX 704 2203#define GNUNET_MESSAGE_TYPE_PSYC_STATE_GET_PREFIX 704
2181 2204
2182#define GNUNET_MESSAGE_TYPE_PSYC_STATE_RESPONSE 705 2205/** S->C: result for a state request. */
2183 2206#define GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT 705
2184#define GNUNET_MESSAGE_TYPE_PSYC_STATE_MODIFIER 706
2185
2186#define GNUNET_MESSAGE_TYPE_PSYC_STATE_MOD_CONT 707
2187 2207
2188 2208
2189/******************************************************************************* 2209/*******************************************************************************
@@ -2196,7 +2216,7 @@ extern "C"
2196#define GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO 730 2216#define GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO 730
2197 2217
2198/** 2218/**
2199 * Client -> Server message register a phone. 2219 * Client -> Server message to register a phone.
2200 */ 2220 */
2201#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER 731 2221#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER 731
2202 2222
diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h
index 3a0c713d5..018f012f4 100644
--- a/src/include/gnunet_psyc_service.h
+++ b/src/include/gnunet_psyc_service.h
@@ -113,6 +113,7 @@ enum GNUNET_PSYC_ChannelFlags
113 GNUNET_PSYC_CHANNEL_RESTRICTED_HISTORY = 1 << 1 113 GNUNET_PSYC_CHANNEL_RESTRICTED_HISTORY = 1 << 1
114}; 114};
115 115
116
116/** 117/**
117 * PSYC channel policies. 118 * PSYC channel policies.
118 */ 119 */
@@ -169,6 +170,7 @@ enum GNUNET_PSYC_MessageFlags
169 GNUNET_PSYC_MESSAGE_REQUEST = 1 << 1 170 GNUNET_PSYC_MESSAGE_REQUEST = 1 << 1
170}; 171};
171 172
173
172GNUNET_NETWORK_STRUCT_BEGIN 174GNUNET_NETWORK_STRUCT_BEGIN
173 175
174/** 176/**
@@ -190,6 +192,7 @@ struct GNUNET_PSYC_MessageHeader
190 192
191 /** 193 /**
192 * Number of the message this message part belongs to. 194 * Number of the message this message part belongs to.
195 * Monotonically increasing from 1.
193 */ 196 */
194 uint64_t message_id GNUNET_PACKED; 197 uint64_t message_id GNUNET_PACKED;
195 198
@@ -254,6 +257,7 @@ struct GNUNET_PSYC_MessageModifier
254 257
255GNUNET_NETWORK_STRUCT_END 258GNUNET_NETWORK_STRUCT_END
256 259
260
257#define GNUNET_PSYC_MODIFIER_MAX_PAYLOAD \ 261#define GNUNET_PSYC_MODIFIER_MAX_PAYLOAD \
258 GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD \ 262 GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD \
259 - sizeof (struct GNUNET_PSYC_MessageModifier) 263 - sizeof (struct GNUNET_PSYC_MessageModifier)
@@ -266,6 +270,7 @@ GNUNET_NETWORK_STRUCT_END
266 GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD \ 270 GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD \
267 - sizeof (struct GNUNET_MessageHeader) 271 - sizeof (struct GNUNET_MessageHeader)
268 272
273
269/** 274/**
270 * Handle that identifies a join request. 275 * Handle that identifies a join request.
271 * 276 *
@@ -362,7 +367,7 @@ struct GNUNET_PSYC_Master;
362 * Function called after the channel master started. 367 * Function called after the channel master started.
363 * 368 *
364 * @param cls Closure. 369 * @param cls Closure.
365 * @param last_message_id Last message ID sent to the channel. 370 * @param max_message_id Last message ID sent to the channel.
366 */ 371 */
367typedef void 372typedef void
368(*GNUNET_PSYC_MasterStartCallback) (void *cls, uint64_t max_message_id); 373(*GNUNET_PSYC_MasterStartCallback) (void *cls, uint64_t max_message_id);