PSYC API: use master/slave/channel terminology
[oweals/gnunet.git] / src / include / gnunet_psyc_service.h
1 /*
2      This file is part of GNUnet.
3      (C) 2012, 2013 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 3, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /** 
22  * @file include/gnunet_psyc_service.h
23  * @brief PSYC service; high-level access to the PSYC protocol
24  *        note that clients of this API are NOT expected to
25  *        understand the PSYC message format, only the semantics!
26  *        Parsing (and serializing) the PSYC stream format is done
27  *        within the implementation of the libgnunetpsyc library,
28  *        and this API deliberately exposes as little as possible
29  *        of the actual data stream format to the application!
30  * @author Christian Grothoff
31  * @author Gabor X Toth
32  *
33  * NOTE:
34  * - this API does not know about psyc's "root" and "places";
35  *   there is no 'root' in GNUnet-Psyc as we're decentralized;
36  *   'places' and 'persons' are combined within the same 
37  *   abstraction, that of a "channel".  Channels are identified
38  *   and accessed in this API using a public/private key.  
39  *   Higher-level applications should use NAMES within GADS
40  *   to obtain public keys, and the distinction between 
41  *   'places' and 'persons' can then be made with the help
42  *   of the naming system (and/or conventions).
43  *   Channels are (as in PSYC) organized into a hierarchy; each
44  *   channel master (the one with the private key) is then
45  *   the operator of the multicast group (its Origin in 
46  *   the terminology of the multicast API).
47  * - The API supports passing large amounts of data using
48  *   'streaming' for the argument passed to a method.  State
49  *   and variables must fit into memory and cannot be streamed
50  *   (thus, no passing of 4 GB of data in a variable; 
51  *   once we implement this, we might want to create a
52  *   @c \#define for the maximum size of a variable).
53  * - PSYC defines standard variables, methods, etc.  This
54  *   library deliberately abstracts over all of these; a
55  *   higher-level API should combine the naming system (GADS)
56  *   and standard methods (message, join, part, warn,
57  *   fail, error) and variables (action, color, time,
58  *   tag, etc.).  However, this API does take over the
59  *   routing variables, specifically 'context' (channel),
60  *   and 'source'.  We only kind-of support 'target', as
61  *   the target is either everyone in the group or the
62  *   origin, and never just a single member of the group;
63  *   for such individual messages, an application needs to
64  *   construct an 'inbox' channel where the master (only)
65  *   receives messages (but never forwards; private responses
66  *   would be transmitted by joining the senders 'inbox'
67  *   channel -- or a inbox#bob subchannel).  The
68  *   goal for all of this is to keep the abstractions in this 
69  *   API minimal: interaction with multicast, try \& slice,
70  *   state/variable/channel management.  Higher-level
71  *   operations belong elsewhere (so maybe this API should
72  *   be called 'PSYC-low', whereas a higher-level API
73  *   implementing defaults for standard methods and
74  *   variables might be called 'PSYC-std' or 'PSYC-high'.
75  */
76
77 #ifndef GNUNET_PSYC_SERVICE_H
78 #define GNUNET_PSYC_SERVICE_H
79
80 #ifdef __cplusplus
81 extern "C"
82 {
83 #if 0                           /* keep Emacsens' auto-indent happy */
84 }
85 #endif
86 #endif
87
88 #include "gnunet_util_lib.h"
89 #include "gnunet_psyc_lib.h"
90 #include "gnunet_multicast_service.h"
91
92
93 /** 
94  * Version number of GNUnet-PSYC API.
95  */
96 #define GNUNET_PSYC_VERSION 0x00000000
97
98
99 enum GNUNET_PSYC_MessageFlags
100 {
101   /**
102    * First fragment of a message.
103    */
104   GNUNET_PSYC_MESSAGE_FIRST_FRAGMENT = GNUNET_MULTICAST_MESSAGE_FIRST_FRAGMENT,
105
106   /**
107    * Last fragment of a message.
108    */
109   GNUNET_PSYC_MESSAGE_LAST_FRAGMENT = GNUNET_MULTICAST_MESSAGE_LAST_FRAGMENT,
110
111   /** 
112    * OR'ed flags if message is not fragmented.
113    */
114   GNUNET_PSYC_MESSAGE_NOT_FRAGMENTED = GNUNET_MULTICAST_MESSAGE_NOT_FRAGMENTED
115 };
116
117
118 /** 
119  * Handle that identifies a join request.
120  *
121  * Used to match calls to #GNUNET_PSYC_JoinCallback to the
122  * corresponding calls to GNUNET_PSYC_join_decision().
123  */
124 struct GNUNET_PSYC_JoinHandle;
125
126 /** 
127  * Handle that identifies a part request.
128  *
129  * Used to match calls to #GNUNET_PSYC_PartCallback to the
130  * corresponding calls to GNUNET_PSYC_part_ack().
131  */
132 struct GNUNET_PSYC_PartHandle;
133
134
135 /** 
136  * Method called from PSYC upon receiving a message indicating a call
137  * to a @e method.  
138  *
139  * @param cls Closure.
140  * @param sender Who transmitted the message (master, except for messages
141  *        from one of the slaves to the master).
142  * @param message_id Unique message counter for this message;
143  *                   (unique only in combination with the given sender for
144  *                    this channel).
145  * @param method_name Original method name from PSYC (may be more
146  *        specific than the registered method name due to try-and-slice matching).
147  *        FIXME: no try-and-slice for methods defined here.
148  * @param header_length Number of modifiers in header.
149  * @param header Modifiers present in the message. FIXME: use environment instead?
150  * @param data_offset Byte offset of @a data in the overall data of the method.
151  * @param data_size Number of bytes in @a data.
152  * @param data Data stream given to the method (might not be zero-terminated 
153  *             if data is binary).
154  * @param frag Fragmentation status for the data.
155  */
156 typedef int (*GNUNET_PSYC_Method)(void *cls,
157                                   const struct GNUNET_PeerIdentity *sender,
158                                   uint64_t message_id,
159                                   const char *method_name,
160                                   size_t header_length,
161                                   GNUNET_PSYC_Modifier *header,
162                                   uint64_t data_offset,
163                                   size_t data_size,
164                                   const void *data,
165                                   enum GNUNET_PSYC_MessageFlags flags);
166
167
168 /** 
169  * Method called from PSYC upon receiving a join request.
170  *
171  * @param cls Closure.
172  * @param peer Peer requesting to join.
173  * @param method_name Method name in the join request.
174  * @param header_length Number of modifiers in header.
175  * @param header Modifiers present in the message.
176  * @param data_size Number of bytes in @a data.
177  * @param data Data stream given to the method (might not be zero-terminated 
178  *             if data is binary).
179  */
180 typedef int (*GNUNET_PSYC_JoinCallback)(void *cls,
181                                         const struct GNUNET_PeerIdentity *peer,
182                                         const char *method_name,
183                                         size_t header_length,
184                                         GNUNET_PSYC_Modifier *header,
185                                         size_t data_size,
186                                         const void *data,
187                                         struct GNUNET_PSYC_JoinHandle *jh);
188
189
190 /** 
191  * Method called from PSYC upon receiving a part request.
192  *
193  * @param cls Closure.
194  * @param peer Peer requesting to leave.
195  * @param method_name Method name in the part request.
196  * @param header_length Number of modifiers in header.
197  * @param header Modifiers present in the message.
198  * @param data_size Number of bytes in @a data.
199  * @param data Data stream given to the method (might not be zero-terminated 
200  *             if data is binary).
201  */
202 typedef int (*GNUNET_PSYC_PartCallback)(void *cls,
203                                         const struct GNUNET_PeerIdentity *peer,
204                                         const char *method_name,
205                                         size_t header_length,
206                                         GNUNET_PSYC_Modifier *header,
207                                         size_t data_size,
208                                         const void *data,
209                                         struct GNUNET_PSYC_PartHandle *ph);
210
211
212 /** 
213  * Function to call with the decision made for a join request.
214  *
215  * Must be called once and only once in response to an invocation of the
216  * #GNUNET_PSYC_JoinCallback.
217  *
218  * @param jh Join request handle.
219  * @param is_admitted #GNUNET_YES if joining is approved,
220  *        #GNUNET_NO if it is disapproved
221  * @param method_name Method name for the message transmitted with the response.
222  * @param env Environment: transient variables for the message.
223  * @param data_size Size of @a data.
224  * @param data Data of the message.
225  */
226 void
227 GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh,
228                            int is_admitted,
229                            const char *method_name,
230                            const struct GNUNET_ENV_Environment *env,
231                            size_t data_size,
232                            const void *data);
233
234
235 /** 
236  * Send a part acknowledgment.
237  *
238  * @param ph Part handle.
239  */
240 void
241 GNUNET_PSYC_part_ack (struct GNUNET_PSYC_PartHandle *ph);
242
243
244 /** 
245  * Handle for the master of a PSYC channel.
246  */
247 struct GNUNET_PSYC_Master;
248
249
250 /** 
251  * Create a PSYC channel master.
252  *
253  * Will create a multicast group identified by the given ECC key.  Messages
254  * received from group members will be given to the respective handler methods.
255  * If a new member wants to join a group, the "join" method handler will be
256  * invoked; the join handler must then generate a "join" message to approve the
257  * joining of the new member.  The channel can also change group membership
258  * without explicit requests.  Note that PSYC doesn't itself "understand" join
259  * or part messages, the respective methods must call other PSYC functions to
260  * inform PSYC about the meaning of the respective events.
261  *
262  * @param cfg Configuration to use (to connect to PSYC service).
263  * @param priv_key ECC key that will be used to sign messages for this
264  *                 PSYC session; public key is used to identify the
265  *                 PSYC channel; FIXME: we'll likely want to use
266  *                 NOT the p512 curve here, but a cheaper one in the future
267  *                 Note that end-users will usually not use the private key
268  *                 directly, but rather look it up in GADS for places
269  *                 managed by other users, or select a file with the private
270  *                 key(s) when setting up their own channels
271  * @param join_policy What is the membership policy of the group?
272  *                 Used to automate group management decisions.
273  * @param method_cb Function to invoke on messages received from members.
274  * @param join_cb Function to invoke when a peer wants to join.
275  * @param part_cb Function to invoke when a peer wants to part.
276  * @param cls Closure for the callbacks.
277  * @return Handle for the channel master, NULL on error.
278  */
279 struct GNUNET_PSYC_Master *
280 GNUNET_PSYC_master_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
281                            const struct GNUNET_CRYPTO_EccPrivateKey *priv_key,
282                            enum GNUNET_MULTICAST_JoinPolicy join_policy,
283                            GNUNET_PSYC_Method method_cb,
284                            GNUNET_PSYC_JoinCallback join_cb,
285                            GNUNET_PSYC_PartCallback part_cb,
286                            void *cls);
287
288
289 /** 
290  * Function called to provide data for a transmission via PSYC.
291  *
292  * Note that returning #GNUNET_OK or #GNUNET_SYSERR (but not #GNUNET_NO)
293  * invalidates the respective transmission handle.
294  *
295  * @param cls Closure.
296  * @param message_id Set to the unique message ID that was generated for
297  *        this message.
298  * @param data_size[in,out] Initially set to the number of bytes available in @a data,
299  *        should be set to the number of bytes written to data (IN/OUT).
300  * @param[out] data Where to write the body of the message to give to the method;
301  *        function must copy at most @a *data_size bytes to @a data.
302  * @return #GNUNET_SYSERR on error (fatal, aborts transmission)
303  *         #GNUNET_NO on success, if more data is to be transmitted later 
304  *         (should be used if @a *data_size was not big enough to take all the data)
305  *         #GNUNET_YES if this completes the transmission (all data supplied)
306  */
307 typedef int (*GNUNET_PSYC_MasterReadyNotify)(void *cls,
308                                              uint64_t message_id,
309                                              size_t *data_size,
310                                              void *data);
311
312
313 /** 
314  * Handle for a pending PSYC transmission operation. 
315  */
316 struct GNUNET_PSYC_MasterTransmitHandle;
317
318
319 /** 
320  * Send a message to call a method to all members in the PSYC channel.
321  *
322  * @param master Handle to the PSYC channel.
323  * @param increment_group_generation #GNUNET_YES if we need to increment
324  *        the group generation counter after transmitting this message.
325  * @param method_name Which method should be invoked.
326  * @param env Environment: state operations and transient variables for the message.
327  * @param notify Function to call to obtain the arguments.
328  * @param notify_cls Closure for @a notify.
329  * @return Transmission handle, NULL on error (i.e. more than one request queued).
330  */
331 struct GNUNET_PSYC_MasterTransmitHandle *
332 GNUNET_PSYC_master_transmit (struct GNUNET_PSYC_Master *master,
333                              int increment_group_generation,
334                              const char *method_name,
335                              const struct GNUNET_ENV_Environment *env,
336                              GNUNET_PSYC_MasterReadyNotify notify,
337                              void *notify_cls);
338
339
340 /** 
341  * Abort transmission request to channel.
342  *
343  * @param th Handle of the request that is being aborted.
344  */
345 void
346 GNUNET_PSYC_master_transmit_cancel (struct GNUNET_PSYC_MasterTransmitHandle *th);
347
348
349 /** 
350  * Destroy a PSYC channel master.
351  *
352  * @param master PSYC channel master to terminate.
353  */
354 tvoid
355 GNUNET_PSYC_master_destroy (struct GNUNET_PSYC_Master *master);
356
357
358 /** 
359  * Handle to access PSYC channel operations for both the master and slaves.
360  */
361 struct GNUNET_PSYC_Channel;
362
363
364 /** 
365  * Convert a channel @a master to a @e channel handle to access the @e channel APIs.
366  * 
367  * @param master Channel master handle.
368  * @return Channel handle, valid for as long as @a master is valid.
369  */ 
370 struct GNUNET_PSYC_Channel *
371 GNUNET_PSYC_master_get_channel (struct GNUNET_PSYC_Master *master);
372
373
374 /** 
375  * Convert @a slave to a @e channel handle to access the @e channel APIs.
376  * 
377  * @param slave Slave handle.
378  * @return Channel handle, valid for as long as @a slave is valid.
379  */ 
380 struct GNUNET_PSYC_Channel *
381 GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave);
382
383
384 /** 
385  * Add a member to the channel.
386  *
387  * Note that this will NOT generate any PSYC traffic, it will merely update the
388  * local data base to modify how we react to <em>membership test</em> queries.
389  * The channel master still needs to explicitly transmit a @e join message to
390  * notify other channel members and they then also must still call this function
391  * in their respective methods handling the @e join message.  This way, how @e
392  * join and @e part operations are exactly implemented is still up to the
393  * application; for example, there might be a @e part_all method to kick out
394  * everyone.
395  *
396  * Note that channel members are explicitly trusted to execute such methods
397  * correctly; not doing so correctly will result in either denying members
398  * access or offering access to channel data to non-members.
399  *
400  * @param channel Channel handle.
401  * @param member Which peer to add.
402  * @param message_id Message ID for the message that changed the membership.
403  */
404 void
405 GNUNET_PSYC_channel_member_add (struct GNUNET_PSYC_Channel *channel,
406                                 const struct GNUNET_PeerIdentity *member,
407                                 uint64_t message_id);
408
409
410 /** 
411  * Remove a member from the channel.
412  *
413  * Note that this will NOT generate any PSYC traffic, it will merely update the
414  * local data base to modify how we react to <em>membership test</em> queries.
415  * The channel master still needs to explicitly transmit a @e part message to
416  * notify other channel members and they then also must still call this function
417  * in their respective methods handling the @e part message.  This way, how
418  * @e join and @e part operations are exactly implemented is still up to the
419  * application; for example, there might be a @e part_all message to kick out
420  * everyone.
421  *
422  * Note that channel members are explicitly trusted to perform these
423  * operations correctly; not doing so correctly will result in either
424  * denying members access or offering access to channel data to
425  * non-members.
426  *
427  * @param channel Channel handle.
428  * @param member Which peer to remove.
429  * @param message_id Message ID for the message that changed the membership.
430  */
431 void
432 GNUNET_PSYC_channel_member_remove (struct GNUNET_PSYC_Channel *channel,
433                                    const struct GNUNET_PeerIdentity *member,
434                                    uint64_t message_id);
435
436
437 /** 
438  * Function called to inform a member about stored state values for a channel.
439  *
440  * @param cls Closure.
441  * @param name Name of the state variable.
442  * @param value Value of the state variable.
443  * @param value_size Number of bytes in @a value.
444  */
445 typedef void (*GNUNET_PSYC_StateCallback)(void *cls,
446                                           const char *name,
447                                           size_t value_size,
448                                           const void *value);
449
450
451 /** 
452  * Handle for a PSYC channel slave.
453  */
454 struct GNUNET_PSYC_Slave;
455
456
457 /** 
458  * Join a PSYC channel.
459  *
460  * The entity joining is always the local peer.  The user must immediately use
461  * the GNUNET_PSYC_slave_to_master() functions to transmit a @e join_msg to the
462  * channel; if the join request succeeds, the channel state (and @e recent
463  * method calls) will be replayed to the joining member.  There is no explicit
464  * notification on failure (as the channel may simply take days to approve,
465  * and disapproval is simply being ignored).
466  *
467  * @param cfg Configuration to use.
468  * @param pub_key ECC key that identifies the channel we wish to join.
469  * @param origin Peer identity of the origin.
470  * @param method Function to invoke on messages received from the channel,
471  *                typically at least contains functions for @e join and @e part.
472  * @param method_cls Closure for @a method.
473  * @return Handle for the slave, NULL on error.
474  */
475 struct GNUNET_PSYC_Slave *
476 GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg, 
477                         const struct GNUNET_CRYPTO_EccPublicKey *pub_key,
478                         const struct GNUNET_PeerIdentity *origin,
479                         GNUNET_PSYC_Method method,
480                         void *method_cls);
481
482
483 /** 
484  * Part a PSYC channel.
485  *
486  * Will terminate the connection to the PSYC service.  Polite clients should
487  * first explicitly send a @e part request (via GNUNET_PSYC_slave_to_master()).
488  *
489  * @param slave Slave handle.
490  */
491 void
492 GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slave);
493
494
495 /** 
496  * Function called to provide data for a transmission to the channel
497  * master (aka the @e host of the channel).
498  *
499  * Note that returning #GNUNET_OK or #GNUNET_SYSERR (but not #GNUNET_NO)
500  * invalidates the respective transmission handle.
501  *
502  * @param cls Closure.
503  * @param data_size[in,out] Initially set to the number of bytes available in @a data,
504  *        should be set to the number of bytes written to data (IN/OUT).
505  * @param[out] data Where to write the body of the message to give to the method;
506  *        function must copy at most @a *data_size bytes to @a data.
507  * @return #GNUNET_SYSERR on error (fatal, aborts transmission).
508  *         #GNUNET_NO on success, if more data is to be transmitted later.
509  *         #GNUNET_YES if this completes the transmission (all data supplied).
510  */
511 typedef int (*GNUNET_PSYC_SlaveReadyNotify)(void *cls,
512                                              size_t *data_size,
513                                              char *data);
514
515
516 /** 
517  * Handle for a pending PSYC transmission operation.
518  */
519 struct GNUNET_PSYC_SlaveTransmitHandle;
520
521
522 /** 
523  * Request a message to be sent to the channel master.
524  *
525  * @param slave Slave handle.
526  * @param method_name Which (PSYC) method should be invoked (on host).
527  * @param env Environment: transient variables for the message.
528  * @param notify Function to call when we are allowed to transmit (to get data).
529  * @param notify_cls Closure for @a notify.
530  * @return Transmission handle, NULL on error (i.e. more than one request queued).
531  */
532 struct GNUNET_PSYC_SlaveTransmitHandle *
533 GNUNET_PSYC_slave_transmit (struct GNUNET_PSYC_Slave *slave,
534                             const char *method_name,
535                             const struct GNUNET_ENV_Environment *env,
536                             GNUNET_PSYC_SlaveReadyNotify notify,
537                             void *notify_cls);
538
539
540 /** 
541  * Abort transmission request to master.
542  *
543  * @param th Handle of the request that is being aborted.
544  */
545 void
546 GNUNET_PSYC_slave_transmit_cancel (struct GNUNET_PSYC_SlaveTransmitHandle *th);
547
548
549 /** 
550  * Handle to a story telling operation.
551  */
552 struct GNUNET_PSYC_Story;
553
554
555 /** 
556  * Request to be told the message history of the channel.
557  *
558  * Historic messages (but NOT the state at the time) will be replayed (given to
559  * the normal method handlers) if available and if access is permitted.
560  *
561  * To get the latest message, use 0 for both the start and end message ID.
562  *
563  * @param slave Which channel should be replayed?
564  * @param start_message_id Earliest interesting point in history.
565  * @param end_message_id Last (exclusive) interesting point in history.
566  * @param method Function to invoke on messages received from the story.
567  * @param method_cls Closure for @a method.
568  * @param finish_cb Function to call when the requested story has been fully 
569  *        told (counting message IDs might not suffice, as some messages
570  *        might be secret and thus the listener would not know the story is 
571  *        finished without being told explicitly); once this function
572  *        has been called, the client must not call
573  *        GNUNET_PSYC_slave_story_tell_cancel() anymore.
574  * @param finish_cb_cls Closure to finish_cb.
575  * @return Handle to cancel story telling operation.
576  */
577 struct GNUNET_PSYC_Story *
578 GNUNET_PSYC_slave_story_tell (struct GNUNET_PSYC_Slave *slave,
579                               uint64_t start_message_id,
580                               uint64_t end_message_id,
581                               GNUNET_PSYC_Method method,
582                               void *method_cls,
583                               void (*finish_cb)(void *),
584                               void *finish_cb_cls);
585
586
587 /** 
588  * Abort story telling.
589  *
590  * This function must not be called from within method handlers (as given to
591  * GNUNET_PSYC_slave_join()) of the slave.
592  *
593  * @param story Story telling operation to stop.
594  */
595 void
596 GNUNET_PSYC_slave_story_tell_cancel (struct GNUNET_PSYC_Story *story);
597
598
599 /** 
600  * Call the given callback on all matching values (including variables) in the
601  * channel state.
602  *
603  * The callback is invoked synchronously on all matching states (as the state is
604  * fully replicated in the library in this process; channel states should be
605  * small, large data is to be passed as streaming data to methods).
606  *
607  * A name matches if it includes the @a state_name prefix, thus requesting the
608  * empty state ("") will match all values; requesting "_a_b" will also return
609  * values stored under "_a_b_c".
610  *
611  * @param slave Slave handle.
612  * @param state_name Name of the state to query (full name 
613  *        might be longer, this is only the prefix that must match).
614  * @param cb Function to call on the matching state values.
615  * @param cb_cls Closure for @a cb.
616  * @return Message ID for which the state was returned (last seen
617  *         message ID).
618  */
619 uint64_t
620 GNUNET_PSYC_slave_state_get_all (struct GNUNET_PSYC_Slave *slave,
621                                  const char *state_name,
622                                  GNUNET_PSYC_StateCallback cb,
623                                  void *cb_cls);
624
625
626 /** 
627  * Obtain the current value of the best-matching value in the state
628  * (including variables).
629  *
630  * Note that variables are only valid during a #GNUNET_PSYC_Method invocation, as
631  * variables are only valid for the duration of a method invocation.
632  *
633  * If the requested variable name does not have an exact state in
634  * the state, the nearest less-specific name is matched; for example,
635  * requesting "_a_b" will match "_a" if "_a_b" does not exist.
636  *
637  * @param slave Slave handle.
638  * @param variable_name Name of the variable to query.
639  * @param[out] return_value_size Set to number of bytes in variable, 
640  *        needed as variables might contain binary data and
641  *        might also not be 0-terminated; set to 0 on errors.
642  * @return NULL on error (no matching state or variable), pointer
643           to the respective value otherwise.
644  */
645 const void *
646 GNUNET_PSYC_slave_state_get (struct GNUNET_PSYC_Slave *slave,
647                              const char *variable_name,
648                              size_t *return_value_size);
649
650
651 #if 0                           /* keep Emacsens' auto-indent happy */
652 {
653 #endif
654 #ifdef __cplusplus
655 }
656 #endif
657
658 /* ifndef GNUNET_PSYC_SERVICE_H */
659 #endif
660 /* end of gnunet_psyc_service.h */