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 | ||
11 | #include <limits.h> | |
12 | #include <stdint.h> | |
36d2e35d | 13 | #include <lttng/constant.h> |
da3c9ec1 DG |
14 | |
15 | /* | |
16 | * Object used for the snapshot API. This is opaque to the public library. | |
17 | */ | |
18 | struct lttng_snapshot_output { | |
19 | /* | |
20 | * ID of the snapshot output. This is only used when they are listed. It is | |
21 | * assigned by the session daemon so when adding an output, this value will | |
22 | * not be used. | |
23 | */ | |
24 | uint32_t id; | |
25 | /* | |
26 | * Maximum size in bytes of the snapshot meaning the total size of all | |
27 | * stream combined. A value of 0 is unlimited. | |
28 | */ | |
29 | uint64_t max_size; | |
30 | /* Name of the output so it can be recognized easily when listing them. */ | |
36d2e35d | 31 | char name[LTTNG_NAME_MAX]; |
da3c9ec1 DG |
32 | /* Destination of the output. See lttng(1) for URL format. */ |
33 | char ctrl_url[PATH_MAX]; | |
34 | /* Destination of the output. See lttng(1) for URL format. */ | |
35 | char data_url[PATH_MAX]; | |
36 | }; | |
37 | ||
38 | /* | |
39 | * Snapshot output list object opaque to the user. | |
40 | */ | |
41 | struct lttng_snapshot_output_list { | |
42 | /* | |
43 | * The position in the output array. This is changed by a get_next call. | |
44 | */ | |
45 | int index; | |
46 | ||
47 | /* | |
48 | * Number of element in the array. | |
49 | */ | |
50 | size_t count; | |
51 | ||
52 | /* | |
53 | * Containes snapshot output object. | |
54 | */ | |
55 | struct lttng_snapshot_output *array; | |
56 | }; | |
57 | ||
58 | #endif /* LTTNG_SNAPSHOT_INTERNAL_ABI_H */ |