X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fevent-internal.h;h=898609879d5107bd4af71ef61a28a66008db23ba;hb=c2afda67713866265294d11c72deca6edba05969;hp=54f33fdf1c5031c9fa57baa617396353553cf502;hpb=b583ad836a07eb17b3abebc9354e49a9ce415492;p=lttng-tools.git diff --git a/include/lttng/event-internal.h b/include/lttng/event-internal.h index 54f33fdf1..898609879 100644 --- a/include/lttng/event-internal.h +++ b/include/lttng/event-internal.h @@ -121,6 +121,20 @@ struct lttng_event_context_app_comm { char payload[]; } LTTNG_PACKED; +struct lttng_event_field_comm { + uint8_t type; + uint8_t nowrite; + /* Includes terminator `\0`. */ + uint32_t name_len; + uint32_t event_len; + + /* + * - name [name_len] + * - lttng_event object + */ + char payload[]; +} LTTNG_PACKED; + struct lttng_event_extended { /* * exclusions and filter_expression are only set when the lttng_event @@ -170,10 +184,25 @@ int lttng_event_context_serialize(struct lttng_event_context *context, LTTNG_HIDDEN void lttng_event_context_destroy(struct lttng_event_context *context); +LTTNG_HIDDEN +ssize_t lttng_event_field_create_from_buffer( + const struct lttng_buffer_view *view, + struct lttng_event_field **field); + +LTTNG_HIDDEN +int lttng_event_field_serialize(const struct lttng_event_field *field, + struct lttng_dynamic_buffer *buffer); + LTTNG_HIDDEN enum lttng_error_code lttng_events_create_and_flatten_from_buffer( const struct lttng_buffer_view *view, unsigned int count, struct lttng_event **events); +LTTNG_HIDDEN +enum lttng_error_code lttng_event_fields_create_and_flatten_from_buffer( + const struct lttng_buffer_view *view, + unsigned int count, + struct lttng_event_field **fields); + #endif /* LTTNG_EVENT_INTERNAL_H */