summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_socket.h
diff options
context:
space:
mode:
authorerh <erh@NetBSD.org>1998-10-01 01:19:07 +0000
committererh <erh@NetBSD.org>1998-10-01 01:19:07 +0000
commit79905dc1f33588cc6ee9bb4910c0146fe7d9bd58 (patch)
tree4b9ad4303496dc77d36fe2708c8667e5ada67878 /sys/compat/linux/common/linux_socket.h
parent45c3ba3edbe3c4552accf87c8c4c7a60ef8accf5 (diff)
Split linux_socket.h into i386 and common parts.
Diffstat (limited to 'sys/compat/linux/common/linux_socket.h')
-rw-r--r--sys/compat/linux/common/linux_socket.h102
1 files changed, 77 insertions, 25 deletions
diff --git a/sys/compat/linux/common/linux_socket.h b/sys/compat/linux/common/linux_socket.h
index a0da285cfa2..da82bb4af72 100644
--- a/sys/compat/linux/common/linux_socket.h
+++ b/sys/compat/linux/common/linux_socket.h
@@ -1,4 +1,40 @@
-/* $NetBSD: linux_socket.h,v 1.3 1995/05/28 10:16:34 mycroft Exp $ */
+/* $NetBSD: linux_socket.h,v 1.4 1998/10/01 01:19:07 erh Exp $ */
+
+/*-
+ * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Eric Haszlakiewicz.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
/*
* Copyright (c) 1995 Frank van der Linden
@@ -31,8 +67,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _LINUX_SOCKET_H
-#define _LINUX_SOCKET_H
+/* Note: Machine dependant portions of this file exist. */
+
+#ifndef _COMMON_LINUX_SOCKET_H
+#define _COMMON_LINUX_SOCKET_H
/*
* Various Linux socket defines. Everything that is not re-defined here
@@ -53,40 +91,54 @@
#define LINUX_AF_AX25 3
#define LINUX_AF_IPX 4
#define LINUX_AF_APPLETALK 5
+#define LINUX_AF_NETROM 6
+#define LINUX_AF_BRIDGE 7
+#define LINUX_AF_ATMPVC 8
+#define LINUX_AF_X25 9
+#define LINUX_AF_INET6 10
+#define LINUX_AF_ROSE 11
+#define LINUX_AF_DECnet 12
+#define LINUX_AF_NETBEUI 13
+#define LINUX_AF_SECURITY 14
+#define LINUX_pseudo_AF_KEY 15
+#define LINUX_AF_NETLINK 16
+#define LINUX_AF_PACKET 17
+#define LINUX_AF_ASH 18
+#define LINUX_AF_ECONET 19
+#define LINUX_AF_ATMSVC 20
+#define LINUX_AF_SNA 22
+#define LINUX_AF_MAX 32
/*
* Option levels for [gs]etsockopt(2). Only SOL_SOCKET is different,
* the rest matches IPPROTO_XXX
*/
-#define LINUX_SOL_SOCKET 1
+/* SOL_SOCKET is machine dependant on Linux */
#define LINUX_SOL_IP 0
-#define LINUX_SOL_IPX 256
-#define LINUX_SOL_AX25 257
#define LINUX_SOL_TCP 6
#define LINUX_SOL_UDP 17
+/* Unused for now: */
+#define LINUX_SOL_IPV6 41
+#define LINUX_SOL_ICMPV6 58
+#define LINUX_SOL_RAW 255
+#define LINUX_SOL_IPX 256
+#define LINUX_SOL_AX25 257
+#define LINUX_SOL_ATALK 258
+#define LINUX_SOL_NETROM 259
+#define LINUX_SOL_ROSE 260
+#define LINUX_SOL_DECNET 261
+#define LINUX_SOL_X25 262
+#define LINUX_SOL_PACKET 263
+#define LINUX_SOL_ATM 264
+#define LINUX_SOL_AAL 265
/*
- * Options for [gs]etsockopt(2), socket level. For Linux, they
- * are not masks, but just increasing numbers.
+ * Options for [gs]etsockopt(2), socket level are machine dependant.
*/
-#define LINUX_SO_DEBUG 1
-#define LINUX_SO_REUSEADDR 2
-#define LINUX_SO_TYPE 3
-#define LINUX_SO_ERROR 4
-#define LINUX_SO_DONTROUTE 5
-#define LINUX_SO_BROADCAST 6
-#define LINUX_SO_SNDBUF 7
-#define LINUX_SO_RCVBUF 8
-#define LINUX_SO_KEEPALIVE 9
-#define LINUX_SO_OOBINLINE 10
-#define LINUX_SO_NO_CHECK 11
-#define LINUX_SO_PRIORITY 12
-#define LINUX_SO_LINGER 13
-
/*
- * Options vor [gs]etsockopt(2), IP level.
+ * Options for [gs]etsockopt(2), IP level.
*/
#define LINUX_IP_TOS 1
@@ -98,10 +150,10 @@
#define LINUX_IP_DROP_MEMBERSHIP 36
/*
- * Options vor [gs]etsockopt(2), TCP level.
+ * Options for [gs]etsockopt(2), TCP level.
*/
#define LINUX_TCP_NODELAY 1
#define LINUX_TCP_MAXSEG 2
-#endif /* _LINUX_SOCKET_H */
+#endif /* !_COMMON_LINUX_SOCKET_H */