X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Fagent.h;h=11acc52f9206cead181383771830ee2a9f9535c3;hp=55df5ed9f4561c69a62bcdbe693d94b538bbfe8b;hb=bdf640139afb02572eb23f014e4a61ad68fdfeb1;hpb=56cc432ef23b7c940aafbfe59843e2e3134045d8 diff --git a/src/common/sessiond-comm/agent.h b/src/common/sessiond-comm/agent.h index 55df5ed9f..11acc52f9 100644 --- a/src/common/sessiond-comm/agent.h +++ b/src/common/sessiond-comm/agent.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2013 - David Goulet + * Copyright (C) 2016 - Jérémie Galarneau * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License, version 2 only, as @@ -18,7 +19,6 @@ #ifndef AGENT_COMM #define AGENT_COMM -#define _GNU_SOURCE #include #include @@ -27,19 +27,24 @@ * 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_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, }; /* * Return codes from the agent. */ enum lttcomm_agent_ret_code { - AGENT_RET_CODE_SUCCESS = 1, - AGENT_RET_CODE_INVALID = 2, - AGENT_RET_CODE_UNKNOWN_NAME = 3, + /* Success, assumed to be the first entry */ + AGENT_RET_CODE_SUCCESS = 1, + /* Invalid command */ + AGENT_RET_CODE_INVALID = 2, + /* Unknown logger name */ + AGENT_RET_CODE_UNKNOWN_NAME = 3, AGENT_RET_CODE_NR, }; @@ -53,18 +58,20 @@ struct lttcomm_agent_hdr { } LTTNG_PACKED; /* - * Enable event command payload. + * Enable event command payload. Will be immediately followed by the + * variable-length string representing the filter expression. */ -struct lttcomm_agent_enable { - uint32_t loglevel; +struct lttcomm_agent_enable_event { + uint32_t loglevel_value; uint32_t loglevel_type; char name[LTTNG_SYMBOL_NAME_LEN]; + uint32_t filter_expression_length; } LTTNG_PACKED; /* * Disable event command payload. */ -struct lttcomm_agent_disable { +struct lttcomm_agent_disable_event { char name[LTTNG_SYMBOL_NAME_LEN]; } LTTNG_PACKED;