pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions | Variables
ipcs.h File Reference
#include <stdbool.h>
#include <qb/qbipcs.h>
#include <crm/common/ipc.h>
#include <crm/common/mainloop.h>
Include dependency graph for ipcs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  crm_remote_s
 
struct  crm_client_s
 

Typedefs

typedef struct crm_client_s crm_client_t
 

Enumerations

enum  client_type { CRM_CLIENT_IPC = 1, CRM_CLIENT_TCP = 2 }
 
enum  crm_client_flags { crm_client_flag_ipc_proxied = 0x00001, crm_client_flag_ipc_privileged = 0x00002 }
 

Functions

void crm_client_init (void)
 
void crm_client_cleanup (void)
 
crm_client_tcrm_client_get (qb_ipcs_connection_t *c)
 
crm_client_tcrm_client_get_by_id (const char *id)
 
const char * crm_client_name (crm_client_t *c)
 
const char * crm_client_type_text (enum client_type client_type)
 
crm_client_tcrm_client_alloc (void *key)
 Allocate a new crm_client_t object and generate its ID. More...
 
crm_client_tcrm_client_new (qb_ipcs_connection_t *c, uid_t uid, gid_t gid)
 
void crm_client_destroy (crm_client_t *c)
 
void crm_client_disconnect_all (qb_ipcs_service_t *s)
 
bool crm_set_client_queue_max (crm_client_t *client, const char *qmax)
 Raise IPC eviction threshold for a client, if allowed. More...
 
void crm_ipcs_send_ack (crm_client_t *c, uint32_t request, uint32_t flags, const char *tag, const char *function, int line)
 
ssize_t crm_ipc_prepare (uint32_t request, xmlNode *message, struct iovec **result, uint32_t max_send_size)
 
ssize_t crm_ipcs_send (crm_client_t *c, uint32_t request, xmlNode *message, enum crm_ipc_flags flags)
 
ssize_t crm_ipcs_sendv (crm_client_t *c, struct iovec *iov, enum crm_ipc_flags flags)
 
xmlNode * crm_ipcs_recv (crm_client_t *c, void *data, size_t size, uint32_t *id, uint32_t *flags)
 
int crm_ipcs_client_pid (qb_ipcs_connection_t *c)
 

Variables

GHashTable * client_connections
 

Typedef Documentation

typedef struct crm_client_s crm_client_t

Definition at line 27 of file ipcs.h.

Enumeration Type Documentation

Enumerator
CRM_CLIENT_IPC 
CRM_CLIENT_TCP 

Definition at line 29 of file ipcs.h.

Enumerator
crm_client_flag_ipc_proxied 
crm_client_flag_ipc_privileged 

Definition at line 57 of file ipcs.h.

Function Documentation

crm_client_t* crm_client_alloc ( void *  key)

Allocate a new crm_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 crm_client_t (asserts on failure)

Definition at line 356 of file ipc.c.

void crm_client_cleanup ( void  )

Definition at line 261 of file ipc.c.

void crm_client_destroy ( crm_client_t c)

Definition at line 450 of file ipc.c.

void crm_client_disconnect_all ( qb_ipcs_service_t *  s)

Definition at line 274 of file ipc.c.

crm_client_t* crm_client_get ( qb_ipcs_connection_t *  c)

Definition at line 190 of file ipc.c.

crm_client_t* crm_client_get_by_id ( const char *  id)

Definition at line 201 of file ipc.c.

void crm_client_init ( void  )

Definition at line 252 of file ipc.c.

const char* crm_client_name ( crm_client_t c)

Definition at line 221 of file ipc.c.

crm_client_t* crm_client_new ( qb_ipcs_connection_t *  c,
uid_t  uid,
gid_t  gid 
)

Definition at line 365 of file ipc.c.

const char* crm_client_type_text ( enum client_type  client_type)

Definition at line 235 of file ipc.c.

ssize_t crm_ipc_prepare ( uint32_t  request,
xmlNode *  message,
struct iovec **  result,
uint32_t  max_send_size 
)

Definition at line 697 of file ipc.c.

int crm_ipcs_client_pid ( qb_ipcs_connection_t *  c)

Definition at line 514 of file ipc.c.

xmlNode* crm_ipcs_recv ( crm_client_t c,
void *  data,
size_t  size,
uint32_t *  id,
uint32_t *  flags 
)

Definition at line 524 of file ipc.c.

ssize_t crm_ipcs_send ( crm_client_t c,
uint32_t  request,
xmlNode *  message,
enum crm_ipc_flags  flags 
)

Definition at line 844 of file ipc.c.

void crm_ipcs_send_ack ( crm_client_t c,
uint32_t  request,
uint32_t  flags,
const char *  tag,
const char *  function,
int  line 
)

Definition at line 867 of file ipc.c.

ssize_t crm_ipcs_sendv ( crm_client_t c,
struct iovec *  iov,
enum crm_ipc_flags  flags 
)

Definition at line 771 of file ipc.c.

bool crm_set_client_queue_max ( crm_client_t client,
const char *  qmax 
)

Raise IPC eviction threshold for a client, if allowed.

Parameters
[in,out]clientClient to modify
[in]queue_maxNew threshold (as string)
Returns
TRUE if change was allowed, FALSE otherwise

Definition at line 500 of file ipc.c.

Variable Documentation

GHashTable* client_connections

Definition at line 187 of file ipc.c.