2 * Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
11 #include <lttng/domain.h>
12 #include <lttng/lttng-export.h>
19 * Handle used as a context for commands.
21 * The structures should be initialized to zero before use.
23 #define LTTNG_HANDLE_PADDING1 16
25 char session_name
[LTTNG_NAME_MAX
];
26 struct lttng_domain domain
;
28 char padding
[LTTNG_HANDLE_PADDING1
];
32 * Create an handle used as a context for every request made to the library.
34 * This handle contains the session name and domain on which the command will
35 * be executed. A domain is basically a tracer like the kernel or user space.
37 * A NULL domain indicates that the handle is not bound to a specific domain.
38 * This is mostly used for actions that apply on a session and not on a domain
39 * (e.g lttng_set_consumer_url).
41 * Return a newly allocated handle that should be freed using
42 * lttng_destroy_handle. On error, NULL is returned.
44 LTTNG_EXPORT
extern struct lttng_handle
*lttng_create_handle(const char *session_name
,
45 struct lttng_domain
*domain
);
48 * Destroy an handle that has been previously created with lttng_create_handle.
50 * It free the given pointer making it unusable.
52 LTTNG_EXPORT
extern void lttng_destroy_handle(struct lttng_handle
*handle
);
58 #endif /* LTTNG_HANDLE_H */
This page took 0.033752 seconds and 4 git commands to generate.