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