Add CTF enum type support for UST registry
[lttng-tools.git] / src / bin / lttng-sessiond / lttng-ust-ctl.h
index b3de5a9ba61846f557ec39b0df4cecd1b486bca1..73a9244187aa9c6aef8536749439cd6482e6228b 100644 (file)
@@ -227,6 +227,7 @@ enum ustctl_socket_type {
 enum ustctl_notify_cmd {
        USTCTL_NOTIFY_CMD_EVENT = 0,
        USTCTL_NOTIFY_CMD_CHANNEL = 1,
+       USTCTL_NOTIFY_CMD_ENUM = 2,
 };
 
 enum ustctl_channel_header {
@@ -274,6 +275,13 @@ struct ustctl_float_type {
        char padding[USTCTL_UST_FLOAT_TYPE_PADDING];
 } LTTNG_PACKED;
 
+#define USTCTL_UST_ENUM_ENTRY_PADDING  32
+struct ustctl_enum_entry {
+       uint64_t start, end;            /* start and end are inclusive */
+       char string[LTTNG_UST_SYM_NAME_LEN];
+       char padding[USTCTL_UST_ENUM_ENTRY_PADDING];
+};
+
 #define USTCTL_UST_BASIC_TYPE_PADDING  296
 union _ustctl_basic_type {
        struct ustctl_integer_type integer;
@@ -281,6 +289,9 @@ union _ustctl_basic_type {
                enum ustctl_string_encodings encoding;
        } string;
        struct ustctl_float_type _float;
+       struct {
+               char name[LTTNG_UST_SYM_NAME_LEN];
+       } enumeration;
        char padding[USTCTL_UST_BASIC_TYPE_PADDING];
 } LTTNG_PACKED;
 
@@ -375,6 +386,22 @@ int ustctl_reply_register_event(int sock,
        uint32_t id,                    /* event id (input) */
        int ret_code);                  /* return code. 0 ok, negative error */
 
+/*
+ * Returns 0 on success, negative UST or system error value on error.
+ */
+int ustctl_recv_register_enum(int sock,
+       int *session_objd,
+       char *enum_name,
+       struct ustctl_enum_entry **entries,
+       unsigned int *nr_entries);
+
+/*
+ * Returns 0 on success, negative error value on error.
+ */
+int ustctl_reply_register_enum(int sock,
+       int64_t id,                     /* enum id (input) */
+       int ret_code);
+
 /*
  * Returns 0 on success, negative UST or system error value on error.
  */
This page took 0.022955 seconds and 4 git commands to generate.