little-dude / netlink

netlink libraries for rust
Other
329 stars 89 forks source link

message with type NLMSG_DONE can also have payload #261

Open qingyunha opened 2 years ago

qingyunha commented 2 years ago
[76, 0, 0, 0, 3, 0, 0, 0, 119, 180, 25, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 119, 180, 25, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 128, 1, 0, 0, 0, 222, 247, 17, 88, 241, 109, 22, 0, 35, 170, 18, 0, 35, 170, 18, 0, 0, 0, 0, 0, 17, 0, 0, 0, 28, 170, 18, 0, 28, 170, 18, 0]                                     
NetlinkMessage { header: NetlinkHeader { length: 76, message_type: 3, flags: 0, sequence_number: 1684599, port_number: 0 }, payload: Done } 

The above is an example of NETLINK_CONNECTOR group cn_proc message. It has a payload but ignores parse.

https://github.com/little-dude/netlink/blob/f21ddb223b311e2a6ed23a1b55de8732c3d569a5/netlink-packet-core/src/message.rs#L112

stbuehler commented 2 years ago

Duplicate of #160 and #230 (discussion mostly in #230).