diff --git a/include/crm/common/messages_internal.h b/include/crm/common/messages_internal.h index d4b4dcd0fe..df12e59b1f 100644 --- a/include/crm/common/messages_internal.h +++ b/include/crm/common/messages_internal.h @@ -1,15 +1,36 @@ /* * Copyright 2018-2022 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_COMMON_MESSAGES_INTERNAL__H #define PCMK__CRM_COMMON_MESSAGES_INTERNAL__H +#include // uint32_t +#include // xmlNode +#include // pcmk__client_t +#include // pcmk__action_result_t + +// Server request (whether from an IPC client or cluster peer) +typedef struct { + // If request is from an IPC client + pcmk__client_t *client; // IPC client (NULL if not via IPC) + uint32_t id; // IPC message ID + uint32_t flags; // IPC message flags + + // If message is from a cluster peer + const char *peer; // Peer name (NULL if not via cluster) + + // Common information regardless of origin + xmlNode *xml; // Request XML + int call_options; // Call options set on request + pcmk__action_result_t result; // Where to store operation result +} pcmk__request_t; + const char *pcmk__message_name(const char *name); #endif // PCMK__CRM_COMMON_MESSAGES_INTERNAL__H