Commit f758b3ae authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Patrick McHardy

[NET]: Move SOCK_foo types into linux/net.h

Every arch defines them the same without exception
and with this we only need to update one spot when
adding new socket types.
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 43da55cb
...@@ -55,20 +55,4 @@ ...@@ -55,20 +55,4 @@
#define SO_SECURITY_ENCRYPTION_TRANSPORT 20 #define SO_SECURITY_ENCRYPTION_TRANSPORT 20
#define SO_SECURITY_ENCRYPTION_NETWORK 21 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -47,20 +47,4 @@ ...@@ -47,20 +47,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -47,20 +47,4 @@ ...@@ -47,20 +47,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -49,21 +49,6 @@ ...@@ -49,21 +49,6 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -47,20 +47,4 @@ ...@@ -47,20 +47,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -47,20 +47,4 @@ ...@@ -47,20 +47,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -56,20 +56,4 @@ ...@@ -56,20 +56,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_IA64_SOCKET_H */
...@@ -47,20 +47,4 @@ ...@@ -47,20 +47,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -68,20 +68,4 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ ...@@ -68,20 +68,4 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
#define SO_PEERSEC 30 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -47,18 +47,4 @@ ...@@ -47,18 +47,4 @@
#define SO_PEERSEC 0x401d #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 */ #endif /* _ASM_SOCKET_H */
...@@ -53,20 +53,4 @@ ...@@ -53,20 +53,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -54,20 +54,4 @@ ...@@ -54,20 +54,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -55,20 +55,4 @@ ...@@ -55,20 +55,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -47,20 +47,4 @@ ...@@ -47,20 +47,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* __ASM_SH_SOCKET_H */
...@@ -52,20 +52,4 @@ ...@@ -52,20 +52,4 @@
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
#define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -52,20 +52,4 @@ ...@@ -52,20 +52,4 @@
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
#define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -47,20 +47,4 @@ ...@@ -47,20 +47,4 @@
#define SO_PEERSEC 31 #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__ */ #endif /* __V850_SOCKET_H__ */
...@@ -47,20 +47,4 @@ ...@@ -47,20 +47,4 @@
#define SO_PEERSEC 31 #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 */ #endif /* _ASM_SOCKET_H */
...@@ -61,6 +61,27 @@ typedef enum { ...@@ -61,6 +61,27 @@ typedef enum {
#define SOCK_ASYNC_WAITDATA 1 #define SOCK_ASYNC_WAITDATA 1
#define SOCK_NOSPACE 2 #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 * struct socket - general BSD socket
* @state - socket state (%SS_CONNECTED, etc) * @state - socket state (%SS_CONNECTED, etc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment