2#ifndef LOGGING_TYPES_H_
3#define LOGGING_TYPES_H_
37 LOG_REASON_UNKNOWN = 0,
53 EVENT_TYPE_UNKNOWN = 0,
55 EVENT_TYPE_UNIX_STREAM_CONNECT,
59 EVENT_TYPE_KERNEL_MODULE_REQUEST,
60 EVENT_TYPE_KERNEL_READ_FILE,
61 EVENT_TYPE_KERNEL_LOAD_DATA,
62 EVENT_TYPE_PTRACE_ACCESS_CHECK,
63 EVENT_TYPE_BPF_WRITE_USER,
64 EVENT_TYPE_TASK_ALLOC,
65 EVENT_TYPE_FILE_ACCESS,
72 INODE_ACTION_UNKNOWN = 0,
#define COMM_LEN
the length of task comm string
Definition constants.h:29
#define MAX_STR_LEN
maximum length of strings used for logging messages
Definition constants.h:23
#define MODULE_NAME_LEN
Copy of MODULE_PARAM_PREFIX_LEN in the kernel.
Definition constants.h:13
EventType
The link between a program's log structure and the logging system.
Definition logging_types.h:52
LogReason
Standard reasons as to why a log is being output.
Definition logging_types.h:36
InodeAction
Identifies a type of action taken on an inode.
Definition logging_types.h:71
LogLevel
Standard log levels indicating the severity of the message.
Definition logging_types.h:21
Log for a eBPF map access via a bpf() syscall.
Definition logging_types.h:124
struct log_hdr header
standard log header
Definition logging_types.h:126
unsigned char name[MAX_STR_LEN]
the name of the map
Definition logging_types.h:128
unsigned int map_id
id number of eBPF map being accessed
Definition logging_types.h:130
Generic log with a message field.
Definition logging_types.h:108
struct log_hdr header
standard log header
Definition logging_types.h:110
unsigned char msg[MAX_STR_LEN]
a 128 character message
Definition logging_types.h:112
Log for various events that access a dentry or and inode(file_open, inode_permission)
Definition logging_types.h:186
struct log_hdr header
standard log header
Definition logging_types.h:188
unsigned int action
the action being taken on the inode, alias for InodeAction
Definition logging_types.h:190
unsigned char name[MAX_STR_LEN]
the first 128 characters of file name, if known
Definition logging_types.h:192
Log for a kernel_load_data() LSM hook event.
Definition logging_types.h:165
unsigned int id
the type of data being loaded into the kernel
Definition logging_types.h:170
struct log_hdr header
standard log header
Definition logging_types.h:167
Log for a kernel_module_request() LSM hook event.
Definition logging_types.h:146
unsigned char kmod_name[MODULE_NAME_LEN]
the name of the kernel module being requested to load
Definition logging_types.h:150
struct log_hdr header
standard log header
Definition logging_types.h:148
Log for a kernel_read_file() LSM hook event.
Definition logging_types.h:154
struct log_hdr header
standard log header
Definition logging_types.h:156
unsigned int id
the type of data being loaded into the kernel
Definition logging_types.h:159
unsigned char filename[MAX_STR_LEN]
the name of the file being loaded
Definition logging_types.h:161
Header attached to every log message.
Definition logging_types.h:88
unsigned long pid
process id that is triggering the hook
Definition logging_types.h:96
unsigned char reason
alias for LogReason
Definition logging_types.h:92
unsigned char level
alias for LogLevel
Definition logging_types.h:90
unsigned char comm[COMM_LEN]
same as /proc/{pid}/comm
Definition logging_types.h:104
unsigned short type
alias for EventType
Definition logging_types.h:94
unsigned long tid
thread id that is triggering the hook
Definition logging_types.h:98
unsigned long pol_id
policy id for this object
Definition logging_types.h:102
unsigned long uid
effective user id of the process
Definition logging_types.h:100
Log for a ptrace_access_check() LSM hook event.
Definition logging_types.h:174
unsigned char target_comm[COMM_LEN]
same as /proc/{pid}/comm for traced process
Definition logging_types.h:182
struct log_hdr header
standard log header
Definition logging_types.h:176
int target_pid
The process ID to be traced.
Definition logging_types.h:178
unsigned int mode
The ptrace mode used.
Definition logging_types.h:180
Log a sb_umount() syscall.
Definition logging_types.h:116
struct log_hdr header
standard log header
Definition logging_types.h:118
unsigned long target_dev
device number of the superblock being unmounted
Definition logging_types.h:120
Log a task_kill() LSM hook event.
Definition logging_types.h:134
int target_pid
process id of the PID receiving the signal
Definition logging_types.h:140
int signum
id of the signal being sent
Definition logging_types.h:142
unsigned char target_comm[COMM_LEN]
same as /proc/{pid}/comm
Definition logging_types.h:138
struct log_hdr header
standard log header
Definition logging_types.h:136