Skip to content

Commit e39e605

Browse files
committed
Add Handle::set_status method
1 parent f76c719 commit e39e605

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
@@ -157,4 +157,14 @@ impl Handle {
157157
)),
158158
}
159159
}
160+
161+
/// Set the audit status
162+
///
163+
/// You must have properly set the mask field according to which fields
164+
/// must be set.
165+
pub async fn set_status(&mut self, status: StatusMessage) -> Result<(), Error> {
166+
let mut req = NetlinkMessage::from(AuditMessage::SetStatus(status));
167+
req.header.flags = NLM_F_REQUEST | NLM_F_ACK;
168+
self.acked_request(req).await
169+
}
160170
}

0 commit comments

Comments
 (0)