X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fsessiond-comm.h;h=8c4fe0ee7eed02293031b74ec9666fc375da72b6;hp=8f08d9904a16a05713edf20ae21b20d7b003af83;hb=2288467f63826a06d25ac361fa04ea92ec7ddfa3;hpb=e8360425c2fd0f8cfef1e678af5adfde7ae0a68e diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index 8f08d9904..8c4fe0ee7 100644 --- a/src/common/sessiond-comm/sessiond-comm.h +++ b/src/common/sessiond-comm/sessiond-comm.h @@ -105,6 +105,8 @@ enum lttcomm_sessiond_command { 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 { @@ -655,30 +657,38 @@ struct lttcomm_ust_reply { #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); -extern void lttcomm_init(void); +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); + +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 */