Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright (C) 1997, 1999, 2000, 2001 Ralf Baechle
0007  * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
0008  */
0009 #ifndef _ASM_SOCKET_H
0010 #define _ASM_SOCKET_H
0011 
0012 #include <uapi/asm/socket.h>
0013 
0014 
0015 /** sock_type - Socket types
0016  *
0017  * Please notice that for binary compat reasons MIPS has to
0018  * override the enum sock_type in include/linux/net.h, so
0019  * we define ARCH_HAS_SOCKET_TYPES here.
0020  *
0021  * @SOCK_DGRAM - datagram (conn.less) socket
0022  * @SOCK_STREAM - stream (connection) socket
0023  * @SOCK_RAW - raw socket
0024  * @SOCK_RDM - reliably-delivered message
0025  * @SOCK_SEQPACKET - sequential packet socket
0026  * @SOCK_PACKET - linux specific way of getting packets at the dev level.
0027  *        For writing rarp and other similar things on the user level.
0028  */
0029 enum sock_type {
0030     SOCK_DGRAM  = 1,
0031     SOCK_STREAM = 2,
0032     SOCK_RAW    = 3,
0033     SOCK_RDM    = 4,
0034     SOCK_SEQPACKET  = 5,
0035     SOCK_DCCP   = 6,
0036     SOCK_PACKET = 10,
0037 };
0038 
0039 #define SOCK_MAX (SOCK_PACKET + 1)
0040 /* Mask which covers at least up to SOCK_MASK-1.  The
0041  *  * remaining bits are used as flags. */
0042 #define SOCK_TYPE_MASK 0xf
0043 
0044 /* Flags for socket, socketpair, paccept */
0045 #define SOCK_CLOEXEC    O_CLOEXEC
0046 #define SOCK_NONBLOCK   O_NONBLOCK
0047 
0048 #define ARCH_HAS_SOCKET_TYPES 1
0049 
0050 #endif /* _ASM_SOCKET_H */