diff options
author | Geoffrey Thomas <geofft@ldpreload.com> | 2015-08-23 22:15:07 -0400 |
---|---|---|
committer | Geoffrey Thomas <geofft@ldpreload.com> | 2015-10-06 19:30:26 -0400 |
commit | b5c13463743d5c2e4dead1934b4abe74eceac104 (patch) | |
tree | 514f60bfdc6c113fd2e0e0fd243b70c251bfe4d5 /nix-test/src/const.c | |
parent | 0529fb8e324157bb02908eac5cfd9d0fa99c130f (diff) | |
download | nix-b5c13463743d5c2e4dead1934b4abe74eceac104.zip |
Add support for sendmsg(2), recvmsg(2), and cmsg(3)
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 #88.
Diffstat (limited to 'nix-test/src/const.c')
-rw-r--r-- | nix-test/src/const.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nix-test/src/const.c b/nix-test/src/const.c index a0a6a116..60447629 100644 --- a/nix-test/src/const.c +++ b/nix-test/src/const.c @@ -289,6 +289,9 @@ get_int_const(const char* err) { GET_CONST(MSG_OOB); GET_CONST(MSG_PEEK); GET_CONST(MSG_DONTWAIT); + GET_CONST(MSG_EOR); + GET_CONST(MSG_TRUNC); + GET_CONST(MSG_CTRUNC); GET_CONST(SHUT_RD); GET_CONST(SHUT_WR); GET_CONST(SHUT_RDWR); @@ -312,6 +315,7 @@ get_int_const(const char* err) { // GET_CONST(SO_PEEK_OFF); GET_CONST(SO_PEERCRED); GET_CONST(SO_SNDBUFFORCE); + GET_CONST(MSG_ERRQUEUE); #endif return -1; |