Fix: syscall list ioctl number conflict
[lttng-tools.git] / src / common / kernel-ctl / kernel-ioctl.h
CommitLineData
16421f6e
DG
1/*
2 * Copyright (C) 2011 - Julien Desfossez <julien.desfossez@polymtl.ca>
3 * Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 *
d14d33bf
AM
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, version 2 only,
7 * as published by the Free Software Foundation.
16421f6e
DG
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
d14d33bf
AM
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16421f6e
DG
17 */
18
19#ifndef _LTT_KERNEL_IOCTL_H
20#define _LTT_KERNEL_IOCTL_H
21
22/* Get a snapshot of the current ring buffer producer and consumer positions */
f3ed775e 23#define RING_BUFFER_SNAPSHOT _IO(0xF6, 0x00)
16421f6e
DG
24/* Get the consumer position (iteration start) */
25#define RING_BUFFER_SNAPSHOT_GET_CONSUMED _IOR(0xF6, 0x01, unsigned long)
26/* Get the producer position (iteration end) */
27#define RING_BUFFER_SNAPSHOT_GET_PRODUCED _IOR(0xF6, 0x02, unsigned long)
28/* Get exclusive read access to the specified sub-buffer position */
f3ed775e 29#define RING_BUFFER_GET_SUBBUF _IOW(0xF6, 0x03, unsigned long)
16421f6e 30/* Release exclusive sub-buffer access */
f3ed775e 31#define RING_BUFFER_PUT_SUBBUF _IO(0xF6, 0x04)
16421f6e
DG
32
33/* Get exclusive read access to the next sub-buffer that can be read. */
f3ed775e 34#define RING_BUFFER_GET_NEXT_SUBBUF _IO(0xF6, 0x05)
16421f6e 35/* Release exclusive sub-buffer access, move consumer forward. */
f3ed775e 36#define RING_BUFFER_PUT_NEXT_SUBBUF _IO(0xF6, 0x06)
16421f6e 37/* returns the size of the current sub-buffer, without padding (for mmap). */
f3ed775e 38#define RING_BUFFER_GET_SUBBUF_SIZE _IOR(0xF6, 0x07, unsigned long)
16421f6e
DG
39/* returns the size of the current sub-buffer, with padding (for splice). */
40#define RING_BUFFER_GET_PADDED_SUBBUF_SIZE _IOR(0xF6, 0x08, unsigned long)
41/* returns the maximum size for sub-buffers. */
42#define RING_BUFFER_GET_MAX_SUBBUF_SIZE _IOR(0xF6, 0x09, unsigned long)
43/* returns the length to mmap. */
f3ed775e 44#define RING_BUFFER_GET_MMAP_LEN _IOR(0xF6, 0x0A, unsigned long)
16421f6e
DG
45/* returns the offset of the subbuffer belonging to the mmap reader. */
46#define RING_BUFFER_GET_MMAP_READ_OFFSET _IOR(0xF6, 0x0B, unsigned long)
f3ed775e
DG
47/* flush the current sub-buffer */
48#define RING_BUFFER_FLUSH _IO(0xF6, 0x0C)
00e2e675 49
309167d2
JD
50/* returns the timestamp begin of the current sub-buffer */
51#define LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN _IOR(0xF6, 0x20, uint64_t)
52/* returns the timestamp end of the current sub-buffer */
53#define LTTNG_RING_BUFFER_GET_TIMESTAMP_END _IOR(0xF6, 0x21, uint64_t)
54/* returns the number of events discarded */
55#define LTTNG_RING_BUFFER_GET_EVENTS_DISCARDED _IOR(0xF6, 0x22, uint64_t)
56/* returns the packet payload size */
57#define LTTNG_RING_BUFFER_GET_CONTENT_SIZE _IOR(0xF6, 0x23, uint64_t)
58/* returns the actual packet size */
59#define LTTNG_RING_BUFFER_GET_PACKET_SIZE _IOR(0xF6, 0x24, uint64_t)
60/* returns the stream id */
61#define LTTNG_RING_BUFFER_GET_STREAM_ID _IOR(0xF6, 0x25, uint64_t)
d3e2ba59
JD
62/* returns the current timestamp */
63#define LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP _IOR(0xF6, 0x26, uint64_t)
309167d2 64
4dbc372b
JD
65/* Old ABI (without support for 32/64 bits compat) */
66/* LTTng file descriptor ioctl */
67#define LTTNG_KERNEL_OLD_SESSION _IO(0xF6, 0x40)
68#define LTTNG_KERNEL_OLD_TRACER_VERSION \
69 _IOR(0xF6, 0x41, struct lttng_kernel_old_tracer_version)
70#define LTTNG_KERNEL_OLD_TRACEPOINT_LIST _IO(0xF6, 0x42)
71#define LTTNG_KERNEL_OLD_WAIT_QUIESCENT _IO(0xF6, 0x43)
72#define LTTNG_KERNEL_OLD_CALIBRATE \
73 _IOWR(0xF6, 0x44, struct lttng_kernel_old_calibrate)
74
75/* Session FD ioctl */
76#define LTTNG_KERNEL_OLD_METADATA \
77 _IOW(0xF6, 0x50, struct lttng_kernel_old_channel)
78#define LTTNG_KERNEL_OLD_CHANNEL \
79 _IOW(0xF6, 0x51, struct lttng_kernel_old_channel)
80#define LTTNG_KERNEL_OLD_SESSION_START _IO(0xF6, 0x52)
81#define LTTNG_KERNEL_OLD_SESSION_STOP _IO(0xF6, 0x53)
82
83/* Channel FD ioctl */
84#define LTTNG_KERNEL_OLD_STREAM _IO(0xF6, 0x60)
85#define LTTNG_KERNEL_OLD_EVENT \
86 _IOW(0xF6, 0x61, struct lttng_kernel_old_event)
f3ed775e 87
4dbc372b
JD
88/* Event and Channel FD ioctl */
89#define LTTNG_KERNEL_OLD_CONTEXT \
90 _IOW(0xF6, 0x70, struct lttng_kernel_old_context)
91
92/* Event, Channel and Session ioctl */
93#define LTTNG_KERNEL_OLD_ENABLE _IO(0xF6, 0x80)
94#define LTTNG_KERNEL_OLD_DISABLE _IO(0xF6, 0x81)
95
96
97/* Current ABI (with suport for 32/64 bits compat) */
857aa172 98/* LTTng file descriptor ioctl */
4dbc372b
JD
99#define LTTNG_KERNEL_SESSION _IO(0xF6, 0x45)
100#define LTTNG_KERNEL_TRACER_VERSION \
101 _IOR(0xF6, 0x46, struct lttng_kernel_tracer_version)
d02666a9 102#define LTTNG_KERNEL_TRACEPOINT_LIST _IO(0xF6, 0x47)
4dbc372b 103#define LTTNG_KERNEL_WAIT_QUIESCENT _IO(0xF6, 0x48)
d0254c7c 104#define LTTNG_KERNEL_CALIBRATE \
4dbc372b 105 _IOWR(0xF6, 0x49, struct lttng_kernel_calibrate)
90d13b3d 106#define LTTNG_KERNEL_SYSCALL_LIST _IO(0xF6, 0x4A)
8d609afd
JD
107
108/* Session FD ioctl */
4dbc372b
JD
109#define LTTNG_KERNEL_METADATA \
110 _IOW(0xF6, 0x54, struct lttng_kernel_channel)
111#define LTTNG_KERNEL_CHANNEL \
112 _IOW(0xF6, 0x55, struct lttng_kernel_channel)
113#define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x56)
114#define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x57)
8d609afd
JD
115
116/* Channel FD ioctl */
4dbc372b
JD
117#define LTTNG_KERNEL_STREAM _IO(0xF6, 0x62)
118#define LTTNG_KERNEL_EVENT \
119 _IOW(0xF6, 0x63, struct lttng_kernel_event)
e80c3634
MD
120#define LTTNG_KERNEL_SYSCALL_MASK \
121 _IOWR(0xF6, 0x64, struct lttng_kernel_syscall_mask)
f3ed775e 122
857aa172 123/* Event and Channel FD ioctl */
4dbc372b
JD
124#define LTTNG_KERNEL_CONTEXT \
125 _IOW(0xF6, 0x71, struct lttng_kernel_context)
857aa172 126
f3ed775e 127/* Event, Channel and Session ioctl */
4dbc372b
JD
128#define LTTNG_KERNEL_ENABLE _IO(0xF6, 0x82)
129#define LTTNG_KERNEL_DISABLE _IO(0xF6, 0x83)
16421f6e
DG
130
131#endif /* _LTT_KERNEL_IOCTL_H */
This page took 0.058451 seconds and 4 git commands to generate.