| 1 | /* |
| 2 | * AIDE (Advanced Intrusion Detection Environment) |
| 3 | * |
| 4 | * Copyright (C) 1999-2002, 2010 Rami Lehti, Pablo Virolainen, |
| 5 | * Hannes von Haugwitz |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of the |
| 10 | * License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | */ |
| 21 | |
| 22 | #ifndef _LIST_H_INCLUDED |
| 23 | #define _LIST_H_INCLUDED |
| 24 | |
| 25 | typedef struct list { |
| 26 | struct list* next; |
| 27 | struct list* prev; |
| 28 | |
| 29 | struct list_header* header; |
| 30 | |
| 31 | /* |
| 32 | struct list* head; |
| 33 | struct list* tail; |
| 34 | */ |
| 35 | |
| 36 | void* data; |
| 37 | } list; |
| 38 | |
| 39 | typedef struct list_header{ |
| 40 | |
| 41 | struct list* head; |
| 42 | struct list* tail; |
| 43 | |
| 44 | }list_header; |
| 45 | |
| 46 | list* list_sorted_insert(list* listp, void* data, int (*compare) (const void*, const void*)); |
| 47 | |
| 48 | list* list_append(list* listp,void*data); |
| 49 | |
| 50 | /* |
| 51 | |
| 52 | list* new_list_item(void*); |
| 53 | |
| 54 | */ |
| 55 | |
| 56 | list* list_delete_item(list* item); |
| 57 | |
| 58 | #endif /* _DB_LIST_H_INCLUDED */ |
| 59 | |
| 60 |