struct cds_list_head node;
};
+enum health_cmd {
+ HEALTH_CMD_CHECK = 0,
+};
+
+struct health_comm_msg {
+ uint32_t component;
+ uint32_t cmd; /* enum health_cmd */
+} LTTNG_PACKED;
+
+struct health_comm_reply {
+ uint32_t ret_code;
+} LTTNG_PACKED;
+
/* Declare TLS health state. */
extern DECLARE_URCU_TLS(struct health_state, health_state);
int sock = -1, new_sock = -1, ret, i, pollfd, err = -1;
uint32_t revents, nb_fd;
struct lttng_poll_event events;
- struct lttcomm_health_msg msg;
- struct lttcomm_health_data reply;
+ struct health_comm_msg msg;
+ struct health_comm_reply reply;
DBG("[thread] Manage health check started");
LTTNG_ENABLE_CONSUMER = 20,
LTTNG_SET_CONSUMER_URI = 21,
LTTNG_ENABLE_EVENT_WITH_FILTER = 22,
- LTTNG_HEALTH_CHECK = 23,
+ /* Unused */
LTTNG_DATA_PENDING = 24,
LTTNG_SNAPSHOT_ADD_OUTPUT = 25,
LTTNG_SNAPSHOT_DEL_OUTPUT = 26,
uint32_t id;
} LTTNG_PACKED;
-struct lttcomm_health_msg {
- uint32_t component;
- uint32_t cmd;
-} LTTNG_PACKED;
-
-struct lttcomm_health_data {
- uint32_t ret_code;
-} LTTNG_PACKED;
-
/*
* lttcomm_consumer_msg is the message sent from sessiond to consumerd
* to either add a channel, add a stream, update a stream, or stop
#include <common/uri.h>
#include <common/utils.h>
#include <lttng/lttng.h>
+#include <lttng/health-internal.h>
#include "filter/filter-ast.h"
#include "filter/filter-parser.h"
int lttng_health_check(enum lttng_health_component c)
{
int sock, ret;
- struct lttcomm_health_msg msg;
- struct lttcomm_health_data reply;
+ struct health_comm_msg msg;
+ struct health_comm_reply reply;
/* Connect to the sesssion daemon */
sock = lttcomm_connect_unix_sock(health_sock_path);
goto error;
}
- msg.cmd = LTTNG_HEALTH_CHECK;
+ msg.cmd = HEALTH_CMD_CHECK;
msg.component = c;
ret = lttcomm_send_unix_sock(sock, (void *)&msg, sizeof(msg));