+ * Possible ways for how data stored in the linked list
+ * might be allocated.
+ */
+enum GNUNET_CONTAINER_SListDisposition
+{
+ /**
+ * Single-linked list must copy the buffer.
+ */
+ GNUNET_CONTAINER_SLIST_DISPOSITION_TRANSIENT = 0,
+
+ /**
+ * Data is static, no need to copy or free.
+ */
+ GNUNET_CONTAINER_SLIST_DISPOSITION_STATIC = 2,
+
+ /**
+ * Data is dynamic, do not copy but free when done.
+ */
+ GNUNET_CONTAINER_SLIST_DISPOSITION_DYNAMIC = 4
+};
+
+
+
+/**
+ * Handle to a singly linked list
+ */
+struct GNUNET_CONTAINER_SList;
+
+/**
+ * Handle to a singly linked list iterator
+ */
+struct GNUNET_CONTAINER_SList_Iterator
+{
+ /**
+ * Linked list that we are iterating over.
+ */
+ struct GNUNET_CONTAINER_SList *list;
+
+ /**
+ * Last element accessed.
+ */
+ struct GNUNET_CONTAINER_SList_Elem *last;
+
+ /**
+ * Current list element.
+ */
+ struct GNUNET_CONTAINER_SList_Elem *elem;
+};
+
+
+
+/**
+ * Add a new element to the list
+ * @param l list
+ * @param disp memory disposition
+ * @param buf payload buffer
+ * @param len length of the buffer
+ */
+void
+GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
+ enum GNUNET_CONTAINER_SListDisposition disp,
+ const void *buf, size_t len);
+
+
+/**
+ * Add a new element to the end of the list
+ * @param l list
+ * @param disp memory disposition
+ * @param buf payload buffer
+ * @param len length of the buffer
+ */
+void
+GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
+ enum GNUNET_CONTAINER_SListDisposition disp,
+ const void *buf, size_t len);
+
+
+/**
+ * Append a singly linked list to another
+ * @param dst list to append to
+ * @param src source
+ */
+void
+GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
+ struct GNUNET_CONTAINER_SList *src);
+
+
+/**
+ * Create a new singly linked list
+ * @return the new list
+ */
+struct GNUNET_CONTAINER_SList *
+GNUNET_CONTAINER_slist_create (void);
+
+
+/**
+ * Destroy a singly linked list
+ * @param l the list to be destroyed
+ */
+void
+GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
+
+
+/**
+ * Return the beginning of a list