summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-14 20:03:55 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-14 20:03:55 -0500
commitc316b284456e8b8d5f6e2ff18ece9c15b60033c7 (patch)
treea16bf7e02544b28fb992ec87beb47d2810b81ff0 /include
parent6fbf8bfd750a5c982b716bea0802692847918951 (diff)
downloadmusl-c316b284456e8b8d5f6e2ff18ece9c15b60033c7.tar.gz
update various bits headers for new linux additions
based on patch by nik
Diffstat (limited to 'include')
-rw-r--r--include/bits/errno.h7
-rw-r--r--include/bits/in.h64
-rw-r--r--include/bits/ioctl.h8
-rw-r--r--include/bits/ipc.h3
-rw-r--r--include/bits/mman.h23
-rw-r--r--include/bits/shm.h6
-rw-r--r--include/bits/socket.h81
7 files changed, 147 insertions, 45 deletions
diff --git a/include/bits/errno.h b/include/bits/errno.h
index fddea5ef..ec3d3633 100644
--- a/include/bits/errno.h
+++ b/include/bits/errno.h
@@ -123,3 +123,10 @@
#define ENOMEDIUM 123
#define EMEDIUMTYPE 124
#define ECANCELED 125
+#define ENOKEY 126
+#define EKEYEXPIRED 127
+#define EKEYREVOKED 128
+#define EKEYREJECTED 129
+#define EOWNERDEAD 130
+#define ENOTRECOVERABLE 131
+#define ERFKILL 132
diff --git a/include/bits/in.h b/include/bits/in.h
index 53ca31ca..b2337064 100644
--- a/include/bits/in.h
+++ b/include/bits/in.h
@@ -12,17 +12,32 @@
#define IP_RECVERR 11
#define IP_RECVTTL 12
#define IP_RECVTOS 13
+#define IP_MTU 14
+#define IP_FREEBIND 15
+#define IP_IPSEC_POLICY 16
+#define IP_XFRM_POLICY 17
+#define IP_PASSSEC 18
+#define IP_TRANSPARENT 19
+#define IP_ORIGDSTADDR 20
+#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
+#define IP_MINTTL 21
#define IP_MULTICAST_IF 32
#define IP_MULTICAST_TTL 33
#define IP_MULTICAST_LOOP 34
#define IP_ADD_MEMBERSHIP 35
#define IP_DROP_MEMBERSHIP 36
+#define IP_UNBLOCK_SOURCE 37
+#define IP_BLOCK_SOURCE 38
+#define IP_ADD_SOURCE_MEMBERSHIP 39
+#define IP_DROP_SOURCE_MEMBERSHIP 40
+#define IP_MSFILTER 41
#define IP_RECVRETOPTS IP_RETOPTS
#define IP_PMTUDISC_DONT 0
#define IP_PMTUDISC_WANT 1
#define IP_PMTUDISC_DO 2
+#define IP_PMTUDISC_PROBE 3
#define SOL_IP 0
@@ -57,25 +72,49 @@ struct in_pktinfo
};
#define IPV6_ADDRFORM 1
-#define IPV6_PKTINFO 2
-#define IPV6_HOPOPTS 3
-#define IPV6_DSTOPTS 4
-#define IPV6_RXSRCRT 5
-#define IPV6_PKTOPTIONS 6
+#define IPV6_2292PKTINFO 2
+#define IPV6_2292HOPOPTS 3
+#define IPV6_2292DSTOPTS 4
+#define IPV6_2292RTHDR 5
+#define IPV6_2292PKTOPTIONS 6
#define IPV6_CHECKSUM 7
-#define IPV6_HOPLIMIT 8
+#define IPV6_2292HOPLIMIT 8
+#define SCM_SRCRT IPV6_RXSRCRT
#define IPV6_NEXTHOP 9
#define IPV6_AUTHHDR 10
#define IPV6_UNICAST_HOPS 16
#define IPV6_MULTICAST_IF 17
#define IPV6_MULTICAST_HOPS 18
#define IPV6_MULTICAST_LOOP 19
-#define IPV6_ADD_MEMBERSHIP 20
-#define IPV6_DROP_MEMBERSHIP 21
+#define IPV6_JOIN_GROUP 20
+#define IPV6_LEAVE_GROUP 21
#define IPV6_ROUTER_ALERT 22
+#define IPV6_MTU_DISCOVER 23
+#define IPV6_MTU 24
+#define IPV6_RECVERR 25
+#define IPV6_V6ONLY 26
+#define IPV6_JOIN_ANYCAST 27
+#define IPV6_LEAVE_ANYCAST 28
+#define IPV6_IPSEC_POLICY 34
+#define IPV6_XFRM_POLICY 35
-#define SCM_SRCRT IPV6_RXSRCRT
+#define IPV6_RECVPKTINFO 49
+#define IPV6_PKTINFO 50
+#define IPV6_RECVHOPLIMIT 51
+#define IPV6_HOPLIMIT 52
+#define IPV6_RECVHOPOPTS 53
+#define IPV6_HOPOPTS 54
+#define IPV6_RTHDRDSTOPTS 55
+#define IPV6_RECVRTHDR 56
+#define IPV6_RTHDR 57
+#define IPV6_RECVDSTOPTS 58
+#define IPV6_DSTOPTS 59
+
+#define IPV6_RECVTCLASS 66
+#define IPV6_TCLASS 67
+#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
+#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
#define IPV6_RXHOPOPTS IPV6_HOPOPTS
#define IPV6_RXDSTOPTS IPV6_DSTOPTS
@@ -83,7 +122,12 @@ struct in_pktinfo
#define IPV6_PMTUDISC_DONT 0
#define IPV6_PMTUDISC_WANT 1
#define IPV6_PMTUDISC_DO 2
-
+#define IPV6_PMTUDISC_PROBE 3
#define SOL_IPV6 41
#define SOL_ICMPV6 58
+
+#define IPV6_RTHDR_LOOSE 0
+#define IPV6_RTHDR_STRICT 1
+
+#define IPV6_RTHDR_TYPE_0 0
diff --git a/include/bits/ioctl.h b/include/bits/ioctl.h
index bb63ffb4..544bbdce 100644
--- a/include/bits/ioctl.h
+++ b/include/bits/ioctl.h
@@ -52,6 +52,10 @@
#define TIOCGSID 0x5429
#define TIOCGPTN 0x80045430
#define TIOCSPTLCK 0x40045431
+#define TCGETX 0x5432
+#define TCSETX 0x5433
+#define TCSETXF 0x5434
+#define TCSETXW 0x5435
#define FIONCLEX 0x5450
#define FIOCLEX 0x5451
@@ -79,6 +83,7 @@
#define TIOCPKT_START 8
#define TIOCPKT_NOSTOP 16
#define TIOCPKT_DOSTOP 32
+#define TIOCPKT_IOCTL 64
#define TIOCSER_TEMT 0x01
@@ -180,3 +185,6 @@ struct winsize {
#define SIOCADDDLCI 0x8980
#define SIOCDELDLCI 0x8981
+
+#define SIOCDEVPRIVATE 0x89F0
+#define SIOCPROTOPRIVATE 0x89E0
diff --git a/include/bits/ipc.h b/include/bits/ipc.h
index 8e3ef9b9..08316a37 100644
--- a/include/bits/ipc.h
+++ b/include/bits/ipc.h
@@ -5,6 +5,9 @@
#define IPC_RMID 0
#define IPC_SET 1
#define IPC_STAT 2
+#ifdef _GNU_SOURCE
+#define IPC_INFO 3
+#endif
#define IPC_PRIVATE ((key_t) 0)
diff --git a/include/bits/mman.h b/include/bits/mman.h
index e02d488c..d133fa20 100644
--- a/include/bits/mman.h
+++ b/include/bits/mman.h
@@ -4,6 +4,8 @@
#define PROT_READ 1
#define PROT_WRITE 2
#define PROT_EXEC 4
+#define PROT_GROWSDOWN 0x01000000
+#define PROT_GROWSUP 0x02000000
#define MAP_SHARED 0x01
#define MAP_PRIVATE 0x02
@@ -14,12 +16,21 @@
#define MAP_FILE 0x00
#define MAP_ANON 0x20
#define MAP_ANONYMOUS MAP_ANON
-
-#define MADV_NORMAL 0
-#define MADV_RANDOM 1
-#define MADV_SEQUENTIAL 2
-#define MADV_WILLNEED 3
-#define MADV_DONTNEED 4
+#define MAP_32BIT 0x40
+
+#define MADV_NORMAL 0
+#define MADV_RANDOM 1
+#define MADV_SEQUENTIAL 2
+#define MADV_WILLNEED 3
+#define MADV_DONTNEED 4
+#define MADV_REMOVE 9
+#define MADV_DONTFORK 10
+#define MADV_DOFORK 11
+#define MADV_MERGEABLE 12
+#define MADV_UNMERGEABLE 13
+#define MADV_HUGEPAGE 14
+#define MADV_NOHUGEPAGE 15
+#define MADV_HWPOISON 100
#define POSIX_MADV_NORMAL 0
#define POSIX_MADV_RANDOM 1
diff --git a/include/bits/shm.h b/include/bits/shm.h
index 46774237..bc95a1ca 100644
--- a/include/bits/shm.h
+++ b/include/bits/shm.h
@@ -2,6 +2,12 @@
#define SHM_RDONLY 010000
#define SHM_RND 020000
+#define SHM_REMAP 040000
+#define SHM_EXEC 0100000
+
+/* linux extensions */
+#define SHM_LOCK 11
+#define SHM_UNLOCK 12
struct shmid_ds
{
diff --git a/include/bits/socket.h b/include/bits/socket.h
index c8bac6b2..b3230625 100644
--- a/include/bits/socket.h
+++ b/include/bits/socket.h
@@ -38,37 +38,12 @@ struct linger
#define SOCK_RAW 3
#define SOCK_RDM 4
#define SOCK_SEQPACKET 5
+#define SOCK_DCCP 6
#define SOCK_PACKET 10
-#define AF_UNSPEC 0
-#define AF_LOCAL 1
-#define AF_UNIX AF_LOCAL
-#define AF_FILE AF_LOCAL
-#define AF_INET 2
-#define AF_AX25 3
-#define AF_IPX 4
-#define AF_APPLETALK 5
-#define AF_NETROM 6
-#define AF_BRIDGE 7
-#define AF_ATMPVC 8
-#define AF_X25 9
-#define AF_INET6 10
-#define AF_ROSE 11
-#define AF_DECnet 12
-#define AF_NETBEUI 13
-#define AF_SECURITY 14
-#define AF_KEY 15
-#define AF_NETLINK 16
-#define AF_ROUTE AF_NETLINK
-#define AF_PACKET 17
-#define AF_ASH 18
-#define AF_ECONET 19
-#define AF_ATMSVC 20
-#define AF_SNA 22
-#define AF_IRDA 23
-#define AF_PPPOX 24
-#define AF_WANPIPE 25
-#define AF_BLUETOOTH 31
+/* linux extensions */
+#define SOCK_CLOEXEC 02000000
+#define SOCK_NONBLOCK 04000
#define PF_UNSPEC 0
#define PF_LOCAL 1
@@ -99,6 +74,52 @@ struct linger
#define PF_PPPOX 24
#define PF_WANPIPE 25
#define PF_BLUETOOTH 31
+#define PF_IUCV 32
+#define PF_RXRPC 33
+#define PF_ISDN 34
+#define PF_PHONET 35
+#define PF_IEEE802154 36
+#define PF_CAIF 37
+#define PF_ALG 38
+#define PF_MAX 39
+
+#define AF_UNSPEC PF_UNSPEC
+#define AF_LOCAL PF_LOCAL
+#define AF_UNIX AF_LOCAL
+#define AF_FILE AF_LOCAL
+#define AF_INET PF_INET
+#define AF_AX25 PF_AX25
+#define AF_IPX PF_IPX
+#define AF_APPLETALK PF_APPLETALK
+#define AF_NETROM PF_NETROM
+#define AF_BRIDGE PF_BRIDGE
+#define AF_ATMPVC PF_ATMPVC
+#define AF_X25 PF_X25
+#define AF_INET6 PF_INET6
+#define AF_ROSE PF_ROSE
+#define AF_DECnet PF_DECnet
+#define AF_NETBEUI PF_NETBEUI
+#define AF_SECURITY PF_SECURITY
+#define AF_KEY PF_KEY
+#define AF_NETLINK PF_NETLINK
+#define AF_ROUTE AF_NETLINK
+#define AF_PACKET PF_PACKET
+#define AF_ASH PF_ASH
+#define AF_ECONET PF_ECONET
+#define AF_ATMSVC PF_ATMSVC
+#define AF_SNA PF_SNA
+#define AF_IRDA PF_IRDA
+#define AF_PPPOX PF_PPPOX
+#define AF_WANPIPE PF_WANPIPE
+#define AF_BLUETOOTH PF_BLUETOOTH
+#define AF_IUCV PF_IUCV
+#define AF_RXRPC PF_RXRPC
+#define AF_ISDN PF_ISDN
+#define AF_PHONET PF_PHONET
+#define AF_IEEE802154 PF_IEEE802154
+#define AF_CAIF PF_CAIF
+#define AF_ALG PF_ALG
+#define AF_MAX PF_MAX
#define SO_DEBUG 1
#define SO_REUSEADDR 2
@@ -166,6 +187,8 @@ struct linger
#define MSG_ERRQUEUE 0x2000
#define MSG_NOSIGNAL 0x4000
#define MSG_MORE 0x8000
+#define MSG_WAITFORONE 0x10000
+#define MSG_CMSG_CLOEXEC 0x40000000
/* Internal use only!! to make CMSG_NXTHDR definition readable by mortals */
#define __CMSG_LEN(cmsg) (((cmsg)->cmsg_len + sizeof(long) - 1) & ~(long)(sizeof(long) - 1))