polachok / pnetlink

netlink library for rust
43 stars 13 forks source link

Linux Only? #34

Closed LuoZijun closed 6 years ago

bkchr commented 6 years ago

What OS do you need?

LuoZijun commented 6 years ago

humm, bsd-like (macos, freebsd, netbsd) and windows ?

i think this project very like borkmann/iproute2 .

i'm very interesting on that.

and i havn't see an license.

LuoZijun commented 6 years ago

the example/ip_link.rs i has impl already with libpnet , wait to merge.

https://github.com/LuoZijun/libpnet/blob/patch-1/pnet_datalink/src/lib.rs#L234

https://github.com/LuoZijun/libpnet/blob/patch-1/examples/list_interfaces.rs

bkchr commented 6 years ago

Could you provide patches for BSD systems? I don't know if they support netlink. But I don't think that windows supports that.

LuoZijun commented 6 years ago

of course, next week.

polachok commented 6 years ago

Netlink sockets are not supported on BSDs as far as I know.

LuoZijun commented 6 years ago

@polachok you are right.

@bkchr the pnet project just impl ip addr.

i just has read this project code, now i know this project use linux netlink api to get ip address/ip neighbor/ip route info.

point is use netlink api.

sorry for wasting your time.