X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Fevent-internal.h;h=5bb0f91065999b277efa7355497da14db0be00c0;hb=76d24c0bd4ea3fe22981f00350f25ffa8e832c38;hp=eec294dec24d74685f558f1db41d9fadc607ede3;hpb=a4a3d6bd4a06e907f9cec07456f42ab08d59829a;p=lttng-tools.git diff --git a/include/lttng/event-internal.h b/include/lttng/event-internal.h index eec294dec..5bb0f9106 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 @@ -140,12 +154,14 @@ struct lttng_event_extended { LTTNG_HIDDEN struct lttng_event *lttng_event_copy(const struct lttng_event *event); +LTTNG_HIDDEN ssize_t lttng_event_create_from_payload(struct lttng_payload_view *view, struct lttng_event **out_event, struct lttng_event_exclusion **out_exclusion, char **out_filter_expression, struct lttng_bytecode **out_bytecode); +LTTNG_HIDDEN int lttng_event_serialize(const struct lttng_event *event, unsigned int exclusion_count, char **exclusion_list, @@ -154,18 +170,37 @@ int lttng_event_serialize(const struct lttng_event *event, struct lttng_bytecode *bytecode, struct lttng_payload *payload); +LTTNG_HIDDEN ssize_t lttng_event_context_create_from_payload( struct lttng_payload_view *view, struct lttng_event_context **event_ctx); +LTTNG_HIDDEN int lttng_event_context_serialize(struct lttng_event_context *context, struct lttng_payload *payload); +LTTNG_HIDDEN void lttng_event_context_destroy(struct lttng_event_context *context); +LTTNG_HIDDEN enum lttng_error_code lttng_events_create_and_flatten_from_payload( struct lttng_payload_view *view, unsigned int count, struct lttng_event **events); +LTTNG_HIDDEN +ssize_t lttng_event_field_create_from_payload( + struct lttng_payload_view *view, + struct lttng_event_field **field); + +LTTNG_HIDDEN +int lttng_event_field_serialize(const struct lttng_event_field *field, + struct lttng_payload *payload); + +LTTNG_HIDDEN +enum lttng_error_code lttng_event_fields_create_and_flatten_from_payload( + struct lttng_payload_view *view, + unsigned int count, + struct lttng_event_field **fields); + #endif /* LTTNG_EVENT_INTERNAL_H */