aboutsummaryrefslogtreecommitdiff
path: root/src/psyc/psyc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/psyc/psyc.h')
-rw-r--r--src/psyc/psyc.h57
1 files changed, 24 insertions, 33 deletions
diff --git a/src/psyc/psyc.h b/src/psyc/psyc.h
index 21131e7d3..f6d40ddb4 100644
--- a/src/psyc/psyc.h
+++ b/src/psyc/psyc.h
@@ -112,30 +112,39 @@ struct ChannelMembershipStoreRequest
112 */ 112 */
113 struct GNUNET_MessageHeader header; 113 struct GNUNET_MessageHeader header;
114 114
115 uint32_t reserved; 115 uint32_t reserved GNUNET_PACKED;
116
117 uint64_t op_id GNUNET_PACKED;
116 118
117 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key; 119 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key;
118 120
119 uint64_t announced_at; 121 uint64_t announced_at GNUNET_PACKED;
120 122
121 uint64_t effective_since; 123 uint64_t effective_since GNUNET_PACKED;
122 124
123 uint8_t did_join; 125 uint8_t did_join;
124}; 126};
125 127
126 128
127struct StoryRequest 129struct HistoryRequest
128{ 130{
129 /** 131 /**
130 * Type: GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_STORY_REQUEST 132 * Type: GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_HISTORY_REQUEST
131 */ 133 */
132 struct GNUNET_MessageHeader header; 134 struct GNUNET_MessageHeader header;
133 135
134 uint64_t op_id; 136 uint32_t reserved GNUNET_PACKED;
137
138 /**
139 * ID for this operation.
140 */
141 uint64_t op_id GNUNET_PACKED;
142
143 uint64_t start_message_id GNUNET_PACKED;
135 144
136 uint64_t start_message_id; 145 uint64_t end_message_id GNUNET_PACKED;
137 146
138 uint64_t end_message_id; 147 uint64_t message_limit GNUNET_PACKED;
139}; 148};
140 149
141 150
@@ -148,10 +157,12 @@ struct StateRequest
148 */ 157 */
149 struct GNUNET_MessageHeader header; 158 struct GNUNET_MessageHeader header;
150 159
160 uint32_t reserved GNUNET_PACKED;
161
151 /** 162 /**
152 * ID for this operation. 163 * ID for this operation.
153 */ 164 */
154 uint64_t op_id; 165 uint64_t op_id GNUNET_PACKED;
155 166
156 /* Followed by NUL-terminated name. */ 167 /* Followed by NUL-terminated name. */
157}; 168};
@@ -160,25 +171,6 @@ struct StateRequest
160/**** service -> library ****/ 171/**** service -> library ****/
161 172
162 173
163struct CountersResult
164{
165 /**
166 * Type: GNUNET_MESSAGE_TYPE_PSYC_RESULT_COUNTERS
167 */
168 struct GNUNET_MessageHeader header;
169
170 /**
171 * Status code for the operation.
172 */
173 int32_t result_code GNUNET_PACKED;
174
175 /**
176 * Last message ID sent to the channel.
177 */
178 uint64_t max_message_id;
179};
180
181
182/** 174/**
183 * Answer from service to client about last operation. 175 * Answer from service to client about last operation.
184 */ 176 */
@@ -192,23 +184,22 @@ struct OperationResult
192 */ 184 */
193 struct GNUNET_MessageHeader header; 185 struct GNUNET_MessageHeader header;
194 186
187 uint32_t reserved GNUNET_PACKED;
188
195 /** 189 /**
196 * Operation ID. 190 * Operation ID.
197 */ 191 */
198 uint32_t op_id GNUNET_PACKED; 192 uint64_t op_id GNUNET_PACKED;
199 193
200 /** 194 /**
201 * Status code for the operation. 195 * Status code for the operation.
202 */ 196 */
203 int64_t result_code GNUNET_PACKED; 197 uint64_t result_code GNUNET_PACKED;
204 198
205 /* Followed by: 199 /* Followed by:
206 * - on error: NUL-terminated error message 200 * - on error: NUL-terminated error message
207 * - on success: one of the following message types 201 * - on success: one of the following message types
208 * 202 *
209 * For a STORY_RESULT:
210 * - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE
211 *
212 * For a STATE_RESULT, one of: 203 * For a STATE_RESULT, one of:
213 * - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER 204 * - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER
214 * - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT 205 * - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT