common: Add index allocator for error counters
[lttng-tools.git] / src / common / payload-view.h
index a07c0be003c7e9638c0ab8af0f1bd0f0cb6e6326..7fe5e7d29fe2500105dfbe22e7baf5d68ea234b0 100644 (file)
@@ -53,6 +53,18 @@ struct lttng_payload_view {
        } _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.
  *
@@ -140,7 +152,7 @@ struct lttng_payload_view lttng_payload_view_init_from_buffer(
  */
 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.
This page took 0.0231 seconds and 4 git commands to generate.