Skip to content

Commit e58951b

Browse files
committed
Add Handle::set_status method
1 parent 705100d commit e58951b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/handle.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,17 @@ impl Handle {
196196
)),
197197
}
198198
}
199+
200+
/// Set the audit status
201+
///
202+
/// You must have properly set the mask field according to which fields
203+
/// must be set.
204+
pub async fn set_status(
205+
&mut self,
206+
status: StatusMessage,
207+
) -> Result<(), Error> {
208+
let mut req = NetlinkMessage::from(AuditMessage::SetStatus(status));
209+
req.header.flags = NLM_F_REQUEST | NLM_F_ACK;
210+
self.acked_request(req).await
211+
}
199212
}

0 commit comments

Comments
 (0)