+end:
+ return ret;
+}
+
+/*
+ * ask_sessiond
+ *
+ * Ask the session daemon a specific command
+ * and put the data into buf.
+ *
+ * Return size of data (only payload, not header).
+ */
+static int ask_sessiond(enum lttcomm_command_type lct, void **buf)
+{
+ int ret;
+ size_t size;
+ void *data = NULL;
+ struct lttcomm_lttng_msg llm;
+
+ lsm.cmd_type = lct;
+
+ /* Send command to session daemon */
+ ret = send_data_sessiond();