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 e58951b
Showing 1 changed file with 13 additions and 0 deletions.
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
}
}

0 comments on commit e58951b

Please sign in to comment.