Skip to content

Commit

Permalink
Add Handle::set_status method
Browse files Browse the repository at this point in the history
  • Loading branch information
vthib committed Jan 10, 2024
1 parent 705100d commit ec6eebc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit ec6eebc

Please sign in to comment.