xref: /freebsd/sys/compat/linux/linux_socket.h (revision 8ec6c4a38bfc988f6300ed6c37a8db352f983329)
140dbba57SAssar Westerlund /*-
27f2d13d6SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
37f2d13d6SPedro F. Giffuni  *
440dbba57SAssar Westerlund  * Copyright (c) 2000 Assar Westerlund
540dbba57SAssar Westerlund  * All rights reserved.
640dbba57SAssar Westerlund  *
740dbba57SAssar Westerlund  * Redistribution and use in source and binary forms, with or without
840dbba57SAssar Westerlund  * modification, are permitted provided that the following conditions
940dbba57SAssar Westerlund  * are met:
1040dbba57SAssar Westerlund  * 1. Redistributions of source code must retain the above copyright
1140dbba57SAssar Westerlund  *    notice, this list of conditions and the following disclaimer
1240dbba57SAssar Westerlund  *    in this position and unchanged.
1340dbba57SAssar Westerlund  * 2. Redistributions in binary form must reproduce the above copyright
1440dbba57SAssar Westerlund  *    notice, this list of conditions and the following disclaimer in the
1540dbba57SAssar Westerlund  *    documentation and/or other materials provided with the distribution.
1640dbba57SAssar Westerlund  * 3. The name of the author may not be used to endorse or promote products
1721dc7d4fSJens Schweikhardt  *    derived from this software without specific prior written permission
1840dbba57SAssar Westerlund  *
1940dbba57SAssar Westerlund  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2040dbba57SAssar Westerlund  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2140dbba57SAssar Westerlund  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2240dbba57SAssar Westerlund  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2340dbba57SAssar Westerlund  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2440dbba57SAssar Westerlund  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2540dbba57SAssar Westerlund  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2640dbba57SAssar Westerlund  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2740dbba57SAssar Westerlund  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2840dbba57SAssar Westerlund  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2940dbba57SAssar Westerlund  *
3040dbba57SAssar Westerlund  * $FreeBSD$
3140dbba57SAssar Westerlund  */
3240dbba57SAssar Westerlund 
3340dbba57SAssar Westerlund #ifndef _LINUX_SOCKET_H_
3440dbba57SAssar Westerlund #define _LINUX_SOCKET_H_
3540dbba57SAssar Westerlund 
3640dbba57SAssar Westerlund /* msg flags in recvfrom/recvmsg */
3740dbba57SAssar Westerlund 
3840dbba57SAssar Westerlund #define LINUX_MSG_OOB		0x01
3940dbba57SAssar Westerlund #define LINUX_MSG_PEEK		0x02
4040dbba57SAssar Westerlund #define LINUX_MSG_DONTROUTE	0x04
4140dbba57SAssar Westerlund #define LINUX_MSG_CTRUNC	0x08
4240dbba57SAssar Westerlund #define LINUX_MSG_PROXY		0x10
4340dbba57SAssar Westerlund #define LINUX_MSG_TRUNC		0x20
4440dbba57SAssar Westerlund #define LINUX_MSG_DONTWAIT	0x40
4540dbba57SAssar Westerlund #define LINUX_MSG_EOR		0x80
4640dbba57SAssar Westerlund #define LINUX_MSG_WAITALL	0x100
4740dbba57SAssar Westerlund #define LINUX_MSG_FIN		0x200
4840dbba57SAssar Westerlund #define LINUX_MSG_SYN		0x400
4940dbba57SAssar Westerlund #define LINUX_MSG_CONFIRM	0x800
5040dbba57SAssar Westerlund #define LINUX_MSG_RST		0x1000
5140dbba57SAssar Westerlund #define LINUX_MSG_ERRQUEUE	0x2000
5240dbba57SAssar Westerlund #define LINUX_MSG_NOSIGNAL	0x4000
53e1ff74c0SDmitry Chagin #define LINUX_MSG_WAITFORONE	0x10000
543a72bf04SDmitry Chagin #define LINUX_MSG_CMSG_CLOEXEC	0x40000000
5540dbba57SAssar Westerlund 
5674f5d680SKonstantin Belousov /* Socket-level control message types */
5774f5d680SKonstantin Belousov 
5874f5d680SKonstantin Belousov #define LINUX_SCM_RIGHTS	0x01
59605da56bSAndriy Gapon #define LINUX_SCM_CREDENTIALS	0x02
60bbf392d5SDmitry Chagin #define LINUX_SCM_TIMESTAMP	0x1D
6174f5d680SKonstantin Belousov 
62b7aaa9fdSDmitry Chagin struct l_msghdr {
63b7aaa9fdSDmitry Chagin 	l_uintptr_t	msg_name;
64b7aaa9fdSDmitry Chagin 	l_int		msg_namelen;
65b7aaa9fdSDmitry Chagin 	l_uintptr_t	msg_iov;
66b7aaa9fdSDmitry Chagin 	l_size_t	msg_iovlen;
67b7aaa9fdSDmitry Chagin 	l_uintptr_t	msg_control;
68b7aaa9fdSDmitry Chagin 	l_size_t	msg_controllen;
69b7aaa9fdSDmitry Chagin 	l_uint		msg_flags;
70b7aaa9fdSDmitry Chagin };
71b7aaa9fdSDmitry Chagin 
72e1ff74c0SDmitry Chagin struct l_mmsghdr {
73e1ff74c0SDmitry Chagin 	struct l_msghdr	msg_hdr;
74e1ff74c0SDmitry Chagin 	l_uint		msg_len;
75e1ff74c0SDmitry Chagin 
76e1ff74c0SDmitry Chagin };
77e1ff74c0SDmitry Chagin 
78b7aaa9fdSDmitry Chagin struct l_cmsghdr {
79b7aaa9fdSDmitry Chagin 	l_size_t	cmsg_len;
80b7aaa9fdSDmitry Chagin 	l_int		cmsg_level;
81b7aaa9fdSDmitry Chagin 	l_int		cmsg_type;
82b7aaa9fdSDmitry Chagin };
83b7aaa9fdSDmitry Chagin 
841ce4275dSPedro F. Giffuni /* Ancillary data object information macros */
8574f5d680SKonstantin Belousov 
8674f5d680SKonstantin Belousov #define LINUX_CMSG_ALIGN(len)	roundup2(len, sizeof(l_ulong))
8774f5d680SKonstantin Belousov #define LINUX_CMSG_DATA(cmsg)	((void *)((char *)(cmsg) + \
8874f5d680SKonstantin Belousov 				    LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr))))
8974f5d680SKonstantin Belousov #define LINUX_CMSG_SPACE(len)	(LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \
9074f5d680SKonstantin Belousov 				    LINUX_CMSG_ALIGN(len))
9174f5d680SKonstantin Belousov #define LINUX_CMSG_LEN(len)	(LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \
9274f5d680SKonstantin Belousov 				    (len))
9374f5d680SKonstantin Belousov #define LINUX_CMSG_FIRSTHDR(msg) \
9474f5d680SKonstantin Belousov 				((msg)->msg_controllen >= \
9574f5d680SKonstantin Belousov 				    sizeof(struct l_cmsghdr) ? \
96605da56bSAndriy Gapon 				    (struct l_cmsghdr *) \
97605da56bSAndriy Gapon 				        PTRIN((msg)->msg_control) : \
9874f5d680SKonstantin Belousov 				    (struct l_cmsghdr *)(NULL))
9974f5d680SKonstantin Belousov #define LINUX_CMSG_NXTHDR(msg, cmsg) \
10074f5d680SKonstantin Belousov 				((((char *)(cmsg) + \
10174f5d680SKonstantin Belousov 				    LINUX_CMSG_ALIGN((cmsg)->cmsg_len) + \
10274f5d680SKonstantin Belousov 				    sizeof(*(cmsg))) > \
103605da56bSAndriy Gapon 				    (((char *)PTRIN((msg)->msg_control)) + \
10474f5d680SKonstantin Belousov 				    (msg)->msg_controllen)) ? \
10574f5d680SKonstantin Belousov 				    (struct l_cmsghdr *) NULL : \
10674f5d680SKonstantin Belousov 				    (struct l_cmsghdr *)((char *)(cmsg) + \
10774f5d680SKonstantin Belousov 				    LINUX_CMSG_ALIGN((cmsg)->cmsg_len)))
10874f5d680SKonstantin Belousov 
10974f5d680SKonstantin Belousov #define CMSG_HDRSZ		CMSG_LEN(0)
11074f5d680SKonstantin Belousov #define L_CMSG_HDRSZ		LINUX_CMSG_LEN(0)
11174f5d680SKonstantin Belousov 
112eeb63e51SDmitry Chagin /* Supported socket types */
113eeb63e51SDmitry Chagin 
114eeb63e51SDmitry Chagin #define	LINUX_SOCK_STREAM	1
115eeb63e51SDmitry Chagin #define	LINUX_SOCK_DGRAM	2
116eeb63e51SDmitry Chagin #define	LINUX_SOCK_RAW		3
117eeb63e51SDmitry Chagin #define	LINUX_SOCK_RDM		4
118eeb63e51SDmitry Chagin #define	LINUX_SOCK_SEQPACKET	5
119eeb63e51SDmitry Chagin 
120eeb63e51SDmitry Chagin #define	LINUX_SOCK_MAX		LINUX_SOCK_SEQPACKET
121eeb63e51SDmitry Chagin 
1223933bde2SDmitry Chagin #define	LINUX_SOCK_TYPE_MASK	0xf
1233933bde2SDmitry Chagin 
1243933bde2SDmitry Chagin /* Flags for socket, socketpair, accept4 */
1253933bde2SDmitry Chagin 
1263933bde2SDmitry Chagin #define	LINUX_SOCK_CLOEXEC	LINUX_O_CLOEXEC
1273933bde2SDmitry Chagin #define	LINUX_SOCK_NONBLOCK	LINUX_O_NONBLOCK
1283933bde2SDmitry Chagin 
129d4dd69c4SDmitry Chagin struct l_ucred {
130d4dd69c4SDmitry Chagin 	uint32_t	pid;
131d4dd69c4SDmitry Chagin 	uint32_t	uid;
132d4dd69c4SDmitry Chagin 	uint32_t	gid;
133d4dd69c4SDmitry Chagin };
134d4dd69c4SDmitry Chagin 
135fc7510aeSEd Maste #if defined(__i386__) || defined(__arm__) || \
136fc7510aeSEd Maste     (defined(__amd64__) && defined(COMPAT_LINUX32))
137fc7510aeSEd Maste 
138a12b9b3dSDmitry Chagin struct linux_accept_args {
13956fba8e6SDmitry Chagin 	register_t s;
14056fba8e6SDmitry Chagin 	register_t addr;
14156fba8e6SDmitry Chagin 	register_t namelen;
142a12b9b3dSDmitry Chagin };
143a12b9b3dSDmitry Chagin 
144a12b9b3dSDmitry Chagin int linux_accept(struct thread *td, struct linux_accept_args *args);
145a12b9b3dSDmitry Chagin 
146d825ce0aSJohn Baldwin /* Operations for socketcall */
147d825ce0aSJohn Baldwin #define	LINUX_SOCKET		1
148d825ce0aSJohn Baldwin #define	LINUX_BIND		2
149d825ce0aSJohn Baldwin #define	LINUX_CONNECT		3
150d825ce0aSJohn Baldwin #define	LINUX_LISTEN		4
151d825ce0aSJohn Baldwin #define	LINUX_ACCEPT		5
152d825ce0aSJohn Baldwin #define	LINUX_GETSOCKNAME	6
153d825ce0aSJohn Baldwin #define	LINUX_GETPEERNAME	7
154d825ce0aSJohn Baldwin #define	LINUX_SOCKETPAIR	8
155d825ce0aSJohn Baldwin #define	LINUX_SEND		9
156d825ce0aSJohn Baldwin #define	LINUX_RECV		10
157d825ce0aSJohn Baldwin #define	LINUX_SENDTO		11
158d825ce0aSJohn Baldwin #define	LINUX_RECVFROM		12
159d825ce0aSJohn Baldwin #define	LINUX_SHUTDOWN		13
160d825ce0aSJohn Baldwin #define	LINUX_SETSOCKOPT	14
161d825ce0aSJohn Baldwin #define	LINUX_GETSOCKOPT	15
162d825ce0aSJohn Baldwin #define	LINUX_SENDMSG		16
163d825ce0aSJohn Baldwin #define	LINUX_RECVMSG		17
164d825ce0aSJohn Baldwin #define	LINUX_ACCEPT4		18
165e1ff74c0SDmitry Chagin #define	LINUX_RECVMMSG		19
166e1ff74c0SDmitry Chagin #define	LINUX_SENDMMSG		20
167fc7510aeSEd Maste #define	LINUX_SENDFILE		21
168fc7510aeSEd Maste 
169fc7510aeSEd Maste #endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
170d825ce0aSJohn Baldwin 
17185712939SDmitry Chagin /* Socket defines */
17285712939SDmitry Chagin #define	LINUX_SOL_SOCKET	1
17385712939SDmitry Chagin 
17485712939SDmitry Chagin #define	LINUX_SO_DEBUG		1
17585712939SDmitry Chagin #define	LINUX_SO_REUSEADDR	2
17685712939SDmitry Chagin #define	LINUX_SO_TYPE		3
17785712939SDmitry Chagin #define	LINUX_SO_ERROR		4
17885712939SDmitry Chagin #define	LINUX_SO_DONTROUTE	5
17985712939SDmitry Chagin #define	LINUX_SO_BROADCAST	6
18085712939SDmitry Chagin #define	LINUX_SO_SNDBUF		7
18185712939SDmitry Chagin #define	LINUX_SO_RCVBUF		8
18285712939SDmitry Chagin #define	LINUX_SO_KEEPALIVE	9
18385712939SDmitry Chagin #define	LINUX_SO_OOBINLINE	10
18485712939SDmitry Chagin #define	LINUX_SO_NO_CHECK	11
18585712939SDmitry Chagin #define	LINUX_SO_PRIORITY	12
18685712939SDmitry Chagin #define	LINUX_SO_LINGER		13
1873bc69ad9SEdward Tomasz Napierala #define	LINUX_SO_REUSEPORT	15
18885712939SDmitry Chagin #ifndef LINUX_SO_PASSCRED	/* powerpc differs */
18985712939SDmitry Chagin #define	LINUX_SO_PASSCRED	16
19085712939SDmitry Chagin #define	LINUX_SO_PEERCRED	17
19185712939SDmitry Chagin #define	LINUX_SO_RCVLOWAT	18
19285712939SDmitry Chagin #define	LINUX_SO_SNDLOWAT	19
19385712939SDmitry Chagin #define	LINUX_SO_RCVTIMEO	20
19485712939SDmitry Chagin #define	LINUX_SO_SNDTIMEO	21
19585712939SDmitry Chagin #endif
19685712939SDmitry Chagin #define	LINUX_SO_TIMESTAMP	29
19785712939SDmitry Chagin #define	LINUX_SO_ACCEPTCONN	30
198c31a6a66SEdward Tomasz Napierala #define	LINUX_SO_SNDBUFFORCE	32
199c31a6a66SEdward Tomasz Napierala #define	LINUX_SO_RCVBUFFORCE	33
2004fe5361cSEdward Tomasz Napierala #define	LINUX_SO_PROTOCOL	38
20185712939SDmitry Chagin 
202d825ce0aSJohn Baldwin /* Socket options */
203d825ce0aSJohn Baldwin #define	LINUX_IP_TOS		1
204d825ce0aSJohn Baldwin #define	LINUX_IP_TTL		2
205d825ce0aSJohn Baldwin #define	LINUX_IP_HDRINCL	3
206d825ce0aSJohn Baldwin #define	LINUX_IP_OPTIONS	4
207*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_ROUTER_ALERT	5
208*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_RECVOPTS	6
209*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_RETOPTS	7
210*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_PKTINFO	8
211*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_PKTOPTIONS	9
212*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_MTU_DISCOVER	10
213da6d8ae6SEdward Tomasz Napierala #define	LINUX_IP_RECVERR	11
214*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_RECVTTL	12
215*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_RECVTOS	13
216*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_MTU		14
217*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_FREEBIND	15
218*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_IPSEC_POLICY	16
219*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_XFRM_POLICY	17
220*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_PASSSEC	18
221*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_TRANSPARENT	19
222*8ec6c4a3SAlexander Leidinger 
223*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_MINTTL		21
224*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_NODEFRAG	22
225*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_CHECKSUM	23
226*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_BIND_ADDRESS_NO_PORT	24
227*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_RECVFRAGSIZE	25
228d825ce0aSJohn Baldwin 
229d825ce0aSJohn Baldwin #define	LINUX_IP_MULTICAST_IF		32
230d825ce0aSJohn Baldwin #define	LINUX_IP_MULTICAST_TTL		33
231d825ce0aSJohn Baldwin #define	LINUX_IP_MULTICAST_LOOP		34
232d825ce0aSJohn Baldwin #define	LINUX_IP_ADD_MEMBERSHIP		35
233d825ce0aSJohn Baldwin #define	LINUX_IP_DROP_MEMBERSHIP	36
234*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_UNBLOCK_SOURCE		37
235*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_BLOCK_SOURCE		38
236*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_ADD_SOURCE_MEMBERSHIP	39
237*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_DROP_SOURCE_MEMBERSHIP	40
238*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_MSFILTER		41
239d825ce0aSJohn Baldwin 
240*8ec6c4a3SAlexander Leidinger #define	LINUX_MCAST_JOIN_GROUP		42
241*8ec6c4a3SAlexander Leidinger #define	LINUX_MCAST_BLOCK_SOURCE	43
242*8ec6c4a3SAlexander Leidinger #define	LINUX_MCAST_UNBLOCK_SOURCE	44
243*8ec6c4a3SAlexander Leidinger #define	LINUX_MCAST_LEAVE_GROUP		45
244*8ec6c4a3SAlexander Leidinger #define	LINUX_MCAST_JOIN_SOURCE_GROUP	46
245*8ec6c4a3SAlexander Leidinger #define	LINUX_MCAST_LEAVE_SOURCE_GROUP	47
246*8ec6c4a3SAlexander Leidinger #define	LINUX_MCAST_MSFILTER		48
247*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_MULTICAST_ALL		49
248*8ec6c4a3SAlexander Leidinger #define	LINUX_IP_UNICAST_IF		50
249*8ec6c4a3SAlexander Leidinger 
250*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_ADDRFORM		1
251*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_2292PKTINFO		2
252*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_2292HOPOPTS		3
253*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_2292DSTOPTS		4
254*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_2292RTHDR		5
255*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_2292PKTOPTIONS	6
25686a9058bSAndrey V. Elsukov #define	LINUX_IPV6_CHECKSUM		7
257*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_2292HOPLIMIT		8
25886a9058bSAndrey V. Elsukov #define	LINUX_IPV6_NEXTHOP		9
259*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_AUTHHDR		10
260*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_FLOWINFO		11
261*8ec6c4a3SAlexander Leidinger 
26286a9058bSAndrey V. Elsukov #define	LINUX_IPV6_UNICAST_HOPS		16
26386a9058bSAndrey V. Elsukov #define	LINUX_IPV6_MULTICAST_IF		17
26486a9058bSAndrey V. Elsukov #define	LINUX_IPV6_MULTICAST_HOPS	18
26586a9058bSAndrey V. Elsukov #define	LINUX_IPV6_MULTICAST_LOOP	19
26686a9058bSAndrey V. Elsukov #define	LINUX_IPV6_ADD_MEMBERSHIP	20
26786a9058bSAndrey V. Elsukov #define	LINUX_IPV6_DROP_MEMBERSHIP	21
268*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_ROUTER_ALERT		22
269*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_MTU_DISCOVER		23
270*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_MTU			24
271*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_RECVERR		25
27286a9058bSAndrey V. Elsukov #define	LINUX_IPV6_V6ONLY		26
273*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_JOIN_ANYCAST		27
274*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_LEAVE_ANYCAST	28
275*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_MULTICAST_ALL	29
276*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_ROUTER_ALERT_ISOLATE	30
277*8ec6c4a3SAlexander Leidinger 
278*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_FLOWLABEL_MGR	32
279*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_FLOWINFO_SEND	33
280*8ec6c4a3SAlexander Leidinger 
281*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_IPSEC_POLICY		34
282*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_XFRM_POLICY		35
283*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_HDRINCL		36
28486a9058bSAndrey V. Elsukov 
28586a9058bSAndrey V. Elsukov #define	LINUX_IPV6_RECVPKTINFO		49
28686a9058bSAndrey V. Elsukov #define	LINUX_IPV6_PKTINFO		50
28786a9058bSAndrey V. Elsukov #define	LINUX_IPV6_RECVHOPLIMIT		51
28886a9058bSAndrey V. Elsukov #define	LINUX_IPV6_HOPLIMIT		52
28986a9058bSAndrey V. Elsukov #define	LINUX_IPV6_RECVHOPOPTS		53
29086a9058bSAndrey V. Elsukov #define	LINUX_IPV6_HOPOPTS		54
29186a9058bSAndrey V. Elsukov #define	LINUX_IPV6_RTHDRDSTOPTS		55
29286a9058bSAndrey V. Elsukov #define	LINUX_IPV6_RECVRTHDR		56
29386a9058bSAndrey V. Elsukov #define	LINUX_IPV6_RTHDR		57
29486a9058bSAndrey V. Elsukov #define	LINUX_IPV6_RECVDSTOPTS		58
29586a9058bSAndrey V. Elsukov #define	LINUX_IPV6_DSTOPTS		59
29686a9058bSAndrey V. Elsukov #define	LINUX_IPV6_RECVPATHMTU		60
29786a9058bSAndrey V. Elsukov #define	LINUX_IPV6_PATHMTU		61
29886a9058bSAndrey V. Elsukov #define	LINUX_IPV6_DONTFRAG		62
29986a9058bSAndrey V. Elsukov 
300*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_AUTOFLOWLABEL	70
301*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_ADDR_PREFERENCES	72
302*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_MINHOPCOUNT		73
303*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_ORIGDSTADDR		74
304*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_TRANSPARENT		75
305*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_UNICAST_IF		76
306*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_RECVFRAGSIZE		77
307*8ec6c4a3SAlexander Leidinger #define	LINUX_IPV6_FREEBIND		78
308*8ec6c4a3SAlexander Leidinger 
309d825ce0aSJohn Baldwin #define	LINUX_TCP_NODELAY	1
310d825ce0aSJohn Baldwin #define	LINUX_TCP_MAXSEG	2
311c2d47457SEdward Tomasz Napierala #define	LINUX_TCP_CORK		3
312d825ce0aSJohn Baldwin #define	LINUX_TCP_KEEPIDLE	4
313d825ce0aSJohn Baldwin #define	LINUX_TCP_KEEPINTVL	5
314d825ce0aSJohn Baldwin #define	LINUX_TCP_KEEPCNT	6
315d825ce0aSJohn Baldwin #define	LINUX_TCP_MD5SIG	14
316d825ce0aSJohn Baldwin 
31740dbba57SAssar Westerlund #endif /* _LINUX_SOCKET_H_ */
318