LTTNG_ROTATION_GET_INFO = 46,
LTTNG_ROTATION_SET_SCHEDULE = 47,
LTTNG_SESSION_GET_CURRENT_OUTPUT = 48,
+ LTTNG_ROTATION_SCHEDULE_GET_TIMER_PERIOD = 49,
+ LTTNG_ROTATION_SCHEDULE_GET_SIZE = 50,
};
enum lttcomm_relayd_command {
int32_t cpu; /* On which CPU this stream is assigned. */
/* Tells the consumer if the stream should be or not monitored. */
uint32_t no_monitor;
+ /*
+ * The archive id that was "current" at the time this
+ * stream was created. This is used to determine
+ * whether a rotation request was sent before or after
+ * the creation of a stream.
+ */
+ uint64_t trace_archive_id;
} LTTNG_PACKED stream; /* Only used by Kernel. */
struct {
uint64_t net_index;
*/
uint32_t ust_app_uid;
int64_t blocking_timeout;
+ /*
+ * The archive id that was "current" at the time this
+ * channel was created. This is used to determine
+ * whether a rotation request was sent before or after
+ * the creation of a channel.
+ */
+ uint64_t trace_archive_id;
char root_shm_path[PATH_MAX];
char shm_path[PATH_MAX];
} LTTNG_PACKED ask_channel;
uint64_t relayd_id; /* Relayd id if apply. */
uint64_t key;
uint64_t nb_packets_per_stream;
+ /*
+ * The session's current trace archive id is propagated
+ * since a snapshot triggers the creation of an
+ * ephemeral metadata stream.
+ */
+ uint64_t trace_archive_id;
} LTTNG_PACKED snapshot_channel;
struct {
uint64_t channel_key;
* Lowest and highest usage (bytes) at the moment the sample was taken.
*/
uint64_t lowest, highest;
+ /*
+ * Sum of all the consumed positions for a channel.
+ */
+ uint64_t total_consumed;
} LTTNG_PACKED;
/*
#endif /* HAVE_LIBLTTNG_UST_CTL */
-extern const char *lttcomm_get_readable_code(enum lttcomm_return_code code);
+LTTNG_HIDDEN const char *lttcomm_get_readable_code(enum lttcomm_return_code code);
-extern int lttcomm_init_inet_sockaddr(struct lttcomm_sockaddr *sockaddr,
+LTTNG_HIDDEN int lttcomm_init_inet_sockaddr(struct lttcomm_sockaddr *sockaddr,
const char *ip, unsigned int port);
-extern int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr,
+LTTNG_HIDDEN int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr,
const char *ip, unsigned int port);
-extern struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto);
-extern int lttcomm_create_sock(struct lttcomm_sock *sock);
-extern struct lttcomm_sock *lttcomm_alloc_sock_from_uri(struct lttng_uri *uri);
-extern void lttcomm_destroy_sock(struct lttcomm_sock *sock);
-extern struct lttcomm_sock *lttcomm_alloc_copy_sock(struct lttcomm_sock *src);
-extern void lttcomm_copy_sock(struct lttcomm_sock *dst,
+LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto);
+LTTNG_HIDDEN int lttcomm_create_sock(struct lttcomm_sock *sock);
+LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_sock_from_uri(struct lttng_uri *uri);
+LTTNG_HIDDEN void lttcomm_destroy_sock(struct lttcomm_sock *sock);
+LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_copy_sock(struct lttcomm_sock *src);
+LTTNG_HIDDEN void lttcomm_copy_sock(struct lttcomm_sock *dst,
struct lttcomm_sock *src);
/* Relayd socket object. */
-extern struct lttcomm_relayd_sock *lttcomm_alloc_relayd_sock(
+LTTNG_HIDDEN struct lttcomm_relayd_sock *lttcomm_alloc_relayd_sock(
struct lttng_uri *uri, uint32_t major, uint32_t minor);
-extern int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int msec);
-extern int lttcomm_setsockopt_snd_timeout(int sock, unsigned int msec);
+LTTNG_HIDDEN int lttcomm_setsockopt_rcv_timeout(int sock, unsigned int msec);
+LTTNG_HIDDEN int lttcomm_setsockopt_snd_timeout(int sock, unsigned int msec);
+
+LTTNG_HIDDEN int lttcomm_sock_get_port(const struct lttcomm_sock *sock,
+ uint16_t *port);
+/*
+ * Set a port to an lttcomm_sock. This will have no effect is the socket is
+ * already bound.
+ */
+LTTNG_HIDDEN int lttcomm_sock_set_port(struct lttcomm_sock *sock, uint16_t port);
-extern void lttcomm_init(void);
+LTTNG_HIDDEN void lttcomm_init(void);
/* Get network timeout, in milliseconds */
-extern unsigned long lttcomm_get_network_timeout(void);
+LTTNG_HIDDEN unsigned long lttcomm_get_network_timeout(void);
#endif /* _LTTNG_SESSIOND_COMM_H */