Ensure an older liblttng-ust communicating with a newer liblttng-ust
will refuse the handshake, so older session daemon do not get to
interact with more recent lttng-ust which implements nested arrays and
sequences.
Introduce LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE to allow
liblttng-ust to be backward compatible with a range of major versions.
In this case, liblttng-ust ABI 9.0 is fully backward compatible with
8.x, given that none of the existing ABI in 8.x has changed in 9.0.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#define LTTNG_UST_COMM_MAGIC 0xC57C57C5
/* Version for ABI between liblttng-ust, sessiond, consumerd */
-#define LTTNG_UST_ABI_MAJOR_VERSION 8
-#define LTTNG_UST_ABI_MINOR_VERSION 1
+#define LTTNG_UST_ABI_MAJOR_VERSION 9
+#define LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE 8
+#define LTTNG_UST_ABI_MINOR_VERSION 0
enum lttng_ust_instrumentation {
LTTNG_UST_TRACEPOINT = 0,
*uint64_t_alignment = reg_msg.uint64_t_alignment;
*long_alignment = reg_msg.long_alignment;
memcpy(name, reg_msg.name, LTTNG_UST_ABI_PROCNAME_LEN);
- if (reg_msg.major != LTTNG_UST_ABI_MAJOR_VERSION) {
+ if (reg_msg.major < LTTNG_UST_ABI_MAJOR_VERSION_OLDEST_COMPATIBLE ||
+ reg_msg.major > LTTNG_UST_ABI_MAJOR_VERSION) {
return -LTTNG_UST_ERR_UNSUP_MAJOR;
}