X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fsessiond-comm.h;fp=src%2Fcommon%2Fsessiond-comm%2Fsessiond-comm.h;h=adb179675cad881f239a30fff00ed0627c993a70;hp=af91087644cf3bd58d03d3d8614bcfd614724e8e;hb=4222116f0098672bbbc0fea2b994e50007929d58;hpb=0159fa50ebb4c8ea0e34a24f99bc8f5cda298be4 diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index af9108764..adb179675 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" @@ -373,14 +374,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 @@ -390,7 +391,7 @@ struct lttcomm_relayd_sock { struct lttcomm_sock sock; uint32_t major; uint32_t minor; -} LTTNG_PACKED; +}; struct lttcomm_net_family { int family; @@ -705,8 +706,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. */ @@ -952,6 +954,9 @@ int lttcomm_init_inet6_sockaddr(struct lttcomm_sockaddr *sockaddr, const char *ip, unsigned int port); struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto); +int lttcomm_populate_sock_from_open_socket(struct lttcomm_sock *sock, + int fd, + enum lttcomm_sock_proto protocol); int lttcomm_create_sock(struct lttcomm_sock *sock); struct lttcomm_sock *lttcomm_alloc_sock_from_uri(struct lttng_uri *uri); void lttcomm_destroy_sock(struct lttcomm_sock *sock);