linux_socket.h revision 1.1
11.1Sfvdl/* $NetBSD: linux_socket.h,v 1.1 1995/02/28 23:26:03 fvdl Exp $ */ 21.1Sfvdl 31.1Sfvdl/* 41.1Sfvdl * Copyright (c) 1995 Frank van der Linden 51.1Sfvdl * All rights reserved. 61.1Sfvdl * 71.1Sfvdl * Redistribution and use in source and binary forms, with or without 81.1Sfvdl * modification, are permitted provided that the following conditions 91.1Sfvdl * are met: 101.1Sfvdl * 1. Redistributions of source code must retain the above copyright 111.1Sfvdl * notice, this list of conditions and the following disclaimer. 121.1Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 131.1Sfvdl * notice, this list of conditions and the following disclaimer in the 141.1Sfvdl * documentation and/or other materials provided with the distribution. 151.1Sfvdl * 3. All advertising materials mentioning features or use of this software 161.1Sfvdl * must display the following acknowledgement: 171.1Sfvdl * This product includes software developed for the NetBSD Project 181.1Sfvdl * by Frank van der Linden 191.1Sfvdl * 4. The name of the author may not be used to endorse or promote products 201.1Sfvdl * derived from this software without specific prior written permission 211.1Sfvdl * 221.1Sfvdl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 231.1Sfvdl * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 241.1Sfvdl * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 251.1Sfvdl * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 261.1Sfvdl * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 271.1Sfvdl * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 281.1Sfvdl * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 291.1Sfvdl * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 301.1Sfvdl * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 311.1Sfvdl * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 321.1Sfvdl */ 331.1Sfvdl 341.1Sfvdl#ifndef _LINUX_SOCKET_H 351.1Sfvdl#define _LINUX_SOCKET_H 361.1Sfvdl 371.1Sfvdl/* 381.1Sfvdl * Various Linux socket defines. Everything that is not re-defined here 391.1Sfvdl * is the same as in NetBSD. 401.1Sfvdl * 411.1Sfvdl * COMPAT_43 is assumed, and the osockaddr struct is used (it is what 421.1Sfvdl * Linux uses) 431.1Sfvdl */ 441.1Sfvdl 451.1Sfvdl/* 461.1Sfvdl * Address families. There are fewer of them, and they're numbered 471.1Sfvdl * a bit different 481.1Sfvdl */ 491.1Sfvdl 501.1Sfvdl#define LINUX_AF_UNSPEC 0 511.1Sfvdl#define LINUX_AF_UNIX 1 521.1Sfvdl#define LINUX_AF_INET 2 531.1Sfvdl#define LINUX_AF_AX25 3 541.1Sfvdl#define LINUX_AF_IPX 4 551.1Sfvdl#define LINUX_AF_APPLETALK 5 561.1Sfvdl 571.1Sfvdl/* 581.1Sfvdl * Option levels for [gs]etsockopt(2). Only SOL_SOCKET is different, 591.1Sfvdl * the rest matches IPPROTO_XXX 601.1Sfvdl */ 611.1Sfvdl 621.1Sfvdl#define LINUX_SOL_SOCKET 1 631.1Sfvdl#define LINUX_SOL_IP 0 641.1Sfvdl#define LINUX_SOL_IPX 256 651.1Sfvdl#define LINUX_SOL_AX25 257 661.1Sfvdl#define LINUX_SOL_TCP 6 671.1Sfvdl#define LINUX_SOL_UDP 17 681.1Sfvdl 691.1Sfvdl/* 701.1Sfvdl * Options for [gs]etsockopt(2), socket level. For Linux, they 711.1Sfvdl * are not masks, but just increasing numbers. 721.1Sfvdl */ 731.1Sfvdl 741.1Sfvdl#define LINUX_SO_DEBUG 1 751.1Sfvdl#define LINUX_SO_REUSEADDR 2 761.1Sfvdl#define LINUX_SO_TYPE 3 771.1Sfvdl#define LINUX_SO_ERROR 4 781.1Sfvdl#define LINUX_SO_DONTROUTE 5 791.1Sfvdl#define LINUX_SO_BROADCAST 6 801.1Sfvdl#define LINUX_SO_SNDBUF 7 811.1Sfvdl#define LINUX_SO_RCVBUF 8 821.1Sfvdl#define LINUX_SO_KEEPALIVE 9 831.1Sfvdl#define LINUX_SO_OOBINLINE 10 841.1Sfvdl#define LINUX_SO_NO_CHECK 11 851.1Sfvdl#define LINUX_SO_PRIORITY 12 861.1Sfvdl#define LINUX_SO_LINGER 13 871.1Sfvdl 881.1Sfvdl/* 891.1Sfvdl * Options vor [gs]etsockopt(2), IP level. Only 2 of them are 901.1Sfvdl * currently implemented in Linux 911.1Sfvdl */ 921.1Sfvdl 931.1Sfvdl#define LINUX_IP_TOS 1 941.1Sfvdl#define LINUX_IP_TTL 2 951.1Sfvdl 961.1Sfvdl#endif /* _LINUX_SOCKET_H */ 97