2 * Copyright (C) 2012 - David Goulet <dgoulet@efficios.com>
3 * Julien Desfossez <julien.desfossez@efficios.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, version 2 only,
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 #include <lttng/lttng.h>
30 * lttng-relayd communication header.
32 struct lttcomm_relayd_hdr
{
33 /* Circuit ID not used for now so always ignored */
35 uint64_t data_size
; /* data size following this header */
36 uint32_t cmd
; /* enum lttcomm_sessiond_command */
37 uint32_t cmd_version
; /* command version */
38 } __attribute__ ((__packed__
));
41 * lttng-relayd data header.
43 struct lttcomm_relayd_data_hdr
{
44 /* Circuit ID not used for now so always ignored */
46 uint64_t stream_id
; /* Stream ID known by the relayd */
47 uint64_t net_seq_num
; /* Network sequence number, per stream. */
48 uint32_t data_size
; /* data size following this header */
49 } __attribute__ ((__packed__
));
52 * Used to add a stream on the relay daemon.
54 struct lttcomm_relayd_add_stream
{
55 char channel_name
[LTTNG_SYMBOL_NAME_LEN
];
56 char pathname
[PATH_MAX
];
57 } __attribute__ ((__packed__
));
60 * Answer from an add stream command.
62 struct lttcomm_relayd_status_stream
{
65 } __attribute__ ((__packed__
));
68 * Used to return command code for command not needing special data.
70 struct lttcomm_relayd_generic_reply
{
72 } __attribute__ ((__packed__
));
75 * Used to update synchronization information.
77 struct lttcomm_relayd_update_sync_info
{
78 /* TODO: fill the structure. Feature not implemented yet */
79 } __attribute__ ((__packed__
));
84 struct lttcomm_relayd_version
{
87 } __attribute__ ((__packed__
));
90 * Metadata payload used when metadata command is sent.
92 struct lttcomm_relayd_metadata_payload
{
95 } __attribute__ ((__packed__
));
98 * Used to indicate that a specific stream id can now be closed.
100 struct lttcomm_relayd_close_stream
{
102 uint64_t last_net_seq_num
; /* sequence number of last packet */
103 } __attribute__ ((__packed__
));
105 #endif /* _RELAYD_COMM */