linux_socket.h revision 1.4
11.4Serh/* $NetBSD: linux_socket.h,v 1.4 1998/10/01 01:19:07 erh Exp $ */ 21.4Serh 31.4Serh/*- 41.4Serh * Copyright (c) 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.4Serh * by 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.4Serh */ 381.1Sfvdl 391.1Sfvdl/* 401.1Sfvdl * Copyright (c) 1995 Frank van der Linden 411.1Sfvdl * All rights reserved. 421.1Sfvdl * 431.1Sfvdl * Redistribution and use in source and binary forms, with or without 441.1Sfvdl * modification, are permitted provided that the following conditions 451.1Sfvdl * are met: 461.1Sfvdl * 1. Redistributions of source code must retain the above copyright 471.1Sfvdl * notice, this list of conditions and the following disclaimer. 481.1Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 491.1Sfvdl * notice, this list of conditions and the following disclaimer in the 501.1Sfvdl * documentation and/or other materials provided with the distribution. 511.1Sfvdl * 3. All advertising materials mentioning features or use of this software 521.1Sfvdl * must display the following acknowledgement: 531.1Sfvdl * This product includes software developed for the NetBSD Project 541.1Sfvdl * by Frank van der Linden 551.1Sfvdl * 4. The name of the author may not be used to endorse or promote products 561.1Sfvdl * derived from this software without specific prior written permission 571.1Sfvdl * 581.1Sfvdl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 591.1Sfvdl * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 601.1Sfvdl * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 611.1Sfvdl * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 621.1Sfvdl * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 631.1Sfvdl * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 641.1Sfvdl * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 651.1Sfvdl * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 661.1Sfvdl * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 671.1Sfvdl * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 681.1Sfvdl */ 691.1Sfvdl 701.4Serh#ifndef _I386_LINUX_SOCKET_H 711.4Serh#define _I386_LINUX_SOCKET_H 721.1Sfvdl 731.1Sfvdl/* 741.4Serh * Option levels for [gs]etsockopt(2). Only SOL_SOCKET is different, 751.1Sfvdl * the rest matches IPPROTO_XXX 761.1Sfvdl */ 771.1Sfvdl#define LINUX_SOL_SOCKET 1 781.1Sfvdl 791.1Sfvdl/* 801.4Serh * Options for [gs]etsockopt(2), socket level. For Linux, thay 811.1Sfvdl * are not masks, but just increasing numbers. 821.1Sfvdl */ 831.1Sfvdl 841.1Sfvdl#define LINUX_SO_DEBUG 1 851.1Sfvdl#define LINUX_SO_REUSEADDR 2 861.1Sfvdl#define LINUX_SO_TYPE 3 871.1Sfvdl#define LINUX_SO_ERROR 4 881.1Sfvdl#define LINUX_SO_DONTROUTE 5 891.1Sfvdl#define LINUX_SO_BROADCAST 6 901.1Sfvdl#define LINUX_SO_SNDBUF 7 911.1Sfvdl#define LINUX_SO_RCVBUF 8 921.1Sfvdl#define LINUX_SO_KEEPALIVE 9 931.1Sfvdl#define LINUX_SO_OOBINLINE 10 941.1Sfvdl#define LINUX_SO_NO_CHECK 11 951.1Sfvdl#define LINUX_SO_PRIORITY 12 961.1Sfvdl#define LINUX_SO_LINGER 13 971.1Sfvdl 981.4Serh/* unused: */ 991.4Serh#define LINUX_SO_BSDCOMPAT 14 1001.4Serh#define LINUX_SO_REUSEPORT 15 /* undef in Linux */ 1011.4Serh#define LINUX_SO_PASSCRED 16 1021.4Serh#define LINUX_SO_PEERCRED 17 1031.4Serh#define LINUX_SO_RCVLOWAT 18 1041.4Serh#define LINUX_SO_SNDLOWAT 19 1051.4Serh#define LINUX_SO_RCVTIMEO 20 1061.4Serh#define LINUX_SO_SNDTIMEO 21 1071.4Serh#define LINUX_SO_SECURITY_AUTHENTICATION 22 1081.4Serh#define LINUX_SO_SECURITY_ENCRYPTION_TRANSPORT 23 1091.4Serh#define LINUX_SO_SECURITY_ENCRYPTION_NETWORK 24 1101.4Serh 1111.4Serh#define LINUX_SO_BINDTODEVICE 25 1121.4Serh#define LINUX_SO_ATTACH_FILTER 26 1131.4Serh#define LINUX_SO_DETACH_FILTER 26 1141.1Sfvdl 1151.4Serh#endif /* !_I386_LINUX_SOCKET_H */ 116