Age | Commit message (Collapse) | Author | Lines |
2022年03月08日 | sys/socket.h: add new SO_ socket options from linux v5.11 | Szabolcs Nagy | -0/+2 |
|
see
linux commit 7fd3253a7de6a317a0683f83739479fb880bffc8
net: Introduce preferred busy-polling
linux commit 7c951cafc0cb2e575f1d58677b95ac387ac0a5bd
net: Add SO_BUSY_POLL_BUDGET socket option
|
2019年12月30日 | sys/socket.h: add SO_DETACH_REUSEPORT_BPF from linux v5.3 | Szabolcs Nagy | -0/+1 |
|
see
linux commit 99f3a064bc2e4bd5fe50218646c5be342f2ad18c
bpf: net: Add SO_DETACH_REUSEPORT_BPF
|
2019年11月02日 | move time64 socket options from arch bits to top-level sys/socket.h | Rich Felker | -0/+11 |
|
now that all 32-bit archs have 64-bit time types, the values for the
time-related socket option macros can be treated as universal for
32-bit archs. the sys/socket.h mechanism for this predates
arch/generic and is instead in the top-level header.
x32, which does not use the new time64 values of the macros, already
has its own overrides, so this commit does not affect it.
|
2019年11月02日 | move msghdr and cmsghdr out of bits/socket.h | Rich Felker | -0/+34 |
|
these structures can now be defined generically in terms of endianness
and long size. previously, the 32-bit archs all shared a common
definition from the generic bits header, and each 64-bit arch had to
repeat the 64-bit version, with endian conditionals if the arch had
variants of each endianness.
I would prefer getting rid of the preprocessor conditionals for
padding and instead using unnamed bitfield members, like commit
9b2921bea1d5017832e1b45d1fd64220047a9802 did for struct timespec.
however, at present sendmsg, recvmsg, and recvmmsg need access to the
padding members by name to zero them. this could perhaps be cleaned up
in the future.
|
2019年11月02日 | make time-related socket options overridable by arch bits files | Rich Felker | -6/+11 |
|
SO_RCVTIMEO and SO_SNDTIMEO already were, but only in aggregate with
SO_DEBUG and all of the other low/traditional options that varied per
arch. SO_TIMESTAMP* are newly overridable. the two groups have to be
done separately since mips64 and powerpc64 will override the former
but not the latter.
at some point this should be cleaned up to use bits headers more
idiomatically.
|
2019年10月28日 | add time64 symbol name redirects to public headers, under arch control | Rich Felker | -0/+6 |
|
a _REDIR_TIME64 macro is introduced, which the arch's alltypes.h is
expected to define, to control redirection of symbol names for
interfaces that involve time_t and derived types. this ensures that
object files will only be linked to libc interfaces matching the ABI
whose headers they were compiled against.
along with time32 compat shims, which will be introduced separately,
the redirection also makes it possible for a single libc (static or
shared) to be used with object files produced with either the old
(32-bit time_t) headers or the new ones after 64-bit time_t switchover
takes place. mixing of such object files (or shared libraries) in the
same program will also be possible, but must be done with care; ABI
between libc and a consumer of the libc interfaces is guaranteed to
match by the the symbol name redirection, but pairwise ABI between
consumers of libc that define interfaces between each other in terms
of time_t is not guaranteed to match.
this change adds a dependency on an additional "GNU C" feature to the
public headers for existing 32-bit archs, which is generally
undesirable; however, the feature is one which glibc has depended on
for a long time, and thus which any viable alternative compiler is
going to need to provide. 64-bit archs are not affected, nor will
future 32-bit archs be, regardless of whether they are "new" on the
kernel side (e.g. riscv32) or just newly-added (e.g. a new sparc or
xtensa port). the same applies to newly-added ABIs for existing
machine-level archs.
|
2019年07月01日 | sys/socket.h: add SO_BINDTOIFINDEX from linux v5.1 | Szabolcs Nagy | -0/+1 |
|
SO_BINDTOIFINDEX behaves similar to SO_BINDTODEVICE, but takes a
network interface index as argument, rather than the network
interface name. see
linux commit f5dd3d0c9638a9d9a02b5964c4ad636f06cf7e2c
net: introduce SO_BINDTOIFINDEX sockopt
|
2019年03月13日 | sys/socket.h: add SO_TXTIME from linux v4.19 | Szabolcs Nagy | -0/+2 |
|
added in linux commit 80b14dee2bea128928537d61c333f24cb8cbb62f
|
2018年12月09日 | add AF_XDP to sys/socket.h from linux v4.18 | Szabolcs Nagy | -1/+4 |
|
new address family and related macros were added in linux commit
68e8b849b221b37a78a110a0307717d45e3593a0
|
2018年06月26日 | fix value of SO_PEERSEC on mips archs | Rich Felker | -1/+1 |
|
adapted from patch by Matthias Schiffer.
|
2018年02月22日 | sys/socket.h: add MSG_ZEROCOPY from linux v4.14 | Szabolcs Nagy | -0/+2 |
|
MSG_ZEROCOPY socket send flag avoids copy in the kernel
new in linux commit 52267790ef52d7513879238ca9fac22c1733e0e3
SO_ZEROCOPY socket option enables MSG_ZEROCOPY if availale
new in linux commit 76851d1212c11365362525e1e2c0a18c97478e6b
|
2018年02月22日 | sys/socket.h: add SOL_TLS from linux v4.13 | Szabolcs Nagy | -0/+1 |
|
socket option for kernel TLS support
new in linux commit 3c4d7559159bfe1e3b94df3a657b2cda3a34e218
|
2018年02月22日 | sys/socket.h: add PF_SMC from linux v4.11 | Szabolcs Nagy | -1/+3 |
|
add AF_SMC and PF_SMC for the IBM shared memory communication protocol.
new in linux commit ac7138746e14137a451f8539614cdd349153e0c0
(linux socket.h is not in uapi so this update was missed earlier)
|
2017年11月05日 | add SO_ getsockopt options from linux v4.13 | Szabolcs Nagy | -0/+2 |
|
SCM_TIMESTAMPING_PKTINFO is new in aad9c8c470f2a8321a99eb053630ce0e199558d6
SO_PEERGROUPS is new in 28b5ba2aa0f55d80adb2624564ed2b170c19519e
|
2017年11月05日 | add new SO_ socket options from linux v4.12 | Szabolcs Nagy | -0/+3 |
|
SO_MEMINFO added in linux commit a2d133b1d465016d0d97560b11f54ba0ace56d3e
SO_INCOMING_NAPI_ID added in 6d4339028b350efbf87c61e6d9e113e5373545c9
SO_COOKIE added in 5daab9db7b65df87da26fd8cfa695fb9546a1ddb
|
2017年11月05日 | add SCM_TIMESTAMPING_OPT_STATS and related TCP_ enums from linux v4.10 | Szabolcs Nagy | -0/+1 |
|
for tcp timestamp control messages, new in linux commit
1c885808e45601b2b6f68b30ac1d999e10b6f606
and export time measurements via tcp_info, added in linux commit
efd90174167530c67a54273fd5d8369c87f9bd32
|
2016年08月30日 | add PF_QIPCRTR, AF_QIPCRTR from linux v4.7 to sys/socket.h | Szabolcs Nagy | -1/+3 |
|
macros for qualcom ip router protocol, new in linux commit
bdabad3e363d825ddf9679dd431cca0b2c30f881
|
2016年07月03日 | make brace placement in public header struct definitions consistent | Rich Felker | -10/+5 |
|
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.
|
2016年06月09日 | avoid padding gaps in struct sockaddr_storage | Rich Felker | -1/+1 |
|
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.
|
2016年06月09日 | update sys/socket.h to linux v4.6 | Szabolcs Nagy | -1/+19 |
|
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
|
2016年06月09日 | add SO_CNX_ADVICE to sys/socket.h, new in linux v4.6 | Szabolcs Nagy | -0/+1 |
|
new socket option so application can give advice about routing
path quality of connected udp sockets, added in linux commit
a87cb3e48ee86d29868d3f59cfb9ce1a8fa63314
|
2016年05月22日 | fix undefined pointer arithmetic in CMSG_NXTHDR macro | Rich Felker | -3/+3 |
|
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.
|
2016年03月19日 | add SO_ATTACH_REUSEPORT_[CE]BPF socket options from linux v4.5 | Szabolcs Nagy | -1/+2 |
|
new socket options for setting classic or extended BPF program
for sockets in a SO_REUSEPORT group. added in linux commit
538950a1b7527a0a52ccd9337e3fcd304f027f13
|
2016年01月24日 | add AF_MPLS (PF_MPLS) address family to socket.h | Szabolcs Nagy | -0/+2 |
|
new in linux 4.0 commit 0189197f441602acdca3f97750d392a895b778fd.
|
2016年01月24日 | add MSG_FASTOPEN sendmsg/sendto flag to socket.h | Szabolcs Nagy | -0/+1 |
|
This was new in linux 3.5 in commit cf60af03ca4e71134206809ea892e49b92a88896,
needed for tcp fastopen feature (sending data in TCP SYN packet).
|
2015年07月21日 | socket.h: fix SO_* for mips | Roman Yeryomin | -3/+3 |
|
Signed-off-by: Roman Yeryomin <roman@ubnt.com>
|
2015年02月09日 | add new socket options SO_INCOMING_CPU, SO_ATTACH_BPF, SO_DETACH_BPF | Szabolcs Nagy | -0/+4 |
|
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.
|
2014年06月19日 | implement sendmmsg and recvmmsg | Rich Felker | -0/+11 |
|
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年05月30日 | add SO_BPF_EXTENSIONS socket option | Szabolcs Nagy | -0/+1 |
|
this was introduced to query BPF extension support with getsockopt
in linux 3.14, commit ea02f9411d9faa3553ed09ce0ec9f00ceae9885e
|
2014年02月25日 | sys/socket.h: add the SO_MAX_PACING_RATE SOL_SOCKET option | Szabolcs Nagy | -0/+1 |
|
introduced in linux v3.13, 62748f32d501f5d3712a7c372bbb92abc7c62bc7
|
2014年01月08日 | fix remaining known namespace violations for netinet/in.h | Rich Felker | -0/+4 |
|
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.
|
2013年12月04日 | move struct ucred under _GNU_SOURCE in sys/socket.h for clean posix namespace | Szabolcs Nagy | -0/+2 |
|
2013年12月04日 | fix SHUT_WR typo in sys/socket.h and duplicate definitions of SHUT_* | Szabolcs Nagy | -5/+1 |
|
2013年10月18日 | fix typo in socket.h (wrong macro name) | Szabolcs Nagy | -1/+1 |
|
2013年09月15日 | sys/socket.h: add new SO_BUSY_POLL socket option | Szabolcs Nagy | -0/+1 |
|
low latency busy poll sockets are new in linux v3.11
|
2013年07月25日 | add protocol families PF_IB and PF_VSOCK to socket.h | Szabolcs Nagy | -1/+5 |
|
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月24日 | add SO_SELECT_ERR_QUEUE to socket.h | Szabolcs Nagy | -0/+1 |
|
introduced in linux-v3.10 commit 7d4c04fc170087119727119074e72445f2bb192b
|
2013年04月01日 | add new socket options to sys/socket.h following linux | Szabolcs Nagy | -2/+17 |
|
2013年03月04日 | fix some obscure header type size/alignment issues | Rich Felker | -4/+2 |
|
2013年01月12日 | add missing protocol families to sys/socket.h | Szabolcs Nagy | -1/+11 |
|
missing protocol families based on current linux headers:
PF_RDS, PF_LLC, PF_CAN, PF_TIPC, PF_NFC
|
2012年12月19日 | socket.h: add SO_(SND/RCV)BUFFORCE to generic block | rofl0r | -0/+2 |
|
2012年11月15日 | disable SO_REUSEPORT in sys/socket.h | Rich Felker | -1/+1 |
|
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月05日 | fix numerous mips abi constant definition mismatches | Rich Felker | -0/+7 |
|
2012年09月29日 | always expose accept4 | Rich Felker | -4/+1 |
|
it will be in the next version of POSIX
|
2012年09月08日 | add acct, accept4, setns, and dup3 syscalls (linux extensions) | Rich Felker | -0/+4 |
|
based on patch by Justin Cormack
|
2012年09月08日 | remove all remaining redundant __restrict/__inline/_Noreturn defs | Rich Felker | -5/+1 |
|
2012年09月06日 | use restrict everywhere it's required by c99 and/or posix 2008 | Rich Felker | -5/+11 |
|
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年08月05日 | fix socket.h on mips | Rich Felker | -0/+3 |
|
why does mips have to be gratuitously incompatible in every possible
imaginable way?
|
2012年07月12日 | workaround another sendmsg kernel bug on 64-bit machines | Rich Felker | -7/+0 |
|
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.
|
2011年09月18日 | cleanup more bits cruft (sysmacros and socket) | Rich Felker | -0/+196 |
|