diff --git a/include/asm-alpha/socket.h b/include/asm-alpha/socket.h index 88912c4c8931f979e95bbf13729253f9ee89c8a3..d00259d3dc7849c69b1d4e9f0c828505142395ab 100644 --- a/include/asm-alpha/socket.h +++ b/include/asm-alpha/socket.h @@ -55,20 +55,4 @@ #define SO_SECURITY_ENCRYPTION_TRANSPORT 20 #define SO_SECURITY_ENCRYPTION_NETWORK 21 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-arm/socket.h b/include/asm-arm/socket.h index b05e717397a1c7869a7d2ae69347646cb26e9848..46d20585d95143c0bf87fe8ea299fe785cf0922d 100644 --- a/include/asm-arm/socket.h +++ b/include/asm-arm/socket.h @@ -47,20 +47,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-arm26/socket.h b/include/asm-arm26/socket.h index b05e717397a1c7869a7d2ae69347646cb26e9848..46d20585d95143c0bf87fe8ea299fe785cf0922d 100644 --- a/include/asm-arm26/socket.h +++ b/include/asm-arm26/socket.h @@ -47,20 +47,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-cris/socket.h b/include/asm-cris/socket.h index b4421808b6762f29f92f673138938d595718c807..f159b4f165f74f165671455f8be0cfba48ebc944 100644 --- a/include/asm-cris/socket.h +++ b/include/asm-cris/socket.h @@ -49,21 +49,6 @@ #define SO_PEERSEC 31 -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-h8300/socket.h b/include/asm-h8300/socket.h index 070d46d2344e5abb22ad78eb9abf8da658f19a38..af33b8525dcf4596ce889a9e5e25519dca44c36a 100644 --- a/include/asm-h8300/socket.h +++ b/include/asm-h8300/socket.h @@ -47,20 +47,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-i386/socket.h b/include/asm-i386/socket.h index 711f906193fd97137f2b9a0cee1ac6a1d770be0c..07f6b38ad140d5ace68f4d44bfeb61cf351b554f 100644 --- a/include/asm-i386/socket.h +++ b/include/asm-i386/socket.h @@ -47,20 +47,4 @@ #define SO_PEERSEC 31 -/* Nasty libc5 fixup - bletch */ -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-ia64/socket.h b/include/asm-ia64/socket.h index bf4434e26a81acafcef77cc73b2a985589a8cb8d..21a9f10d6baafd033e96a83d7c9e1e0568b823ea 100644 --- a/include/asm-ia64/socket.h +++ b/include/asm-ia64/socket.h @@ -56,20 +56,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_IA64_SOCKET_H */ diff --git a/include/asm-m68k/socket.h b/include/asm-m68k/socket.h index 68a33bfbae03c4f4f1dc4fad4473266caff760d2..8d0b9fc2d07e4ea82a64504591201ad83ccd8ea8 100644 --- a/include/asm-m68k/socket.h +++ b/include/asm-m68k/socket.h @@ -47,20 +47,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-mips/socket.h b/include/asm-mips/socket.h index 6556c10be8f00cee446b5532a56b45bb4223b6ad..855b86f3ea0e74713b41a68ea25a12a840c121a2 100644 --- a/include/asm-mips/socket.h +++ b/include/asm-mips/socket.h @@ -68,20 +68,4 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ #define SO_PEERSEC 30 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_DGRAM 1 /* datagram (conn.less) socket */ -#define SOCK_STREAM 2 /* stream (connection) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-parisc/socket.h b/include/asm-parisc/socket.h index fd3f0f29eb3cdac47d33bd4258879d4c2c231b90..4a77996c1862c53c773d334f8c27646ad4f9cbdc 100644 --- a/include/asm-parisc/socket.h +++ b/include/asm-parisc/socket.h @@ -47,18 +47,4 @@ #define SO_PEERSEC 0x401d -#if defined(__KERNEL__) -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-ppc/socket.h b/include/asm-ppc/socket.h index bad94c36f1b8c08fab129dc2941e00c1ea83f0a5..4134376b0f66c68bc55b6e9291b87c2f812384ec 100644 --- a/include/asm-ppc/socket.h +++ b/include/asm-ppc/socket.h @@ -53,20 +53,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif /* __KERNEL__ */ - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-ppc64/socket.h b/include/asm-ppc64/socket.h index 1021a5268346870b1ee0960d1cc7deb7e136f114..59e00dfc8b8ec48d4e566bd4d20bfd0347740251 100644 --- a/include/asm-ppc64/socket.h +++ b/include/asm-ppc64/socket.h @@ -54,20 +54,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-s390/socket.h b/include/asm-s390/socket.h index 1855ec7a112b225efb00d77b03e210d6e96d1fab..0e96eeca4e6b748233d9ca842e254e466bef0075 100644 --- a/include/asm-s390/socket.h +++ b/include/asm-s390/socket.h @@ -55,20 +55,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-sh/socket.h b/include/asm-sh/socket.h index 2b9469472f76b3b50a3cb035a6ee29f52e3f9d66..dde696c3b4c7660d59f5e6a3809a003968f5c07b 100644 --- a/include/asm-sh/socket.h +++ b/include/asm-sh/socket.h @@ -47,20 +47,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* __ASM_SH_SOCKET_H */ diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h index cfa529d9bb968ce5377de18622e50c884ec3b8b2..c1154e3ecfdf53b3cbccffa88c032194e10316bc 100644 --- a/include/asm-sparc/socket.h +++ b/include/asm-sparc/socket.h @@ -52,20 +52,4 @@ #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 #define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h index ba2230ba1d7de3870cc6fe31bbfd406943132dd8..865547a23908120b7e8c8eda37a08b78c1d047a9 100644 --- a/include/asm-sparc64/socket.h +++ b/include/asm-sparc64/socket.h @@ -52,20 +52,4 @@ #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 #define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-v850/socket.h b/include/asm-v850/socket.h index 7d7f80efa8b36bd04b8502f2adc74caeaaff1fff..213b852af53e83c77f151137d5ab483fca27f8c8 100644 --- a/include/asm-v850/socket.h +++ b/include/asm-v850/socket.h @@ -47,20 +47,4 @@ #define SO_PEERSEC 31 -/* Nast libc5 fixup - bletch */ -#if defined(__KERNEL__) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* __V850_SOCKET_H__ */ diff --git a/include/asm-x86_64/socket.h b/include/asm-x86_64/socket.h index 373e7abadfb5728a037adb29e55139af4c91cf3d..d9a252ea8210d2677809339fd725fd948b3deeb8 100644 --- a/include/asm-x86_64/socket.h +++ b/include/asm-x86_64/socket.h @@ -47,20 +47,4 @@ #define SO_PEERSEC 31 -/* Nasty libc5 fixup - bletch */ -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - #endif /* _ASM_SOCKET_H */ diff --git a/include/linux/net.h b/include/linux/net.h index 80e7fec727e36fff783feb34aac360d8c5185cb2..0f710b7e41219a444963e792ef575d002a61e0f8 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -61,6 +61,27 @@ typedef enum { #define SOCK_ASYNC_WAITDATA 1 #define SOCK_NOSPACE 2 +/** sock_type - Socket types + * + * @SOCK_STREAM - stream (connection) socket + * @SOCK_DGRAM - datagram (conn.less) socket + * @SOCK_RAW - raw socket + * @SOCK_RDM - reliably-delivered message + * @SOCK_SEQPACKET - sequential packet socket + * @SOCK_PACKET - linux specific way of getting packets at the dev level. + * For writing rarp and other similar things on the user level. + */ +enum sock_type { + SOCK_STREAM = 1, + SOCK_DGRAM = 2, + SOCK_RAW = 3, + SOCK_RDM = 4, + SOCK_SEQPACKET = 5, + SOCK_PACKET = 10, +}; + +#define SOCK_MAX (SOCK_PACKET + 1) + /** * struct socket - general BSD socket * @state - socket state (%SS_CONNECTED, etc)