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