pacemaker  2.1.0-7c3f660
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ipc_server.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <errno.h>
#include <bzlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/common/ipc.h>
#include <crm/common/ipc_internal.h>
#include "crmcommon_private.h"
Include dependency graph for ipc_server.c:

Go to the source code of this file.

Macros

#define PCMK_IPC_DEFAULT_QUEUE_MAX   500
 

Functions

guint pcmk__ipc_client_count ()
 
void pcmk__foreach_ipc_client (GHFunc func, gpointer user_data)
 
pcmk__client_tpcmk__find_client (qb_ipcs_connection_t *c)
 
pcmk__client_tpcmk__find_client_by_id (const char *id)
 
const char * pcmk__client_name (pcmk__client_t *c)
 
void pcmk__client_cleanup (void)
 
void pcmk__drop_all_clients (qb_ipcs_service_t *service)
 
pcmk__client_tpcmk__new_unauth_client (void *key)
 Allocate a new pcmk__client_t object and generate its ID. More...
 
pcmk__client_tpcmk__new_client (qb_ipcs_connection_t *c, uid_t uid_client, gid_t gid_client)
 
void pcmk_free_ipc_event (struct iovec *event)
 Free an I/O vector created by pcmk__ipc_prepare_iov() More...
 
void pcmk__free_client (pcmk__client_t *c)
 
bool pcmk__set_client_queue_max (pcmk__client_t *client, const char *qmax)
 
int pcmk__client_pid (qb_ipcs_connection_t *c)
 
xmlNode * pcmk__client_data2xml (pcmk__client_t *c, void *data, uint32_t *id, uint32_t *flags)
 
int pcmk__ipc_prepare_iov (uint32_t request, xmlNode *message, uint32_t max_send_size, struct iovec **result, ssize_t *bytes)
 
int pcmk__ipc_send_iov (pcmk__client_t *c, struct iovec *iov, uint32_t flags)
 
int pcmk__ipc_send_xml (pcmk__client_t *c, uint32_t request, xmlNode *message, uint32_t flags)
 
int pcmk__ipc_send_ack_as (const char *function, int line, pcmk__client_t *c, uint32_t request, uint32_t flags, const char *tag, crm_exit_t status)
 
void pcmk__serve_based_ipc (qb_ipcs_service_t **ipcs_ro, qb_ipcs_service_t **ipcs_rw, qb_ipcs_service_t **ipcs_shm, struct qb_ipcs_service_handlers *ro_cb, struct qb_ipcs_service_handlers *rw_cb)
 
void pcmk__stop_based_ipc (qb_ipcs_service_t *ipcs_ro, qb_ipcs_service_t *ipcs_rw, qb_ipcs_service_t *ipcs_shm)
 
qb_ipcs_service_t * pcmk__serve_controld_ipc (struct qb_ipcs_service_handlers *cb)
 
void pcmk__serve_attrd_ipc (qb_ipcs_service_t **ipcs, struct qb_ipcs_service_handlers *cb)
 
void pcmk__serve_fenced_ipc (qb_ipcs_service_t **ipcs, struct qb_ipcs_service_handlers *cb)
 
void pcmk__serve_pacemakerd_ipc (qb_ipcs_service_t **ipcs, struct qb_ipcs_service_handlers *cb)
 
bool crm_is_daemon_name (const char *name)
 Check whether string represents a client name used by cluster daemons. More...
 

Macro Definition Documentation

#define PCMK_IPC_DEFAULT_QUEUE_MAX   500

Definition at line 25 of file ipc_server.c.

Function Documentation

bool crm_is_daemon_name ( const char *  name)

Check whether string represents a client name used by cluster daemons.

Parameters
[in]nameString to check
Returns
true if name is standard client name used by daemons, false otherwise
Note
This is provided by the client, and so cannot be used by itself as a secure means of authentication.

Definition at line 958 of file ipc_server.c.

void pcmk__client_cleanup ( void  )

Definition at line 116 of file ipc_server.c.

xmlNode* pcmk__client_data2xml ( pcmk__client_t c,
void *  data,
uint32_t *  id,
uint32_t *  flags 
)

Definition at line 392 of file ipc_server.c.

const char* pcmk__client_name ( pcmk__client_t c)

Definition at line 99 of file ipc_server.c.

int pcmk__client_pid ( qb_ipcs_connection_t *  c)

Definition at line 371 of file ipc_server.c.

void pcmk__drop_all_clients ( qb_ipcs_service_t *  service)

Definition at line 130 of file ipc_server.c.

pcmk__client_t* pcmk__find_client ( qb_ipcs_connection_t *  c)

Definition at line 59 of file ipc_server.c.

pcmk__client_t* pcmk__find_client_by_id ( const char *  id)

Definition at line 70 of file ipc_server.c.

void pcmk__foreach_ipc_client ( GHFunc  func,
gpointer  user_data 
)

Definition at line 51 of file ipc_server.c.

void pcmk__free_client ( pcmk__client_t c)

Definition at line 305 of file ipc_server.c.

guint pcmk__ipc_client_count ( void  )

Definition at line 36 of file ipc_server.c.

int pcmk__ipc_prepare_iov ( uint32_t  request,
xmlNode *  message,
uint32_t  max_send_size,
struct iovec **  result,
ssize_t *  bytes 
)

Definition at line 586 of file ipc_server.c.

int pcmk__ipc_send_ack_as ( const char *  function,
int  line,
pcmk__client_t c,
uint32_t  request,
uint32_t  flags,
const char *  tag,
crm_exit_t  status 
)

Definition at line 788 of file ipc_server.c.

int pcmk__ipc_send_iov ( pcmk__client_t c,
struct iovec *  iov,
uint32_t  flags 
)

Definition at line 671 of file ipc_server.c.

int pcmk__ipc_send_xml ( pcmk__client_t c,
uint32_t  request,
xmlNode *  message,
uint32_t  flags 
)

Definition at line 750 of file ipc_server.c.

pcmk__client_t* pcmk__new_client ( qb_ipcs_connection_t *  c,
uid_t  uid_client,
gid_t  gid_client 
)

Definition at line 224 of file ipc_server.c.

pcmk__client_t* pcmk__new_unauth_client ( void *  key)

Allocate a new pcmk__client_t object and generate its ID.

Parameters
[in]keyWhat to use as connections hash table key (NULL to use ID)
Returns
Pointer to new pcmk__client_t (asserts on failure)

Definition at line 215 of file ipc_server.c.

void pcmk__serve_attrd_ipc ( qb_ipcs_service_t **  ipcs,
struct qb_ipcs_service_handlers *  cb 
)

Definition at line 887 of file ipc_server.c.

void pcmk__serve_based_ipc ( qb_ipcs_service_t **  ipcs_ro,
qb_ipcs_service_t **  ipcs_rw,
qb_ipcs_service_t **  ipcs_shm,
struct qb_ipcs_service_handlers *  ro_cb,
struct qb_ipcs_service_handlers *  rw_cb 
)

Definition at line 821 of file ipc_server.c.

qb_ipcs_service_t* pcmk__serve_controld_ipc ( struct qb_ipcs_service_handlers *  cb)

Definition at line 873 of file ipc_server.c.

void pcmk__serve_fenced_ipc ( qb_ipcs_service_t **  ipcs,
struct qb_ipcs_service_handlers *  cb 
)

Definition at line 908 of file ipc_server.c.

void pcmk__serve_pacemakerd_ipc ( qb_ipcs_service_t **  ipcs,
struct qb_ipcs_service_handlers *  cb 
)

Definition at line 930 of file ipc_server.c.

bool pcmk__set_client_queue_max ( pcmk__client_t client,
const char *  qmax 
)

Definition at line 356 of file ipc_server.c.

void pcmk__stop_based_ipc ( qb_ipcs_service_t *  ipcs_ro,
qb_ipcs_service_t *  ipcs_rw,
qb_ipcs_service_t *  ipcs_shm 
)

Definition at line 855 of file ipc_server.c.

void pcmk_free_ipc_event ( struct iovec *  event)

Free an I/O vector created by pcmk__ipc_prepare_iov()

Parameters
[in]eventI/O vector to free

Definition at line 280 of file ipc_server.c.