xref: /aosp_15_r20/external/ltp/testcases/kernel/syscalls/sendmmsg/sendmmsg.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef SENDMMSG_H__
4 #define SENDMMSG_H__
5 
6 #include <netinet/ip.h>
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <string.h>
10 #include <sys/types.h>
11 
12 #include "time64_variants.h"
13 #include "tst_test.h"
14 #include "lapi/socket.h"
15 #include "tst_safe_macros.h"
16 #include "sendmmsg_var.h"
17 
18 #define BUFSIZE 16
19 
20 static struct time64_variants variants[] = {
21 	{ .recvmmsg = libc_recvmmsg, .sendmmsg = libc_sendmmsg, .ts_type = TST_LIBC_TIMESPEC, .desc = "vDSO or syscall with libc spec"},
22 
23 #if (__NR_recvmmsg != __LTP__NR_INVALID_SYSCALL)
24 	{ .recvmmsg = sys_recvmmsg, .sendmmsg = sys_sendmmsg, .ts_type = TST_KERN_OLD_TIMESPEC, .desc = "syscall with old kernel spec"},
25 #endif
26 
27 #if (__NR_recvmmsg_time64 != __LTP__NR_INVALID_SYSCALL)
28 	{ .recvmmsg = sys_recvmmsg64, .sendmmsg = sys_sendmmsg, .ts_type = TST_KERN_TIMESPEC, .desc = "syscall time64 with kernel spec"},
29 #endif
30 };
31 
32 #endif /* SENDMMSG_H__ */
33