+ * - create the thread pipe (for splice)
+ * Takes a function pointer as argument, this function is called when data is
+ * available on a buffer. This function is responsible to do the
+ * kernctl_get_next_subbuf, read the data with mmap or splice depending on the
+ * buffer configuration and then kernctl_put_next_subbuf at the end.
+ * Returns a pointer to the new context or NULL on error.
+ */
+struct kconsumerd_local_data *kconsumerd_create(
+ int (*buffer_ready)(struct kconsumerd_fd *kconsumerd_fd));
+
+/*
+ * kconsumerd_destroy
+ * Close all fds associated with the instance and free the context
+ */
+void kconsumerd_destroy(struct kconsumerd_local_data *ctx);
+
+/*
+ * kconsumerd_on_read_subbuffer_mmap
+ * mmap the ring buffer, read it and write the data to the tracefile.
+ * Returns the number of bytes written
+ */
+int kconsumerd_on_read_subbuffer_mmap(struct kconsumerd_local_data *ctx,
+ struct kconsumerd_fd *kconsumerd_fd, unsigned long len);
+
+/*
+ * kconsumerd_on_read_subbuffer
+ *
+ * Splice the data from the ring buffer to the tracefile.
+ * Returns the number of bytes spliced