linux_socket.h revision 1.5
11.5Sfvdl/*	$NetBSD: linux_socket.h,v 1.5 1998/10/04 00:02:27 fvdl Exp $	*/
21.4Serh
31.4Serh/*-
41.5Sfvdl * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
51.4Serh * All rights reserved.
61.4Serh *
71.4Serh * This code is derived from software contributed to The NetBSD Foundation
81.5Sfvdl * by Frank van der Linden and Eric Haszlakiewicz.
91.4Serh *
101.4Serh * Redistribution and use in source and binary forms, with or without
111.4Serh * modification, are permitted provided that the following conditions
121.4Serh * are met:
131.4Serh * 1. Redistributions of source code must retain the above copyright
141.4Serh *    notice, this list of conditions and the following disclaimer.
151.4Serh * 2. Redistributions in binary form must reproduce the above copyright
161.4Serh *    notice, this list of conditions and the following disclaimer in the
171.4Serh *    documentation and/or other materials provided with the distribution.
181.4Serh * 3. All advertising materials mentioning features or use of this software
191.4Serh *    must display the following acknowledgement:
201.4Serh *	This product includes software developed by the NetBSD
211.4Serh *	Foundation, Inc. and its contributors.
221.4Serh * 4. Neither the name of The NetBSD Foundation nor the names of its
231.4Serh *    contributors may be used to endorse or promote products derived
241.4Serh *    from this software without specific prior written permission.
251.4Serh *
261.4Serh * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
271.4Serh * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
281.4Serh * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
291.4Serh * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
301.4Serh * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
311.4Serh * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
321.4Serh * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
331.4Serh * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
341.4Serh * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
351.4Serh * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
361.4Serh * POSSIBILITY OF SUCH DAMAGE.
371.1Sfvdl */
381.1Sfvdl
391.4Serh#ifndef _I386_LINUX_SOCKET_H
401.4Serh#define _I386_LINUX_SOCKET_H
411.1Sfvdl
421.1Sfvdl/*
431.4Serh * Option levels for [gs]etsockopt(2).  Only SOL_SOCKET is different,
441.1Sfvdl * the rest matches IPPROTO_XXX
451.1Sfvdl */
461.1Sfvdl#define LINUX_SOL_SOCKET	1
471.1Sfvdl
481.1Sfvdl/*
491.4Serh * Options for [gs]etsockopt(2), socket level.  For Linux, thay
501.1Sfvdl * are not masks, but just increasing numbers.
511.1Sfvdl */
521.1Sfvdl
531.1Sfvdl#define LINUX_SO_DEBUG		1
541.1Sfvdl#define LINUX_SO_REUSEADDR	2
551.1Sfvdl#define LINUX_SO_TYPE		3
561.1Sfvdl#define LINUX_SO_ERROR		4
571.1Sfvdl#define LINUX_SO_DONTROUTE	5
581.1Sfvdl#define LINUX_SO_BROADCAST	6
591.1Sfvdl#define LINUX_SO_SNDBUF		7
601.1Sfvdl#define LINUX_SO_RCVBUF		8
611.1Sfvdl#define LINUX_SO_KEEPALIVE	9
621.1Sfvdl#define LINUX_SO_OOBINLINE	10
631.1Sfvdl#define LINUX_SO_NO_CHECK	11
641.1Sfvdl#define LINUX_SO_PRIORITY	12
651.1Sfvdl#define LINUX_SO_LINGER		13
661.1Sfvdl
671.4Serh/* unused: */
681.4Serh#define LINUX_SO_BSDCOMPAT	14
691.4Serh#define LINUX_SO_REUSEPORT	15	/* undef in Linux */
701.4Serh#define LINUX_SO_PASSCRED	16
711.4Serh#define LINUX_SO_PEERCRED	17
721.4Serh#define LINUX_SO_RCVLOWAT	18
731.4Serh#define LINUX_SO_SNDLOWAT	19
741.4Serh#define LINUX_SO_RCVTIMEO	20
751.4Serh#define LINUX_SO_SNDTIMEO	21
761.4Serh#define LINUX_SO_SECURITY_AUTHENTICATION	22
771.4Serh#define LINUX_SO_SECURITY_ENCRYPTION_TRANSPORT	23
781.4Serh#define LINUX_SO_SECURITY_ENCRYPTION_NETWORK	24
791.4Serh
801.4Serh#define LINUX_SO_BINDTODEVICE	25
811.4Serh#define LINUX_SO_ATTACH_FILTER	26
821.4Serh#define LINUX_SO_DETACH_FILTER	26
831.1Sfvdl
841.4Serh#endif /* !_I386_LINUX_SOCKET_H */
85