-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ancillary data over sendmsg
, recvmsg
#313
Comments
@brunowonka I don't really have time to review this at the moment, but if you open a draft pr I can start reviewing the code once I have some time. In general I think that if the API surface isn't too big socket2 should be able to support this. |
Thanks @Thomasdezeeuw, opened #316 to get the conversation started |
I don't have an opinion on the code per-say, but I did want to link some other resources I stumbled across that may be helpful:
As an argument for supporting edit: it looks like |
There also is some incomplete work in the standard library |
If this is useful for anyone, I extracted some of the code from |
Reading and writing PKTINFO would also be of great help for std_embedded_nal, as having the local address is mandatory for that interface, to allow QUIC and CoAP implementations. (Right now, that crate goes through nix, but this crate could offer it in a sufficiently abstract way that even Windows can be supported). |
Should
socket2
supportsendmsg
/recvmsg
including control ancillary data to expose things likeIP_TTL
andIPV6_PKTINFO
.I took a quick stab at it to figure out how it'd look like. I only did the writing side, I think there's a lot of design work and discussion here and I'm more than half-convinced this should be an
enum
instead of what I wrote.I think it'd be interesting to basically provide some safe wrappers around
CMSG
and the many control data types. Unclear if it's in the interest of the authors of the crate to maintain all of those, however. Also I have 0 experience with Windows here so I didn't even try satisfying it with my prototype, and I'm honestly not even sure where to begin there.Interested to hear the maintainer's thoughts. I'm willing to iterate on design and implementation here if there is interest.
Note: This is somewhat related to #86 from what I gathered in the discussion over there.
The text was updated successfully, but these errors were encountered: