yumapro
24.10-3
YumaPro SDK
|
Configuration segments are stored in sequential order. More...
Data Structures | |
struct | cfg_template_t |
struct representing 1 configuration database More... | |
Typedefs | |
typedef void(* | cfg_reload_candidate_cb_t) (void) |
support for server callback anytime the candidate config is reloaded from the running config <discard-changes> | |
Enumerations | |
enum | cfg_state_t { CFG_ST_NONE , CFG_ST_INIT , CFG_ST_READY , CFG_ST_PLOCK , CFG_ST_FLOCK , CFG_ST_CLEANUP } |
current configuration state More... | |
enum | cfg_source_t |
classify the config source | |
enum | cfg_location_t |
classify the config location | |
Functions | |
void | cfg_ypinit (void) |
Initialize the config manager. More... | |
void | cfg_clean_roots (void) |
Cleanup the cfg->root nodes before all the objects are freed. More... | |
void | cfg_cleanup (void) |
Cleanup the config manager. More... | |
status_t | cfg_rwlock_rdlock (thd_tcb_t *tcb, cfg_template_t *cfg) |
Take out the read lock associated with a cfg (datastore) RWLOCK structure May be called recursively. More... | |
status_t | cfg_rwlock_wrlock (thd_tcb_t *tcb, cfg_template_t *cfg) |
Take out a write lock associated with a cfg (datastore) RWLOCK structure. More... | |
status_t | cfg_rwlock_unlock (thd_tcb_t *tcb, cfg_template_t *cfg) |
Release a lock associated with a cfg (datastore) RWLOCK structure. More... | |
status_t | cfg_rwlock_init_req_locks (thd_tcb_t *tcb) |
Initialize TCB multiple lock structure. More... | |
status_t | cfg_rwlock_release_all_locks (thd_tcb_t *tcb) |
Release all RWLOCKs recorded in TCB lock state structure. More... | |
status_t | cfg_rwlock_acquire_locks (thd_tcb_t *tcb) |
Acquire multiple locks in order to help prevent deadlock. More... | |
status_t | cfg_rwlock_acquire_lock_pair (thd_tcb_t *tcb, cfg_template_t *cfg1, boolean wrlock1, cfg_template_t *cfg2, boolean wrlock2) |
Acquire multiple (2) locks in predetermined, repeatable in order to help prevent deadlock. More... | |
status_t | cfg_rwlock_acquire_single_lock (thd_tcb_t *tcb, cfg_template_t *cfg, boolean wrlock) |
Acquire a single RWLOCK. More... | |
status_t | cfg_rwlock_acquire_single_rdlock (thd_tcb_t *tcb, cfg_template_t *cfg) |
Acquire a single RWLOCK for read access. More... | |
status_t | cfg_rwlock_acquire_single_wrlock (thd_tcb_t *tcb, cfg_template_t *cfg) |
Acquire a single RWLOCK for write access. More... | |
status_t | cfg_init_static_db (ncx_cfg_t cfg_id) |
Initialize the specified static configuration slot. More... | |
cfg_template_t * | cfg_new_template (const xmlChar *name, ncx_cfg_t cfg_id) |
Malloc and initialize a cfg_template_t struct. More... | |
void | cfg_free_template (cfg_template_t *cfg) |
Clean and free the cfg_template_t struct. More... | |
void | cfg_set_state (ncx_cfg_t cfg_id, cfg_state_t new_state) |
Change the state of the specified static config. More... | |
cfg_state_t | cfg_get_state (ncx_cfg_t cfg_id) |
Get the state of the specified static config. More... | |
cfg_template_t * | cfg_get_config (const xmlChar *cfgname) |
Get the config struct from its name. More... | |
const xmlChar * | cfg_get_config_name (ncx_cfg_t cfgid) |
Get the config name from its ID. More... | |
cfg_template_t * | cfg_get_config_id (ncx_cfg_t cfgid) |
Get the config struct from its ID. More... | |
void | cfg_set_target (ncx_cfg_t cfg_id) |
Set the CFG_FL_TARGET flag in the specified config. More... | |
status_t | cfg_fill_candidate_from_running (ses_id_t sesid) |
Fill the <candidate> config with the config contents of the <running> config. More... | |
status_t | cfg_fill_candidate_from_startup (ses_id_t sesid) |
Fill the <candidate> config with the config contents of the <startup> config. More... | |
status_t | cfg_fill_candidate_from_inline (ses_id_t sesid, val_value_t *newroot) |
Fill the <candidate> config with the config contents of the <config> inline XML node. More... | |
void | cfg_set_dirty_flag (cfg_template_t *cfg) |
Mark the config as 'changed'. More... | |
void | cfg_clear_dirty_flag (cfg_template_t *cfg) |
Clear the cfg dirty flag upon request. More... | |
void | cfg_clear_running_dirty_flag (void) |
Clear the running dirty flag when it is saved to NV-storage or loaded into running from startup. More... | |
void | cfg_clear_candidate_dirty_flag (void) |
Clear the candidate dirty flag when it is saved to NV-storage or loaded into running from startup. More... | |
boolean | cfg_get_dirty_flag (const cfg_template_t *cfg) |
Get the config dirty flag value. More... | |
status_t | cfg_ok_to_lock (const cfg_template_t *cfg) |
Check if the specified config can be locked right now for global lock only. More... | |
status_t | cfg_ok_to_unlock (const cfg_template_t *cfg, ses_id_t sesid) |
Check if the specified config can be unlocked right now by the specified session ID; for global lock only. More... | |
status_t | cfg_ok_to_unlock2 (const cfg_template_t *cfg, ses_id_t sesid, boolean lockall) |
Check if the specified config can be unlocked right now by the specified session ID; for global lock only. More... | |
status_t | cfg_ok_to_read (const cfg_template_t *cfg) |
Check if the specified config can be read right now. More... | |
status_t | cfg_ok_to_write (const cfg_template_t *cfg, ses_id_t sesid) |
Check if the specified config can be written right now by the specified session ID. More... | |
boolean | cfg_is_global_locked (const cfg_template_t *cfg) |
Check if the specified config has ab active global lock. More... | |
boolean | cfg_is_partial_locked (const cfg_template_t *cfg) |
Check if the specified config has any active partial locks. More... | |
status_t | cfg_get_global_lock_info (const cfg_template_t *cfg, ses_id_t *sesid, const xmlChar **locktime) |
Get the current global lock info. More... | |
status_t | cfg_lock (cfg_template_t *cfg, ses_id_t locked_by, cfg_source_t lock_src) |
Lock the specified config. More... | |
status_t | cfg_lock2 (cfg_template_t *cfg, ses_id_t locked_by, cfg_source_t lock_src, boolean lockall) |
Lock the specified config (with lockall) More... | |
status_t | cfg_unlock (cfg_template_t *cfg, ses_id_t locked_by) |
Unlock the specified config. More... | |
status_t | cfg_unlock2 (cfg_template_t *cfg, ses_id_t locked_by, boolean lockall) |
Unlock the specified config (2nd rev) More... | |
status_t | cfg_unlock_ex (cfg_template_t *cfg, ses_id_t locked_by, boolean skip_reload) |
Unlock the specified config. More... | |
void | cfg_release_locks (ses_id_t sesid) |
Release any configuration locks held by the specified session. More... | |
void | cfg_release_partial_locks (ses_id_t sesid) |
Release any configuration locks held by the specified session. More... | |
void | cfg_get_lock_list (ses_id_t sesid, val_value_t *retval) |
Get a list of all the locks held by a session. More... | |
void | cfg_apply_load_root (cfg_template_t *cfg, val_value_t *newroot) |
Apply the AGT_CB_APPLY function for the OP_EDITOP_LOAD operation. More... | |
void | cfg_update_last_ch_time (cfg_template_t *cfg, time_t *timestamp) |
Update the last-modified timestamp. More... | |
void | cfg_update_last_txid (cfg_template_t *cfg, ncx_transaction_id_t txid) |
Update the last good transaction ID. More... | |
void | cfg_update_stamps (cfg_template_t *source, cfg_template_t *dest) |
Update the last-modified and last-txid stamps. More... | |
const xmlChar * | cfg_get_last_ch_time (cfg_template_t *cfg) |
Get the last-modified timestamp. More... | |
ncx_transaction_id_t | cfg_get_last_txid (cfg_template_t *cfg) |
Get the last good transaction ID. More... | |
status_t | cfg_sprintf_etag (cfg_template_t *cfg, xmlChar *buff, int32 buffsize) |
Write the Entity Tag for the datastore to the specified buffer. More... | |
status_t | cfg_sprintf_etag_id (ncx_transaction_id_t id, xmlChar *buff, int32 buffsize) |
Write the Entity Tag for the datastore to the specified buffer Use the last_id instead of the cfg template. More... | |
status_t | cfg_add_partial_lock (cfg_template_t *cfg, plock_cb_t *plcb) |
Add a partial lock the specified config. More... | |
plock_cb_t * | cfg_find_partial_lock (cfg_template_t *cfg, plock_id_t lockid) |
Find a partial lock in the specified config. More... | |
plock_cb_t * | cfg_first_partial_lock (cfg_template_t *cfg) |
Get the first partial lock in the specified config. More... | |
plock_cb_t * | cfg_next_partial_lock (plock_cb_t *curplockcb) |
Get the next partial lock in the specified config. More... | |
void | cfg_delete_partial_lock (cfg_template_t *cfg, plock_id_t lockid) |
Remove a partial lock from the specified config. More... | |
status_t | cfg_ok_to_partial_lock (const cfg_template_t *cfg) |
Check if the specified config can be locked right now for partial lock only. More... | |
val_value_t * | cfg_get_root (ncx_cfg_t cfgid) |
Get the config root for the specified config. More... | |
status_t | cfg_setup_running (void) |
Setup the running config root if load_running_config did not add anything. More... | |
void | cfg_register_reload_candidate_cb (cfg_reload_candidate_cb_t cbfn) |
Register a callback function to be called anytime the. More... | |
const xmlChar * | cfg_get_startup_filespec (void) |
Get the filespec string for the XML file to save the running database. More... | |
boolean | cfg_running_is_wrlocked (void) |
Check if the running datastore is currently pthreads write-locked. More... | |
boolean | cfg_candidate_is_wrlocked (void) |
Check if the candidate datastore is currently pthreads write-locked. More... | |
cfg_template_t * | cfg_new_fake_candidate (const xmlChar *name, ncx_cfg_t cfg_id) |
Malloc and initialize a new fake Candidate cfg_template_t struct. More... | |
void | cfg_set_defer_load (boolean val) |
Set the config defer load flag to the config. More... | |
time_t | cfg_get_lock_itime (ncx_cfg_t cfg_id) |
Get the lock_itime field. More... | |
status_t | cfg_lock_hold_timeout (ncx_cfg_t cfg_id) |
Force a cfg lock to be undone due to max-lock-hold-time. More... | |
Configuration segments are stored in sequential order.
Configuration database (running, candidate, startup, etc.) + | +-- (root: /) + | +--- object X (netconf, security, routing, etc.) | | | +---- object A , B, C | +--- object Y | | | +---- object D , E V MODULE USAGE ============ 1) call cfg_ypinit() 2) call cfg_init_static_db for the various hard-wired databases that need to be created by the agent 3) call cfg_apply_load_root() with the startup database contents to load into the running config 4) call cfg_set_target() [NCX_CFGID_CANDIDATE or NCX_CFGID_RUNNING] 4a) call cfg_fill_candidate_from_running if the target is candidate; after agt.c/load_running_config is called 5) call cfg_set_state() to setup config db access, when ready for NETCONF operations 6) Use cfg_ok_to_* functions to test config access 7) use cfg_lock and cfg_unlock as desired to set global write locks 8) use cfg_release_locks when a session terminates 9) call cfg_cleanup() when program is terminating
enum cfg_state_t |
status_t cfg_add_partial_lock | ( | cfg_template_t * | cfg, |
plock_cb_t * | plcb | ||
) |
Add a partial lock the specified config.
This will not really have an effect unless the CFG_FL_TARGET flag in the specified config is also set For global lock only
cfg | Config template to lock |
plcb | partial lock control block, already filled out, to add to this configuration |
void cfg_apply_load_root | ( | cfg_template_t * | cfg, |
val_value_t * | newroot | ||
) |
Apply the AGT_CB_APPLY function for the OP_EDITOP_LOAD operation.
cfg | config target |
newroot | new config tree |
boolean cfg_candidate_is_wrlocked | ( | void | ) |
Check if the candidate datastore is currently pthreads write-locked.
void cfg_clean_roots | ( | void | ) |
Cleanup the cfg->root nodes before all the objects are freed.
void cfg_cleanup | ( | void | ) |
Cleanup the config manager.
void cfg_clear_candidate_dirty_flag | ( | void | ) |
Clear the candidate dirty flag when it is saved to NV-storage or loaded into running from startup.
void cfg_clear_dirty_flag | ( | cfg_template_t * | cfg | ) |
Clear the cfg dirty flag upon request.
cfg | pointer to valid config template |
void cfg_clear_running_dirty_flag | ( | void | ) |
Clear the running dirty flag when it is saved to NV-storage or loaded into running from startup.
void cfg_delete_partial_lock | ( | cfg_template_t * | cfg, |
plock_id_t | lockid | ||
) |
Remove a partial lock from the specified config.
cfg | Config template to use |
lockid | lock-id for the plcb to remove |
status_t cfg_fill_candidate_from_inline | ( | ses_id_t | sesid, |
val_value_t * | newroot | ||
) |
Fill the <candidate> config with the config contents of the <config> inline XML node.
Called internally only, do not use!
sesid | current session ID |
newroot | new root for the candidate config |
Fill the <candidate> config with the config contents of the <running> config.
sesid | session ID setting the config |
Fill the <candidate> config with the config contents of the <startup> config.
Called internally only, do not use!
sesid | session ID setting the config |
plock_cb_t * cfg_find_partial_lock | ( | cfg_template_t * | cfg, |
plock_id_t | lockid | ||
) |
Find a partial lock in the specified config.
cfg | Config template to use |
lockid | lock-id for the plcb to find |
plock_cb_t * cfg_first_partial_lock | ( | cfg_template_t * | cfg | ) |
Get the first partial lock in the specified config.
cfg | Config template to use |
void cfg_free_template | ( | cfg_template_t * | cfg | ) |
Clean and free the cfg_template_t struct.
cfg | cfg_template_t to clean and free |
cfg_template_t * cfg_get_config | ( | const xmlChar * | cfgname | ) |
Get the config struct from its name.
cfgname | Config Name |
cfg_template_t * cfg_get_config_id | ( | ncx_cfg_t | cfgid | ) |
Get the config struct from its ID.
cfgid | config ID |
const xmlChar * cfg_get_config_name | ( | ncx_cfg_t | cfgid | ) |
Get the config name from its ID.
cfgid | config ID |
boolean cfg_get_dirty_flag | ( | const cfg_template_t * | cfg | ) |
Get the config dirty flag value.
cfg | configuration template to check |
status_t cfg_get_global_lock_info | ( | const cfg_template_t * | cfg, |
ses_id_t * | sesid, | ||
const xmlChar ** | locktime | ||
) |
Get the current global lock info.
cfg | Config template to check | |
[out] | sesid | address of return session ID pointer
|
[out] | locktime | address of return lock time
|
const xmlChar * cfg_get_last_ch_time | ( | cfg_template_t * | cfg | ) |
Get the last-modified timestamp.
cfg | config target |
ncx_transaction_id_t cfg_get_last_txid | ( | cfg_template_t * | cfg | ) |
Get the last good transaction ID.
cfg | config target |
time_t cfg_get_lock_itime | ( | ncx_cfg_t | cfg_id | ) |
Get the lock_itime field.
cfg_id | cfg ID |
void cfg_get_lock_list | ( | ses_id_t | sesid, |
val_value_t * | retval | ||
) |
Get a list of all the locks held by a session.
sesid | session ID to check for any locks | |
[out] | retval | pointer to malloced and initialized NCX_BT_SLIST
|
val_value_t * cfg_get_root | ( | ncx_cfg_t | cfgid | ) |
Get the config root for the specified config.
cfgid | config ID to get root from |
const xmlChar * cfg_get_startup_filespec | ( | void | ) |
Get the filespec string for the XML file to save the running database.
cfg_state_t cfg_get_state | ( | ncx_cfg_t | cfg_id | ) |
Get the state of the specified static config.
cfg_id | Config ID |
Initialize the specified static configuration slot.
cfg_id | cfg ID to intialize |
boolean cfg_is_global_locked | ( | const cfg_template_t * | cfg | ) |
Check if the specified config has ab active global lock.
cfg | Config template to check |
boolean cfg_is_partial_locked | ( | const cfg_template_t * | cfg | ) |
Check if the specified config has any active partial locks.
cfg | Config template to check |
status_t cfg_lock | ( | cfg_template_t * | cfg, |
ses_id_t | locked_by, | ||
cfg_source_t | lock_src | ||
) |
Lock the specified config.
This will not really have an effect unless the CFG_FL_TARGET flag in the specified config is also set
cfg | Config template to lock |
locked_by | session ID of the lock owner |
lock_src | enum classifying the lock source |
status_t cfg_lock2 | ( | cfg_template_t * | cfg, |
ses_id_t | locked_by, | ||
cfg_source_t | lock_src, | ||
boolean | lockall | ||
) |
Lock the specified config (with lockall)
This will not really have an effect unless the CFG_FL_TARGET flag in the specified config is also set
cfg | Config template to lock |
locked_by | session ID of the lock owner |
lock_src | enum classifying the lock source |
lockall | TRUE if from "<lock-all>"; FALSE otherwise |
Force a cfg lock to be undone due to max-lock-hold-time.
cfg_id | Config ID to force global lock released |
cfg_template_t * cfg_new_fake_candidate | ( | const xmlChar * | name, |
ncx_cfg_t | cfg_id | ||
) |
Malloc and initialize a new fake Candidate cfg_template_t struct.
name | cfg name |
cfg_id | cfg ID |
cfg_template_t * cfg_new_template | ( | const xmlChar * | name, |
ncx_cfg_t | cfg_id | ||
) |
Malloc and initialize a cfg_template_t struct.
name | cfg name |
cfg_id | cfg ID |
plock_cb_t * cfg_next_partial_lock | ( | plock_cb_t * | curplockcb | ) |
Get the next partial lock in the specified config.
curplockcb | current lock control block; get next CB |
status_t cfg_ok_to_lock | ( | const cfg_template_t * | cfg | ) |
Check if the specified config can be locked right now for global lock only.
cfg | Config template to check |
status_t cfg_ok_to_partial_lock | ( | const cfg_template_t * | cfg | ) |
Check if the specified config can be locked right now for partial lock only.
cfg | Config template to check |
status_t cfg_ok_to_read | ( | const cfg_template_t * | cfg | ) |
Check if the specified config can be read right now.
cfg | Config template to check |
status_t cfg_ok_to_unlock | ( | const cfg_template_t * | cfg, |
ses_id_t | sesid | ||
) |
Check if the specified config can be unlocked right now by the specified session ID; for global lock only.
cfg | Config template to check |
sesid | session ID requesting to unlock the config |
status_t cfg_ok_to_unlock2 | ( | const cfg_template_t * | cfg, |
ses_id_t | sesid, | ||
boolean | lockall | ||
) |
Check if the specified config can be unlocked right now by the specified session ID; for global lock only.
Support for lock-all added
cfg | Config template to check |
sesid | session ID requesting to unlock the config |
lockall | TRUE if from "<unlock-all>"; FALSE otherwise |
status_t cfg_ok_to_write | ( | const cfg_template_t * | cfg, |
ses_id_t | sesid | ||
) |
Check if the specified config can be written right now by the specified session ID.
This is not an access control check, only locks and config state will be checked
cfg | Config template to check |
sesid | session ID requesting to write to the config |
void cfg_register_reload_candidate_cb | ( | cfg_reload_candidate_cb_t | cbfn | ) |
Register a callback function to be called anytime the.
cfg_fill_candidate_from_ FOO function is called This is an internal server callback – not a SIL callback
cbfn | callback function to register |
void cfg_release_locks | ( | ses_id_t | sesid | ) |
Release any configuration locks held by the specified session.
sesid | session ID to check for |
void cfg_release_partial_locks | ( | ses_id_t | sesid | ) |
Release any configuration locks held by the specified session.
sesid | session ID to check for |
boolean cfg_running_is_wrlocked | ( | void | ) |
Check if the running datastore is currently pthreads write-locked.
status_t cfg_rwlock_acquire_lock_pair | ( | thd_tcb_t * | tcb, |
cfg_template_t * | cfg1, | ||
boolean | wrlock1, | ||
cfg_template_t * | cfg2, | ||
boolean | wrlock2 | ||
) |
Acquire multiple (2) locks in predetermined, repeatable in order to help prevent deadlock.
tcb | thread control block for session (caller) |
cfg1 | config ptr 1 |
wrlock1 | TRUE => write lock ELSE read lock |
cfg2 | config ptr 2 |
wrlock2 | TRUE => write lock ELSE read lock |
Acquire multiple locks in order to help prevent deadlock.
tcb | thread control block for session (caller) |
status_t cfg_rwlock_acquire_single_lock | ( | thd_tcb_t * | tcb, |
cfg_template_t * | cfg, | ||
boolean | wrlock | ||
) |
Acquire a single RWLOCK.
NOTE: Call once only. Do NOT use this to acquire multiple locks.
tcb | thread control block for session (caller) |
cfg | data store |
wrlock | TRUE == write access requested |
status_t cfg_rwlock_acquire_single_rdlock | ( | thd_tcb_t * | tcb, |
cfg_template_t * | cfg | ||
) |
Acquire a single RWLOCK for read access.
NOTE: Call once only per RPC. Do NOT use this to acquire multiple locks.
tcb | thread control block for session (caller) |
cfg | data store |
status_t cfg_rwlock_acquire_single_wrlock | ( | thd_tcb_t * | tcb, |
cfg_template_t * | cfg | ||
) |
Acquire a single RWLOCK for write access.
NOTE: Call once only per RPC. Do NOT use this to acquire multiple locks.
tcb | thread control block for session (caller) |
cfg | data store |
Initialize TCB multiple lock structure.
WARNING: Will attempt to unlock (and generate error message) but should NOT be called for this purpose.
tcb | thread control block for session (caller) |
status_t cfg_rwlock_rdlock | ( | thd_tcb_t * | tcb, |
cfg_template_t * | cfg | ||
) |
Take out the read lock associated with a cfg (datastore) RWLOCK structure May be called recursively.
tcb | thread control block for session (caller) |
cfg | datastore descriptor (e.g., running, candidate, or startup) |
Release all RWLOCKs recorded in TCB lock state structure.
tcb | thread control block for session (caller) |
status_t cfg_rwlock_unlock | ( | thd_tcb_t * | tcb, |
cfg_template_t * | cfg | ||
) |
Release a lock associated with a cfg (datastore) RWLOCK structure.
May be called recursively.
tcb | thread control block for session (caller) |
cfg | datastore descriptor (e.g., running, candidate, or startup) |
status_t cfg_rwlock_wrlock | ( | thd_tcb_t * | tcb, |
cfg_template_t * | cfg | ||
) |
Take out a write lock associated with a cfg (datastore) RWLOCK structure.
May be called recursively.
tcb | thread control block for session (caller) |
cfg | datastore descriptor (e.g., running, candidate, or startup) |
void cfg_set_defer_load | ( | boolean | val | ) |
Set the config defer load flag to the config.
val | TRUE if this config is in defer load mode; FALSE if not |
void cfg_set_dirty_flag | ( | cfg_template_t * | cfg | ) |
Mark the config as 'changed'.
cfg | configuration template to set |
void cfg_set_state | ( | ncx_cfg_t | cfg_id, |
cfg_state_t | new_state | ||
) |
Change the state of the specified static config.
cfg_id | Config ID to change |
new_state | new config state to set |
void cfg_set_target | ( | ncx_cfg_t | cfg_id | ) |
Set the CFG_FL_TARGET flag in the specified config.
cfg_id | Config ID to set as a valid target |
status_t cfg_setup_running | ( | void | ) |
Setup the running config root if load_running_config did not add anything.
status_t cfg_sprintf_etag | ( | cfg_template_t * | cfg, |
xmlChar * | buff, | ||
int32 | buffsize | ||
) |
Write the Entity Tag for the datastore to the specified buffer.
cfg | cfg_templatet data structure to use | |
[out] | buff | buffer to use
|
buffsize | buffer size to use |
status_t cfg_sprintf_etag_id | ( | ncx_transaction_id_t | id, |
xmlChar * | buff, | ||
int32 | buffsize | ||
) |
Write the Entity Tag for the datastore to the specified buffer Use the last_id instead of the cfg template.
id | cfg id to use | |
[out] | buff | buffer to use
|
buffsize | buffer size to use |
status_t cfg_unlock | ( | cfg_template_t * | cfg, |
ses_id_t | locked_by | ||
) |
Unlock the specified config.
cfg | Config template to unlock |
locked_by | session ID of the lock owner |
status_t cfg_unlock2 | ( | cfg_template_t * | cfg, |
ses_id_t | locked_by, | ||
boolean | lockall | ||
) |
Unlock the specified config (2nd rev)
cfg | Config template to unlock |
locked_by | session ID of the lock owner |
lockall | TRUE if called from <unlock-all>; FALSE otherwise |
status_t cfg_unlock_ex | ( | cfg_template_t * | cfg, |
ses_id_t | locked_by, | ||
boolean | skip_reload | ||
) |
Unlock the specified config.
Do not always force a remove changes. This is needed for the <unload> operation which locks the datastores while deleting data nodes and schema nodes for the module being unloaded
cfg | Config template to unlock |
locked_by | session ID of the lock owner |
skip_reload | TRUE to skip cfg reload test |
void cfg_update_last_ch_time | ( | cfg_template_t * | cfg, |
time_t * | timestamp | ||
) |
Update the last-modified timestamp.
cfg | config target |
timestamp | timestamp to use or NULL to get cvurrent time |
void cfg_update_last_txid | ( | cfg_template_t * | cfg, |
ncx_transaction_id_t | txid | ||
) |
Update the last good transaction ID.
cfg | config target |
txid | trnasaction ID to use |
void cfg_update_stamps | ( | cfg_template_t * | source, |
cfg_template_t * | dest | ||
) |
Update the last-modified and last-txid stamps.
source | source config |
dest | destoination config |
void cfg_ypinit | ( | void | ) |
Initialize the config manager.
YPW-1360: netconfd: naming issue in ncx module (cfg.c cfg_init() API) changed function name cfg_init to cfg_ypinit.