ctf.fs: bt_ctf_notif_iter_create(): assert() that all medops exist
[babeltrace.git] / formats / lttng-live / lttng-live.h
index cf47437bbd03e83f55331d2637833c987d1ae7ec..b3154581244707cdc3b899a097eeb01513d45fe1 100644 (file)
  */
 
 #include <stdint.h>
+#include <sys/param.h>
+#include "lttng-viewer-abi.h"
 
 #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT      5344
 
 #define LTTNG_LIVE_MAJOR                       2
 #define LTTNG_LIVE_MINOR                       4
 
+/*
+ * The lttng-live output file pointer is currently hardcoded to stdout,
+ * and is expected to be hardcoded to this by fflush() performed between
+ * each packet.
+ */
+#define LTTNG_LIVE_OUTPUT_FP                   stdout
+
 struct lttng_live_ctx {
-       char traced_hostname[NAME_MAX];
-       char session_name[NAME_MAX];
-       char relay_hostname[NAME_MAX];
+       char traced_hostname[MAXNAMLEN];
+       char session_name[MAXNAMLEN];
+       char relay_hostname[MAXNAMLEN];
        int control_sock;
        int port;
+       /* Protocol version to use for this connection. */
+       uint32_t major;
+       uint32_t minor;
        struct lttng_live_session *session;
        struct bt_context *bt_ctx;
        GArray *session_ids;
@@ -45,12 +57,14 @@ struct lttng_live_ctx {
 struct lttng_live_viewer_stream {
        uint64_t id;
        uint64_t mmap_size;
+       uint64_t ctf_stream_id;
        FILE *metadata_fp_write;
        ssize_t metadata_len;
        int metadata_flag;
-       int first_read;
+       int data_pending;
        struct lttng_live_session *session;
        struct lttng_live_ctf_trace *ctf_trace;
+       struct lttng_viewer_index current_index;
        char path[PATH_MAX];
 };
 
@@ -59,6 +73,7 @@ struct lttng_live_session {
        uint64_t stream_count;
        struct lttng_live_ctx *ctx;
        struct lttng_live_viewer_stream *streams;
+       /* HashTable mapping trace_ids to ptrs to struct lttng_live_ctf_trace */
        GHashTable *ctf_traces;
 };
 
This page took 0.024744 seconds and 4 git commands to generate.