corosync 3.1.7
Data Structures | Macros | Typedefs | Enumerations | Functions
cfg.h File Reference
#include <netinet/in.h>
#include <corosync/corotypes.h>
Include dependency graph for cfg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  corosync_cfg_callbacks_t
 struct corosync_cfg_shutdown_callback_t More...
 
struct  corosync_cfg_node_address_t
 A node address. More...
 
struct  corosync_knet_link_status_v1
 
struct  corosync_cfg_node_status_v1
 

Macros

#define CFG_MAX_HOST_LEN   256
 
#define CFG_MAX_LINKS   8
 

Typedefs

typedef uint64_t corosync_cfg_handle_t
 
typedef void(* corosync_cfg_shutdown_callback_t) (corosync_cfg_handle_t cfg_handle, corosync_cfg_shutdown_flags_t flags)
 corosync_cfg_shutdown_callback_t callback More...
 

Enumerations

enum  corosync_cfg_shutdown_flags_t { COROSYNC_CFG_SHUTDOWN_FLAG_REQUEST = 0 , COROSYNC_CFG_SHUTDOWN_FLAG_REGARDLESS = 1 , COROSYNC_CFG_SHUTDOWN_FLAG_IMMEDIATE = 2 }
 Shutdown types. More...
 
enum  corosync_cfg_shutdown_reply_flags_t { COROSYNC_CFG_SHUTDOWN_FLAG_NO = 0 , COROSYNC_CFG_SHUTDOWN_FLAG_YES = 1 }
 enum corosync_cfg_shutdown_reply_flags_t More...
 
enum  corosync_cfg_node_status_version_t { CFG_NODE_STATUS_V1 = 1 }
 

Functions

cs_error_t corosync_cfg_initialize (corosync_cfg_handle_t *cfg_handle, const corosync_cfg_callbacks_t *cfg_callbacks)
 corosync_cfg_initialize More...
 
cs_error_t corosync_cfg_fd_get (corosync_cfg_handle_t cfg_handle, int32_t *selection_fd)
 corosync_cfg_fd_get More...
 
cs_error_t corosync_cfg_dispatch (corosync_cfg_handle_t cfg_handle, cs_dispatch_flags_t dispatch_flags)
 corosync_cfg_dispatch More...
 
cs_error_t corosync_cfg_finalize (corosync_cfg_handle_t cfg_handle)
 corosync_cfg_finalize More...
 
cs_error_t corosync_cfg_ring_status_get (corosync_cfg_handle_t cfg_handle, char ***interface_names, char ***status, unsigned int *interface_count)
 corosync_cfg_ring_status_get More...
 
cs_error_t corosync_cfg_node_status_get (corosync_cfg_handle_t cfg_handle, unsigned int nodeid, corosync_cfg_node_status_version_t version, void *node_status)
 corosync_cfg_node_status_get More...
 
cs_error_t corosync_cfg_kill_node (corosync_cfg_handle_t cfg_handle, unsigned int nodeid, const char *reason)
 corosync_cfg_kill_node More...
 
cs_error_t corosync_cfg_trackstart (corosync_cfg_handle_t cfg_handle, uint8_t track_flags)
 corosync_cfg_trackstart Track CFG for shutdown requests More...
 
cs_error_t corosync_cfg_trackstop (corosync_cfg_handle_t cfg_handle)
 corosync_cfg_trackstop Stop tracking CFG for shutdown requests More...
 
cs_error_t corosync_cfg_try_shutdown (corosync_cfg_handle_t cfg_handle, corosync_cfg_shutdown_flags_t flags)
 corosync_cfg_try_shutdown More...
 
cs_error_t corosync_cfg_replyto_shutdown (corosync_cfg_handle_t cfg_handle, corosync_cfg_shutdown_reply_flags_t flags)
 corosync_cfg_replyto_shutdown More...
 
cs_error_t corosync_cfg_get_node_addrs (corosync_cfg_handle_t cfg_handle, unsigned int nodeid, size_t max_addrs, int *num_addrs, corosync_cfg_node_address_t *addrs)
 corosync_cfg_get_node_addrs More...
 
cs_error_t corosync_cfg_local_get (corosync_cfg_handle_t handle, unsigned int *local_nodeid)
 corosync_cfg_local_get More...
 
cs_error_t corosync_cfg_reload_config (corosync_cfg_handle_t handle)
 corosync_cfg_reload_config More...
 
cs_error_t corosync_cfg_reopen_log_files (corosync_cfg_handle_t handle)
 Reopen logging files. More...
 

Macro Definition Documentation

◆ CFG_MAX_HOST_LEN

#define CFG_MAX_HOST_LEN   256

Definition at line 169 of file cfg.h.

◆ CFG_MAX_LINKS

#define CFG_MAX_LINKS   8

Definition at line 170 of file cfg.h.

Typedef Documentation

◆ corosync_cfg_handle_t

typedef uint64_t corosync_cfg_handle_t

Definition at line 41 of file cfg.h.

◆ corosync_cfg_shutdown_callback_t

typedef void(* corosync_cfg_shutdown_callback_t) (corosync_cfg_handle_t cfg_handle, corosync_cfg_shutdown_flags_t flags)

corosync_cfg_shutdown_callback_t callback

Definition at line 74 of file cfg.h.

Enumeration Type Documentation

◆ corosync_cfg_node_status_version_t

Enumerator
CFG_NODE_STATUS_V1 

Definition at line 165 of file cfg.h.

◆ corosync_cfg_shutdown_flags_t

Shutdown types.

Enumerator
COROSYNC_CFG_SHUTDOWN_FLAG_REQUEST 

REQUEST is the normal shutdown.

Other daemons will be consulted.

COROSYNC_CFG_SHUTDOWN_FLAG_REGARDLESS 

REGARDLESS will tell other daemons but ignore their opinions.

COROSYNC_CFG_SHUTDOWN_FLAG_IMMEDIATE 

IMMEDIATE will shut down straight away (but still tell other nodes).

Definition at line 46 of file cfg.h.

◆ corosync_cfg_shutdown_reply_flags_t

enum corosync_cfg_shutdown_reply_flags_t

Enumerator
COROSYNC_CFG_SHUTDOWN_FLAG_NO 
COROSYNC_CFG_SHUTDOWN_FLAG_YES 

Definition at line 66 of file cfg.h.

Function Documentation

◆ corosync_cfg_dispatch()

cs_error_t corosync_cfg_dispatch ( corosync_cfg_handle_t  cfg_handle,
cs_dispatch_flags_t  dispatch_flags 
)

corosync_cfg_dispatch

Parameters
cfg_handle
dispatch_flags
Returns

Definition at line 145 of file lib/cfg.c.

References hdb_error_to_cs(), and IPC_DISPATCH_SIZE.

◆ corosync_cfg_fd_get()

cs_error_t corosync_cfg_fd_get ( corosync_cfg_handle_t  cfg_handle,
int32_t *  selection_fd 
)

corosync_cfg_fd_get

Parameters
cfg_handle
selection_fd
Returns

Definition at line 126 of file lib/cfg.c.

References hdb_error_to_cs().

◆ corosync_cfg_finalize()

cs_error_t corosync_cfg_finalize ( corosync_cfg_handle_t  cfg_handle)

corosync_cfg_finalize

Parameters
cfg_handle
Returns

Definition at line 254 of file lib/cfg.c.

References hdb_error_to_cs().

◆ corosync_cfg_get_node_addrs()

cs_error_t corosync_cfg_get_node_addrs ( corosync_cfg_handle_t  cfg_handle,
unsigned int  nodeid,
size_t  max_addrs,
int *  num_addrs,
corosync_cfg_node_address_t addrs 
)

corosync_cfg_get_node_addrs

Parameters
cfg_handle
nodeid
max_addrs
num_addrs
addrs
Returns

Definition at line 630 of file lib/cfg.c.

References hdb_error_to_cs(), and IPC_RESPONSE_SIZE.

◆ corosync_cfg_initialize()

cs_error_t corosync_cfg_initialize ( corosync_cfg_handle_t cfg_handle,
const corosync_cfg_callbacks_t cfg_callbacks 
)

corosync_cfg_initialize

Parameters
cfg_handle
cfg_callbacks
Returns

Definition at line 85 of file lib/cfg.c.

References CS_OK, and hdb_error_to_cs().

◆ corosync_cfg_kill_node()

cs_error_t corosync_cfg_kill_node ( corosync_cfg_handle_t  cfg_handle,
unsigned int  nodeid,
const char *  reason 
)

corosync_cfg_kill_node

Parameters
cfg_handle
nodeid
reason
Returns

Definition at line 520 of file lib/cfg.c.

References CS_ERR_NAME_TOO_LONG, CS_MAX_NAME_LENGTH, and hdb_error_to_cs().

◆ corosync_cfg_local_get()

cs_error_t corosync_cfg_local_get ( corosync_cfg_handle_t  handle,
unsigned int *  local_nodeid 
)

corosync_cfg_local_get

Parameters
handle
local_nodeid
Returns

Definition at line 717 of file lib/cfg.c.

References hdb_error_to_cs().

◆ corosync_cfg_node_status_get()

cs_error_t corosync_cfg_node_status_get ( corosync_cfg_handle_t  cfg_handle,
unsigned int  nodeid,
corosync_cfg_node_status_version_t  version,
void *  node_status 
)

corosync_cfg_node_status_get

Parameters
cfg_handle
nodeid
node_status
Returns

Definition at line 371 of file lib/cfg.c.

References CFG_NODE_STATUS_V1, CS_ERR_INVALID_PARAM, hdb_error_to_cs(), and version.

◆ corosync_cfg_reload_config()

cs_error_t corosync_cfg_reload_config ( corosync_cfg_handle_t  handle)

corosync_cfg_reload_config

Parameters
handle
Returns

Definition at line 759 of file lib/cfg.c.

References hdb_error_to_cs().

◆ corosync_cfg_reopen_log_files()

cs_error_t corosync_cfg_reopen_log_files ( corosync_cfg_handle_t  handle)

Reopen logging files.

Parameters
handleCFG service handle
Returns
CS_OK on success, CS_ERR_NOT_SUPPORTED if reopening of logging files is not available, otherwise one of common errors.

Definition at line 798 of file lib/cfg.c.

References hdb_error_to_cs().

◆ corosync_cfg_replyto_shutdown()

cs_error_t corosync_cfg_replyto_shutdown ( corosync_cfg_handle_t  cfg_handle,
corosync_cfg_shutdown_reply_flags_t  flags 
)

corosync_cfg_replyto_shutdown

Parameters
cfg_handle
flags
Returns

Definition at line 598 of file lib/cfg.c.

References hdb_error_to_cs().

◆ corosync_cfg_ring_status_get()

cs_error_t corosync_cfg_ring_status_get ( corosync_cfg_handle_t  cfg_handle,
char ***  interface_names,
char ***  status,
unsigned int *  interface_count 
)

corosync_cfg_ring_status_get

Parameters
cfg_handle
interface_names
status
interface_count
Returns

Definition at line 283 of file lib/cfg.c.

References hdb_error_to_cs().

◆ corosync_cfg_trackstart()

cs_error_t corosync_cfg_trackstart ( corosync_cfg_handle_t  cfg_handle,
uint8_t  track_flags 
)

corosync_cfg_trackstart Track CFG for shutdown requests

Parameters
cfg_handle
track_flags(none currently supported)
reason
Returns

Definition at line 452 of file lib/cfg.c.

References hdb_error_to_cs(), req_lib_cfg_trackstart::header, MESSAGE_REQ_CFG_TRACKSTART, and req_lib_cfg_trackstart::track_flags.

◆ corosync_cfg_trackstop()

cs_error_t corosync_cfg_trackstop ( corosync_cfg_handle_t  cfg_handle)

corosync_cfg_trackstop Stop tracking CFG for shutdown requests

Parameters
cfg_handle
reason
Returns

Definition at line 487 of file lib/cfg.c.

References hdb_error_to_cs().

◆ corosync_cfg_try_shutdown()

cs_error_t corosync_cfg_try_shutdown ( corosync_cfg_handle_t  cfg_handle,
corosync_cfg_shutdown_flags_t  flags 
)

corosync_cfg_try_shutdown

Parameters
cfg_handle
flags
Returns

Definition at line 563 of file lib/cfg.c.

References hdb_error_to_cs().