Skip to content

Commit ec6eebc

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

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/handle.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,14 @@ 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(&mut self, status: StatusMessage) -> Result<(), Error> {
205+
let mut req = NetlinkMessage::from(AuditMessage::SetStatus(status));
206+
req.header.flags = NLM_F_REQUEST | NLM_F_ACK;
207+
self.acked_request(req).await
208+
}
199209
}

0 commit comments

Comments
 (0)