1 /*
2  * Definitions for libevt
3  *
4  * Copyright (C) 2011-2021, Joachim Metz <joachim.metz@gmail.com>
5  *
6  * Refer to AUTHORS for acknowledgements.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #if !defined( _LIBEVT_DEFINITIONS_H )
23 #define _LIBEVT_DEFINITIONS_H
24 
25 #include <libevt/types.h>
26 
27 #define LIBEVT_VERSION			20210424
28 
29 /* The version string
30  */
31 #define LIBEVT_VERSION_STRING		"20210424"
32 
33 /* The access flags definitions
34  * bit 1        set to 1 for read access
35  * bit 2        set to 1 for write access
36  * bit 3-8      not used
37  */
38 enum LIBEVT_ACCESS_FLAGS
39 {
40 	LIBEVT_ACCESS_FLAG_READ		= 0x01,
41 /* Reserved: not supported yet */
42 	LIBEVT_ACCESS_FLAG_WRITE	= 0x02
43 };
44 
45 /* The file access macros
46  */
47 #define LIBEVT_OPEN_READ		( LIBEVT_ACCESS_FLAG_READ )
48 /* Reserved: not supported yet */
49 #define LIBEVT_OPEN_WRITE		( LIBEVT_ACCESS_FLAG_WRITE )
50 /* Reserved: not supported yet */
51 #define LIBEVT_OPEN_READ_WRITE		( LIBEVT_ACCESS_FLAG_READ | LIBEVT_ACCESS_FLAG_WRITE )
52 
53 /* The event type definitions
54  */
55 enum LIBEVT_EVENT_TYPES
56 {
57 	LIBEVT_EVENT_TYPE_ERROR		= 0x0001,
58 	LIBEVT_EVENT_TYPE_WARNING	= 0x0002,
59 	LIBEVT_EVENT_TYPE_INFORMATION	= 0x0004,
60 	LIBEVT_EVENT_TYPE_AUDIT_SUCCESS	= 0x0008,
61 	LIBEVT_EVENT_TYPE_AUDIT_FAILURE	= 0x0010,
62 };
63 
64 /* The event file flags
65  */
66 enum LIBEVT_FILE_FLAGS
67 {
68 	LIBEVT_FILE_FLAG_IS_DIRTY	= 0x00000001UL,
69 	LIBEVT_FILE_FLAG_HAS_WRAPPED	= 0x00000002UL,
70 	LIBEVT_FILE_FLAG_IS_FULL	= 0x00000004UL,
71 	LIBEVT_FILE_FLAG_ARCHIVE	= 0x00000008UL
72 };
73 
74 #endif /* !defined( _LIBEVT_DEFINITIONS_H ) */
75 
76