xref: /netbsd/sys/compat/linux/arch/i386/linux_socket.h (revision 8096c25a)
1*8096c25aSfvdl /*	$NetBSD: linux_socket.h,v 1.5 1998/10/04 00:02:27 fvdl Exp $	*/
279905dc1Serh 
379905dc1Serh /*-
4*8096c25aSfvdl  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
579905dc1Serh  * All rights reserved.
679905dc1Serh  *
779905dc1Serh  * This code is derived from software contributed to The NetBSD Foundation
8*8096c25aSfvdl  * by Frank van der Linden and Eric Haszlakiewicz.
979905dc1Serh  *
1079905dc1Serh  * Redistribution and use in source and binary forms, with or without
1179905dc1Serh  * modification, are permitted provided that the following conditions
1279905dc1Serh  * are met:
1379905dc1Serh  * 1. Redistributions of source code must retain the above copyright
1479905dc1Serh  *    notice, this list of conditions and the following disclaimer.
1579905dc1Serh  * 2. Redistributions in binary form must reproduce the above copyright
1679905dc1Serh  *    notice, this list of conditions and the following disclaimer in the
1779905dc1Serh  *    documentation and/or other materials provided with the distribution.
1879905dc1Serh  * 3. All advertising materials mentioning features or use of this software
1979905dc1Serh  *    must display the following acknowledgement:
2079905dc1Serh  *	This product includes software developed by the NetBSD
2179905dc1Serh  *	Foundation, Inc. and its contributors.
2279905dc1Serh  * 4. Neither the name of The NetBSD Foundation nor the names of its
2379905dc1Serh  *    contributors may be used to endorse or promote products derived
2479905dc1Serh  *    from this software without specific prior written permission.
2579905dc1Serh  *
2679905dc1Serh  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2779905dc1Serh  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2879905dc1Serh  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2979905dc1Serh  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
3079905dc1Serh  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3179905dc1Serh  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3279905dc1Serh  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3379905dc1Serh  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3479905dc1Serh  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3579905dc1Serh  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3679905dc1Serh  * POSSIBILITY OF SUCH DAMAGE.
3779905dc1Serh  */
383bf459f3Sfvdl 
3979905dc1Serh #ifndef _I386_LINUX_SOCKET_H
4079905dc1Serh #define _I386_LINUX_SOCKET_H
413bf459f3Sfvdl 
423bf459f3Sfvdl /*
433bf459f3Sfvdl  * Option levels for [gs]etsockopt(2).  Only SOL_SOCKET is different,
443bf459f3Sfvdl  * the rest matches IPPROTO_XXX
453bf459f3Sfvdl  */
463bf459f3Sfvdl #define LINUX_SOL_SOCKET	1
473bf459f3Sfvdl 
483bf459f3Sfvdl /*
4979905dc1Serh  * Options for [gs]etsockopt(2), socket level.  For Linux, thay
503bf459f3Sfvdl  * are not masks, but just increasing numbers.
513bf459f3Sfvdl  */
523bf459f3Sfvdl 
533bf459f3Sfvdl #define LINUX_SO_DEBUG		1
543bf459f3Sfvdl #define LINUX_SO_REUSEADDR	2
553bf459f3Sfvdl #define LINUX_SO_TYPE		3
563bf459f3Sfvdl #define LINUX_SO_ERROR		4
573bf459f3Sfvdl #define LINUX_SO_DONTROUTE	5
583bf459f3Sfvdl #define LINUX_SO_BROADCAST	6
593bf459f3Sfvdl #define LINUX_SO_SNDBUF		7
603bf459f3Sfvdl #define LINUX_SO_RCVBUF		8
613bf459f3Sfvdl #define LINUX_SO_KEEPALIVE	9
623bf459f3Sfvdl #define LINUX_SO_OOBINLINE	10
633bf459f3Sfvdl #define LINUX_SO_NO_CHECK	11
643bf459f3Sfvdl #define LINUX_SO_PRIORITY	12
653bf459f3Sfvdl #define LINUX_SO_LINGER		13
663bf459f3Sfvdl 
6779905dc1Serh /* unused: */
6879905dc1Serh #define LINUX_SO_BSDCOMPAT	14
6979905dc1Serh #define LINUX_SO_REUSEPORT	15	/* undef in Linux */
7079905dc1Serh #define LINUX_SO_PASSCRED	16
7179905dc1Serh #define LINUX_SO_PEERCRED	17
7279905dc1Serh #define LINUX_SO_RCVLOWAT	18
7379905dc1Serh #define LINUX_SO_SNDLOWAT	19
7479905dc1Serh #define LINUX_SO_RCVTIMEO	20
7579905dc1Serh #define LINUX_SO_SNDTIMEO	21
7679905dc1Serh #define LINUX_SO_SECURITY_AUTHENTICATION	22
7779905dc1Serh #define LINUX_SO_SECURITY_ENCRYPTION_TRANSPORT	23
7879905dc1Serh #define LINUX_SO_SECURITY_ENCRYPTION_NETWORK	24
793bf459f3Sfvdl 
8079905dc1Serh #define LINUX_SO_BINDTODEVICE	25
8179905dc1Serh #define LINUX_SO_ATTACH_FILTER	26
8279905dc1Serh #define LINUX_SO_DETACH_FILTER	26
833bf459f3Sfvdl 
8479905dc1Serh #endif /* !_I386_LINUX_SOCKET_H */
85