2 * Copyright (C) 2014 - David Goulet <dgoulet@efficios.com>
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef LTTNG_HANDLE_H
19 #define LTTNG_HANDLE_H
21 #include <lttng/domain.h>
28 * Handle used as a context for commands.
30 * The structures should be initialized to zero before use.
32 #define LTTNG_HANDLE_PADDING1 16
34 char session_name
[LTTNG_NAME_MAX
];
35 struct lttng_domain domain
;
37 char padding
[LTTNG_HANDLE_PADDING1
];
41 * Create an handle used as a context for every request made to the library.
43 * This handle contains the session name and domain on which the command will
44 * be executed. A domain is basically a tracer like the kernel or user space.
46 * A NULL domain indicates that the handle is not bound to a specific domain.
47 * This is mostly used for actions that apply on a session and not on a domain
48 * (e.g lttng_set_consumer_url).
50 * Return a newly allocated handle that should be freed using
51 * lttng_destroy_handle. On error, NULL is returned.
53 extern struct lttng_handle
*lttng_create_handle(const char *session_name
,
54 struct lttng_domain
*domain
);
57 * Destroy an handle that has been previously created with lttng_create_handle.
59 * It free the given pointer making it unusable.
61 extern void lttng_destroy_handle(struct lttng_handle
*handle
);
68 #endif /* LTTNG_HANDLE_H */
This page took 0.032762 seconds and 5 git commands to generate.