Fix: liblttng-ctl comm: lttng_event_field is not packed
[lttng-tools.git] / include / lttng / event-internal.h
index 6eb7ab37a7c67db671f59199c769ce54e79759f6..52f7f7857981c3b684fd6946b845bf2f54068284 100644 (file)
@@ -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
@@ -167,4 +181,16 @@ enum lttng_error_code lttng_events_create_and_flatten_from_payload(
                unsigned int count,
                struct lttng_event **events);
 
+ssize_t lttng_event_field_create_from_payload(
+               struct lttng_payload_view *view,
+               struct lttng_event_field **field);
+
+int lttng_event_field_serialize(const struct lttng_event_field *field,
+               struct lttng_payload *payload);
+
+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 */
This page took 0.023284 seconds and 4 git commands to generate.