Commit | Line | Data |
---|---|---|
da3c9ec1 | 1 | /* |
ab5be9fa | 2 | * Copyright (C) 2013 David Goulet <dgoulet@efficios.com> |
da3c9ec1 | 3 | * |
ab5be9fa | 4 | * SPDX-License-Identifier: LGPL-2.1-only |
da3c9ec1 | 5 | * |
da3c9ec1 DG |
6 | */ |
7 | ||
8 | #ifndef LTTNG_SNAPSHOT_INTERNAL_ABI_H | |
9 | #define LTTNG_SNAPSHOT_INTERNAL_ABI_H | |
10 | ||
28f23191 JG |
11 | #include <common/macros.hpp> |
12 | ||
13 | #include <lttng/constant.h> | |
14 | ||
da3c9ec1 DG |
15 | #include <limits.h> |
16 | #include <stdint.h> | |
17 | ||
18 | /* | |
19 | * Object used for the snapshot API. This is opaque to the public library. | |
20 | */ | |
21 | struct lttng_snapshot_output { | |
22 | /* | |
23 | * ID of the snapshot output. This is only used when they are listed. It is | |
24 | * assigned by the session daemon so when adding an output, this value will | |
25 | * not be used. | |
26 | */ | |
27 | uint32_t id; | |
28 | /* | |
29 | * Maximum size in bytes of the snapshot meaning the total size of all | |
30 | * stream combined. A value of 0 is unlimited. | |
31 | */ | |
32 | uint64_t max_size; | |
33 | /* Name of the output so it can be recognized easily when listing them. */ | |
36d2e35d | 34 | char name[LTTNG_NAME_MAX]; |
da3c9ec1 DG |
35 | /* Destination of the output. See lttng(1) for URL format. */ |
36 | char ctrl_url[PATH_MAX]; | |
37 | /* Destination of the output. See lttng(1) for URL format. */ | |
38 | char data_url[PATH_MAX]; | |
7bd95aee | 39 | } LTTNG_PACKED; |
da3c9ec1 DG |
40 | |
41 | /* | |
42 | * Snapshot output list object opaque to the user. | |
43 | */ | |
44 | struct lttng_snapshot_output_list { | |
45 | /* | |
46 | * The position in the output array. This is changed by a get_next call. | |
47 | */ | |
48 | int index; | |
49 | ||
50 | /* | |
51 | * Number of element in the array. | |
52 | */ | |
53 | size_t count; | |
54 | ||
55 | /* | |
757c48a2 | 56 | * Contains snapshot output object. |
da3c9ec1 DG |
57 | */ |
58 | struct lttng_snapshot_output *array; | |
59 | }; | |
60 | ||
61 | #endif /* LTTNG_SNAPSHOT_INTERNAL_ABI_H */ |