root/include/crm/common/digests_internal.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2004-2024 the Pacemaker project contributors
   3  *
   4  * The version control history for this file may have further details.
   5  *
   6  * This source code is licensed under the GNU Lesser General Public License
   7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
   8  */
   9 
  10 #ifndef PCMK__CRM_COMMON_DIGESTS_INTERNAL__H
  11 #define PCMK__CRM_COMMON_DIGESTS_INTERNAL__H
  12 
  13 #include <libxml/tree.h>            // xmlNode
  14 
  15 #ifdef __cplusplus
  16 extern "C" {
  17 #endif
  18 
  19 // Digest comparison results
  20 enum pcmk__digest_result {
  21     pcmk__digest_unknown,   // No digest available for comparison
  22     pcmk__digest_match,     // Digests match
  23     pcmk__digest_mismatch,  // Any parameter changed (potentially reloadable)
  24     pcmk__digest_restart,   // Parameters that require a restart changed
  25 };
  26 
  27 // Information needed to compare operation digests
  28 typedef struct {
  29     enum pcmk__digest_result rc;    // Result of digest comparison
  30     xmlNode *params_all;            // All operation parameters
  31     xmlNode *params_secure;         // Parameters marked private
  32     xmlNode *params_restart;        // Parameters marked not reloadable
  33     char *digest_all_calc;          // Digest of params_all
  34     char *digest_secure_calc;       // Digest of params_secure
  35     char *digest_restart_calc;      // Digest of params_restart
  36 } pcmk__op_digest_t;
  37 
  38 bool pcmk__verify_digest(xmlNode *input, const char *expected);
  39 
  40 #ifdef __cplusplus
  41 }
  42 #endif
  43 
  44 #endif // PCMK__CRM_COMMON_DIGESTS_INTERNAL__H

/* [previous][next][first][last][top][bottom][index][help] */