14 #include <sys/types.h> 19 #define MIN_MSG_SIZE 12336 // sizeof(struct qb_ipc_connection_response) 20 #define MAX_MSG_SIZE 128*1024 // 128k default 33 static unsigned int global_max = 0;
35 if (global_max == 0) {
36 const char *env = getenv(
"PCMK_ipc_buffer");
47 return QB_MAX(max, global_max);
58 static unsigned int default_size = 0;
60 if (default_size == 0) {
78 crm_err(
"IPC message without header");
82 crm_err(
"Filtering incompatible v%d IPC message (only versions <= %d supported)",
92 switch (client_type) {
97 #ifdef HAVE_GNUTLS_GNUTLS_H 98 case pcmk__client_tls:
int crm_parse_int(const char *text, const char *default_text)
Parse an integer value from a string.
unsigned int pcmk__ipc_buffer_size(unsigned int max)
bool pcmk__valid_ipc_header(const pcmk__ipc_header_t *header)
#define PCMK__IPC_VERSION
unsigned int crm_ipc_default_buffer_size(void)
Return pacemaker's default IPC buffer size.
#define crm_err(fmt, args...)
const char * pcmk__client_type_str(uint64_t client_type)