logging tweak
[l2tpns.git] / ll.h
1 #ifndef __LL_H__
2 #define __LL_H__
3
4 typedef struct s_li
5 {
6 void *data;
7 struct s_li *next;
8 } li;
9
10 typedef struct s_ll
11 {
12 li *head;
13 li *end;
14 li *current;
15 } linked_list;
16
17 linked_list *ll_init();
18 void ll_done(linked_list *l);
19 li *ll_push(linked_list *l, void *data);
20 void ll_delete(linked_list *l, void *data);
21 void *ll_pop(linked_list *l);
22 void ll_iterate(linked_list *l, int(*func)(void *));
23 void ll_reset(linked_list *l);
24 void *ll_next(linked_list *l);
25 int ll_size(linked_list *l);
26 int ll_contains(linked_list *l, void *search);
27
28 #endif /* __LL_H__ */