History log of /seL4-camkes-master/projects/musllibc/include/sys/socket.h
Revision Date Author Comments
# 0f8ad40b 20-Aug-2016 Szabolcs Nagy <nsz@port70.net>

add PF_QIPCRTR, AF_QIPCRTR from linux v4.7 to sys/socket.h

macros for qualcom ip router protocol, new in linux commit
bdabad3e363d825ddf9679dd431cca0b2c30f881


# befa5866 03-Jul-2016 Rich Felker <dalias@aerifal.cx>

make brace placement in public header struct definitions consistent

placing the opening brace on the same line as the struct keyword/tag
is the style I prefer and seems to be the prevailing practice in more
recent additions.

these changes were generated by the command:

find include/ arch/*/bits -name '*.h' \
-exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} +

and subsequently checked by hand to ensure that the regex did not pick
up any false positives.


# 1e6fc0b6 09-Jun-2016 Rich Felker <dalias@aerifal.cx>

avoid padding gaps in struct sockaddr_storage

compilers are free not to copy, or in some cases to clobber, padding
bytes in a structure. while it's an aliasing violation, and thus
undefined behavior, to copy or manipulate other sockaddr types using
sockaddr_storage, it seems likely that traditional code attempts to do
so, and the original intent of the sockaddr_storage structure was
probably to allow such usage.

in the interest of avoiding silent and potentially dangerous breakage,
ensure that there are no actual padding bytes in sockaddr_storage by
moving and adjusting the size of the __ss_padding member so that it
fits exactly.

this change also removes a silent assumption that the alignment of
long is equal to its size.


# a0bb50a1 26-May-2016 Szabolcs Nagy <nsz@port70.net>

update sys/socket.h to linux v4.6

kernel connection multiplexor macros AF_KCM, PF_KCM, SOL_KCM were
added in linux commit ab7ac4eb9832e32a09f4e8042705484d2fb0aad3

MSG_BATCH sendmsg flag for performance optimization was added
in linux commit f092276d85b82504e8a07498f4e9e0c51f06745c

SOL_* macros are now synced with linux socket.h which is not a uapi
header and glibc did not have the macros either, but that has changed
http://sourceware.org/ml/libc-alpha/2016-05/msg00322.html


# f6f4aa5d 26-May-2016 Szabolcs Nagy <nsz@port70.net>

add SO_CNX_ADVICE to sys/socket.h, new in linux v4.6

new socket option so application can give advice about routing
path quality of connected udp sockets, added in linux commit
a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314


# 81fb75a1 22-May-2016 Rich Felker <dalias@aerifal.cx>

fix undefined pointer arithmetic in CMSG_NXTHDR macro

previously, the only way the stopping condition could be met with
correct lengths in the headers invoked undefined behavior, adding
sizeof(struct cmsghdr) beyond the end of the cmsg buffer.

instead, compute and compare sizes rather than pointers.


# c1aabc6c 19-Mar-2016 Szabolcs Nagy <nsz@port70.net>

add SO_ATTACH_REUSEPORT_[CE]BPF socket options from linux v4.5

new socket options for setting classic or extended BPF program
for sockets in a SO_REUSEPORT group. added in linux commit
538950a1b7527a0a52ccd9337e3fcd304f027f13


# 9f52c17e 26-Jun-2015 Szabolcs Nagy <nsz@port70.net>

add AF_MPLS (PF_MPLS) address family to socket.h

new in linux 4.0 commit 0189197f441602acdca3f97750d392a895b778fd.


# ea4fc27d 26-Jun-2015 Szabolcs Nagy <nsz@port70.net>

add MSG_FASTOPEN sendmsg/sendto flag to socket.h

This was new in linux 3.5 in commit cf60af03ca4e71134206809ea892e49b92a88896,
needed for tcp fastopen feature (sending data in TCP SYN packet).


# 29ec7677 01-Jul-2015 Roman Yeryomin <roman@ubnt.com>

socket.h: fix SO_* for mips

Signed-off-by: Roman Yeryomin <roman@ubnt.com>


# 70572dce 09-Feb-2015 Szabolcs Nagy <nsz@port70.net>

add new socket options SO_INCOMING_CPU, SO_ATTACH_BPF, SO_DETACH_BPF

these socket options are new in linux v3.19, introduced in commit
2c8c56e15df3d4c2af3d656e44feb18789f75837 and commit
89aa075832b0da4402acebd698d0411dcc82d03e

with SO_INCOMING_CPU the cpu can be queried on which a socket is
managed inside the kernel and optimize polling of large number of
sockets accordingly.

SO_ATTACH_BPF lets eBPF programs (created by the bpf syscall) to
be attached to sockets.


# acb7e049 19-Jun-2014 Rich Felker <dalias@aerifal.cx>

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.


# c8ea2126 30-May-2014 Szabolcs Nagy <nsz@port70.net>

add SO_BPF_EXTENSIONS socket option

this was introduced to query BPF extension support with getsockopt
in linux 3.14, commit ea02f9411d9faa3553ed09ce0ec9f00ceae9885e


# 099ce363 24-Feb-2014 Szabolcs Nagy <nsz@port70.net>

sys/socket.h: add the SO_MAX_PACING_RATE SOL_SOCKET option

introduced in linux v3.13, 62748f32d501f5d3712a7c372bbb92abc7c62bc7


# acde0135 08-Jan-2014 Rich Felker <dalias@aerifal.cx>

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.


# b054137a 04-Dec-2013 Szabolcs Nagy <nsz@port70.net>

move struct ucred under _GNU_SOURCE in sys/socket.h for clean posix namespace


# 2c241808 04-Dec-2013 Szabolcs Nagy <nsz@port70.net>

fix SHUT_WR typo in sys/socket.h and duplicate definitions of SHUT_*


# 20a34af8 18-Oct-2013 Szabolcs Nagy <nsz@port70.net>

fix typo in socket.h (wrong macro name)


# ae51aa75 14-Sep-2013 Szabolcs Nagy <nsz@port70.net>

sys/socket.h: add new SO_BUSY_POLL socket option

low latency busy poll sockets are new in linux v3.11


# 3d4583c3 24-Jul-2013 Szabolcs Nagy <nsz@port70.net>

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


# 8f6ec721 24-Jul-2013 Szabolcs Nagy <nsz@port70.net>

add SO_SELECT_ERR_QUEUE to socket.h
introduced in linux-v3.10 commit 7d4c04fc170087119727119074e72445f2bb192b


# e82bd04c 23-Mar-2013 Szabolcs Nagy <nsz@port70.net>

add new socket options to sys/socket.h following linux


# 8c741783 04-Mar-2013 Rich Felker <dalias@aerifal.cx>

fix some obscure header type size/alignment issues


# f13a4788 10-Jan-2013 Szabolcs Nagy <nsz@port70.net>

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


# 3159e2fc 19-Dec-2012 rofl0r <retnyg@gmx.net>

socket.h: add SO_(SND/RCV)BUFFORCE to generic block


# 91738d02 15-Nov-2012 Rich Felker <dalias@aerifal.cx>

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.


# 32d6d77e 05-Nov-2012 Rich Felker <dalias@aerifal.cx>

fix numerous mips abi constant definition mismatches


# 3609e019 29-Sep-2012 Rich Felker <dalias@aerifal.cx>

always expose accept4

it will be in the next version of POSIX


# 6cf8bfdb 08-Sep-2012 Rich Felker <dalias@aerifal.cx>

add acct, accept4, setns, and dup3 syscalls (linux extensions)

based on patch by Justin Cormack


# 455f9685 08-Sep-2012 Rich Felker <dalias@aerifal.cx>

remove all remaining redundant __restrict/__inline/_Noreturn defs


# 400c5e5c 06-Sep-2012 Rich Felker <dalias@aerifal.cx>

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.


# 7fee5f96 05-Aug-2012 Rich Felker <dalias@aerifal.cx>

fix socket.h on mips

why does mips have to be gratuitously incompatible in every possible
imaginable way?


# 96107564 12-Jul-2012 Rich Felker <dalias@aerifal.cx>

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.


# b0c088ee 18-Sep-2011 Rich Felker <dalias@aerifal.cx>

cleanup more bits cruft (sysmacros and socket)


# 7f547152 16-Jun-2011 Rich Felker <dalias@aerifal.cx>

fix some struct padding to match LSB/glibc ABI where it may be helpful


# 74eea628 14-Feb-2011 Rich Felker <dalias@aerifal.cx>

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


# 0b44a031 11-Feb-2011 Rich Felker <dalias@aerifal.cx>

initial check-in, version 0.5.0