} _iterator;
};
+/**
+ * Checks if a payload view's buffer is safe to access.
+ *
+ * After calling the payload view creation functions, callers should verify
+ * if the resquested length (if any is explicitly provided) could be mapped
+ * to a new view.
+ *
+ * @view Payload to validate
+ */
+LTTNG_HIDDEN
+bool lttng_payload_view_is_valid(const struct lttng_payload_view *view);
+
/**
* Return a payload view referencing a subset of a payload.
*
*/
LTTNG_HIDDEN
int lttng_payload_view_get_fd_handle_count(
- struct lttng_payload_view *payload_view);
+ const struct lttng_payload_view *payload_view);
/**
* Pop an fd handle from a payload view.