X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Flttng-relayd.h;h=4d23615676bcb9def4560e570305400597c8e7b4;hb=3fd2739803ea7273c6483060ac042942af06b1d4;hp=f22b115c9d037e78c0737b10f2f7861e9efeb21e;hpb=a020f610bb3e9a263d8c6509a634b90fe3321fee;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/lttng-relayd.h b/src/bin/lttng-relayd/lttng-relayd.h index f22b115c9..4d2361567 100644 --- a/src/bin/lttng-relayd/lttng-relayd.h +++ b/src/bin/lttng-relayd/lttng-relayd.h @@ -23,9 +23,10 @@ #include #include #include +#include #include -#include +#include #include "ctf-trace.h" @@ -44,6 +45,16 @@ enum connection_type { RELAY_VIEWER_NOTIFICATION = 4, }; +/* + * When we receive a stream, it gets stored in a list (on a per connection + * basis) until we have all the streams of the same channel and the metadata + * associated with it, then it gets flagged with viewer_ready. + */ +struct relay_stream_recv_handle { + uint64_t id; /* stream handle */ + struct cds_list_head node; +}; + /* * Represents a session for the relay point of view */ @@ -144,6 +155,11 @@ struct relay_stream { * update the oldest_tracefile_id. */ unsigned int tracefile_overwrite:1; + /* + * Can this stream be used by a viewer or are we waiting for additional + * information. + */ + unsigned int viewer_ready:1; }; /* @@ -200,12 +216,13 @@ struct relay_command { struct lttng_ht_node_ulong sock_n; struct rcu_head rcu_node; enum connection_type type; - unsigned int version_check_done:1; /* protocol version to use for this session */ uint32_t major; uint32_t minor; struct lttng_ht *ctf_traces_ht; /* indexed by path name */ uint64_t session_id; + struct cds_list_head recv_head; + unsigned int version_check_done:1; }; struct relay_local_data { @@ -220,6 +237,9 @@ extern struct lttng_ht *indexes_ht; extern const char *tracing_group_name; +extern const char * const config_section_name; + struct relay_stream *relay_stream_find_by_id(uint64_t stream_id); +void lttng_relay_notify_ready(void); #endif /* LTTNG_RELAYD_H */