11 #  define STONITH_NG__H    35 #  define T_STONITH_NOTIFY_DISCONNECT     "st_notify_disconnect"    36 #  define T_STONITH_NOTIFY_FENCE          "st_notify_fence"    37 #  define T_STONITH_NOTIFY_HISTORY        "st_notify_history"    38 #  define T_STONITH_NOTIFY_HISTORY_SYNCED "st_notify_history_synced"    96                                              const char *namespace_s);
   197         stonith_t *
st, 
int options, 
const char *node, 
int level);
   216             const char *device, 
const char *provider, 
char **output, 
int timeout);
   320         const char *callback_name,
   344                              const char *node, 
const char *pattern,
   345                              const char *attr, 
const char *value, 
int level);
   364                                const char *node, 
const char *pattern,
   365                                const char *attr, 
const char *value,
   387                     const char *namespace_s, 
const char *agent,
   389                     char **error_output);
   491 #  define STONITH_LIBRARY "libstonithd.so.26"   497 stonith_api_kick_helper(uint32_t nodeid, 
int timeout, 
bool off)
   499     static void *st_library = NULL;
   502     if (st_library == NULL) {
   505     if (st_library && st_kick_fn == NULL) {
   506         st_kick_fn = (
st_api_kick_fn) dlsym(st_library, 
"stonith_api_kick");
   508     if (st_kick_fn == NULL) {
   516     return (*st_kick_fn) (nodeid, NULL, 
timeout, off);
   520 stonith_api_time_helper(uint32_t nodeid, 
bool in_progress)
   522     static void *st_library = NULL;
   525     if (st_library == NULL) {
   528     if (st_library && st_time_fn == NULL) {
   529         st_time_fn = (
st_api_time_fn) dlsym(st_library, 
"stonith_api_time");
   531     if (st_time_fn == NULL) {
   535     return (*st_time_fn) (nodeid, NULL, in_progress);
   556 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) 
struct stonith_history_s * next
 
int(* register_level_full)(stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level, stonith_key_value_t *device_list)
Register fencing level for specific node, node regex or attribute. 
 
struct stonith_api_operations_s stonith_api_operations_t
 
struct stonith_key_value_s stonith_key_value_t
 
int stonith_api_kick(uint32_t nodeid, const char *uname, int timeout, bool off)
 
int(* query)(stonith_t *st, int options, const char *node, stonith_key_value_t **devices, int timeout)
Retrieve a list of registered stonith devices. 
 
struct stonith_history_s stonith_history_t
 
enum stonith_namespace stonith_get_namespace(const char *agent, const char *namespace_s)
Determine namespace of a fence agent. 
 
struct stonith_key_value_s * next
 
int(* register_level)(stonith_t *st, int options, const char *node, int level, stonith_key_value_t *device_list)
Register a fencing level containing the fencing devices to be used at that level for a specific node...
 
const char * get_stonith_provider(const char *agent, const char *provider)
 
int(* remove_callback)(stonith_t *st, int call_id, bool all_callbacks)
Remove a registered callback for a given call id. 
 
bool stonith_dispatch(stonith_t *st)
 
stonith_t * stonith_api_new(void)
 
int stonith_api_connect_retry(stonith_t *st, const char *name, int max_attempts)
Make a blocking connection attempt to the fencer. 
 
stonith_key_value_t * stonith_key_value_add(stonith_key_value_t *kvp, const char *key, const char *value)
 
int(* free)(stonith_t *st)
Destroy the stonith api structure. 
 
struct stonith_callback_data_s stonith_callback_data_t
 
bool stonith_agent_exists(const char *agent, int timeout)
 
const char * stonith_op_state_str(enum op_state state)
Return string equivalent of an operation state value. 
 
const char * stonith_action_str(const char *action)
Turn stonith action into a more readable string. 
 
time_t(* st_api_time_fn)(int nodeid, const char *uname, bool in_progress)
 
int(* metadata)(stonith_t *st, int options, const char *device, const char *provider, char **output, int timeout)
Get the metadata documentation for a resource. 
 
int(* register_device)(stonith_t *st, int options, const char *id, const char *provider, const char *agent, stonith_key_value_t *params)
Register a stonith device with the local stonith daemon. 
 
int(* status)(stonith_t *st, int options, const char *id, const char *port, int timeout)
Check to see if a local stonith device's port is reachable. 
 
int(* fence)(stonith_t *st, int options, const char *node, const char *action, int timeout, int tolerance)
Issue a fencing action against a node. 
 
int(* register_callback)(stonith_t *st, int call_id, int timeout, int options, void *userdata, const char *callback_name, void(*callback)(stonith_t *st, stonith_callback_data_t *data))
Register a callback to receive the result of an asynchronous call. 
 
int(* disconnect)(stonith_t *st)
Disconnect from the local stonith daemon. 
 
void stonith_key_value_freeall(stonith_key_value_t *kvp, int keys, int values)
 
int(* list)(stonith_t *st, int options, const char *id, char **list_output, int timeout)
Retrieve string listing hosts and port assignments from a local stonith device. 
 
int(* list_agents)(stonith_t *stonith, int call_options, const char *provider, stonith_key_value_t **devices, int timeout)
Retrieve a list of installed stonith agents. 
 
void stonith_dump_pending_callbacks(stonith_t *st)
 
int(* fence_with_delay)(stonith_t *st, int options, const char *node, const char *action, int timeout, int tolerance, int delay)
Issue a fencing action against a node with requested fencing delay. 
 
int(* connect)(stonith_t *st, const char *name, int *stonith_fd)
Connect to the local stonith daemon. 
 
int(* remove_device)(stonith_t *st, int options, const char *name)
Remove a registered stonith device with the local stonith daemon. 
 
int(* register_notification)(stonith_t *st, const char *event, void(*notify)(stonith_t *st, stonith_event_t *e))
 
int(* monitor)(stonith_t *st, int options, const char *id, int timeout)
Check to see if a local stonith device is reachable. 
 
int(* remove_notification)(stonith_t *st, const char *event)
 
int(* validate)(stonith_t *st, int call_options, const char *rsc_id, const char *namespace_s, const char *agent, stonith_key_value_t *params, int timeout, char **output, char **error_output)
Validate an arbitrary stonith device configuration. 
 
void stonith_api_delete(stonith_t *st)
 
int(* remove_level_full)(stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level)
Remove fencing level for specific node, node regex or attribute. 
 
stonith_api_operations_t * cmds
 
int(* remove_level)(stonith_t *st, int options, const char *node, int level)
Remove a fencing level for a specific node. 
 
void stonith_history_free(stonith_history_t *history)
 
struct stonith_event_s stonith_event_t
 
int(* st_api_kick_fn)(int nodeid, const char *uname, int timeout, bool off)
 
time_t stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress)
 
int(* confirm)(stonith_t *st, int options, const char *node)
Manually confirm that a node is down. 
 
enum stonith_namespace stonith_text2namespace(const char *namespace_s)
Get agent namespace by name. 
 
const char * stonith_namespace2text(enum stonith_namespace st_namespace)
Get agent namespace name. 
 
int(* history)(stonith_t *st, int options, const char *node, stonith_history_t **output, int timeout)
Retrieve a list of fencing operations that have occurred for a specific node.