pub enum AuditMessage {
GetStatus(Option<StatusMessage>),
SetStatus(StatusMessage),
AddRule(RuleMessage),
DelRule(RuleMessage),
ListRules(Option<RuleMessage>),
Event((u16, String)),
Other((u16, String)),
}
Variants
GetStatus(Option<StatusMessage>)
SetStatus(StatusMessage)
AddRule(RuleMessage)
DelRule(RuleMessage)
ListRules(Option<RuleMessage>)
Event((u16, String))
Event message (message types 1300 through 1399). This includes the following message types
(this list is non-exhaustive, and not really kept up to date): AUDIT_SYSCALL
,
AUDIT_PATH
, AUDIT_IPC
, AUDIT_SOCKETCALL
, AUDIT_CONFIG_CHANGE
, AUDIT_SOCKADDR
,
AUDIT_CWD
, AUDIT_EXECVE
, AUDIT_IPC_SET_PERM
, AUDIT_MQ_OPEN
, AUDIT_MQ_SENDRECV
,
AUDIT_MQ_NOTIFY
, AUDIT_MQ_GETSETATTR
, AUDIT_KERNEL_OTHER
, AUDIT_FD_PAIR
,
AUDIT_OBJ_PID
, AUDIT_TTY
, AUDIT_EOE
, AUDIT_BPRM_FCAPS
, AUDIT_CAPSET
,
AUDIT_MMAP
, AUDIT_NETFILTER_PKT
, AUDIT_NETFILTER_CFG
, AUDIT_SECCOMP
,
AUDIT_PROCTITLE
, AUDIT_FEATURE_CHANGE
, AUDIT_REPLACE
, AUDIT_KERN_MODULE
,
AUDIT_FANOTIFY
.
The first element of the tuple is the message type, and the second is the event data.
Other((u16, String))
All the other events are parsed as such as they can be parsed also.
Implementations
sourceimpl AuditMessage
impl AuditMessage
pub fn is_event(&self) -> bool
pub fn is_get_status(&self) -> bool
pub fn is_set_status(&self) -> bool
pub fn is_add_rule(&self) -> bool
pub fn is_del_rule(&self) -> bool
pub fn is_list_rules(&self) -> bool
pub fn message_type(&self) -> u16
Trait Implementations
sourceimpl Clone for AuditMessage
impl Clone for AuditMessage
sourcefn clone(&self) -> AuditMessage
fn clone(&self) -> AuditMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AuditMessage
impl Debug for AuditMessage
sourceimpl Emitable for AuditMessage
impl Emitable for AuditMessage
sourceimpl From<AuditMessage> for NetlinkPayload<AuditMessage>
impl From<AuditMessage> for NetlinkPayload<AuditMessage>
sourcefn from(message: AuditMessage) -> Self
fn from(message: AuditMessage) -> Self
Converts to this type from the input type.
sourceimpl NetlinkDeserializable for AuditMessage
impl NetlinkDeserializable for AuditMessage
type Error = DecodeError
sourcefn deserialize(
header: &NetlinkHeader,
payload: &[u8]
) -> Result<Self, Self::Error>
fn deserialize(
header: &NetlinkHeader,
payload: &[u8]
) -> Result<Self, Self::Error>
Deserialize the given buffer into Self
.
sourceimpl NetlinkSerializable for AuditMessage
impl NetlinkSerializable for AuditMessage
fn message_type(&self) -> u16
sourcefn buffer_len(&self) -> usize
fn buffer_len(&self) -> usize
Return the length of the serialized data. Read more
sourcefn serialize(&self, buffer: &mut [u8])
fn serialize(&self, buffer: &mut [u8])
Serialize this types and write the serialized data into the given buffer.
buffer
’s length is exactly InnerMessage::buffer_len()
.
It means that if InnerMessage::buffer_len()
is buggy and does not return the appropriate length,
bad things can happen: Read more
sourceimpl<'a, T: AsRef<[u8]> + ?Sized> ParseableParametrized<AuditBuffer<&'a T>, u16> for AuditMessage
impl<'a, T: AsRef<[u8]> + ?Sized> ParseableParametrized<AuditBuffer<&'a T>, u16> for AuditMessage
sourcefn parse_with_param(
buf: &AuditBuffer<&'a T>,
message_type: u16
) -> Result<Self, DecodeError>
fn parse_with_param(
buf: &AuditBuffer<&'a T>,
message_type: u16
) -> Result<Self, DecodeError>
Deserialize the current type.
sourceimpl PartialEq<AuditMessage> for AuditMessage
impl PartialEq<AuditMessage> for AuditMessage
sourcefn eq(&self, other: &AuditMessage) -> bool
fn eq(&self, other: &AuditMessage) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &AuditMessage) -> bool
fn ne(&self, other: &AuditMessage) -> bool
This method tests for !=
.
impl Eq for AuditMessage
impl StructuralEq for AuditMessage
impl StructuralPartialEq for AuditMessage
Auto Trait Implementations
impl RefUnwindSafe for AuditMessage
impl Send for AuditMessage
impl Sync for AuditMessage
impl Unpin for AuditMessage
impl UnwindSafe for AuditMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more