+/* Destination type of lttng URI */
+enum lttng_dst_type {
+ LTTNG_DST_IPV4, /* IPv4 protocol */
+ LTTNG_DST_IPV6, /* IPv6 protocol */
+ LTTNG_DST_PATH, /* Local file system */
+};
+
+/* Type of lttng URI where it is a final destination or a hop */
+enum lttng_uri_type {
+ LTTNG_URI_DST, /* The URI is a final destination */
+ /*
+ * Hop are not supported yet but planned for a future release.
+ *
+ LTTNG_URI_HOP,
+ */
+};
+
+/* Communication stream type of a lttng URI */
+enum lttng_stream_type {
+ LTTNG_STREAM_CONTROL,
+ LTTNG_STREAM_DATA,
+};
+
+/*
+ * Protocol type of a lttng URI. The value 0 indicate that the proto_type field
+ * should be ignored.
+ */
+enum lttng_proto_type {
+ LTTNG_TCP = 1,
+ /*
+ * UDP protocol is not supported for now.
+ *
+ LTTNG_UDP = 2,
+ */
+};
+
+/*
+ * Structure representing an URI supported by lttng.
+ */
+#define LTTNG_URI_PADDING1_LEN 16
+#define LTTNG_URI_PADDING2_LEN LTTNG_SYMBOL_NAME_LEN + 32
+struct lttng_uri {
+ enum lttng_dst_type dtype;
+ enum lttng_uri_type utype;
+ enum lttng_stream_type stype;
+ enum lttng_proto_type proto;
+ in_port_t port;
+ char padding[LTTNG_URI_PADDING1_LEN];
+ union {
+ char ipv4[INET_ADDRSTRLEN];
+ char ipv6[INET6_ADDRSTRLEN];
+ char path[PATH_MAX];
+ char padding[LTTNG_URI_PADDING2_LEN];
+ } dst;
+};
+
+/*
+ * The structures should be initialized to zero before use.
+ */
+#define LTTNG_DOMAIN_PADDING1 16
+#define LTTNG_DOMAIN_PADDING2 LTTNG_SYMBOL_NAME_LEN + 32