syscall instrumentation: add missing forward declarations for old kernels
[lttng-modules.git] / src / lttng-syscalls.h
CommitLineData
e42c4f49
FD
1/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * lttng-syscalls.h
4 *
5 * LTTng syscall header.
6 *
7 * Copyright (C) 2021 Francis Deslauriers <francis.deslauriers@efficios.com>
8 */
9
ebcc64cd
FD
10#ifndef LTTNG_SYSCALLS_H
11#define LTTNG_SYSCALLS_H
12
e42c4f49 13#include <asm/ptrace.h>
87ad3fdc
FD
14#include <linux/compat.h>
15#include <linux/fcntl.h>
16#include <linux/in.h>
17#include <linux/in6.h>
18#include <linux/mman.h>
e42c4f49 19
ebcc64cd 20#include <lttng/events.h>
e42c4f49
FD
21#include <lttng/kernel-version.h>
22
23
24/*
25 * Forward declarations for old kernels.
26 */
27struct mmsghdr;
28struct rlimit64;
29struct oldold_utsname;
30struct old_utsname;
31struct sel_arg_struct;
32struct mmap_arg_struct;
33struct file_handle;
34struct user_msghdr;
7aedbe65
MD
35struct __kernel_old_itimerval;
36struct open_how;
37struct mount_attr;
38struct futex_waitv;
e42c4f49
FD
39
40/*
41 * Forward declaration for kernels >= 5.6
42 */
43struct timex;
44struct timeval;
45struct itimerval;
46struct itimerspec;
47
48#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0))
49typedef __kernel_old_time_t time_t;
50#endif
51
ebcc64cd
FD
52struct trace_syscall_entry {
53 void *event_func;
54 const struct lttng_kernel_event_desc *desc;
4f1d1ee5 55 const struct lttng_kernel_event_field * const *fields;
ebcc64cd
FD
56 unsigned int nrargs;
57};
58
59struct trace_syscall_table {
60 const struct trace_syscall_entry *table;
61 const size_t len;
62};
e42c4f49
FD
63
64extern
65void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id);
66
67extern
68void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret);
69
70extern
71void syscall_entry_event_notifier_probe(void *__data, struct pt_regs *regs,
72 long id);
73extern
74void syscall_exit_event_notifier_probe(void *__data, struct pt_regs *regs,
75 long ret);
76
ebcc64cd 77#endif /* LTTNG_SYSCALLS_H */
This page took 0.03277 seconds and 4 git commands to generate.