Crates.io | rsmnl |
lib.rs | rsmnl |
version | 0.1.0 |
source | src |
created_at | 2021-08-31 20:10:31.931056 |
updated_at | 2021-08-31 20:10:31.931056 |
description | A rust netlink library imitating libmnl |
homepage | |
repository | https://github.com/chamaken/rsmnl-core |
max_upload_size | |
id | 445280 |
size | 592,773 |
A pure Rust lib for netlink, imitating libmnl. Tends to be a successor of crslmnl, and (I think) more rusty.
see examples, and also rsmnl-linux's.
nlmsghdr is represented in two ways, by its role
msgvec::Header for write (put attr). you can set nlmsg_ member but can not nlmsg_len, which is handled by put functions.
nlmsg::Msghdr for read (get attr). you can not handle mutable one, only getting it from callback.
You may not specify msgvec::Header type directly, I think.
attr validation is done on getting value, not in parsing. Since get fn (value(), value_ref()..). is imitate original get_..._safe().
No batch specific struct. use msgvec::MsgVec, similar to original batch struct, to construct nlmsg.
To put attr, use MesVec.put(), not Nlmsg.put()