Skip to content
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

bind sendmsg/recvmsg for Unix socket control messages/ancillary data #88

Closed
swinbio opened this issue Mar 9, 2015 · 2 comments
Closed

Comments

@swinbio
Copy link

swinbio commented Mar 9, 2015

Right now nix exposes bindings to sendto/recvfrom which work for the data part of Unix socket messages, but which cannot interact with control messages such as file descriptors sent over Unix sockets. The library should also bind these as they're one of the distinguishing features of Unix sockets.

@carllerche
Copy link
Contributor

Hey, this is definitely something that I would like to add, but I am a bit swamped right now w/ work. I would accept a PR that adds this feature though.

@geofft
Copy link
Contributor

geofft commented Aug 26, 2015

I have a patchset for this that's almost done; I'll send a PR in a day or two.

geofft added a commit to geofft/nix-rust that referenced this issue Aug 26, 2015
Only supports SCM_RIGHTS at the moment. See the test case for an example.

XXX only tested on Linux x86-64

Fixes nix-rust#88.
geofft added a commit to geofft/nix-rust that referenced this issue Aug 26, 2015
Only supports SCM_RIGHTS at the moment. See the test case for an example.

XXX only tested on Linux x86-64

Fixes nix-rust#88.
geofft added a commit to geofft/nix-rust that referenced this issue Aug 27, 2015
The best specification for control message layout appears to be,
[RFC 2292, section 4](https://tools.ietf.org/html/rfc2292#section-4),
despite this not being a network API. These definitions have also been
checked against glibc 2.19 <bits/socket.h> and Linux 4.0
<linux/socket.h>, and tested on Debian 8.1 and FreeBSD 10.2 x86_64.

The API differs a bit from the cmsg(4) API for type-safety reasons (and
also because the cmsg(4) API is terrible). See test/sys/test_socket.rs
for an example.

Only supports SCM_RIGHTS at the moment.

Fixes nix-rust#88.
geofft added a commit to geofft/nix-rust that referenced this issue Aug 27, 2015
The best specification for control message layout appears to be
[RFC 2292, section 4](https://tools.ietf.org/html/rfc2292#section-4),
despite this not being a wire protocol. These definitions have also been
checked against glibc 2.19 <bits/socket.h> and Linux 4.0
<linux/socket.h>, and tested on Debian 8.1 and FreeBSD 10.2 x86_64.

The API differs a bit from the cmsg(4) API for type-safety reasons (and
also because the cmsg(4) API is terrible). See test/sys/test_socket.rs
for an example.

Only supports SCM_RIGHTS at the moment.

Fixes nix-rust#88.
geofft added a commit to geofft/nix-rust that referenced this issue Sep 18, 2015
The best specification for control message layout appears to be
[RFC 2292, section 4](https://tools.ietf.org/html/rfc2292#section-4),
despite this not being a wire protocol. These definitions have also been
checked against glibc 2.19 <bits/socket.h> and Linux 4.0
<linux/socket.h>, and tested on Debian 8.1 and FreeBSD 10.2 x86_64.

The API differs a bit from the cmsg(4) API for type-safety reasons (and
also because the cmsg(4) API is terrible). See test/sys/test_socket.rs
for an example.

Only supports SCM_RIGHTS at the moment.

Fixes nix-rust#88.
geofft added a commit to geofft/nix-rust that referenced this issue Sep 25, 2015
The best specification for control message layout appears to be
[RFC 2292, section 4](https://tools.ietf.org/html/rfc2292#section-4),
despite this not being a wire protocol. These definitions have also been
checked against glibc 2.19 <bits/socket.h> and Linux 4.0
<linux/socket.h>, and tested on Debian 8.1 and FreeBSD 10.2 x86_64.

The API differs a bit from the cmsg(4) API for type-safety reasons (and
also because the cmsg(4) API is terrible). See test/sys/test_socket.rs
for an example.

Only supports SCM_RIGHTS at the moment.

Fixes nix-rust#88.
geofft added a commit to geofft/nix-rust that referenced this issue Oct 6, 2015
The best specification for control message layout appears to be
[RFC 2292, section 4](https://tools.ietf.org/html/rfc2292#section-4),
despite this not being a wire protocol. These definitions have also been
checked against glibc 2.19 <bits/socket.h> and Linux 4.0
<linux/socket.h>, and tested on Debian 8.1 and FreeBSD 10.2 x86_64.

The API differs a bit from the cmsg(4) API for type-safety reasons (and
also because the cmsg(4) API is terrible). See test/sys/test_socket.rs
for an example.

Only supports SCM_RIGHTS at the moment.

Fixes nix-rust#88.
geofft added a commit to geofft/nix-rust that referenced this issue Oct 6, 2015
The best specification for control message layout appears to be
[RFC 2292, section 4](https://tools.ietf.org/html/rfc2292#section-4),
despite this not being a wire protocol. These definitions have also been
checked against glibc 2.19 <bits/socket.h> and Linux 4.0
<linux/socket.h>, and tested on Debian 8.1 and FreeBSD 10.2 x86_64.

The API differs a bit from the cmsg(3) API for type-safety reasons (and
also because the cmsg(3) API is terrible). See test/sys/test_socket.rs
for an example.

Only supports SCM_RIGHTS at the moment.

Fixes nix-rust#88.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants