X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fagent.hpp;h=2d2d0fa4a50f98734c653de30b4e20bf89839451;hb=7d46777ba0eaba7916ae822a7133f39740cdf9e5;hp=9fcb1f34956be67f4a5329e4a8c5cd9d2158a10f;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/common/sessiond-comm/agent.hpp b/src/common/sessiond-comm/agent.hpp index 9fcb1f349..2d2d0fa4a 100644 --- a/src/common/sessiond-comm/agent.hpp +++ b/src/common/sessiond-comm/agent.hpp @@ -9,21 +9,23 @@ #ifndef AGENT_COMM #define AGENT_COMM -#include - +#include #include + #include +#include + /* * Command value passed in the header. */ enum lttcomm_agent_command { - AGENT_CMD_LIST = 1, - AGENT_CMD_ENABLE = 2, - AGENT_CMD_DISABLE = 3, - AGENT_CMD_REG_DONE = 4, /* End registration process. */ - AGENT_CMD_APP_CTX_ENABLE = 5, - AGENT_CMD_APP_CTX_DISABLE = 6, + AGENT_CMD_LIST = 1, + AGENT_CMD_ENABLE = 2, + AGENT_CMD_DISABLE = 3, + AGENT_CMD_REG_DONE = 4, /* End registration process. */ + AGENT_CMD_APP_CTX_ENABLE = 5, + AGENT_CMD_APP_CTX_DISABLE = 6, }; /* @@ -31,11 +33,11 @@ enum lttcomm_agent_command { */ enum lttcomm_agent_ret_code { /* Success, assumed to be the first entry */ - AGENT_RET_CODE_SUCCESS = 1, + AGENT_RET_CODE_SUCCESS = 1, /* Invalid command */ - AGENT_RET_CODE_INVALID = 2, + AGENT_RET_CODE_INVALID = 2, /* Unknown logger name */ - AGENT_RET_CODE_UNKNOWN_NAME = 3, + AGENT_RET_CODE_UNKNOWN_NAME = 3, AGENT_RET_CODE_NR, }; @@ -43,9 +45,9 @@ enum lttcomm_agent_ret_code { * Agent application communication header. */ struct lttcomm_agent_hdr { - uint64_t data_size; /* data size following this header */ - uint32_t cmd; /* Enum of agent command. */ - uint32_t cmd_version; /* command version */ + uint64_t data_size; /* data size following this header */ + uint32_t cmd; /* Enum of agent command. */ + uint32_t cmd_version; /* command version */ } LTTNG_PACKED; /* @@ -87,7 +89,7 @@ struct lttcomm_agent_list_reply_hdr { struct lttcomm_agent_list_reply { uint32_t nb_event; /* List of event name each of them ending by a NULL byte. */ - char payload[]; + char payload[LTTNG_FLEXIBLE_ARRAY_MEMBER_LENGTH]; } LTTNG_PACKED; -#endif /* AGENT_COMM */ +#endif /* AGENT_COMM */