| Nick Kralevich | a67e4de | 2013-01-14 11:28:26 -0800 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 19 | #ifndef _UAPI_LINUX_NET_H | 
|  | 20 | #define _UAPI_LINUX_NET_H | 
|  | 21 | #include <linux/socket.h> | 
|  | 22 | #include <asm/socket.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define NPROTO AF_MAX | 
|  | 24 | #define SYS_SOCKET 1 | 
|  | 25 | #define SYS_BIND 2 | 
|  | 26 | #define SYS_CONNECT 3 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define SYS_LISTEN 4 | 
|  | 28 | #define SYS_ACCEPT 5 | 
|  | 29 | #define SYS_GETSOCKNAME 6 | 
|  | 30 | #define SYS_GETPEERNAME 7 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define SYS_SOCKETPAIR 8 | 
|  | 32 | #define SYS_SEND 9 | 
|  | 33 | #define SYS_RECV 10 | 
|  | 34 | #define SYS_SENDTO 11 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define SYS_RECVFROM 12 | 
|  | 36 | #define SYS_SHUTDOWN 13 | 
|  | 37 | #define SYS_SETSOCKOPT 14 | 
|  | 38 | #define SYS_GETSOCKOPT 15 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define SYS_SENDMSG 16 | 
|  | 40 | #define SYS_RECVMSG 17 | 
|  | 41 | #define SYS_ACCEPT4 18 | 
|  | 42 | #define SYS_RECVMMSG 19 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define SYS_SENDMMSG 20 | 
|  | 44 | typedef enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | SS_FREE = 0, | 
|  | 46 | SS_UNCONNECTED, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | SS_CONNECTING, | 
|  | 48 | SS_CONNECTED, | 
|  | 49 | SS_DISCONNECTING | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | } socket_state; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define __SO_ACCEPTCON (1 << 16) | 
| Nick Kralevich | a67e4de | 2013-01-14 11:28:26 -0800 | [diff] [blame] | 52 | #endif |