pacemaker  2.0.4-2deceaa
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Functions
lrmd_client.c File Reference
#include <crm_internal.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <glib.h>
#include <dirent.h>
#include <crm/crm.h>
#include <crm/lrmd.h>
#include <crm/lrmd_internal.h>
#include <crm/services.h>
#include <crm/common/mainloop.h>
#include <crm/common/ipcs_internal.h>
#include <crm/common/remote_internal.h>
#include <crm/msg_xml.h>
#include <crm/stonith-ng.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <netdb.h>
Include dependency graph for lrmd_client.c:

Go to the source code of this file.

Macros

#define MAX_TLS_RECV_WAIT   10000
 

Typedefs

typedef struct lrmd_private_s lrmd_private_t
 

Functions

 CRM_TRACE_INIT_DATA (lrmd)
 
int lrmd_internal_proxy_send (lrmd_t *lrmd, xmlNode *msg)
 
void lrmd_internal_set_proxy_callback (lrmd_t *lrmd, void *userdata, void(*callback)(lrmd_t *lrmd, void *userdata, xmlNode *msg))
 
void lrmd_list_freeall (lrmd_list_t *head)
 
lrmd_key_value_tlrmd_key_value_add (lrmd_key_value_t *head, const char *key, const char *value)
 
void lrmd_key_value_freeall (lrmd_key_value_t *head)
 
lrmd_event_data_tlrmd_new_event (const char *rsc_id, const char *task, guint interval_ms)
 
lrmd_event_data_tlrmd_copy_event (lrmd_event_data_t *event)
 
void lrmd_free_event (lrmd_event_data_t *event)
 
int lrmd_poll (lrmd_t *lrmd, int timeout)
 Poll for a specified timeout period to determine if a message is ready for dispatch. More...
 
bool lrmd_dispatch (lrmd_t *lrmd)
 Use after lrmd_poll returns 1 to read and dispatch a message. More...
 
int remote_proxy_check (lrmd_t *lrmd, GHashTable *hash)
 
lrmd_rsc_info_tlrmd_new_rsc_info (const char *rsc_id, const char *standard, const char *provider, const char *type)
 
lrmd_rsc_info_tlrmd_copy_rsc_info (lrmd_rsc_info_t *rsc_info)
 
void lrmd_free_rsc_info (lrmd_rsc_info_t *rsc_info)
 
void lrmd_free_op_info (lrmd_op_info_t *op_info)
 
lrmd_tlrmd_api_new (void)
 Create a new connection to the local executor. More...
 
lrmd_tlrmd_remote_api_new (const char *nodename, const char *server, int port)
 Create a new TLS connection to a remote executor. More...
 
void lrmd_api_delete (lrmd_t *lrmd)
 Destroy executor connection object. More...
 

Macro Definition Documentation

#define MAX_TLS_RECV_WAIT   10000

Definition at line 47 of file lrmd_client.c.

Typedef Documentation

typedef struct lrmd_private_s lrmd_private_t

Function Documentation

CRM_TRACE_INIT_DATA ( lrmd  )
void lrmd_api_delete ( lrmd_t lrmd)

Destroy executor connection object.

Definition at line 2082 of file lrmd_client.c.

lrmd_t* lrmd_api_new ( void  )

Create a new connection to the local executor.

Definition at line 2019 of file lrmd_client.c.

lrmd_event_data_t* lrmd_copy_event ( lrmd_event_data_t event)

Definition at line 211 of file lrmd_client.c.

lrmd_rsc_info_t* lrmd_copy_rsc_info ( lrmd_rsc_info_t rsc_info)

Definition at line 1565 of file lrmd_client.c.

bool lrmd_dispatch ( lrmd_t lrmd)

Use after lrmd_poll returns 1 to read and dispatch a message.

Parameters
[in,out]lrmdExecutor connection object
Returns
TRUE if connection is still up, FALSE if disconnected

Definition at line 467 of file lrmd_client.c.

void lrmd_free_event ( lrmd_event_data_t event)

Definition at line 234 of file lrmd_client.c.

void lrmd_free_op_info ( lrmd_op_info_t op_info)

Definition at line 1622 of file lrmd_client.c.

void lrmd_free_rsc_info ( lrmd_rsc_info_t rsc_info)

Definition at line 1572 of file lrmd_client.c.

int lrmd_internal_proxy_send ( lrmd_t lrmd,
xmlNode *  msg 
)

Definition at line 1719 of file lrmd_client.c.

void lrmd_internal_set_proxy_callback ( lrmd_t lrmd,
void *  userdata,
void(*)(lrmd_t *lrmd, void *userdata, xmlNode *msg)  callback 
)

Definition at line 1699 of file lrmd_client.c.

lrmd_key_value_t* lrmd_key_value_add ( lrmd_key_value_t head,
const char *  key,
const char *  value 
)

Definition at line 144 of file lrmd_client.c.

void lrmd_key_value_freeall ( lrmd_key_value_t head)

Definition at line 167 of file lrmd_client.c.

void lrmd_list_freeall ( lrmd_list_t head)

Definition at line 129 of file lrmd_client.c.

lrmd_event_data_t* lrmd_new_event ( const char *  rsc_id,
const char *  task,
guint  interval_ms 
)

Create a new lrmd_event_data_t object

Parameters
[in]rsc_idID of resource involved in event
[in]taskAction name
[in]interval_msAction interval
Returns
Newly allocated and initialized lrmd_event_data_t
Note
This functions asserts on memory errors, so the return value is guaranteed to be non-NULL. The caller is responsible for freeing the result with lrmd_free_event().

Definition at line 193 of file lrmd_client.c.

lrmd_rsc_info_t* lrmd_new_rsc_info ( const char *  rsc_id,
const char *  standard,
const char *  provider,
const char *  type 
)

Definition at line 1539 of file lrmd_client.c.

int lrmd_poll ( lrmd_t lrmd,
int  timeout 
)

Poll for a specified timeout period to determine if a message is ready for dispatch.

Return values
1msg is ready
0timeout occurred
negativeerror code

Definition at line 433 of file lrmd_client.c.

lrmd_t* lrmd_remote_api_new ( const char *  nodename,
const char *  server,
int  port 
)

Create a new TLS connection to a remote executor.

Parameters
nodenamename of remote node identified with this connection
servername of server to connect to
portport number to connect to
Note
nodename and server may be the same value.

Definition at line 2055 of file lrmd_client.c.

int remote_proxy_check ( lrmd_t lrmd,
GHashTable *  hash 
)

Definition at line 926 of file lrmd_client.c.