18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 38c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 48c2ecf20Sopenharmony_ci * for more details. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 1997, 1999, 2000, 2001 Ralf Baechle 78c2ecf20Sopenharmony_ci * Copyright (C) 2000, 2001 Silicon Graphics, Inc. 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci#ifndef _ASM_SOCKET_H 108c2ecf20Sopenharmony_ci#define _ASM_SOCKET_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <uapi/asm/socket.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/** sock_type - Socket types 168c2ecf20Sopenharmony_ci * 178c2ecf20Sopenharmony_ci * Please notice that for binary compat reasons MIPS has to 188c2ecf20Sopenharmony_ci * override the enum sock_type in include/linux/net.h, so 198c2ecf20Sopenharmony_ci * we define ARCH_HAS_SOCKET_TYPES here. 208c2ecf20Sopenharmony_ci * 218c2ecf20Sopenharmony_ci * @SOCK_DGRAM - datagram (conn.less) socket 228c2ecf20Sopenharmony_ci * @SOCK_STREAM - stream (connection) socket 238c2ecf20Sopenharmony_ci * @SOCK_RAW - raw socket 248c2ecf20Sopenharmony_ci * @SOCK_RDM - reliably-delivered message 258c2ecf20Sopenharmony_ci * @SOCK_SEQPACKET - sequential packet socket 268c2ecf20Sopenharmony_ci * @SOCK_PACKET - linux specific way of getting packets at the dev level. 278c2ecf20Sopenharmony_ci * For writing rarp and other similar things on the user level. 288c2ecf20Sopenharmony_ci */ 298c2ecf20Sopenharmony_cienum sock_type { 308c2ecf20Sopenharmony_ci SOCK_DGRAM = 1, 318c2ecf20Sopenharmony_ci SOCK_STREAM = 2, 328c2ecf20Sopenharmony_ci SOCK_RAW = 3, 338c2ecf20Sopenharmony_ci SOCK_RDM = 4, 348c2ecf20Sopenharmony_ci SOCK_SEQPACKET = 5, 358c2ecf20Sopenharmony_ci SOCK_DCCP = 6, 368c2ecf20Sopenharmony_ci SOCK_PACKET = 10, 378c2ecf20Sopenharmony_ci}; 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define SOCK_MAX (SOCK_PACKET + 1) 408c2ecf20Sopenharmony_ci/* Mask which covers at least up to SOCK_MASK-1. The 418c2ecf20Sopenharmony_ci * * remaining bits are used as flags. */ 428c2ecf20Sopenharmony_ci#define SOCK_TYPE_MASK 0xf 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci/* Flags for socket, socketpair, paccept */ 458c2ecf20Sopenharmony_ci#define SOCK_CLOEXEC O_CLOEXEC 468c2ecf20Sopenharmony_ci#define SOCK_NONBLOCK O_NONBLOCK 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#define ARCH_HAS_SOCKET_TYPES 1 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#endif /* _ASM_SOCKET_H */ 51