{
int ret;
pid_t pid;
+ uint32_t major_version, minor_version;
ssize_t size;
enum lttng_domain_type domain;
struct agent_app *app;
}
domain = be32toh(msg.domain);
pid = be32toh(msg.pid);
+ major_version = be32toh(msg.major_version);
+ minor_version = be32toh(msg.minor_version);
+
+ /* Test communication protocol version of the registring agent. */
+ if (major_version != AGENT_MAJOR_VERSION) {
+ ret = -EINVAL;
+ goto error_socket;
+ }
+ if (minor_version != AGENT_MINOR_VERSION) {
+ ret = -EINVAL;
+ goto error_socket;
+ }
DBG2("[agent-thread] New registration for pid %d domain %d on socket %d",
pid, domain, new_sock->fd);
#include <common/hashtable/hashtable.h>
#include <lttng/lttng.h>
+/* Agent protocol version that is verified during the agent registration. */
+#define AGENT_MAJOR_VERSION 1
+#define AGENT_MINOR_VERSION 0
+
/*
* Hash table that contains the agent app created upon registration indexed by
* socket.
/* This maps to a lttng_domain_type. */
uint32_t domain;
uint32_t pid;
+ uint32_t major_version;
+ uint32_t minor_version;
};
/*