+ switch (lum->cmd) {
+ case LTTNG_UST_ABI_FILTER:
+ case LTTNG_UST_ABI_EXCLUSION:
+ case LTTNG_UST_ABI_CHANNEL:
+ case LTTNG_UST_ABI_STREAM:
+ case LTTNG_UST_ABI_CONTEXT:
+ /*
+ * Those commands send additional payload after struct
+ * ustcomm_ust_msg, which makes it pretty much impossible to
+ * deal with "unknown command" errors without leaving the
+ * communication pipe in a out-of-sync state. This is part of
+ * the ABI between liblttng-ust-ctl and liblttng-ust, and
+ * should be fixed on the next breaking
+ * LTTNG_UST_ABI_MAJOR_VERSION protocol bump by indicating the
+ * total command message length as part of a message header so
+ * that the protocol can recover from invalid command errors.
+ */
+ break;
+
+ case LTTNG_UST_ABI_CAPTURE:
+ case LTTNG_UST_ABI_COUNTER:
+ case LTTNG_UST_ABI_COUNTER_GLOBAL:
+ case LTTNG_UST_ABI_COUNTER_CPU:
+ case LTTNG_UST_ABI_EVENT_NOTIFIER_CREATE:
+ case LTTNG_UST_ABI_EVENT_NOTIFIER_GROUP_CREATE:
+ /*
+ * Those commands expect a reply to the struct ustcomm_ust_msg
+ * before sending additional payload.
+ */
+ prepare_cmd_reply(&lur, lum->handle, lum->cmd, 0);
+
+ ret = send_reply(sock, &lur);
+ if (ret < 0) {
+ DBG("error sending reply");
+ goto error;
+ }
+ break;
+
+ default:
+ /*
+ * Other commands either don't send additional payload, or are
+ * unknown.
+ */
+ break;
+ }
+