Commit Graph

26 Commits

Author SHA1 Message Date
Rich Felker acb7e049b8 implement sendmmsg and recvmmsg
these are not pure syscall wrappers because they have to work around
kernel API bugs on 64-bit archs. the workarounds could probably be
made somewhat more efficient, but at the cost of more complexity. this
may be revisited later.
2014-06-19 23:01:15 -04:00
Szabolcs Nagy c8ea212668 add SO_BPF_EXTENSIONS socket option
this was introduced to query BPF extension support with getsockopt
in linux 3.14, commit ea02f9411d9faa3553ed09ce0ec9f00ceae9885e
2014-05-30 13:06:51 -04:00
Szabolcs Nagy 099ce3631c sys/socket.h: add the SO_MAX_PACING_RATE SOL_SOCKET option
introduced in linux v3.13, 62748f32d501f5d3712a7c372bbb92abc7c62bc7
2014-02-25 00:22:04 +01:00
Rich Felker acde013522 fix remaining known namespace violations for netinet/in.h
the imr_, imsf_, ip6_, ip6m_, ipi_, ipi6_, SCM_, and SOL_ prefixes are
not in the reserved namespace for this header. thus the constants and
structures using them need to be protected under appropriate feature
test macros.

this also affects some headers which are permitted to include
netinet/in.h, particularly netdb.h and arpa/inet.h.

the SOL_ macros are moved to sys/socket.h where they are in the
reserved namespace (SO*). they are still accessible via netinet/in.h
since it includes sys/socket.h implicitly (which is permitted).

the SCM_SRCRT macro is simply removed, since the definition used for
it, IPV6_RXSRCRT is not defined anywhere. it could be re-added, this
time in sys/socket.h, if the appropriate value can be determined;
however, given that the erroneous definition was not caught, it is
unlikely that any software actually attempts to use SCM_SRCRT.
2014-01-08 18:54:33 -05:00
Szabolcs Nagy b054137a64 move struct ucred under _GNU_SOURCE in sys/socket.h for clean posix namespace 2013-12-04 21:39:52 +00:00
Szabolcs Nagy 2c2418088d fix SHUT_WR typo in sys/socket.h and duplicate definitions of SHUT_* 2013-12-04 21:38:32 +00:00
Szabolcs Nagy 20a34af862 fix typo in socket.h (wrong macro name) 2013-10-18 15:19:49 +00:00
Szabolcs Nagy ae51aa7534 sys/socket.h: add new SO_BUSY_POLL socket option
low latency busy poll sockets are new in linux v3.11
2013-09-15 04:54:19 +00:00
Szabolcs Nagy 3d4583c3fb add protocol families PF_IB and PF_VSOCK to socket.h
linux commit 8d36eb01da5d371feffa280e501377b5c450f5a5 (2013-05-29)
added PF_IB for InfiniBand

linux commit d021c344051af91f42c5ba9fdedc176740cbd238 (2013-02-06)
added PF_VSOCK for VMware sockets
2013-07-25 00:22:05 +00:00
Szabolcs Nagy 8f6ec7217f add SO_SELECT_ERR_QUEUE to socket.h
introduced in linux-v3.10 commit 7d4c04fc170087119727119074e72445f2bb192b
2013-07-24 22:17:24 +00:00
Szabolcs Nagy e82bd04cf7 add new socket options to sys/socket.h following linux 2013-04-01 16:24:12 +00:00
Rich Felker 8c741783fc fix some obscure header type size/alignment issues 2013-03-04 17:05:45 -05:00
Szabolcs Nagy f13a478860 add missing protocol families to sys/socket.h
missing protocol families based on current linux headers:
PF_RDS, PF_LLC, PF_CAN, PF_TIPC, PF_NFC
2013-01-12 19:42:38 +01:00
rofl0r 3159e2fc81 socket.h: add SO_(SND/RCV)BUFFORCE to generic block 2012-12-19 19:02:22 +01:00
Rich Felker 91738d0241 disable SO_REUSEPORT in sys/socket.h
although a number is reserved for it, this option is not implemented
on Linux and does not work. defining it causes some applications to
use it, and subsequently break due to its failure.
2012-11-15 19:16:10 -05:00
Rich Felker 32d6d77e54 fix numerous mips abi constant definition mismatches 2012-11-05 14:29:04 -05:00
Rich Felker 3609e019f3 always expose accept4
it will be in the next version of POSIX
2012-09-29 17:44:33 -04:00
Rich Felker 6cf8bfdb64 add acct, accept4, setns, and dup3 syscalls (linux extensions)
based on patch by Justin Cormack
2012-09-08 20:22:08 -04:00
Rich Felker 455f96857f remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
Rich Felker 400c5e5c83 use restrict everywhere it's required by c99 and/or posix 2008
to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
2012-09-06 22:44:55 -04:00
Rich Felker 7fee5f9606 fix socket.h on mips
why does mips have to be gratuitously incompatible in every possible
imaginable way?
2012-08-05 14:23:40 -04:00
Rich Felker 96107564e2 workaround another sendmsg kernel bug on 64-bit machines
the kernel wrongly expects the cmsg length field to be size_t instead
of socklen_t. in order to work around the issue, we have to impose a
length limit and copy to a local buffer. the length limit should be
more than sufficient for any real-world use; these headers are only
used for passing file descriptors and permissions between processes
over unix sockets.
2012-07-12 21:37:54 -04:00
Rich Felker b0c088ee55 cleanup more bits cruft (sysmacros and socket) 2011-09-18 16:34:13 -04:00
Rich Felker 7f5471529c fix some struct padding to match LSB/glibc ABI where it may be helpful 2011-06-16 17:11:35 -04:00
Rich Felker 74eea628cf extensive header cleanup for standards conformance & correctness
thanks to Peter Mazinger (psm) for pointing many of these issues out
and submitting a patch on which this commit is loosely based
2011-02-14 18:41:25 -05:00
Rich Felker 0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00