}
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);
connect.viewer_session_id = -1ULL; /* will be set on recv */
connect.major = htobe32(LTTNG_LIVE_MAJOR);
}
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(ctx->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);
goto end;
}
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(stream->id);
rq.stream_id = htobe64(metadata_stream->id);
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);
ret_len = lttng_live_send(ctx->control_sock, &cmd, sizeof(cmd));
if (ret_len < 0) {
struct lttng_viewer_index *rp = &viewer_stream->current_index;
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);
memset(&rq, 0, sizeof(rq));
rq.stream_id = htobe64(viewer_stream->id);
}
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(ctx->control_sock, &cmd, sizeof(cmd));
if (ret_len < 0) {
}
cmd.cmd = htobe32(LTTNG_VIEWER_GET_NEW_STREAMS);
- 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);