2 This file is part of GNUnet.
3 (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 Christian Grothoff (and other contributing authors)
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 2, or (at your
8 option) any later version.
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.
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.
22 * @file include/gnunet_container_lib.h
23 * @brief container classes for GNUnet
25 * @author Christian Grothoff
29 #ifndef GNUNET_CONTAINER_LIB_H
30 #define GNUNET_CONTAINER_LIB_H
32 /* add error and config prototypes */
33 #include "gnunet_crypto_lib.h"
34 #include <extractor.h>
39 #if 0 /* keep Emacsens' auto-indent happy */
45 /* ******************* bloomfilter ***************** */
48 * @brief bloomfilter representation (opaque)
50 struct GNUNET_CONTAINER_BloomFilter;
53 * Iterator over HashCodes.
55 * @return GNUNET_YES if next was updated
56 * GNUNET_NO if there are no more entries
58 typedef int (*GNUNET_HashCodeIterator) (GNUNET_HashCode * next, void *arg);
61 * Load a bloom-filter from a file.
62 * @param filename the name of the file (or the prefix)
63 * @param size the size of the bloom-filter (number of
64 * bytes of storage space to use)
65 * @param k the number of GNUNET_CRYPTO_hash-functions to apply per
66 * element (number of bits set per element in the set)
67 * @return the bloomfilter
69 struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_load (const
80 * Create a bloom filter from raw bits.
82 * @param data the raw bits in memory (maybe NULL,
83 * in which case all bits should be considered
85 * @param size the size of the bloom-filter (number of
86 * bytes of storage space to use); also size of data
87 * -- unless data is NULL. Must be a power of 2.
88 * @param k the number of GNUNET_CRYPTO_hash-functions to apply per
89 * element (number of bits set per element in the set)
90 * @return the bloomfilter
92 struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_init (const
103 * Copy the raw data of this bloomfilter into
104 * the given data array.
106 * @param data where to write the data
107 * @param size the size of the given data array
108 * @return GNUNET_SYSERR if the data array of the wrong size
110 int GNUNET_CONTAINER_bloomfilter_get_raw_data (struct
111 GNUNET_CONTAINER_BloomFilter
116 * Test if an element is in the filter.
117 * @param e the element
118 * @param bf the filter
119 * @return GNUNET_YES if the element is in the filter, GNUNET_NO if not
121 int GNUNET_CONTAINER_bloomfilter_test (struct GNUNET_CONTAINER_BloomFilter
122 *bf, const GNUNET_HashCode * e);
125 * Add an element to the filter
126 * @param bf the filter
127 * @param e the element
129 void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter
130 *bf, const GNUNET_HashCode * e);
133 * Remove an element from the filter.
134 * @param bf the filter
135 * @param e the element to remove
137 void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter
138 *bf, const GNUNET_HashCode * e);
141 * Free the space associcated with a filter
142 * in memory, flush to drive if needed (do not
143 * free the space on the drive)
144 * @param bf the filter
146 void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter
150 * Reset a bloom filter to empty.
151 * @param bf the filter
153 void GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter
157 * Or the entries of the given raw data array with the
158 * data of the given bloom filter. Assumes that
159 * the size of the data array and the current filter
161 * @param bf the filter
163 int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
164 const char *data, unsigned int size);
167 * Resize a bloom filter. Note that this operation
168 * is pretty costly. Essentially, the bloom filter
169 * needs to be completely re-build.
171 * @param bf the filter
172 * @param iterator an iterator over all elements stored in the BF
173 * @param iterator_arg argument to the iterator function
174 * @param size the new size for the filter
175 * @param k the new number of GNUNET_CRYPTO_hash-function to apply per element
177 void GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter
179 GNUNET_HashCodeIterator iterator,
181 unsigned int size, unsigned int k);
183 /* ****************** metadata ******************* */
186 * Meta data to associate with a file, directory or namespace.
188 struct GNUNET_CONTAINER_MetaData;
191 * Iterator over meta data.
194 * @param type type of the meta data
195 * @param data value of the meta data
196 * @return GNUNET_OK to continue to iterate, GNUNET_SYSERR to abort
198 typedef int (*GNUNET_CONTAINER_MetaDataProcessor) (void *cls,
199 EXTRACTOR_KeywordType type,
203 * Create a fresh MetaData token.
205 struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_create (void);
208 * Duplicate a MetaData token.
210 struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_duplicate (const
212 GNUNET_CONTAINER_MetaData
218 void GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData
222 * Test if two MDs are equal.
224 int GNUNET_CONTAINER_meta_data_test_equal (const struct
225 GNUNET_CONTAINER_MetaData *md1,
227 GNUNET_CONTAINER_MetaData *md2);
232 * @return GNUNET_OK on success, GNUNET_SYSERR if this entry already exists
234 int GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
235 EXTRACTOR_KeywordType type,
240 * @return GNUNET_OK on success, GNUNET_SYSERR if the item does not exist in md
242 int GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md,
243 EXTRACTOR_KeywordType type,
247 * Add the current time as the publication date
250 void GNUNET_CONTAINER_meta_data_add_publication_date (struct
251 GNUNET_CONTAINER_MetaData
255 * Iterate over MD entries, excluding thumbnails.
257 * @return number of entries
259 int GNUNET_CONTAINER_meta_data_get_contents (const struct
260 GNUNET_CONTAINER_MetaData *md,
261 GNUNET_CONTAINER_MetaDataProcessor
262 iterator, void *closure);
265 * Get the first MD entry of the given type.
266 * @return NULL if we do not have any such entry,
267 * otherwise client is responsible for freeing the value!
269 char *GNUNET_CONTAINER_meta_data_get_by_type (const struct
270 GNUNET_CONTAINER_MetaData *md,
271 EXTRACTOR_KeywordType type);
274 * Get the first matching MD entry of the given types.
275 * @paarm ... -1-terminated list of types
276 * @return NULL if we do not have any such entry,
277 * otherwise client is responsible for freeing the value!
279 char *GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
280 GNUNET_CONTAINER_MetaData
284 * Get a thumbnail from the meta-data (if present).
286 * @param thumb will be set to the thumbnail data. Must be
287 * freed by the caller!
288 * @return number of bytes in thumbnail, 0 if not available
290 size_t GNUNET_CONTAINER_meta_data_get_thumbnail (const struct
291 GNUNET_CONTAINER_MetaData
292 *md, unsigned char **thumb);
295 * Extract meta-data from a file.
297 * @return GNUNET_SYSERR on error, otherwise the number
298 * of meta-data items obtained
300 int GNUNET_CONTAINER_meta_data_extract_from_file (struct
301 GNUNET_CONTAINER_MetaData
302 *md, const char *filename,
303 EXTRACTOR_ExtractorList *
306 enum GNUNET_CONTAINER_MetaDataSerializationOptions
308 GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL = 0,
309 GNUNET_CONTAINER_META_DATA_SERIALIZE_PART = 1,
310 GNUNET_CONTAINER_META_DATA_SERIALIZE_NO_COMPRESS = 2
316 * Serialize meta-data to target.
318 * @param size maximum number of bytes available
319 * @param opt is it ok to just write SOME of the
320 * meta-data to match the size constraint,
321 * possibly discarding some data?
322 * @return number of bytes written on success,
323 * GNUNET_SYSERR on error (typically: not enough
326 ssize_t GNUNET_CONTAINER_meta_data_serialize (const struct
327 GNUNET_CONTAINER_MetaData *md,
331 GNUNET_CONTAINER_MetaDataSerializationOptions
335 * Compute size of the meta-data in
337 * @param opt is it ok to just write SOME of the
338 * meta-data to match the size constraint,
339 * possibly discarding some data?
341 ssize_t GNUNET_CONTAINER_meta_data_get_serialized_size (const struct
342 GNUNET_CONTAINER_MetaData
345 GNUNET_CONTAINER_MetaDataSerializationOptions
349 * Deserialize meta-data. Initializes md.
350 * @param size number of bytes available
351 * @return MD on success, NULL on error (i.e.
354 struct GNUNET_CONTAINER_MetaData
355 *GNUNET_CONTAINER_meta_data_deserialize (const char *input,
359 * Does the meta-data claim that this is a directory?
360 * Checks if the mime-type is that of a GNUnet directory.
362 * @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if
363 * we have no mime-type information (treat as 'GNUNET_NO')
365 int GNUNET_CONTAINER_meta_data_test_for_directory (const struct
366 GNUNET_CONTAINER_MetaData
370 /* ******************************* HashMap **************************** */
373 * Opaque handle for a HashMap.
375 struct GNUNET_CONTAINER_MultiHashMap;
378 * Options for storing values in the HashMap.
380 enum GNUNET_CONTAINER_MultiHashMapOption
383 * If a value with the given key exists, replace it.
384 * Note that the old value would NOT be freed
385 * by replace (the application has to make sure that
386 * this happens if required).
388 GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE,
391 * Allow multiple values with the same key.
393 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE,
396 * There must only be one value per key; storing
397 * a value should fail if a value under the same
398 * key already exists.
400 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY,
403 * There must only be one value per key, but don't
404 * bother checking if a value already exists
405 * (faster than UNIQUE_ONLY; implemented just like
406 * MULTIPLE but this option documents better what
407 * is intended if UNIQUE is what is desired).
409 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST
413 * Iterator over HashCodes.
415 * @param key current key code
416 * @param value value in the hash map
417 * @param cls client-defined argument
418 * @return GNUNET_YES if we should continue to
422 typedef int (*GNUNET_CONTAINER_HashMapIterator) (const GNUNET_HashCode * key,
423 void *value, void *cls);
427 * Create a multi hash map.
430 * @param len initial size (map will grow as needed)
431 * @return NULL on error
433 struct GNUNET_CONTAINER_MultiHashMap
434 *GNUNET_CONTAINER_multihashmap_create (unsigned int len);
437 * Destroy a hash map. Will not free any values
438 * stored in the hash map!
442 void GNUNET_CONTAINER_multihashmap_destroy (struct
443 GNUNET_CONTAINER_MultiHashMap
447 * Given a key find a value in the
448 * map matching the key.
451 * @param key what to look for
452 * @return NULL if no value was found; note that
453 * this is indistinguishable from values that just
454 * happen to be NULL; use "contains" to test for
455 * key-value pairs with value NULL
457 void *GNUNET_CONTAINER_multihashmap_get (const struct
458 GNUNET_CONTAINER_MultiHashMap *map,
459 const GNUNET_HashCode * key);
462 * Remove the given key-value pair from the map.
463 * Note that if the key-value pair is in the map
464 * multiple times, only one of the pairs will be
468 * @param key key of the key-value pair
469 * @param value value of the key-value pair
470 * @return GNUNET_YES on success, GNUNET_NO if the key-value pair
473 int GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap
474 *map, const GNUNET_HashCode * key,
478 * Remove all entries for the given key from the map.
479 * Note that the values would not be "freed".
482 * @param key identifies values to be removed
483 * @return number of values removed
485 int GNUNET_CONTAINER_multihashmap_remove_all (struct
486 GNUNET_CONTAINER_MultiHashMap
488 const GNUNET_HashCode * key);
491 * Check if the map contains any value under the given
492 * key (including values that are NULL).
495 * @param key the key to test if a value exists for it
496 * @return GNUNET_YES if such a value exists,
499 int GNUNET_CONTAINER_multihashmap_contains (const struct
500 GNUNET_CONTAINER_MultiHashMap
502 const GNUNET_HashCode * key);
505 * Store a key-value pair in the map.
508 * @param key key to use
509 * @param value value to use
510 * @param opt options for put
511 * @return GNUNET_OK on success,
512 * GNUNET_NO if a value was replaced (with REPLACE)
513 * GNUNET_SYSERR if UNIQUE_ONLY was the option and the
514 * value already exists
516 int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap
517 *map, const GNUNET_HashCode * key,
520 GNUNET_CONTAINER_MultiHashMapOption
524 * Get the number of key-value pairs in the map.
527 * @return the number of key value pairs
529 unsigned int GNUNET_CONTAINER_multihashmap_size (const struct
530 GNUNET_CONTAINER_MultiHashMap
535 * Iterate over all entries in the map.
538 * @param iterator function to call on each entry
539 * @param cls extra argument to it
540 * @return the number of key value pairs processed,
541 * GNUNET_SYSERR if it aborted iteration
543 int GNUNET_CONTAINER_multihashmap_iterate (const struct
544 GNUNET_CONTAINER_MultiHashMap *map,
545 GNUNET_CONTAINER_HashMapIterator
546 iterator, void *cls);
549 * Iterate over all entries in the map
550 * that match a particular key.
553 * @param key key that the entries must correspond to
554 * @param iterator function to call on each entry
555 * @param cls extra argument to it
556 * @return the number of key value pairs processed,
557 * GNUNET_SYSERR if it aborted iteration
559 int GNUNET_CONTAINER_multihashmap_get_multiple (const struct
560 GNUNET_CONTAINER_MultiHashMap
562 const GNUNET_HashCode * key,
563 GNUNET_CONTAINER_HashMapIterator
564 iterator, void *cls);
566 * Returns the stored value of a random non-null entry
567 * in the hash table. Returns only the first value, does
568 * not go inside bucket linked list (yet). Runs with a
569 * worst case time of N, so it's not efficient in any way
572 void *GNUNET_CONTAINER_multihashmap_get_random (const struct
573 GNUNET_CONTAINER_MultiHashMap
579 /* ******************** doubly-linked list *************** */
582 * Insert an element into a DLL. Assumes
583 * that head, tail and element are structs
584 * with prev and next fields.
586 #define GNUNET_CONTAINER_DLL_insert(head,tail,element) \
587 (element)->next = (head); \
588 (element)->prev = NULL; \
589 if ((tail) == NULL) \
592 (head)->prev = element; \
596 * Insert an element into a DLL after the given other
597 * element. Insert at the head if the other
600 #define GNUNET_CONTAINER_DLL_insert_after(head,tail,other,element) \
601 (element)->prev = (other); \
604 (element)->next = (head); \
605 (head) = (element); \
609 (element)->next = (other)->next; \
610 (other)->next = (element); \
612 if (NULL == (element)->next) \
613 (tail) = (element); \
615 (element)->next->prev = (element);
621 * Remove an element from a DLL. Assumes
622 * that head, tail and element are structs
623 * with prev and next fields.
625 #define GNUNET_CONTAINER_DLL_remove(head,tail,element) \
626 if ((element)->prev == NULL) \
627 (head) = (element)->next; \
629 (element)->prev->next = (element)->next; \
630 if ((element)->next == NULL) \
631 (tail) = (element)->prev; \
633 (element)->next->prev = (element)->prev;
637 /* ******************** Heap *************** */
641 * Cost by which elements in a heap can be ordered.
643 typedef unsigned int GNUNET_CONTAINER_HeapCost;
646 * Heap type, either max or min. Hopefully makes the
647 * implementation more useful.
649 enum GNUNET_CONTAINER_HeapOrder
652 * Heap with the maximum cost at the root.
654 GNUNET_CONTAINER_HEAP_ORDER_MAX,
657 * Heap with the minimum cost at the root.
659 GNUNET_CONTAINER_HEAP_ORDER_MIN
665 struct GNUNET_CONTAINER_Heap;
670 * @param type should the minimum or the maximum element be the root
671 * @return NULL on error, otherwise a fresh heap
673 struct GNUNET_CONTAINER_Heap *GNUNET_CONTAINER_heap_create (enum
674 GNUNET_CONTAINER_HeapOrder
680 * @param h heap to free.
682 void GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *h);
685 * Function called on elements of a heap.
688 * @param element obj stored in heap
689 * @param cost cost of the element
690 * @return GNUNET_YES if we should continue to iterate,
693 typedef int (*GNUNET_CONTAINER_HeapIterator) (void *cls,
695 GNUNET_CONTAINER_HeapCost cost);
697 * Iterate over all entries in the map.
699 * @param heap the heap
700 * @param iterator function to call on each entry
701 * @param iterator_cls closure for iterator
702 * @return number of items handled
703 * GNUNET_SYSERR if iteration was aborted by iterator
705 int GNUNET_CONTAINER_heap_iterate (struct GNUNET_CONTAINER_Heap *heap,
706 GNUNET_CONTAINER_HeapIterator iterator,
711 * Inserts a new item into the heap, item is always neighbor now.
712 * @param heap the heap
715 GNUNET_CONTAINER_heap_insert (struct GNUNET_CONTAINER_Heap *heap,
716 void *element, GNUNET_CONTAINER_HeapCost cost);
719 * Removes root of the tree, is remove max if a max heap and remove min
720 * if a min heap, returns the data stored at the node.
722 * @param heap the heap
723 * @return NULL if the heap is empty
725 void *GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
728 * Returns element stored at root of tree, doesn't effect anything
730 * @param heap the heap
731 * @return NULL if the heap is empty
733 void *GNUNET_CONTAINER_heap_peek (struct GNUNET_CONTAINER_Heap *heap);
736 * Removes any node from the tree based on the neighbor given, does
737 * not traverse the tree (backpointers) but may take more time due to
738 * percolation of nodes.
739 * @param heap the heap
741 void *GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_Heap *heap,
745 * Updates the cost of any node in the tree
747 * @param heap the heap
748 * @param element the element for which the cost is updated
749 * @param new_cost new cost for the element
753 GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap,
755 GNUNET_CONTAINER_HeapCost new_cost);
758 * Random walk of the tree, returns the data stored at the next random node
759 * in the walk. Calls callee with the data, or NULL if the tree is empty
760 * or some other problem crops up.
762 * @param heap the heap
763 * @return the next element from the random walk
765 void *GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap
769 * Returns the current size of the heap
771 * @param heap the heap to get the size of
772 * @return number of elements in the heap
775 GNUNET_CONTAINER_heap_get_size (struct GNUNET_CONTAINER_Heap *heap);
778 /* ******************** Vector *************** */
783 struct GNUNET_CONTAINER_Vector;
786 * A debug function that traverses the linked list and prints the
787 * sizes of the segments.
789 void GNUNET_CONTAINER_vector_dump(struct GNUNET_CONTAINER_Vector *v);
792 * Allocate a new vector structure with a single empty data segment.
794 struct GNUNET_CONTAINER_Vector * GNUNET_CONTAINER_vector_create(unsigned int vss);
797 * Free vector structure including its data segments, but _not_ including the
798 * stored void pointers. It is the user's responsibility to empty the vector
799 * when necessary to avoid memory leakage.
801 void GNUNET_CONTAINER_vector_destroy(struct GNUNET_CONTAINER_Vector *v);
804 * Return the size of the vector.
806 size_t GNUNET_CONTAINER_vector_size(struct GNUNET_CONTAINER_Vector *v);
809 * Insert a new element in the vector at given index. The return value is
810 * OK on success, SYSERR if the index is out of bounds.
812 int GNUNET_CONTAINER_vector_insert_at(struct GNUNET_CONTAINER_Vector *v,
817 * Insert a new element at the end of the vector.
819 void GNUNET_CONTAINER_vector_insert_last(struct GNUNET_CONTAINER_Vector *v, void *object);
822 * Return the element at given index in the vector or NULL if the index is out
823 * of bounds. The iterator is set to point to the returned element.
825 void * GNUNET_CONTAINER_vector_get_at(struct GNUNET_CONTAINER_Vector *v,
829 * Return the first element in the vector, whose index is 0, or NULL if the
830 * vector is empty. The iterator of the vector is set to point to the first
833 void * GNUNET_CONTAINER_vector_get_first(struct GNUNET_CONTAINER_Vector *v);
836 * Return the last element in the vector or NULL if the vector is
837 * empty. The iterator of the vector is set to the last element.
839 void * GNUNET_CONTAINER_vector_get_last(struct GNUNET_CONTAINER_Vector *v);
842 * Return the next element in the vector, as called after vector_get_at() or
843 * vector_get_first(). The return value is NULL if there are no more elements
844 * in the vector or if the iterator has not been set.
846 void * GNUNET_CONTAINER_vector_get_next(struct GNUNET_CONTAINER_Vector *v);
849 * Return the previous element in the vector, as called after vector_get_at()
850 * or vector_get_last(). The return value is NULL if there are no more
851 * elements in the vector or if the iterator has not been set.
853 void * GNUNET_CONTAINER_vector_get_previous(struct GNUNET_CONTAINER_Vector * v);
856 * Delete and return the element at given index. NULL is returned if index is
859 void * GNUNET_CONTAINER_vector_remove_at(struct GNUNET_CONTAINER_Vector *v,
863 * Delete and return the last element in the vector, or NULL if the vector
866 void *GNUNET_CONTAINER_vector_remove_last (struct GNUNET_CONTAINER_Vector *v);
869 * Delete and return given object from the vector, or return NULL if the object
872 void * GNUNET_CONTAINER_vector_remove_object(struct GNUNET_CONTAINER_Vector *v, void *object);
875 * Set the given index in the vector. The old value of the index is
876 * returned, or NULL if the index is out of bounds.
878 void *GNUNET_CONTAINER_vector_set_at (struct GNUNET_CONTAINER_Vector *v,
883 * Set the index occupied by the given object to point to the new object.
884 * The old object is returned, or NULL if it's not found.
886 void *GNUNET_CONTAINER_vector_set_object(struct GNUNET_CONTAINER_Vector *v,
891 * Swaps the contents of index1 and index2. Return value is OK
892 * on success, SYSERR if either index is out of bounds.
894 int GNUNET_CONTAINER_vector_swap(struct GNUNET_CONTAINER_Vector *v,
896 unsigned int index2);
899 * Return the index of given element or -1 if the element is not found.
901 unsigned int GNUNET_CONTAINER_vector_index_of(struct GNUNET_CONTAINER_Vector *v,
905 * Return the data stored in the vector as a single dynamically allocated
906 * array of (void *), which must be free(3)d by the user. Use the functions
907 * get_{at,first,last,next,previous} instead, unless you really need to access
908 * everything in the vector as fast as possible.
910 void ** GNUNET_CONTAINER_vector_elements (struct GNUNET_CONTAINER_Vector *v);
913 #if 0 /* keep Emacsens' auto-indent happy */
921 /* ifndef GNUNET_CONTAINER_LIB_H */
923 /* end of gnunet_container_lib.h */