+ * Return the size (bytes) of the list and set the event_list array.
+ * On error, return negative value.
+ */
+int lttng_list_kernel_events(struct lttng_event **events)
+{
+ int ret;
+
+ ret = ask_sessiond(LTTNG_KERNEL_LIST_EVENTS, (void **) events);
+
+ return ret / sizeof(struct lttng_event);
+}
+
+/*
+ * Return a human readable string of code
+ */
+const char *lttng_get_readable_code(int code)
+{
+ if (code > -LTTCOMM_OK) {
+ return "Ended with errors";
+ }
+
+ return lttcomm_get_readable_code(code);
+}
+
+/*
+ * Create a brand new session using name.
+ */
+int lttng_create_session(const char *name, const char *path)
+{
+ strncpy(lsm.session_name, name, NAME_MAX);
+ strncpy(lsm.path, path, PATH_MAX);
+ return ask_sessiond(LTTNG_CREATE_SESSION, NULL);
+}
+
+/*
+ * Destroy session using name.
+ */
+int lttng_destroy_session(const char *name)
+{
+ strncpy(lsm.session_name, name, NAME_MAX);
+ return ask_sessiond(LTTNG_DESTROY_SESSION, NULL);
+}
+
+/*