-
Notifications
You must be signed in to change notification settings - Fork 15
Implement safe sendmsg/recvmsg abstractions #16
base: master
Are you sure you want to change the base?
Conversation
Supports SCM_CREDENTIALS and SCM_RIGHTS control messages
|
thank you! |
Cargo.toml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't necessary - it's only needed when linking to third party stuff.
|
Thanks for doing this! I left some comments here and there. Also, this'll need to be put behind a feature since these are Linux-only APIs I believe. I'm not totally sure what the API for |
|
I think all of the flags are potentially applicable and usable with this API. If you want, I can replace the c_int with a struct of bools to make it a bit more friendly? Can also take it out completely, but I think the options flags provides and the data it returns are genuinely useful. Will probably work to address comments today |
|
Oh yeah, the options flags are definitely useful, I'd just prefer something more structured than a raw c_int. A struct with bool setters/getters seems reasonable to me. |
|
Take a look at the latest version of the pull request. Replaced it with the struct as requested |
|
I just saw this -- I have a PR for a pure-Rust implementation of this (just |
src/lib.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path doesn't appear to be a parameter here anymore.
|
Finally got around to addressing the comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct ucred now exists in libc, from version 0.2.3: rust-lang/libc@4920c7e :)
Supports SCM_CREDENTIALS and SCM_RIGHTS control messages
Resolves #4 and resolves #5