Add app context support to ust-ctl protocol
[deliverable/lttng-ust.git] / include / lttng / ust-ctl.h
index 7a5f969eecd4ebd0fe50a0715e5d5e273dbbcbaf..d3c50c5cbd6a326b8e6907de08deb46a1fcb2612 100644 (file)
@@ -59,6 +59,17 @@ struct ustctl_consumer_channel_attr {
  * API used by sessiond.
  */
 
+struct lttng_ust_context_attr {
+       enum lttng_ust_context_type ctx;
+       union {
+               struct lttng_ust_perf_counter_ctx perf_counter;
+               struct {
+                       char *provider_name;
+                       char *ctx_name;
+               } app_ctx;
+       } u;
+};
+
 /*
  * Error values: all the following functions return:
  * >= 0: Success (LTTNG_UST_OK)
@@ -69,7 +80,7 @@ int ustctl_create_session(int sock);
 int ustctl_create_event(int sock, struct lttng_ust_event *ev,
                struct lttng_ust_object_data *channel_data,
                struct lttng_ust_object_data **event_data);
-int ustctl_add_context(int sock, struct lttng_ust_context *ctx,
+int ustctl_add_context(int sock, struct lttng_ust_context_attr *ctx,
                struct lttng_ust_object_data *obj_data,
                struct lttng_ust_object_data **context_data);
 int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode,
@@ -273,6 +284,8 @@ enum ustctl_abstract_types {
        ustctl_atype_sequence,
        ustctl_atype_string,
        ustctl_atype_float,
+       ustctl_atype_variant,
+       ustctl_atype_struct,
        NR_USTCTL_ABSTRACT_TYPES,
 };
 
@@ -345,6 +358,15 @@ struct ustctl_type {
                        struct ustctl_basic_type length_type;
                        struct ustctl_basic_type elem_type;
                } sequence;
+               struct {
+                       uint32_t nr_choices;
+                       char tag_name[LTTNG_UST_SYM_NAME_LEN];
+                       /* Followed by nr_choices struct ustctl_field. */
+               } variant;
+               struct {
+                       uint32_t nr_fields;
+                       /* Followed by nr_fields struct ustctl_field. */
+               } _struct;
                char padding[USTCTL_UST_TYPE_PADDING];
        } u;
 } LTTNG_PACKED;
This page took 0.026276 seconds and 5 git commands to generate.