Save/load: support session trace format
[lttng-tools.git] / include / lttng / trace-format-descriptor.h
index ade822582e3cb83dacaa34dffd720ef519aeb160..99cc94b04ba28cf0ad6c111cab96bd5ecad74bd2 100644 (file)
@@ -9,6 +9,8 @@
 #define LTTNG_TRACE_FORMAT_DESCRIPTOR_H
 
 #include <inttypes.h>
+#include <lttng/domain.h>
+#include <lttng/lttng-error.h>
 #include <lttng/lttng-export.h>
 
 #ifdef __cplusplus
@@ -16,6 +18,7 @@ extern "C" {
 #endif
 
 struct lttng_trace_format_descriptor;
+enum lttng_domain_type;
 
 enum lttng_trace_format_descriptor_status {
        LTTNG_TRACE_FORMAT_DESCRIPTOR_STATUS_INVALID = -1,
@@ -49,6 +52,30 @@ LTTNG_EXPORT extern enum lttng_trace_format_descriptor_status lttng_trace_format
 
 LTTNG_EXPORT void lttng_trace_format_descriptor_destroy(
                struct lttng_trace_format_descriptor *descriptor);
+/*
+ * Check if the passed trace format is supported for the passed domain.
+ */
+LTTNG_EXPORT extern enum lttng_error_code lttng_domain_supports_trace_format(
+               const struct lttng_endpoint *session_daemon_endpoint,
+               enum lttng_domain_type domain_type,
+               const struct lttng_trace_format_descriptor *trace_format_descriptor);
+
+/*
+ * For network destinations targeting a relay daemon, the session daemon will
+ * establish a connection to check for the capability at the time of the call.
+ * Note that the relay daemon at the destination address may be replaced by
+ * the time tracing starts.
+ *
+ * When destination url is a network destination (relayd), the following
+ * URL format is expected:
+ *  NETPROTO://(HOST | IPADDR)[:CTRLPORT[:DATAPORT]][/TRACEPATH]
+ *
+ * Always returns LTTNG_OK for local destinations.
+ */
+LTTNG_EXPORT extern enum lttng_error_code lttng_destination_supports_trace_format(
+               const struct lttng_endpoint *session_daemon_endpoint,
+               const char *destination_url,
+               const struct lttng_trace_format_descriptor *trace_format_descriptor);
 
 #ifdef __cplusplus
 }
This page took 0.025952 seconds and 5 git commands to generate.