1*e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2607ca46eSDavid Howells /* 3607ca46eSDavid Howells * NET An implementation of the SOCKET network access protocol. 4607ca46eSDavid Howells * This is the master header file for the Linux NET layer, 5607ca46eSDavid Howells * or, in plain English: the networking handling part of the 6607ca46eSDavid Howells * kernel. 7607ca46eSDavid Howells * 8607ca46eSDavid Howells * Version: @(#)net.h 1.0.3 05/25/93 9607ca46eSDavid Howells * 10607ca46eSDavid Howells * Authors: Orest Zborowski, <obz@Kodak.COM> 11607ca46eSDavid Howells * Ross Biro 12607ca46eSDavid Howells * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 13607ca46eSDavid Howells * 14607ca46eSDavid Howells * This program is free software; you can redistribute it and/or 15607ca46eSDavid Howells * modify it under the terms of the GNU General Public License 16607ca46eSDavid Howells * as published by the Free Software Foundation; either version 17607ca46eSDavid Howells * 2 of the License, or (at your option) any later version. 18607ca46eSDavid Howells */ 19607ca46eSDavid Howells #ifndef _UAPI_LINUX_NET_H 20607ca46eSDavid Howells #define _UAPI_LINUX_NET_H 21607ca46eSDavid Howells 22607ca46eSDavid Howells #include <linux/socket.h> 23607ca46eSDavid Howells #include <asm/socket.h> 24607ca46eSDavid Howells 25607ca46eSDavid Howells #define NPROTO AF_MAX 26607ca46eSDavid Howells 27607ca46eSDavid Howells #define SYS_SOCKET 1 /* sys_socket(2) */ 28607ca46eSDavid Howells #define SYS_BIND 2 /* sys_bind(2) */ 29607ca46eSDavid Howells #define SYS_CONNECT 3 /* sys_connect(2) */ 30607ca46eSDavid Howells #define SYS_LISTEN 4 /* sys_listen(2) */ 31607ca46eSDavid Howells #define SYS_ACCEPT 5 /* sys_accept(2) */ 32607ca46eSDavid Howells #define SYS_GETSOCKNAME 6 /* sys_getsockname(2) */ 33607ca46eSDavid Howells #define SYS_GETPEERNAME 7 /* sys_getpeername(2) */ 34607ca46eSDavid Howells #define SYS_SOCKETPAIR 8 /* sys_socketpair(2) */ 35607ca46eSDavid Howells #define SYS_SEND 9 /* sys_send(2) */ 36607ca46eSDavid Howells #define SYS_RECV 10 /* sys_recv(2) */ 37607ca46eSDavid Howells #define SYS_SENDTO 11 /* sys_sendto(2) */ 38607ca46eSDavid Howells #define SYS_RECVFROM 12 /* sys_recvfrom(2) */ 39607ca46eSDavid Howells #define SYS_SHUTDOWN 13 /* sys_shutdown(2) */ 40607ca46eSDavid Howells #define SYS_SETSOCKOPT 14 /* sys_setsockopt(2) */ 41607ca46eSDavid Howells #define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ 42607ca46eSDavid Howells #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ 43607ca46eSDavid Howells #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ 44607ca46eSDavid Howells #define SYS_ACCEPT4 18 /* sys_accept4(2) */ 45607ca46eSDavid Howells #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ 46607ca46eSDavid Howells #define SYS_SENDMMSG 20 /* sys_sendmmsg(2) */ 47607ca46eSDavid Howells 48607ca46eSDavid Howells typedef enum { 49607ca46eSDavid Howells SS_FREE = 0, /* not allocated */ 50607ca46eSDavid Howells SS_UNCONNECTED, /* unconnected to any socket */ 51607ca46eSDavid Howells SS_CONNECTING, /* in process of connecting */ 52607ca46eSDavid Howells SS_CONNECTED, /* connected to socket */ 53607ca46eSDavid Howells SS_DISCONNECTING /* in process of disconnecting */ 54607ca46eSDavid Howells } socket_state; 55607ca46eSDavid Howells 56607ca46eSDavid Howells #define __SO_ACCEPTCON (1 << 16) /* performed a listen */ 57607ca46eSDavid Howells 58607ca46eSDavid Howells #endif /* _UAPI_LINUX_NET_H */ 59