10 #ifndef PCMK__CRM_STONITH_NG__H    11 #  define PCMK__CRM_STONITH_NG__H    91                                              const char *namespace_s);
   204                            const char *namespace_s, 
const char *agent,
   254                     const char *namespace_s, 
char **output, 
int timeout_sec);
   291                 char **list_info, 
int timeout);
   320                   const char *port, 
int timeout);
   424                              int options, 
void *user_data,
   425                              const char *callback_name,
   463                              const char *node, 
const char *pattern,
   464                              const char *attr, 
const char *value, 
int level);
   490                                const char *node, 
const char *pattern,
   491                                const char *attr, 
const char *value, 
int level,
   515                     const char *namespace_s, 
const char *agent,
   517                     char **output, 
char **error_output);
   624 #  define STONITH_LIBRARY "libstonithd.so.26"   630 stonith_api_kick_helper(uint32_t nodeid, 
int timeout, 
bool off)
   632     static void *st_library = NULL;
   635     if (st_library == NULL) {
   638     if (st_library && st_kick_fn == NULL) {
   639         st_kick_fn = (
st_api_kick_fn) dlsym(st_library, 
"stonith_api_kick");
   641     if (st_kick_fn == NULL) {
   649     return (*st_kick_fn) (nodeid, NULL, 
timeout, off);
   653 stonith_api_time_helper(uint32_t nodeid, 
bool in_progress)
   655     static void *st_library = NULL;
   658     if (st_library == NULL) {
   661     if (st_library && st_time_fn == NULL) {
   662         st_time_fn = (
st_api_time_fn) dlsym(st_library, 
"stonith_api_time");
   664     if (st_time_fn == NULL) {
   668     return (*st_time_fn) (nodeid, NULL, in_progress);
   689 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)   696 #define T_STONITH_NOTIFY_DISCONNECT "st_notify_disconnect"   699 #define T_STONITH_NOTIFY_FENCE "st_notify_fence"   702 #define T_STONITH_NOTIFY_HISTORY "st_notify_history"   705 #define T_STONITH_NOTIFY_HISTORY_SYNCED "st_notify_history_synced" 
int(* fence_with_delay)(stonith_t *stonith, int call_options, const char *node, const char *action, int timeout, int tolerance, int delay)
Request delayed fencing of a target. 
 
struct stonith_history_s * next
 
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)
 
struct stonith_history_s stonith_history_t
 
int(* register_level_full)(stonith_t *st, int options, const char *node, const char *pattern, const char *attr, const char *value, int level, const stonith_key_value_t *device_list)
Register fencing level for specified node, pattern or attribute. 
 
enum stonith_namespace stonith_get_namespace(const char *agent, const char *namespace_s)
Determine namespace of a fence agent. 
 
int(* register_callback)(stonith_t *stonith, int call_id, int timeout, int options, void *user_data, const char *callback_name, void(*callback)(stonith_t *st, stonith_callback_data_t *data))
Register a callback for an asynchronous fencing result. 
 
struct stonith_key_value_s * next
 
int(* register_notification)(stonith_t *stonith, const char *event, void(*callback)(stonith_t *st, stonith_event_t *e))
Register a callback for fence notifications. 
 
const char * get_stonith_provider(const char *agent, const char *provider)
 
bool stonith_dispatch(stonith_t *st)
 
int(* confirm)(stonith_t *stonith, int call_options, const char *target)
Manually confirm that a node has been fenced. 
 
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. 
 
int(* list_agents)(stonith_t *stonith, int call_options, const char *namespace_s, stonith_key_value_t **devices, int timeout)
Retrieve a list of installed fence agents. 
 
stonith_key_value_t * stonith_key_value_add(stonith_key_value_t *kvp, const char *key, const char *value)
 
int(* remove_callback)(stonith_t *stonith, int call_id, bool all_callbacks)
Unregister callbacks for asynchronous fencing results. 
 
int(* validate)(stonith_t *st, int call_options, const char *rsc_id, const char *namespace_s, const char *agent, const stonith_key_value_t *params, int timeout, char **output, char **error_output)
Validate an arbitrary stonith device configuration. 
 
int(* free)(stonith_t *st)
Destroy a fencer connection. 
 
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. 
 
int(* status)(stonith_t *stonith, int call_options, const char *id, const char *port, int timeout)
Check whether a fence device target is reachable by status action. 
 
const char * stonith_action_str(const char *action)
Turn fence action into a more readable string. 
 
time_t(* st_api_time_fn)(int nodeid, const char *uname, bool in_progress)
 
int(* register_level)(stonith_t *st, int options, const char *node, int level, const stonith_key_value_t *device_list)
Register a fencing level for specified node with local fencer. 
 
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)
 
void stonith_dump_pending_callbacks(stonith_t *st)
 
int(* connect)(stonith_t *st, const char *name, int *stonith_fd)
Connect to the local fencer. 
 
int(* metadata)(stonith_t *stonith, int call_options, const char *agent, const char *namespace_s, char **output, int timeout_sec)
Retrieve a fence agent's metadata. 
 
int(* remove_device)(stonith_t *st, int options, const char *name)
Unregister a fence device with the local fencer. 
 
int(* history)(stonith_t *stonith, int call_options, const char *node, stonith_history_t **history, int timeout)
List fencing actions that have occurred for a target. 
 
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)
Unregister fencing level for specified node, pattern or attribute. 
 
stonith_api_operations_t * cmds
 
int(* remove_level)(stonith_t *st, int options, const char *node, int level)
Unregister a fencing level for specified node with local fencer. 
 
int(* register_device)(stonith_t *st, int options, const char *id, const char *namespace_s, const char *agent, const stonith_key_value_t *params)
Register a fence device with the local fencer. 
 
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)
 
int(* monitor)(stonith_t *stonith, int call_options, const char *id, int timeout)
Check whether a fence device is reachable by monitor action. 
 
int(* query)(stonith_t *stonith, int call_options, const char *target, stonith_key_value_t **devices, int timeout)
List registered fence devices. 
 
time_t stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress)
 
int(* list)(stonith_t *stonith, int call_options, const char *id, char **list_info, int timeout)
Get the output of a fence device's list action. 
 
int(* fence)(stonith_t *stonith, int call_options, const char *node, const char *action, int timeout, int tolerance)
Request that a target get fenced. 
 
enum stonith_namespace stonith_text2namespace(const char *namespace_s)
Get agent namespace by name. 
 
int(* remove_notification)(stonith_t *stonith, const char *event)
Unregister callbacks for fence notifications. 
 
const char * stonith_namespace2text(enum stonith_namespace st_namespace)
Get agent namespace name.