crslmnl

A Rust wrapper for libmnl.

sample

see examples

requires

links

stackoverflow

thanks to Shepmaster

comparison

| original | crslmnl | remarks | | ------------------------------------- | ----------------------------- | ----------------------------- | | mnlattrgettype | Attr.atype | | | mnlattrgetlen | Attr.len | | | mnlattrgetpayloadlen | Attr.payloadlen | | | mnlattrgetpayload | Attr.payload | | | mnlattrgetpayload | Attr.payloadmut | | | mnlattrok | Attr.ok | | | mnlattrnext | Attr.next | | | mnlattrtypevalid | Attr.typevalid | | | mnlattrvalidate | Attr.validate | | | mnlattrvalidate2 | Attr.validate2 | | | mnlattrparse | Attr.parse | | | (add) | Attr.clparse | | | mnlattrparsenested | Attr.parsenested | | | (add) | Attr.clparsenested | | | mnlattrparsepayload | parseattrs | | | (add) | clparseattrs | | | mnlattrgetu8 | Attr.u8 | | | mnlattrgetu16 | Attr.u16 | | | mnlattrgetu32 | Attr.u32 | | | mnlattrgetu64 | Attr.u64 | | | mnlattrgetstr | Attr.str | | | (add) | Attr.string | | | mnlattrput | Nlmsg.putraw | | | mnlattrputu8 | Nlmsg.putu8raw | | | mnlattrputu16 | Nlmsg.putu16raw | | | mnlattrputu32 | Nlmsg.putu32raw | | | mnlattrputu64 | Nlmsg.putu64raw | | | mnlattrputstr | Nlmsg.putstrraw | | | mnlattrputstrz | Nlmsg.putstrzraw | | | mnlattrputcheck | Nlmsg.put | | | mnlattrputu8check | Nlmsg.putu8 | | | mnlattrputu16check | Nlmsg.putu16 | | | mnlattrputu32check | Nlmsg.putu32 | | | mnlattrputu64check | Nlmsg.putu64 | | | mnlattrputstrcheck | Nlmsg.putstr | | | mnlattrputstrzcheck | Nlmsg.putstrz | | | mnlattrneststart | Nlmsg.neststartraw | | | mnlattrneststartcheck | Nlmsg.neststart | | | mnlattrnestend | Nlmsg.nestend | | | mnlattrnestcancel | Nlmsg.nestcancel | | | ------------------------------------- | ----------------------------- | ----------------------------- | | mnlnlmsgsize | Nlmsg::size | | | mnlnlmsggetpayloadlen | Nlmsg.payloadlen | | | mnlnlmsgputheader | Nlmsg::new | | | mnlnlmsgputheader | Nlmsg.putheaderraw | | | (add) | Nlmsg.putheadercheck | | | mnlnlmsgputextraheader | Nlmsg.putextraheaderraw | | | (add) | Nlmsg.putsizedheader | | | (add) | Nlmsg.putsizedheaderraw | | | (add) | Nlmsg.putsizedheader | | | mnlnlmsggetpaylod | Nlmsg.payload | | | mnlnlmsggetpaylod | Nlmsg.payloadmut | | | mnlnlmsggetpayloadoffset | Nlmsg.payloadoffset | | | mnlnlmsggetpayloadoffset | Nlmsg.payloadoffsetmut | | | mnlnlmsgok | Nlmsg.ok | | | mnlnlmsgnext | Nlmsg.next | | | mnlnlmsggetpayloadtail | Nlmsg.payloadtail | | | mnlnlmsggetpayloadtail | Nlmsg.payloadtailmut | | | mnlnlmsgseqok | Nlmsg.seqok | | | mnlnlmsgportidok | Nlmsg.portidok | | | mnlnlmsgfprintf | Nlmsg.fprintf | | | mnlnlmsgbatchstart | NlmsgBatch::start | | | mnlnlmsgbatchstop | NlmsgBatch.drop | | | mnlnlmsgbatchnext | NlmsgBatch.next | | | mnlnlmsgbatchreset | NlmsgBatch.reset | | | mnlnlmsgbatchsize | NlmsgBatch.size | | | mnlnlmsgbatchhead | NlmsgBatch.head | | | mnlnlmsgbatchcurrent | NlmsgBatch.current | | | (add) | NlmsgBatch.currentnlmsg | | | mnlnlmsgbatchisempty | NlmsgBatch.isempty | | | ------------------------------------- | ----------------------------- | ----------------------------- | | mnlcbrun | cbrun | | | mnlcbrun2 | cbrun2 | | | (add) | clrun | closure instead of callback | | (add) | clrun2 | closure instead of callback | | ------------------------------------- | ----------------------------- | ----------------------------- | | mnlsocketgetfd | Socket.asrawfd | | | mnlsocketgetportid | Socket.portid | | | mnlsocketopen | Socket::open | | | mnlsocketopen2 | Socket::open2 | | | mnlsocketfdopen | Socket::fdopen | | | mnlsocketbind | Socket.bind | | | mnlsocketsendto | Socket.sendto | | | (add) | Socket.sendnlmsg | | | (add) | Socket.sendbatch | | | mnlsocketrecvfrom | Socket.recvfrom | | | mnlsocketclose | Socket.close | | | mnlsocketsetsockopt | Socket.setsockopt | | | mnlsocketgetsockopt | Socket.getsockopt | | | ------------------------------------- | ----------------------------- | ----------------------------- | | mnlattrforeach | Nlmsg.attrs | | | mnlattrforeachnested | Attr.nesteds | | | ------------------------------------- | ----------------------------- | ----------------------------- | | (add) | NlmsgIterator | | | (add) | Iterator for NlmsgBatch | |