Add lttng_trace_archive_location lttng-ctl API
[lttng-tools.git] / include / lttng / location-internal.h
CommitLineData
434131e4
JG
1/*
2 * Copyright (C) 2017 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
3 *
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.
7 *
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
11 * for more details.
12 *
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
16 */
17
18#ifndef LTTNG_LOCATION_INTERNAL_H
19#define LTTNG_LOCATION_INTERNAL_H
20
21#include <lttng/location.h>
22#include <common/macros.h>
23
24struct lttng_trace_archive_location {
25 enum lttng_trace_archive_location_type type;
26 union {
27 struct {
28 char *absolute_path;
29 } local;
30 struct {
31 char *host;
32 enum lttng_trace_archive_location_relay_protocol_type protocol;
33 struct {
34 uint16_t control, data;
35 } ports;
36 char *relative_path;
37 } relay;
38 } types;
39};
40
41LTTNG_HIDDEN
42struct lttng_trace_archive_location *lttng_trace_archive_location_local_create(
43 const char *path);
44
45LTTNG_HIDDEN
46struct lttng_trace_archive_location *lttng_trace_archive_location_relay_create(
47 const char *host,
48 enum lttng_trace_archive_location_relay_protocol_type protocol,
49 uint16_t control_port, uint16_t data_port,
50 const char *relative_path);
51
52LTTNG_HIDDEN
53void lttng_trace_archive_location_destroy(
54 struct lttng_trace_archive_location *location);
55
56#endif /* LTTNG_LOCATION_INTERNAL_H */
This page took 0.035174 seconds and 4 git commands to generate.