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
[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 * Return an newly allocated handle that should be freed using
47 * lttng_destroy_handle. On error, NULL is returned.
49 extern struct lttng_handle
*lttng_create_handle(const char *session_name
,
50 struct lttng_domain
*domain
);
53 * Destroy an handle that has been previously created with lttng_create_handle.
55 * It free the given pointer making it unusable.
57 extern void lttng_destroy_handle(struct lttng_handle
*handle
);
64 #endif /* LTTNG_HANDLE_H */
This page took 0.051107 seconds and 4 git commands to generate.