nix icon indicating copy to clipboard operation
nix copied to clipboard

`sendmmsg` documentation is incorrect

Open kalradivyanshu opened this issue 2 years ago • 3 comments
trafficstars

https://docs.rs/nix/latest/nix/sys/socket/fn.sendmmsg.html is incorrect. The doc says that sendmmsg takes 3 arguments:

Arguments

  • fd: Socket file descriptor
  • data: Struct that implements IntoIterator with SendMmsgData items
  • flags: Optional flags passed directly to the operating system.

But it takes 6? And as far as I can tell SendMmsgData doesn't exist anymore? I would love a working example of how to use sendmmsg.

Thanks!

kalradivyanshu avatar May 02 '23 21:05 kalradivyanshu

sendmmsg is notoriously hard to use, and hard to bind in Rust. Nix has been through a few different versions. @pacak @rtzoeller could you please take a look?

asomers avatar Jun 29 '23 23:06 asomers

Derp. I totally forgot to update the documentation when updating sendmmsg. Now there's also https://github.com/nix-rust/nix/pull/2038 that changes sendmmsg a bit more....

pacak avatar Jun 29 '23 23:06 pacak

Updated the docs in #2038 a bit, at least now it doesn't contradict to the type signature.

pacak avatar Jun 29 '23 23:06 pacak