X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-ctl.h;h=7a5f969eecd4ebd0fe50a0715e5d5e273dbbcbaf;hb=c785c634a51956094130218c2bffeff32756cb69;hp=78e0cf727feb1a91c150c2a5b308bd8d3750c710;hpb=aaf93c608bb7591f0a5411c221a3ad3fbd8efdfd;p=lttng-ust.git diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index 78e0cf72..7a5f969e 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -255,6 +255,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 { @@ -302,9 +303,21 @@ 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; + struct { + char name[LTTNG_UST_SYM_NAME_LEN]; + struct ustctl_integer_type container_type; + uint64_t id; /* enum ID in sessiond. */ + } enumeration; struct { enum ustctl_string_encodings encoding; } string; @@ -403,6 +416,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, + size_t *nr_entries); + +/* + * Returns 0 on success, negative error value on error. + */ +int ustctl_reply_register_enum(int sock, + uint64_t id, /* enum id (input) */ + int ret_code); + /* * Returns 0 on success, negative UST or system error value on error. */