X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Fsnapshot.h;h=24f1652874472ebc3b7591e3200487e81aa98eea;hp=90c712aa624b873387d41c0c1fb06f4ca8b3905b;hb=5c504c41e4d470012cb98c849aa82086d1ba1bde;hpb=eef7781fe985ee2a635de32d1c62b845947ea0b7 diff --git a/include/lttng/snapshot.h b/include/lttng/snapshot.h index 90c712aa6..24f165287 100644 --- a/include/lttng/snapshot.h +++ b/include/lttng/snapshot.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2013 - David Goulet + * Copyright (C) 2013 David Goulet * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LTTNG_SNAPSHOT_H @@ -75,6 +65,42 @@ int lttng_snapshot_output_set_size(uint64_t size, /* Set the snapshot name. */ int lttng_snapshot_output_set_name(const char *name, struct lttng_snapshot_output *output); + +/* + * Set the output destination to be a path on the local filesystem. + * + * The path must be absolute. It can optionally begin with `file://`. + * + * Return 0 on success or else a negative LTTNG_ERR code. + */ +int lttng_snapshot_output_set_local_path(const char *path, + struct lttng_snapshot_output *output); + +/* + * Set the output destination to be the network from a combined control/data + * URL. + * + * `url` must start with `net://` or `net6://`. + * + * Return 0 on success or else a negative LTTNG_ERR code. + */ +int lttng_snapshot_output_set_network_url(const char *url, + struct lttng_snapshot_output *output); + +/* + * Set the output destination to be the network using separate URLs for control + * and data. + * + * Both ctrl_url and data_url must be non-null. + * + * `ctrl_url` and `data_url` must start with `tcp://` or `tcp6://`. + * + * Return 0 on success or else a negative LTTNG_ERR code. + */ +int lttng_snapshot_output_set_network_urls( + const char *ctrl_url, const char *data_url, + struct lttng_snapshot_output *output); + /* Set the control URL. Local and remote URL are supported. */ int lttng_snapshot_output_set_ctrl_url(const char *url, struct lttng_snapshot_output *output);