Imported Upstream version 2.4.3
[platform/upstream/audit.git] / audisp / queue.h
1 /* queue.h --
2  * Copyright 2007 Red Hat Inc., Durham, North Carolina.
3  * All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  * Authors:
20  *      Steve Grubb <sgrubb@redhat.com>
21  */
22
23 #ifndef QUEUE_HEADER
24 #define QUEUE_HEADER
25
26 #include "libaudit.h"
27 #include "audispd-config.h"
28
29 typedef struct event
30 {
31         struct audit_dispatcher_header hdr;
32         char data[MAX_AUDIT_MESSAGE_LENGTH];
33 } event_t;
34
35
36 void reset_suspended(void);
37 int init_queue(unsigned int size);
38 void enqueue(event_t *e, struct daemon_conf *config);
39 event_t *dequeue(void);
40 void nudge_queue(void);
41 void increase_queue_depth(unsigned int size);
42 void destroy_queue(void);
43
44 #endif
45