Imported Upstream version 2.4.3
[platform/upstream/audit.git] / src / ausearch-checkpt.h
1 /*
2  * ausearch-checkpt.h - ausearch checkpointing feature header file 
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18 #ifndef CHECKPT_HEADER
19 #define CHECKPT_HEADER
20
21 #include <sys/types.h>
22 #include "ausearch-llist.h"
23
24 int set_ChkPtFileDetails(const char *fn);
25 int set_ChkPtLastEvent(const event *e);
26 void free_ChkPtMemory(void);
27 void save_ChkPt(const char *fn);
28 int load_ChkPt(const char *fn);
29
30 #define CP_NOMEM        0x0001  /* no memory when creating checkpoint list */
31 #define CP_STATFAILED   0x0002  /* stat() call on last log file failed */
32 #define CP_STATUSIO     0x0004  /* cannot open/read/write checkpoint file */
33 #define CP_STATUSBAD    0x0008  /* malformed status checkpoint entries */
34 #define CP_CORRUPTED    0x0010  /* corrupted times in checkpoint file */
35
36 extern unsigned checkpt_failure;
37
38 extern dev_t    chkpt_input_dev;
39 extern ino_t    chkpt_input_ino;
40 extern event    chkpt_input_levent;
41
42 #endif  /* CHECKPT_HEADER */