mirror of
git://git.musl-libc.org/musl
synced 2025-02-03 20:41:31 +00:00
a0252bc75b
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
9b2921bea1
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.
36 lines
943 B
C
36 lines
943 B
C
#define SOCK_STREAM 2
|
|
#define SOCK_DGRAM 1
|
|
#define SOL_SOCKET 65535
|
|
#define SO_DEBUG 1
|
|
|
|
#define SO_REUSEADDR 0x0004
|
|
#define SO_KEEPALIVE 0x0008
|
|
#define SO_DONTROUTE 0x0010
|
|
#define SO_BROADCAST 0x0020
|
|
#define SO_LINGER 0x0080
|
|
#define SO_OOBINLINE 0x0100
|
|
#define SO_REUSEPORT 0x0200
|
|
#define SO_SNDBUF 0x1001
|
|
#define SO_RCVBUF 0x1002
|
|
#define SO_SNDLOWAT 0x1003
|
|
#define SO_RCVLOWAT 0x1004
|
|
#define SO_RCVTIMEO 0x1006
|
|
#define SO_SNDTIMEO 0x1005
|
|
#define SO_ERROR 0x1007
|
|
#define SO_TYPE 0x1008
|
|
#define SO_ACCEPTCONN 0x1009
|
|
#define SO_PROTOCOL 0x1028
|
|
#define SO_DOMAIN 0x1029
|
|
|
|
#define SO_NO_CHECK 11
|
|
#define SO_PRIORITY 12
|
|
#define SO_BSDCOMPAT 14
|
|
#define SO_PASSCRED 17
|
|
#define SO_PEERCRED 18
|
|
#define SO_PEERSEC 30
|
|
#define SO_SNDBUFFORCE 31
|
|
#define SO_RCVBUFFORCE 33
|
|
|
|
#define SOCK_NONBLOCK 0200
|
|
#define SOCK_CLOEXEC 02000000
|