+/*
+ * lttng_kernel_enable_channel
+ *
+ * Enable recording for a channel for the kernel tracer.
+ */
+int lttng_kernel_enable_channel(char *name)
+{
+ strncpy(lsm.u.enable.channel_name, name, NAME_MAX);
+ return ask_sessiond(LTTNG_KERNEL_ENABLE_CHANNEL, NULL);
+}
+
+/*
+ * lttng_kernel_disable_channel
+ *
+ * Disable recording for the channel for the kernel tracer.
+ */
+int lttng_kernel_disable_channel(char *name)
+{
+ strncpy(lsm.u.disable.channel_name, name, NAME_MAX);
+ return ask_sessiond(LTTNG_KERNEL_DISABLE_CHANNEL, NULL);
+}
+
+/*
+ * lttng_kernel_create_channel
+ *
+ * Create a channel in the kernel tracer.
+ */
+int lttng_kernel_create_channel(struct lttng_channel *chan)
+{
+ memcpy(&lsm.u.channel.chan, chan, sizeof(struct lttng_channel));
+ return ask_sessiond(LTTNG_KERNEL_CREATE_CHANNEL, NULL);
+}
+
+/*
+ * lttng_list_events
+ *
+ * List all available events in the kernel.
+ *
+ * Return the size (bytes) of the list and set the event_list array.
+ * On error, return negative value.
+ */
+int lttng_kernel_list_events(char **event_list)
+{
+ return ask_sessiond(LTTNG_KERNEL_LIST_EVENTS, (void **) event_list);
+}
+
+/*
+ * END Kernel control API
+ */
+
+/*
+ * lttng_get_readable_code
+ *
+ * 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);
+}
+