pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
utils.c File Reference
#include <crm_internal.h>
#include <crm/cluster/internal.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <pwd.h>
#include <glib.h>
#include <bzlib.h>
#include <grp.h>
#include "./utils.h"
#include "./plugin.h"
Include dependency graph for utils.c:

Go to the source code of this file.

Macros

#define PW_BUFFER_LEN   500
 

Functions

void log_ais_message (int level, const AIS_Message *msg)
 
gboolean spawn_child (crm_child_t *child)
 
gboolean stop_child (crm_child_t *child, int signal)
 
void destroy_ais_node (gpointer data)
 
int update_member (unsigned int id, uint64_t born, uint64_t seq, int32_t votes, uint32_t procs, const char *uname, const char *state, const char *version)
 
void delete_member (uint32_t id, const char *uname)
 
const char * member_uname (uint32_t id)
 
char * append_member (char *data, crm_node_t *node)
 
void swap_sender (AIS_Message *msg)
 
char * get_ais_data (const AIS_Message *msg)
 
int send_plugin_msg (enum crm_ais_msg_types type, const char *host, const char *data)
 
int send_client_ipc (void *conn, const AIS_Message *ais_msg)
 
int send_client_msg (void *conn, enum crm_ais_msg_class class, enum crm_ais_msg_types type, const char *data)
 
char * ais_concat (const char *prefix, const char *suffix, char join)
 
hdb_handle_t config_find_init (struct corosync_api_v1 *config, char *name)
 
hdb_handle_t config_find_next (struct corosync_api_v1 *config, char *name, hdb_handle_t top_handle)
 
void config_find_done (struct corosync_api_v1 *config, hdb_handle_t local_handle)
 
int get_config_opt (struct corosync_api_v1 *config, hdb_handle_t object_service_handle, char *key, char **value, const char *fallback)
 
int ais_get_boolean (const char *value)
 
long long ais_get_int (const char *text, char **end_text)
 
int pcmk_user_lookup (const char *name, uid_t *uid, gid_t *gid)
 

Variables

struct pcmk_env_s pcmk_env
 
struct corosync_api_v1 * pcmk_api
 

Macro Definition Documentation

#define PW_BUFFER_LEN   500

Definition at line 752 of file utils.c.

Function Documentation

char* ais_concat ( const char *  prefix,
const char *  suffix,
char  join 
)

Definition at line 604 of file utils.c.

int ais_get_boolean ( const char *  value)

Definition at line 697 of file utils.c.

long long ais_get_int ( const char *  text,
char **  end_text 
)

Definition at line 712 of file utils.c.

char* append_member ( char *  data,
crm_node_t node 
)

Definition at line 388 of file utils.c.

void config_find_done ( struct corosync_api_v1 *  config,
hdb_handle_t  local_handle 
)

Definition at line 652 of file utils.c.

hdb_handle_t config_find_init ( struct corosync_api_v1 *  config,
char *  name 
)

Definition at line 620 of file utils.c.

hdb_handle_t config_find_next ( struct corosync_api_v1 *  config,
char *  name,
hdb_handle_t  top_handle 
)

Definition at line 633 of file utils.c.

void delete_member ( uint32_t  id,
const char *  uname 
)

Definition at line 364 of file utils.c.

void destroy_ais_node ( gpointer  data)

Definition at line 282 of file utils.c.

char* get_ais_data ( const AIS_Message msg)

Definition at line 454 of file utils.c.

int get_config_opt ( struct corosync_api_v1 *  config,
hdb_handle_t  object_service_handle,
char *  key,
char **  value,
const char *  fallback 
)

Definition at line 660 of file utils.c.

void log_ais_message ( int  level,
const AIS_Message msg 
)

Definition at line 43 of file utils.c.

const char* member_uname ( uint32_t  id)

Definition at line 374 of file utils.c.

int pcmk_user_lookup ( const char *  name,
uid_t *  uid,
gid_t *  gid 
)

Definition at line 755 of file utils.c.

int send_client_ipc ( void *  conn,
const AIS_Message ais_msg 
)

Definition at line 527 of file utils.c.

int send_client_msg ( void *  conn,
enum crm_ais_msg_class  class,
enum crm_ais_msg_types  type,
const char *  data 
)

Definition at line 550 of file utils.c.

int send_plugin_msg ( enum crm_ais_msg_types  type,
const char *  host,
const char *  data 
)

Definition at line 479 of file utils.c.

gboolean spawn_child ( crm_child_t child)

Definition at line 136 of file utils.c.

gboolean stop_child ( crm_child_t child,
int  signal 
)

Definition at line 252 of file utils.c.

void swap_sender ( AIS_Message msg)

Definition at line 435 of file utils.c.

int update_member ( unsigned int  id,
uint64_t  born,
uint64_t  seq,
int32_t  votes,
uint32_t  procs,
const char *  uname,
const char *  state,
const char *  version 
)

Definition at line 295 of file utils.c.

Variable Documentation

struct corosync_api_v1* pcmk_api

Definition at line 54 of file plugin.c.

struct pcmk_env_s pcmk_env

Definition at line 40 of file utils.c.