Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,17 @@ impl Handle {
)),
}
}

/// Set the audit status
///
/// You must have properly set the mask field according to which fields
/// must be set.
pub async fn set_status(
&mut self,
status: StatusMessage,
) -> Result<(), Error> {
let mut req = NetlinkMessage::from(AuditMessage::SetStatus(status));
req.header.flags = NLM_F_REQUEST | NLM_F_ACK;
self.acked_request(req).await
}
}