Closed pd0wm closed 8 months ago
Is there any reason the raw flags value is not exposed to the user? There might be more drivers that are using non-standard flags to communicate a certain state.
We're trying to provide a cross platform API, but for Windows RecvFlags
is completely fake.
Looks like the build is failing due to missing fields for some targets. Shall I limit the new functions to target_os = "linux"
?
Looks like the build is failing due to missing fields for some targets. Shall I limit the new functions to
target_os = "linux"
?
It's it's Linux only then yes. But it will require the all
feature as well.
Should be supported on Android as well. Is dc71380335fde833a3b8d66616e806c17a060891 what you mean by requiring both the all
feature and gating on the os?
I think MSG_CONFIRM
is normally used as a flag for calling sendmsg
, and not used on received messages. So not sure if I can trigger this with an end-to-end test without using SocketCAN. SocketCAN cannot be easily tested inside a docker container, as the host needs to create a virtual SocketCAN device first.
Should I add the flags to the impl std::fmt::Debug
as well? https://github.com/rust-lang/socket2/blob/master/src/sys/unix.rs#L579-L589
I can add a test that the value is false under normal circumstances here: https://github.com/rust-lang/socket2/blob/master/tests/socket.rs#L685-L686
Should I add the flags to the impl
std::fmt::Debug
as well? https://github.com/rust-lang/socket2/blob/master/src/sys/unix.rs#L579-L589I can add a test that the value is false under normal circumstances here: https://github.com/rust-lang/socket2/blob/master/tests/socket.rs#L685-L686
Yes to both. After that we can merge.
Should I add the flags to the impl
std::fmt::Debug
as well? https://github.com/rust-lang/socket2/blob/master/src/sys/unix.rs#L579-L589 I can add a test that the value is false under normal circumstances here: https://github.com/rust-lang/socket2/blob/master/tests/socket.rs#L685-L686Yes to both. After that we can merge.
Already done :)
Thanks @pd0wm
Thanks for your quick feedback!
This is useful when reading from SocketCAN sockets. The MSG_CONFIRM flag is used to indicate a successful transmission of a CAN frame.
Reference: https://www.kernel.org/doc/html/next/networking/can.html#raw-socket-option-can-raw-join-filters
Is there any reason the raw flags value is not exposed to the user? There might be more drivers that are using non-standard flags to communicate a certain state.