2 * ausearch-lol.h - linked list of linked lists library header
3 * Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
6 * This software may be freely redistributed and/or modified under the
7 * terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2, or (at your option) any
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; see the file COPYING. If not, write to the
18 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Steve Grubb <sgrubb@redhat.com>
24 #ifndef AUSEARCH_LOL_HEADER
25 #define AUSEARCH_LOL_HEADER
28 #include "ausearch-llist.h"
30 typedef enum { L_EMPTY, L_BUILDING, L_COMPLETE } lol_t;
32 /* This is the node of the linked list. message & item are the only elements
33 * at this time. Any data elements that are per item goes here. */
34 typedef struct _lolnode{
35 llist *l; // The linked list
36 int status; // 0 = empty, 1 in use, 2 complete
39 /* This is the linked list head. Only data elements that are 1 per
43 int maxi; // Largest index used
44 int limit; // Number of nodes in the array
47 void lol_create(lol *lo);
48 void lol_clear(lol *lo);
49 int lol_add_record(lol *lo, char *buff);
50 void terminate_all_events(lol *lo);
51 llist* get_ready_event(lol *lo);