ssize_t ret_len;
cmd.cmd = htobe32(LTTNG_VIEWER_CONNECT);
- cmd.data_size = sizeof(connect);
- cmd.cmd_version = 0;
+ cmd.data_size = htobe64(sizeof(connect));
+ cmd.cmd_version = htobe32(0);
memset(&connect, 0, sizeof(connect));
connect.major = htobe32(VERSION_MAJOR);
int first_session = 0;
cmd.cmd = htobe32(LTTNG_VIEWER_LIST_SESSIONS);
- cmd.data_size = 0;
- cmd.cmd_version = 0;
+ cmd.data_size = htobe64(0);
+ cmd.cmd_version = htobe32(0);
ret_len = lttng_live_send(control_sock, &cmd, sizeof(cmd));
if (ret_len < 0) {
ssize_t ret_len;
cmd.cmd = htobe32(LTTNG_VIEWER_CREATE_SESSION);
- cmd.data_size = 0;
- cmd.cmd_version = 0;
+ cmd.data_size = htobe64(0);
+ cmd.cmd_version = htobe32(0);
ret_len = lttng_live_send(control_sock, &cmd, sizeof(cmd));
if (ret_len < 0) {
}
cmd.cmd = htobe32(LTTNG_VIEWER_ATTACH_SESSION);
- cmd.data_size = sizeof(rq);
- cmd.cmd_version = 0;
+ cmd.data_size = htobe64(sizeof(rq));
+ cmd.cmd_version = htobe32(0);
memset(&rq, 0, sizeof(rq));
rq.session_id = htobe64(id);
int metadata_stream_id = -1;
cmd.cmd = htobe32(LTTNG_VIEWER_GET_METADATA);
- cmd.data_size = sizeof(rq);
- cmd.cmd_version = 0;
+ cmd.data_size = htobe64(sizeof(rq));
+ cmd.cmd_version = htobe32(0);
for (i = 0; i < session->stream_count; i++) {
if (session->streams[i].metadata_flag) {
int id;
cmd.cmd = htobe32(LTTNG_VIEWER_GET_NEXT_INDEX);
- cmd.data_size = sizeof(rq);
- cmd.cmd_version = 0;
+ cmd.data_size = htobe64(sizeof(rq));
+ cmd.cmd_version = htobe32(0);
for (id = 0; id < session->stream_count; id++) {
if (session->streams[id].metadata_flag) {
ssize_t ret_len;
cmd.cmd = htobe32(LTTNG_VIEWER_GET_PACKET);
- cmd.data_size = sizeof(rq);
- cmd.cmd_version = 0;
+ cmd.data_size = htobe64(sizeof(rq));
+ cmd.cmd_version = htobe32(0);
memset(&rq, 0, sizeof(rq));
rq.stream_id = htobe64(session->streams[id].id);
ssize_t ret_len;
cmd.cmd = htobe32(LTTNG_VIEWER_DETACH_SESSION);
- cmd.data_size = sizeof(rq);
- cmd.cmd_version = 0;
+ cmd.data_size = htobe64(sizeof(rq));
+ cmd.cmd_version = htobe32(0);
memset(&rq, 0, sizeof(rq));
rq.session_id = htobe64(id);