X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Furi.h;h=ac1de9e0cbc2450f2592f54c46beb499321734c3;hp=347b639b0008dcd8991c7a468aafcee6ecfce56f;hb=44635d77b591f83a80d48cd93497bd1cd6aa788d;hpb=ad20f4747b375cf21623ece9f76c9a9b54c493bb diff --git a/src/common/uri.h b/src/common/uri.h index 347b639b0..ac1de9e0c 100644 --- a/src/common/uri.h +++ b/src/common/uri.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2012 - David Goulet + * Copyright (C) 2012 David Goulet * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program 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 General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef URI_H @@ -20,6 +10,7 @@ #include #include +#include /* Destination type of lttng URI */ enum lttng_dst_type { @@ -65,18 +56,20 @@ struct lttng_uri { enum lttng_uri_type utype; enum lttng_stream_type stype; enum lttng_proto_type proto; - in_port_t port; - char subdir[PATH_MAX]; + uint16_t port; + char subdir[LTTNG_PATH_MAX]; union { char ipv4[INET_ADDRSTRLEN]; char ipv6[INET6_ADDRSTRLEN]; - char path[PATH_MAX]; + char path[LTTNG_PATH_MAX]; } dst; -}; +} LTTNG_PACKED; int uri_compare(struct lttng_uri *uri1, struct lttng_uri *uri2); void uri_free(struct lttng_uri *uri); ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris); +ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url, + struct lttng_uri **uris); int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size); #endif /* _LTT_URI_H */