linux_socket.h revision 1.1
11.1Smanu/* $NetBSD: linux_socket.h,v 1.1 2001/08/26 17:12:56 manu Exp $ */ 21.1Smanu 31.1Smanu/*- 41.1Smanu * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc. 51.1Smanu * All rights reserved. 61.1Smanu * 71.1Smanu * This code is derived from software contributed to The NetBSD Foundation 81.1Smanu * by Frank van der Linden, Eric Haszlakiewicz and Emmanuel Dreyfus. 91.1Smanu * 101.1Smanu * Redistribution and use in source and binary forms, with or without 111.1Smanu * modification, are permitted provided that the following conditions 121.1Smanu * are met: 131.1Smanu * 1. Redistributions of source code must retain the above copyright 141.1Smanu * notice, this list of conditions and the following disclaimer. 151.1Smanu * 2. Redistributions in binary form must reproduce the above copyright 161.1Smanu * notice, this list of conditions and the following disclaimer in the 171.1Smanu * documentation and/or other materials provided with the distribution. 181.1Smanu * 3. All advertising materials mentioning features or use of this software 191.1Smanu * must display the following acknowledgement: 201.1Smanu * This product includes software developed by the NetBSD 211.1Smanu * Foundation, Inc. and its contributors. 221.1Smanu * 4. Neither the name of The NetBSD Foundation nor the names of its 231.1Smanu * contributors may be used to endorse or promote products derived 241.1Smanu * from this software without specific prior written permission. 251.1Smanu * 261.1Smanu * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 271.1Smanu * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 281.1Smanu * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 291.1Smanu * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 301.1Smanu * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 311.1Smanu * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 321.1Smanu * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 331.1Smanu * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 341.1Smanu * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 351.1Smanu * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 361.1Smanu * POSSIBILITY OF SUCH DAMAGE. 371.1Smanu */ 381.1Smanu 391.1Smanu#ifndef _MIPS_LINUX_SOCKET_H 401.1Smanu#define _MIPS_LINUX_SOCKET_H 411.1Smanu 421.1Smanu/* 431.1Smanu * Everything is from Linux's include/asm-mips/socket.h 441.1Smanu */ 451.1Smanu 461.1Smanu/* 471.1Smanu * Option levels for [gs]etsockopt(2). Only SOL_SOCKET is different, 481.1Smanu * the rest matches IPPROTO_XXX 491.1Smanu */ 501.1Smanu#define LINUX_SOL_SOCKET 0xffff 511.1Smanu 521.1Smanu/* 531.1Smanu * Options for [gs]etsockopt(2), socket level. 541.1Smanu * In Linux, theses follow IRIX numbering scheme, 551.1Smanu * except numbers in decimal that are Linux specific 561.1Smanu */ 571.1Smanu 581.1Smanu#define LINUX_SO_DEBUG 0x0001 591.1Smanu#define LINUX_SO_REUSEADDR 0x0004 601.1Smanu#define LINUX_SO_TYPE 0x1008 611.1Smanu#define LINUX_SO_ERROR 0x1007 621.1Smanu#define LINUX_SO_DONTROUTE 0x0010 631.1Smanu#define LINUX_SO_BROADCAST 0x0020 641.1Smanu#define LINUX_SO_SNDBUF 0x1001 651.1Smanu#define LINUX_SO_RCVBUF 0x1002 661.1Smanu#define LINUX_SO_KEEPALIVE 0x0008 671.1Smanu#define LINUX_SO_OOBINLINE 0x0100 681.1Smanu#define LINUX_SO_NO_CHECK 11 691.1Smanu#define LINUX_SO_PRIORITY 12 701.1Smanu#define LINUX_SO_LINGER 0x0080 711.1Smanu#define LINUX_SO_BSDCOMPAT 14 721.1Smanu#define LINUX_SO_REUSEPORT 0x0200 /* undef in Linux */ 731.1Smanu#define LINUX_SO_RCVLOWAT 0x1004 741.1Smanu#define LINUX_SO_SNDLOWAT 0x1003 751.1Smanu#define LINUX_SO_RCVTIMEO 0x1005 761.1Smanu#define LINUX_SO_SNDTIMEO 0x1006 771.1Smanu#define LINUX_SO_PASSCRED 17 781.1Smanu#define LINUX_SO_PEERCRED 18 791.1Smanu#define LINUX_SO_SECURITY_AUTHENTICATION 22 801.1Smanu#define LINUX_SO_SECURITY_ENCRYPTION_TRANSPORT 23 811.1Smanu#define LINUX_SO_SECURITY_ENCRYPTION_NETWORK 24 821.1Smanu 831.1Smanu#define LINUX_SO_BINDTODEVICE 25 841.1Smanu#define LINUX_SO_ATTACH_FILTER 26 851.1Smanu#define LINUX_SO_DETACH_FILTER 27 861.1Smanu 871.1Smanu#define LINUX_SO_PEERNAME 28 881.1Smanu#define LINUX_SO_TIMESTAMP 29 891.1Smanu#define LINUX_SCM_TIMESTAMP LINUX_SO_TIMESTAMP 901.1Smanu 911.1Smanu#endif /* !_MIPS_LINUX_SOCKET_H */ 92