8982df2bc93ca6fbcbfd110cb0a016c85ff4254a
[oweals/gnunet.git] / src / include / gnunet_namestore_service.h
1
2 /*
3      This file is part of GNUnet
4      (C) 2012, 2013 Christian Grothoff (and other contributing authors)
5
6      GNUnet is free software; you can redistribute it and/or modify
7      it under the terms of the GNU General Public License as published
8      by the Free Software Foundation; either version 3, or (at your
9      option) any later version.
10
11      GNUnet is distributed in the hope that it will be useful, but
12      WITHOUT ANY WARRANTY; without even the implied warranty of
13      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14      General Public License for more details.
15
16      You should have received a copy of the GNU General Public License
17      along with GNUnet; see the file COPYING.  If not, write to the
18      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19      Boston, MA 02111-1307, USA.
20 */
21
22 /**
23  * @file include/gnunet_namestore_service.h
24  * @brief API that can be used to store naming information on a GNUnet node;
25  *        Naming information can either be records for which this peer/user
26  *        is authoritative, or blocks which are cached, encrypted naming
27  *        data from other peers.
28  * @author Christian Grothoff
29  */
30 #ifndef GNUNET_NAMESTORE_SERVICE_H
31 #define GNUNET_NAMESTORE_SERVICE_H
32
33 #include "gnunet_util_lib.h"
34 #include "gnunet_block_lib.h"
35
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #if 0                           /* keep Emacsens' auto-indent happy */
40 }
41 #endif
42 #endif
43
44 /**
45  * Record type indicating any record/'*'
46  */
47 #define GNUNET_NAMESTORE_TYPE_ANY 0
48
49 /**
50  * Record type for GNS zone transfer ("PKEY").
51  */
52 #define GNUNET_NAMESTORE_TYPE_PKEY 65536
53
54 /**
55  * Record type for GNS zone transfer ("PSEU").
56  */
57 #define GNUNET_NAMESTORE_TYPE_PSEU 65537
58
59 /**
60  * Record type for GNS legacy hostnames ("LEHO").
61  */
62 #define GNUNET_NAMESTORE_TYPE_LEHO 65538
63
64 /**
65  * Record type for VPN resolution
66  */
67 #define GNUNET_NAMESTORE_TYPE_VPN 65539
68
69 /**
70  * Record type for zone revocation
71  */
72 #define GNUNET_NAMESTORE_TYPE_REV 65540
73
74 /**
75  * Record type for a social place.
76  */
77 #define GNUNET_NAMESTORE_TYPE_PLACE 65541
78
79 /**
80  * Entry in the queue.
81  */
82 struct GNUNET_NAMESTORE_QueueEntry;
83
84 /**
85  * Handle to the namestore service.
86  */
87 struct GNUNET_NAMESTORE_Handle;
88
89 /**
90  * Handle to the namestore zone iterator.
91  */
92 struct GNUNET_NAMESTORE_ZoneIterator;
93
94 /**
95  * Maximum size of a value that can be stored in the namestore.
96  */
97 #define GNUNET_NAMESTORE_MAX_VALUE_SIZE (63 * 1024)
98
99
100 /**
101  * Connect to the namestore service.
102  *
103  * @param cfg configuration to use
104  * @return handle to use to access the service
105  */
106 struct GNUNET_NAMESTORE_Handle *
107 GNUNET_NAMESTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
108
109
110 /**
111  * Disconnect from the namestore service (and free associated
112  * resources).
113  *
114  * @param h handle to the namestore
115  */
116 void
117 GNUNET_NAMESTORE_disconnect (struct GNUNET_NAMESTORE_Handle *h);
118
119
120 /**
121  * Continuation called to notify client about result of the
122  * operation.
123  *
124  * @param cls closure
125  * @param success GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate)
126  *                GNUNET_NO if content was already there or not found
127  *                GNUNET_YES (or other positive value) on success
128  * @param emsg NULL on success, otherwise an error message
129  */
130 typedef void (*GNUNET_NAMESTORE_ContinuationWithStatus) (void *cls,
131                                                          int32_t success,
132                                                          const char *emsg);
133
134
135 /**
136  * Flags that can be set for a record.
137  */
138 enum GNUNET_NAMESTORE_RecordFlags
139 {
140   
141   /**
142    * No special options.
143    */
144   GNUNET_NAMESTORE_RF_NONE = 0,
145
146   /**
147    * This is a private record of this peer and it should
148    * thus not be handed out to other peers.
149    */
150   GNUNET_NAMESTORE_RF_PRIVATE = 2,
151
152   /**
153    * This record was added automatically by the system
154    * and is pending user confimation.
155    */
156   GNUNET_NAMESTORE_RF_PENDING = 4,
157
158   /**
159    * This expiration time of the record is a relative
160    * time (not an absolute time).
161    */
162   GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION = 8,
163
164   /**
165    * This record should not be used unless all (other) records with an absolute
166    * expiration time have expired.
167    */
168   GNUNET_NAMESTORE_RF_SHADOW_RECORD = 16
169
170   /**
171    * When comparing flags for record equality for removal,
172    * which flags should must match (in addition to the type,
173    * name, expiration value and data of the record)?  All flags
174    * that are not listed here will be ignored for this purpose.
175    * (for example, we don't expect that users will remember to
176    * pass the '--private' option when removing a record from
177    * the namestore, hence we don't require this particular option
178    * to match upon removal).  See also
179    * 'GNUNET_NAMESTORE_records_cmp'.
180    */
181 #define GNUNET_NAMESTORE_RF_RCMP_FLAGS (GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)
182 };
183
184
185 /**
186  * A GNS record.
187  */
188 struct GNUNET_NAMESTORE_RecordData
189 {
190
191   /**
192    * Binary value stored in the DNS record.  Note: "data" must never
193    * be individually 'malloc'ed, but instead always points into some
194    * existing data area.
195    */
196   const void *data;
197
198   /**
199    * Expiration time for the DNS record.  Can be relative
200    * or absolute, depending on 'flags'.  Measured in the same
201    * unit as GNUnet time (microseconds).
202    */
203   uint64_t expiration_time;
204
205   /**
206    * Number of bytes in 'data'.
207    */
208   size_t data_size;
209
210   /**
211    * Type of the GNS/DNS record.
212    */
213   uint32_t record_type;
214
215   /**
216    * Flags for the record.
217    */
218   enum GNUNET_NAMESTORE_RecordFlags flags;
219 };
220
221
222
223 GNUNET_NETWORK_STRUCT_BEGIN
224
225
226 /**
227  * Information we have in an encrypted block with record data (i.e. in the DHT).
228  */
229 struct GNUNET_NAMESTORE_Block
230 {
231
232   /**
233    * Signature of the block.
234    */
235   struct GNUNET_CRYPTO_EccSignature signature;
236
237   /**
238    * Derived key used for signing; hash of this is the query.
239    */
240   struct GNUNET_CRYPTO_EccPublicKey derived_key;
241
242   /**
243    * Number of bytes signed; also specifies the number of bytes
244    * of encrypted data that follow.
245    */
246   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
247   
248   /**
249    * Expiration time of the block.
250    */
251   struct GNUNET_TIME_AbsoluteNBO expiration_time;
252
253   /* followed by encrypted data */
254 };
255
256 GNUNET_NETWORK_STRUCT_END
257
258 /**
259  * Store an item in the namestore.  If the item is already present,
260  * it is replaced with the new record.  
261  *
262  * @param h handle to the namestore
263  * @param block block to store
264  * @param cont continuation to call when done
265  * @param cont_cls closure for @a cont
266  * @return handle to abort the request
267  */
268 struct GNUNET_NAMESTORE_QueueEntry *
269 GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h,
270                               const struct GNUNET_NAMESTORE_Block *block,
271                               GNUNET_NAMESTORE_ContinuationWithStatus cont,
272                               void *cont_cls);
273
274
275 /**
276  * Store an item in the namestore.  If the item is already present,
277  * it is replaced with the new record.  Use an empty array to
278  * remove all records under the given name.
279  *
280  * @param h handle to the namestore
281  * @param pkey private key of the zone
282  * @param label name that is being mapped (at most 255 characters long)
283  * @param rd_count number of records in the 'rd' array
284  * @param rd array of records with data to store
285  * @param cont continuation to call when done
286  * @param cont_cls closure for @a cont
287  * @return handle to abort the request
288  */
289 struct GNUNET_NAMESTORE_QueueEntry *
290 GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h,
291                                 const struct GNUNET_CRYPTO_EccPrivateKey *pkey,
292                                 const char *label,
293                                 unsigned int rd_count,
294                                 const struct GNUNET_NAMESTORE_RecordData *rd,
295                                 GNUNET_NAMESTORE_ContinuationWithStatus cont,
296                                 void *cont_cls);
297
298
299 /**
300  * Process a record that was stored in the namestore.
301  *
302  * @param cls closure
303  * @param block block that was stored in the namestore
304  */
305 typedef void (*GNUNET_NAMESTORE_BlockProcessor) (void *cls,
306                                                  const struct GNUNET_NAMESTORE_Block *block);
307
308
309 /**
310  * Get a result for a particular key from the namestore.  The processor
311  * will only be called once.  
312  *
313  * @param h handle to the namestore
314  * @param derived_hash hash of zone key combined with name to lookup
315  * @param proc function to call on the matching block, or with
316  *        NULL if there is no matching block
317  * @param proc_cls closure for proc
318  * @return a handle that can be used to cancel
319  */
320 struct GNUNET_NAMESTORE_QueueEntry *
321 GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h, 
322                                const struct GNUNET_HashCode *derived_hash,
323                                GNUNET_NAMESTORE_BlockProcessor proc, void *proc_cls);
324
325
326 /**
327  * Process a record that was stored in the namestore.
328  *
329  * @param cls closure
330  * @param zone private key of the zone; NULL on disconnect
331  * @param label label of the records; NULL on disconnect
332  * @param rd_count number of entries in @a rd array, 0 if label was deleted
333  * @param rd array of records with data to store
334  */
335 typedef void (*GNUNET_NAMESTORE_RecordMonitor) (void *cls,
336                                                 const struct GNUNET_CRYPTO_EccPrivateKey *zone,
337                                                 const char *label,
338                                                 unsigned int rd_count,
339                                                 const struct GNUNET_NAMESTORE_RecordData *rd);
340
341
342 /**
343  * Look for an existing PKEY delegation record for a given public key.
344  * Returns at most one result to the processor.
345  *
346  * @param h handle to the namestore
347  * @param zone public key of the zone to look up in, never NULL
348  * @param value_zone public key of the target zone (value), never NULL
349  * @param proc function to call on the matching records, or with
350  *        NULL (rd_count == 0) if there are no matching records
351  * @param proc_cls closure for proc
352  * @return a handle that can be used to
353  *         cancel
354  */
355 struct GNUNET_NAMESTORE_QueueEntry *
356 GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h, 
357                                const struct GNUNET_CRYPTO_EccPrivateKey *zone,
358                                const struct GNUNET_CRYPTO_EccPublicKey *value_zone,
359                                GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls);
360
361
362 /**
363  * Process a records that were decrypted from a block.
364  *
365  * @param cls closure
366  * @param rd_count number of entries in @a rd array
367  * @param rd array of records with data to store
368  */
369 typedef void (*GNUNET_NAMESTORE_RecordCallback) (void *cls,
370                                                  unsigned int rd_count,
371                                                  const struct GNUNET_NAMESTORE_RecordData *rd);
372
373
374 /**
375  * Cancel a namestore operation.  The final callback from the
376  * operation must not have been done yet.  Must be called on any
377  * namestore operation that has not yet completed prior to calling
378  * #GNUNET_NAMESTORE_disconnect.
379  *
380  * @param qe operation to cancel
381  */
382 void
383 GNUNET_NAMESTORE_cancel (struct GNUNET_NAMESTORE_QueueEntry *qe);
384
385
386 /**
387  * Starts a new zone iteration (used to periodically PUT all of our
388  * records into our DHT). This MUST lock the struct GNUNET_NAMESTORE_Handle
389  * for any other calls than #GNUNET_NAMESTORE_zone_iterator_next and
390  * #GNUNET_NAMESTORE_zone_iteration_stop. @a proc will be called once
391  * immediately, and then again after
392  * #GNUNET_NAMESTORE_zone_iterator_next is invoked.
393  *
394  * @param h handle to the namestore
395  * @param zone zone to access, NULL for all zones
396  * @param proc function to call on each name from the zone; it
397  *        will be called repeatedly with a value (if available)
398  *        and always once at the end with a name of NULL.
399  * @param proc_cls closure for @a proc
400  * @return an iterator handle to use for iteration
401  */
402 struct GNUNET_NAMESTORE_ZoneIterator *
403 GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h,
404                                        const struct GNUNET_CRYPTO_EccPrivateKey *zone,
405                                        GNUNET_NAMESTORE_RecordMonitor proc,
406                                        void *proc_cls);
407
408
409 /**
410  * Calls the record processor specified in #GNUNET_NAMESTORE_zone_iteration_start
411  * for the next record.
412  *
413  * @param it the iterator
414  */
415 void
416 GNUNET_NAMESTORE_zone_iterator_next (struct GNUNET_NAMESTORE_ZoneIterator *it);
417
418
419 /**
420  * Stops iteration and releases the namestore handle for further calls.  Must
421  * be called on any iteration that has not yet completed prior to calling
422  * #GNUNET_NAMESTORE_disconnect.
423  *
424  * @param it the iterator
425  */
426 void
427 GNUNET_NAMESTORE_zone_iteration_stop (struct GNUNET_NAMESTORE_ZoneIterator *it);
428
429
430 /**
431  * Handle for a monitoring activity.
432  */
433 struct GNUNET_NAMESTORE_ZoneMonitor;
434
435
436 /**
437  * Function called once the monitor has caught up with the current 
438  * state of the database.  Will be called AGAIN after each disconnect
439  * (record monitor called with 'NULL' for zone_key) once we're again
440  * in sync.
441  *
442  * @param cls closure
443  */
444 typedef void (*GNUNET_NAMESTORE_RecordsSynchronizedCallback)(void *cls);
445
446
447 /**
448  * Begin monitoring a zone for changes.  Will first call the @a monitor function
449  * on all existing records in the selected zone(s), then calls @a sync_cb,
450  * and then calls the @a monitor whenever a record changes.  If the namestore
451  * disconnects, the @a monitor function is called with a disconnect event; if
452  * the connection is re-established, the process begins from the start (all
453  * existing records, sync, then updates).
454  *
455  * @param cfg configuration to use to connect to namestore
456  * @param zone zone to monitor
457  * @param monitor function to call on zone changes
458  * @param sync_cb function called when we're in sync with the namestore
459  * @param cls closure for @a monitor' and @a sync_cb
460  * @return handle to stop monitoring
461  */
462 struct GNUNET_NAMESTORE_ZoneMonitor *
463 GNUNET_NAMESTORE_zone_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
464                                      const struct GNUNET_CRYPTO_EccPrivateKey *zone,
465                                      GNUNET_NAMESTORE_RecordMonitor monitor,
466                                      GNUNET_NAMESTORE_RecordsSynchronizedCallback sync_cb,
467                                      void *cls);
468
469
470 /**
471  * Stop monitoring a zone for changes.
472  *
473  * @param zm handle to the monitor activity to stop
474  */
475 void
476 GNUNET_NAMESTORE_zone_monitor_stop (struct GNUNET_NAMESTORE_ZoneMonitor *zm);
477
478
479 /* convenience APIs for serializing / deserializing GNS records */
480
481 /**
482  * Calculate how many bytes we will need to serialize the given
483  * records.
484  *
485  * @param rd_count number of records in the @a rd array
486  * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements
487  * @return the required size to serialize
488  */
489 size_t
490 GNUNET_NAMESTORE_records_get_size (unsigned int rd_count,
491                                    const struct GNUNET_NAMESTORE_RecordData *rd);
492
493
494 /**
495  * Serialize the given records to the given destination buffer.
496  *
497  * @param rd_count number of records in the @a rd array
498  * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements
499  * @param dest_size size of the destination array @a dst
500  * @param dest where to write the result
501  * @return the size of serialized records, -1 if records do not fit
502  */
503 ssize_t
504 GNUNET_NAMESTORE_records_serialize (unsigned int rd_count,
505                                     const struct GNUNET_NAMESTORE_RecordData *rd,
506                                     size_t dest_size,
507                                     char *dest);
508
509
510 /**
511  * Deserialize the given records to the given destination.
512  *
513  * @param len size of the serialized record data
514  * @param src the serialized record data
515  * @param rd_count number of records in the @a dest array
516  * @param dest where to put the data
517  * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
518  */
519 int
520 GNUNET_NAMESTORE_records_deserialize (size_t len,
521                                       const char *src,
522                                       unsigned int rd_count,
523                                       struct GNUNET_NAMESTORE_RecordData *dest);
524
525
526 /**
527  * Convert the binary value @a data of a record of 
528  * type @a type to a human-readable string.
529  *
530  * @param type type of the record
531  * @param data value in binary encoding
532  * @param data_size number of bytes in @a data
533  * @return NULL on error, otherwise human-readable representation of the value
534  */
535 char *
536 GNUNET_NAMESTORE_value_to_string (uint32_t type,
537                                   const void *data,
538                                   size_t data_size);
539
540
541 /**
542  * Convert human-readable version of the value @a s of a record
543  * of type @a type to the respective binary representation.
544  *
545  * @param type type of the record
546  * @param s human-readable string
547  * @param data set to value in binary encoding (will be allocated)
548  * @param data_size set to number of bytes in @a data
549  * @return #GNUNET_OK on success
550  */
551 int
552 GNUNET_NAMESTORE_string_to_value (uint32_t type,
553                                   const char *s,
554                                   void **data,
555                                   size_t *data_size);
556
557
558 /**
559  * Convert a type name (i.e. "AAAA") to the corresponding number.
560  *
561  * @param typename name to convert
562  * @return corresponding number, UINT32_MAX on error
563  */
564 uint32_t
565 GNUNET_NAMESTORE_typename_to_number (const char *typename);
566
567
568 /**
569  * Convert a type number (i.e. 1) to the corresponding type string (i.e. "A")
570  *
571  * @param type number of a type to convert
572  * @return corresponding typestring, NULL on error
573  */
574 const char *
575 GNUNET_NAMESTORE_number_to_typename (uint32_t type);
576
577
578 /**
579  * Test if a given record is expired.
580  * 
581  * @param rd record to test
582  * @return #GNUNET_YES if the record is expired,
583  *         #GNUNET_NO if not
584  */
585 int
586 GNUNET_NAMESTORE_is_expired (const struct GNUNET_NAMESTORE_RecordData *rd);
587
588
589 /**
590  * Convert a UTF-8 string to UTF-8 lowercase
591  * @param src source string
592  * @return converted result
593  */
594 char *
595 GNUNET_NAMESTORE_normalize_string (const char *src);
596
597
598 /**
599  * Convert a zone to a string (for printing debug messages).
600  * This is one of the very few calls in the entire API that is
601  * NOT reentrant!
602  *
603  * @param z public key of a zone
604  * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s.
605  */
606 const char *
607 GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EccPublicKey *z);
608
609
610 /**
611  * Convert public key to the respective absolute domain name in the
612  * ".zkey" pTLD. 
613  * This is one of the very few calls in the entire API that is
614  * NOT reentrant!
615  * 
616  * @param pkey a public key with (x,y) on the eliptic curve 
617  * @return string "Y.X.zkey" where X and Y are the coordinates of the public
618  *         key in an encoding suitable for DNS labels.
619  */
620 const char *
621 GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicKey *pkey);
622
623
624 /**
625  * Convert an absolute domain name in the ".zkey" pTLD to the
626  * respective public key.
627  * 
628  * @param zkey string "Y.X.zkey" where X and Y are the coordinates of the public
629  *         key in an encoding suitable for DNS labels.
630  * @param pkey set to a public key with (x,y) on the eliptic curve 
631  * @return #GNUNET_SYSERR if @a zkey has the wrong syntax
632  */
633 int
634 GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey,
635                                struct GNUNET_CRYPTO_EccPublicKey *pkey);
636
637
638 /**
639  * Calculate the DHT query for a given @a label in a given @a zone.
640  * 
641  * @param zone private key of the zone
642  * @param label label of the record
643  * @param query hash to use for the query
644  */
645 void
646 GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EccPrivateKey *zone,
647                                          const char *label,
648                                          struct GNUNET_HashCode *query);
649
650
651 /**
652  * Calculate the DHT query for a given @a label in a given @a zone.
653  * 
654  * @param pub public key of the zone
655  * @param label label of the record
656  * @param query hash to use for the query
657  */
658 void
659 GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicKey *pub,
660                                         const char *label,
661                                         struct GNUNET_HashCode *query);
662
663
664 /**
665  * Sign name and records
666  *
667  * @param key the private key
668  * @param expire block expiration
669  * @param label the name for the records
670  * @param rd record data
671  * @param rd_count number of records in @a rd
672  */
673 struct GNUNET_NAMESTORE_Block *
674 GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key,
675                                struct GNUNET_TIME_Absolute expire,
676                                const char *label,
677                                const struct GNUNET_NAMESTORE_RecordData *rd,
678                                unsigned int rd_count);
679
680
681 /**
682  * Check if a signature is valid.  This API is used by the GNS Block
683  * to validate signatures received from the network.
684  *
685  * @param block block to verify
686  * @return #GNUNET_OK if the signature is valid
687  */
688 int
689 GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block);
690
691
692 /**
693  * Decrypt block.
694  *
695  * @param block block to decrypt
696  * @param zone_key public key of the zone
697  * @param label the name for the records
698  * @param proc function to call with the result
699  * @param proc_cls closure for @a proc
700  * @return #GNUNET_OK on success, #GNUNET_SYSERR if the block was 
701  *        not well-formed
702  */
703 int
704 GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block,
705                                 const struct GNUNET_CRYPTO_EccPublicKey *zone_key,
706                                 const char *label,
707                                 GNUNET_NAMESTORE_RecordCallback proc,
708                                 void *proc_cls);
709
710
711 /**
712  * Compares if two records are equal
713  *
714  * @param a a record
715  * @param b another record 
716  * @return #GNUNET_YES if the records are equal, or #GNUNET_NO if not.
717  */
718 int
719 GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a,
720                               const struct GNUNET_NAMESTORE_RecordData *b);
721
722
723 /**
724  * Returns the expiration time of the given block of records. The block
725  * expiration time is the expiration time of the block with smallest
726  * expiration time.
727  *
728  * @param rd_count number of records given in @a rd
729  * @param rd array of records 
730  * @return absolute expiration time
731  */
732 struct GNUNET_TIME_Absolute
733 GNUNET_NAMESTORE_record_get_expiration_time (unsigned int rd_count, 
734                                              const struct GNUNET_NAMESTORE_RecordData *rd);
735
736
737 #if 0                           /* keep Emacsens' auto-indent happy */
738 {
739 #endif
740 #ifdef __cplusplus
741 }
742 #endif
743
744 /* end of gnunet_namestore_service.h */
745 #endif