162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
362306a36Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
462306a36Sopenharmony_ci * for more details.
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Copyright (C) 1997, 1999, 2000, 2001 Ralf Baechle
762306a36Sopenharmony_ci * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci#ifndef _ASM_SOCKET_H
1062306a36Sopenharmony_ci#define _ASM_SOCKET_H
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#include <uapi/asm/socket.h>
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci/** sock_type - Socket types
1662306a36Sopenharmony_ci *
1762306a36Sopenharmony_ci * Please notice that for binary compat reasons MIPS has to
1862306a36Sopenharmony_ci * override the enum sock_type in include/linux/net.h, so
1962306a36Sopenharmony_ci * we define ARCH_HAS_SOCKET_TYPES here.
2062306a36Sopenharmony_ci *
2162306a36Sopenharmony_ci * @SOCK_DGRAM - datagram (conn.less) socket
2262306a36Sopenharmony_ci * @SOCK_STREAM - stream (connection) socket
2362306a36Sopenharmony_ci * @SOCK_RAW - raw socket
2462306a36Sopenharmony_ci * @SOCK_RDM - reliably-delivered message
2562306a36Sopenharmony_ci * @SOCK_SEQPACKET - sequential packet socket
2662306a36Sopenharmony_ci * @SOCK_PACKET - linux specific way of getting packets at the dev level.
2762306a36Sopenharmony_ci *		  For writing rarp and other similar things on the user level.
2862306a36Sopenharmony_ci */
2962306a36Sopenharmony_cienum sock_type {
3062306a36Sopenharmony_ci	SOCK_DGRAM	= 1,
3162306a36Sopenharmony_ci	SOCK_STREAM	= 2,
3262306a36Sopenharmony_ci	SOCK_RAW	= 3,
3362306a36Sopenharmony_ci	SOCK_RDM	= 4,
3462306a36Sopenharmony_ci	SOCK_SEQPACKET	= 5,
3562306a36Sopenharmony_ci	SOCK_DCCP	= 6,
3662306a36Sopenharmony_ci	SOCK_PACKET	= 10,
3762306a36Sopenharmony_ci};
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#define SOCK_MAX (SOCK_PACKET + 1)
4062306a36Sopenharmony_ci/* Mask which covers at least up to SOCK_MASK-1.  The
4162306a36Sopenharmony_ci *  * remaining bits are used as flags. */
4262306a36Sopenharmony_ci#define SOCK_TYPE_MASK 0xf
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci/* Flags for socket, socketpair, paccept */
4562306a36Sopenharmony_ci#define SOCK_CLOEXEC	O_CLOEXEC
4662306a36Sopenharmony_ci#define SOCK_NONBLOCK	O_NONBLOCK
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci#define ARCH_HAS_SOCKET_TYPES 1
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci#endif /* _ASM_SOCKET_H */
51