diff options
Diffstat (limited to 'include/linux/socket.h')
-rw-r--r-- | include/linux/socket.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h index 3273a0c5043b..354cc5617f8b 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -24,6 +24,9 @@ struct __kernel_sockaddr_storage { | |||
24 | #include <linux/types.h> /* pid_t */ | 24 | #include <linux/types.h> /* pid_t */ |
25 | #include <linux/compiler.h> /* __user */ | 25 | #include <linux/compiler.h> /* __user */ |
26 | 26 | ||
27 | #define __sockaddr_check_size(size) \ | ||
28 | BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) | ||
29 | |||
27 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
28 | # ifdef CONFIG_PROC_FS | 31 | # ifdef CONFIG_PROC_FS |
29 | struct seq_file; | 32 | struct seq_file; |
@@ -65,6 +68,12 @@ struct msghdr { | |||
65 | unsigned msg_flags; | 68 | unsigned msg_flags; |
66 | }; | 69 | }; |
67 | 70 | ||
71 | /* For recvmmsg/sendmmsg */ | ||
72 | struct mmsghdr { | ||
73 | struct msghdr msg_hdr; | ||
74 | unsigned msg_len; | ||
75 | }; | ||
76 | |||
68 | /* | 77 | /* |
69 | * POSIX 1003.1g - ancillary data object information | 78 | * POSIX 1003.1g - ancillary data object information |
70 | * Ancillary data consits of a sequence of pairs of | 79 | * Ancillary data consits of a sequence of pairs of |
@@ -246,6 +255,7 @@ struct ucred { | |||
246 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ | 255 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ |
247 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ | 256 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ |
248 | #define MSG_MORE 0x8000 /* Sender will send more */ | 257 | #define MSG_MORE 0x8000 /* Sender will send more */ |
258 | #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ | ||
249 | 259 | ||
250 | #define MSG_EOF MSG_FIN | 260 | #define MSG_EOF MSG_FIN |
251 | 261 | ||
@@ -312,6 +322,10 @@ extern int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uadd | |||
312 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr); | 322 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr); |
313 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); | 323 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); |
314 | 324 | ||
325 | struct timespec; | ||
326 | |||
327 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | ||
328 | unsigned int flags, struct timespec *timeout); | ||
315 | #endif | 329 | #endif |
316 | #endif /* not kernel and not glibc */ | 330 | #endif /* not kernel and not glibc */ |
317 | #endif /* _LINUX_SOCKET_H */ | 331 | #endif /* _LINUX_SOCKET_H */ |