#include <netinet/in.h>
#include <lttng/lttng.h>
+#include <common/macros.h>
/* Destination type of lttng URI */
enum lttng_dst_type {
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 */