2 * Copyright (C) 2012 David Goulet <dgoulet@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
11 #include <common/macros.hpp>
13 #include <lttng/lttng.h>
15 #include <netinet/in.h>
17 /* Destination type of lttng URI */
24 /* Type of lttng URI where it is a final destination or a hop */
26 LTTNG_URI_DST, /* The URI is a final destination */
28 * Hops are not supported yet but planned for a future release.
34 /* Communication stream type of a lttng URI */
35 enum lttng_stream_type {
41 * Protocol type of a lttng URI. The value 0 indicate that the proto_type field
44 enum lttng_proto_type {
45 LTTNG_PROTO_TYPE_NONE = 0,
48 * UDP protocol is not supported for now.
55 * Structure representing an URI supported by lttng.
58 enum lttng_dst_type dtype;
59 enum lttng_uri_type utype;
60 enum lttng_stream_type stype;
61 enum lttng_proto_type proto;
63 char subdir[LTTNG_PATH_MAX];
65 char ipv4[INET_ADDRSTRLEN];
66 char ipv6[INET6_ADDRSTRLEN];
67 char path[LTTNG_PATH_MAX];
71 int uri_compare(struct lttng_uri *uri1, struct lttng_uri *uri2);
72 void uri_free(struct lttng_uri *uri);
73 ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris);
74 ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url, struct lttng_uri **uris);
75 int uri_to_str_url(struct lttng_uri *uri, char *dst, size_t size);
77 #endif /* _LTT_URI_H */