From ec6eebc12ecbfbc326fa6b2ed5fac4995ce82dd9 Mon Sep 17 00:00:00 2001 From: Vincent Thiberville Date: Wed, 19 Jul 2023 18:29:59 +0200 Subject: [PATCH] Add Handle::set_status method --- src/handle.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/handle.rs b/src/handle.rs index 810cf62..4fd13be 100644 --- a/src/handle.rs +++ b/src/handle.rs @@ -196,4 +196,14 @@ 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 + } }