bytecodealliance / rustix

Safe Rust bindings to POSIX-ish APIs
Other
1.4k stars 139 forks source link

Add support for Netlink sockets #1079

Open ids1024 opened 4 weeks ago

ids1024 commented 4 weeks ago

I noticed that msg_namelen is being set to the size of SocketAddr*, which seems to be incorrect. So I also added a commit changing that for the existing socket address types.

I wonder if some of the code here could be less redundant, but that isn't changed here.

ids1024 commented 4 weeks ago

Ah, I guess this (and making the socket code less redundant) is covered in https://github.com/bytecodealliance/rustix/pull/1004. I didn't really expect anyone else would have tried adding Netlink support recently.

Though I guess the size_of change is still needed.