X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fsessiond-comm.h;h=318753d978240142ed9fadc08238df99dd44c19c;hb=999af9c1150784f8676c6fce0764772d2314854a;hp=ba756f8f197ce8fd4cea1ebf3dc5d36b5080a1c0;hpb=00e71031969e1cef925cd32f81de49ab7213dfec;p=lttng-tools.git diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index ba756f8f1..318753d97 100644 --- a/src/common/sessiond-comm/sessiond-comm.h +++ b/src/common/sessiond-comm/sessiond-comm.h @@ -1,6 +1,5 @@ /* - * Copyright (C) 2011 David Goulet - * Copyright (C) 2011 Julien Desfossez + * Copyright (C) 2011 EfficiOS Inc. * Copyright (C) 2011 Mathieu Desnoyers * * SPDX-License-Identifier: GPL-2.0-only @@ -31,6 +30,7 @@ #include #include +#include #include #include "inet.h" @@ -374,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 @@ -391,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; @@ -461,8 +461,7 @@ struct lttcomm_session_msg { } LTTNG_PACKED disable; /* Create channel */ struct { - struct lttng_channel chan; - struct lttng_channel_extended extended; + uint32_t length; } LTTNG_PACKED channel; /* Context */ struct { @@ -608,6 +607,14 @@ struct lttcomm_event_command_header { uint32_t nb_events; } LTTNG_PACKED; +/* + * Listing command header. + */ +struct lttcomm_list_command_header { + /* Number of elements */ + uint32_t count; +} LTTNG_PACKED; + /* * Event extended info header. This is the structure preceding each * extended info data. @@ -706,8 +713,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. */ @@ -953,6 +961,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);