pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Enumerations | Functions
ipc.h File Reference

Wrappers for and extensions to libqb IPC. More...

#include <crm/common/xml.h>
#include <qb/qbipcc.h>
Include dependency graph for ipc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define create_reply(request, xml_response_data)   create_reply_adv(request, xml_response_data, __FUNCTION__);
 
#define create_request(task, xml_data, host_to, sys_to, sys_from, uuid_from)   create_request_adv(task, xml_data, host_to, sys_to, sys_from, uuid_from, __FUNCTION__)
 

Typedefs

typedef struct crm_ipc_s crm_ipc_t
 

Enumerations

enum  crm_ipc_flags {
  crm_ipc_flags_none = 0x00000000, crm_ipc_compressed = 0x00000001, crm_ipc_proxied = 0x00000100, crm_ipc_client_response = 0x00000200,
  crm_ipc_server_event = 0x00010000, crm_ipc_server_free = 0x00020000, crm_ipc_proxied_relay_response = 0x00040000, crm_ipc_server_info = 0x00100000,
  crm_ipc_server_error = 0x00200000
}
 

Functions

xmlNode * create_reply_adv (xmlNode *request, xmlNode *xml_response_data, const char *origin)
 
xmlNode * create_request_adv (const char *task, xmlNode *xml_data, const char *host_to, const char *sys_to, const char *sys_from, const char *uuid_from, const char *origin)
 
crm_ipc_tcrm_ipc_new (const char *name, size_t max_size)
 
bool crm_ipc_connect (crm_ipc_t *client)
 Establish an IPC connection to a Pacemaker component. More...
 
void crm_ipc_close (crm_ipc_t *client)
 
void crm_ipc_destroy (crm_ipc_t *client)
 
int crm_ipc_send (crm_ipc_t *client, xmlNode *message, enum crm_ipc_flags flags, int32_t ms_timeout, xmlNode **reply)
 
int crm_ipc_get_fd (crm_ipc_t *client)
 
bool crm_ipc_connected (crm_ipc_t *client)
 
int crm_ipc_ready (crm_ipc_t *client)
 Check whether an IPC connection is ready to be read. More...
 
long crm_ipc_read (crm_ipc_t *client)
 
const char * crm_ipc_buffer (crm_ipc_t *client)
 
uint32_t crm_ipc_buffer_flags (crm_ipc_t *client)
 
const char * crm_ipc_name (crm_ipc_t *client)
 
unsigned int crm_ipc_default_buffer_size (void)
 
xmlNode * create_hello_message (const char *uuid, const char *client_name, const char *major_version, const char *minor_version)
 

Detailed Description

Wrappers for and extensions to libqb IPC.

Definition in file ipc.h.

Macro Definition Documentation

#define create_reply (   request,
  xml_response_data 
)    create_reply_adv(request, xml_response_data, __FUNCTION__);

Definition at line 31 of file ipc.h.

#define create_request (   task,
  xml_data,
  host_to,
  sys_to,
  sys_from,
  uuid_from 
)    create_request_adv(task, xml_data, host_to, sys_to, sys_from, uuid_from, __FUNCTION__)

Definition at line 34 of file ipc.h.

Typedef Documentation

typedef struct crm_ipc_s crm_ipc_t

Definition at line 61 of file ipc.h.

Enumeration Type Documentation

Enumerator
crm_ipc_flags_none 
crm_ipc_compressed 
crm_ipc_proxied 
crm_ipc_client_response 
crm_ipc_server_event 
crm_ipc_server_free 
crm_ipc_proxied_relay_response 
crm_ipc_server_info 
crm_ipc_server_error 

Definition at line 41 of file ipc.h.

Function Documentation

xmlNode* create_hello_message ( const char *  uuid,
const char *  client_name,
const char *  major_version,
const char *  minor_version 
)

Definition at line 1335 of file ipc.c.

xmlNode* create_reply_adv ( xmlNode *  request,
xmlNode *  xml_response_data,
const char *  origin 
)

Definition at line 150 of file ipc.c.

xmlNode* create_request_adv ( const char *  task,
xmlNode *  xml_data,
const char *  host_to,
const char *  sys_to,
const char *  sys_from,
const char *  uuid_from,
const char *  origin 
)

Definition at line 105 of file ipc.c.

const char* crm_ipc_buffer ( crm_ipc_t client)

Definition at line 1096 of file ipc.c.

uint32_t crm_ipc_buffer_flags ( crm_ipc_t client)

Definition at line 1103 of file ipc.c.

void crm_ipc_close ( crm_ipc_t client)

Definition at line 904 of file ipc.c.

bool crm_ipc_connect ( crm_ipc_t client)

Establish an IPC connection to a Pacemaker component.

Parameters
[in]clientConnection instance obtained from crm_ipc_new()
Returns
TRUE on success, FALSE otherwise (in which case errno will be set)

Definition at line 873 of file ipc.c.

bool crm_ipc_connected ( crm_ipc_t client)

Definition at line 956 of file ipc.c.

unsigned int crm_ipc_default_buffer_size ( void  )

Definition at line 67 of file ipc.c.

void crm_ipc_destroy ( crm_ipc_t client)

Definition at line 919 of file ipc.c.

int crm_ipc_get_fd ( crm_ipc_t client)

Definition at line 942 of file ipc.c.

const char* crm_ipc_name ( crm_ipc_t client)

Definition at line 1117 of file ipc.c.

crm_ipc_t* crm_ipc_new ( const char *  name,
size_t  max_size 
)

Definition at line 845 of file ipc.c.

long crm_ipc_read ( crm_ipc_t client)

Definition at line 1050 of file ipc.c.

int crm_ipc_ready ( crm_ipc_t client)

Check whether an IPC connection is ready to be read.

Parameters
[in]clientConnection to check
Returns
Positive value if ready to be read, 0 if not ready, -errno on error

Definition at line 988 of file ipc.c.

int crm_ipc_send ( crm_ipc_t client,
xmlNode *  message,
enum crm_ipc_flags  flags,
int32_t  ms_timeout,
xmlNode **  reply 
)

Definition at line 1199 of file ipc.c.