+/*
+ * lttng_kernel_disable_event
+ *
+ * Disable an event in the kernel tracer.
+ */
+int lttng_kernel_disable_event(char *name, char *channel_name)
+{
+ int ret;
+
+ if (channel_name == NULL) {
+ strncpy(lsm.u.disable.channel_name, DEFAULT_CHANNEL_NAME, NAME_MAX);
+ } else {
+ strncpy(lsm.u.disable.channel_name, channel_name, NAME_MAX);
+ }
+
+ if (name == NULL) {
+ ret = ask_sessiond(LTTNG_KERNEL_DISABLE_ALL_EVENT, NULL);
+ } else {
+ strncpy(lsm.u.disable.name, name, NAME_MAX);
+ ret = ask_sessiond(LTTNG_KERNEL_DISABLE_EVENT, NULL);
+ }
+
+ return ret;
+}
+
+/*
+ * 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
+ */
+