X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fsessiond-comm.h;h=2d6493d8eec989b53c17e361b8f5665bae0f9bb8;hb=fe7bf56464d7747362e1bde77c2769a62c81ac4c;hp=e23a84d20ee2d3feccecb79b543eb0ee88a0c01d;hpb=4cf84528f9620f27677bda5b2e486144913a2414;p=lttng-tools.git diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index e23a84d20..2d6493d8e 100644 --- a/src/common/sessiond-comm/sessiond-comm.h +++ b/src/common/sessiond-comm/sessiond-comm.h @@ -30,6 +30,7 @@ #include #include +#include #include #include "inet.h" @@ -325,14 +326,14 @@ struct lttcomm_sockaddr { struct sockaddr_in sin; struct sockaddr_in6 sin6; } addr; -} LTTNG_PACKED; +}; struct lttcomm_sock { int32_t fd; enum lttcomm_sock_proto proto; struct lttcomm_sockaddr sockaddr; const struct lttcomm_proto_ops *ops; -} LTTNG_PACKED; +}; /* * Relayd sock. Adds the protocol version to use for the communications with @@ -342,7 +343,7 @@ struct lttcomm_relayd_sock { struct lttcomm_sock sock; uint32_t major; uint32_t minor; -} LTTNG_PACKED; +}; struct lttcomm_net_family { int family; @@ -657,8 +658,9 @@ struct lttcomm_consumer_msg { struct { uint64_t net_index; enum lttng_stream_type type; - /* Open socket to the relayd */ - struct lttcomm_relayd_sock sock; + uint32_t major; + uint32_t minor; + uint8_t relayd_socket_protocol; /* Tracing session id associated to the relayd. */ uint64_t session_id; /* Relayd session id, only used with control socket. */ @@ -904,6 +906,9 @@ LTTNG_HIDDEN int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr, const char *ip, unsigned int port); LTTNG_HIDDEN struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto); +LTTNG_HIDDEN int lttcomm_populate_sock_from_open_socket(struct lttcomm_sock *sock, + int fd, + enum lttcomm_sock_proto protocol); 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);