]> git.proxmox.com Git - wasi-libc.git/blame - libc-bottom-half/headers/public/__header_sys_socket.h
Wasi snapshot preview1 (#140)
[wasi-libc.git] / libc-bottom-half / headers / public / __header_sys_socket.h
CommitLineData
320054e8
DG
1#ifndef __wasilibc___header_sys_socket_h
2#define __wasilibc___header_sys_socket_h
3
4#include <__struct_msghdr.h>
5#include <__struct_sockaddr.h>
6#include <__struct_sockaddr_storage.h>
7
446cb3f1 8#include <wasi/api.h>
320054e8 9
446cb3f1
DG
10#define SHUT_RD __WASI_SDFLAGS_RD
11#define SHUT_WR __WASI_SDFLAGS_WR
320054e8
DG
12#define SHUT_RDWR (SHUT_RD | SHUT_WR)
13
446cb3f1
DG
14#define MSG_PEEK __WASI_RIFLAGS_RECV_PEEK
15#define MSG_WAITALL __WASI_RIFLAGS_RECV_WAITALL
16#define MSG_TRUNC __WASI_RIFLAGS_RECV_DATA_TRUNCATED
320054e8
DG
17
18#define SOCK_DGRAM __WASI_FILETYPE_SOCKET_DGRAM
19#define SOCK_STREAM __WASI_FILETYPE_SOCKET_STREAM
20
21#define SOCK_NONBLOCK (0x00004000)
22#define SOCK_CLOEXEC (0x00002000)
23
24#define SOL_SOCKET 0x7fffffff
25
26#define SO_TYPE 3
27
28#define AF_UNSPEC 0
29#define AF_INET 1
30#define AF_INET6 2
31#define AF_UNIX 3
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif