• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright (c) 2016 Fujitsu Ltd.
3 * Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it would be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program.
17 */
18 
19 #ifndef __LAPI_SOCKET_H__
20 #define __LAPI_SOCKET_H__
21 
22 #include "config.h"
23 #include <sys/socket.h>
24 
25 #ifndef MSG_ZEROCOPY
26 # define MSG_ZEROCOPY	0x4000000 /* Use user data in kernel path */
27 #endif
28 
29 #ifndef MSG_FASTOPEN
30 # define MSG_FASTOPEN	0x20000000 /* Send data in TCP SYN */
31 #endif
32 
33 #ifndef SO_REUSEPORT
34 # define SO_REUSEPORT	15
35 #endif
36 
37 #ifndef SO_BUSY_POLL
38 # define SO_BUSY_POLL	46
39 #endif
40 
41 #ifndef SO_ATTACH_BPF
42 # define SO_ATTACH_BPF  50
43 #endif
44 
45 #ifndef SO_ZEROCOPY
46 # define SO_ZEROCOPY	60
47 #endif
48 
49 #ifndef SOCK_DCCP
50 # define SOCK_DCCP		6
51 #endif
52 
53 #ifndef SOCK_CLOEXEC
54 # define SOCK_CLOEXEC 02000000
55 #endif
56 
57 #ifndef AF_ALG
58 # define AF_ALG		38
59 #endif
60 
61 #ifndef SOL_SCTP
62 # define SOL_SCTP	132
63 #endif
64 
65 #ifndef SOL_UDPLITE
66 # define SOL_UDPLITE		136 /* UDP-Lite (RFC 3828) */
67 #endif
68 
69 #ifndef SOL_DCCP
70 # define SOL_DCCP		269
71 #endif
72 
73 #ifndef SOL_ALG
74 # define SOL_ALG		279
75 #endif
76 
77 #ifndef HAVE_STRUCT_MMSGHDR
78 struct mmsghdr {
79 	struct msghdr msg_hdr;
80 	unsigned int msg_len;
81 };
82 #endif
83 
84 #endif /* __LAPI_SOCKET_H__ */
85