- * Pop an fd from a payload view.
- * No ownership of the file descriptor is assumed by the payload.
+ * Return a payload view referencing a subset of the memory referenced by a raw
+ * pointer.
+ *
+ * @src Source buffer to reference
+ * @offset Offset to apply to the source memory buffer
+ * @len Length of the memory contents to reference.
+ *
+ * Note that a payload view never assumes the ownership of the memory it
+ * references.
+ */
+LTTNG_HIDDEN
+struct lttng_payload_view lttng_payload_view_init_from_buffer(
+ const char *src, size_t offset, ptrdiff_t len);
+
+/**
+ * Get the number of file descriptor handles left in a payload view.
+ *
+ * @payload Payload instance
+ *
+ * Returns the number of file descriptor handles left on success, -1 on error.
+ */
+LTTNG_HIDDEN
+int lttng_payload_view_get_fd_handle_count(
+ const struct lttng_payload_view *payload_view);
+
+/**
+ * Pop an fd handle from a payload view.
+ *
+ * A reference to the returned fd_handle is acquired on behalf of the caller.