Imported Upstream version 2.4.3
[platform/upstream/audit.git] / src / auditd-event.h
1 /* auditd-event.h -- 
2  * Copyright 2004, 2005, 2008 Red Hat Inc., Durham, North Carolina.
3  * All Rights Reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program 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
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; 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
24 #ifndef AUDITD_EVENT_H
25 #define AUDITD_EVENT_H
26
27 #include "libaudit.h"
28
29 typedef void (*ack_func_type)(void *ack_data, const unsigned char *header, const char *msg);
30
31 struct auditd_reply_list {
32         struct audit_reply reply;
33         struct auditd_reply_list *next;
34         ack_func_type ack_func;
35         void *ack_data;
36         unsigned long sequence_id;
37 };
38
39 #include "auditd-config.h"
40
41 void shutdown_events(void);
42 int init_event(struct daemon_conf *config);
43 void resume_logging(void);
44 void enqueue_event(struct auditd_reply_list *rep);
45 void enqueue_formatted_event(char *msg, ack_func_type ack_func, void *ack_data, uint32_t sequence_id);
46 void *consumer_thread_main(void *arg);
47
48 #endif
49