yumapro  20.10-12
YumaPro SDK
agt_ncx.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_agt_ncx
13 #define _H_agt_ncx
14 
15 /* FILE: agt_ncx.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
28 /*********************************************************************
29 * *
30 * C H A N G E H I S T O R Y *
31 * *
32 *********************************************************************
33 
34 date init comment
35 ----------------------------------------------------------------------
36 04-feb-06 abb Begun
37 
38 */
39 
40 #ifndef _H_cfg
41 #include "cfg.h"
42 #endif
43 
44 #ifndef _H_ncxtypes
45 #include "ncxtypes.h"
46 #endif
47 
48 #ifndef _H_ses
49 #include "ses.h"
50 #endif
51 
52 #ifndef _H_status
53 #include "status.h"
54 #endif
55 
56 #ifndef _H_val
57 #include "val.h"
58 #endif
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 /********************************************************************
65 * *
66 * F U N C T I O N S *
67 * *
68 *********************************************************************/
69 
88 extern status_t
89  agt_ncx_init (void);
90 
91 
97 extern void
98  agt_ncx_cleanup (void);
99 
100 
116 extern status_t
117  agt_ncx_cfg_load (cfg_template_t *cfg,
118  cfg_location_t cfgloc,
119  const xmlChar *cfgparm);
120 
121 
131 extern status_t
132  agt_ncx_cfg_save_ex (ses_cb_t *scb,
133  rpc_msg_t *msg,
134  cfg_template_t *cfg);
135 
136 
144 extern status_t
145  agt_ncx_cfg_save (cfg_template_t *cfg);
146 
147 
156 extern status_t
157  agt_ncx_cfg_save_inline (const xmlChar *source_url,
158  val_value_t *newroot);
159 
160 
171 extern status_t
172  agt_ncx_load_backup (const xmlChar *filespec,
173  cfg_template_t *cfg,
174  ses_id_t use_sid,
175  dlq_hdr_t *errQ);
176 
177 
178 
186 extern boolean
187  agt_ncx_cc_active (void);
188 
189 
195 extern ses_id_t
196  agt_ncx_cc_ses_id (void);
197 
198 
205 extern void
207 
208 
214 extern const xmlChar *
215  agt_ncx_cc_persist_id (void);
216 
217 
224 extern void
226 
227 
228 #ifdef PTHREADS
229 
236 extern void
238 
239 #endif // PTHREADS
240 
241 
249 extern void
250  agt_ncx_cancel_confirmed_commit (ses_cb_t *scb,
251  ncx_confirm_event_t event);
252 
253 
254 
278 extern status_t
279  agt_ncx_internal_commit (ses_cb_t *scb,
280  rpc_msg_t *msg,
281  boolean write_backup,
282  boolean save_nvstore,
283  ses_id_t rollback_sid,
284  xmlChar **backup_source,
285  boolean *errdone,
286  boolean *rootcheck_done,
287  status_t *rootcheck_res);
288 
289 
299 extern status_t
300  agt_ncx_write_config (const xmlChar *filespec,
301  cfg_template_t *cfg);
302 
303 
315 extern status_t
316  agt_ncx_force_write_config (const xmlChar *filespec,
317  cfg_template_t *cfg);
318 
319 
327 extern status_t
328  agt_ncx_process_one_loaded_module (ses_cb_t *scb,
329  ncx_module_t *mod);
330 
331 
341 extern status_t
343  rpc_msg_t *msg);
344 
345 
346 
357 extern status_t
358  agt_ncx_check_commit_parms (boolean confirmed,
359  uint32 confirm_timeout,
360  const xmlChar *persist,
361  const xmlChar *persist_id);
362 
363 
383 extern status_t
384  agt_ncx_commit_invoke (ses_cb_t *scb,
385  rpc_msg_t *msg,
386  cfg_template_t *running,
387  const xmlChar *comment_str,
388  boolean confirmed,
389  uint32 confirm_timeout,
390  const xmlChar *persist,
391  const xmlChar *persist_id,
392  agt_ccparm_t *ret_ccparm,
393  boolean *errdone,
394  boolean *save_startup);
395 
396 
397 
409 extern status_t
410  agt_ncx_load_config_ha (ses_cb_t *scb,
411  rpc_msg_t *msg,
412  val_value_t *config_val,
413  ncx_transaction_id_t txid);
414 
415 
422 extern status_t
423  agt_ncx_do_lock_validate (cfg_template_t *cfg);
424 
425 
430 #ifdef __cplusplus
431 } /* end extern 'C' */
432 #endif
433 
434 #endif /* _H_agt_ncx */
NCX_AGT_TARG_RUNNING
@ NCX_AGT_TARG_RUNNING
target=running
Definition: ncxtypes.h:355
OP_KILL_SESSION
@ OP_KILL_SESSION
kill-session
Definition: op.h:78
OP_COMMIT
@ OP_COMMIT
commit, #candidate capability
Definition: op.h:79
cfg_rwlock_acquire_single_rdlock
status_t cfg_rwlock_acquire_single_rdlock(thd_tcb_t *tcb, cfg_template_t *cfg)
Acquire a single RWLOCK for read access.
Definition: cfg.c:957
ses.h
NETCONF Session Common definitions module.
agt_sys_send_sysCapabilityChange
void agt_sys_send_sysCapabilityChange(ses_cb_t *changed_by, boolean is_add, const xmlChar *capstr)
Send a Capability Change notification.
Definition: agt_sys.c:1477
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
NCX_NT_STRING
@ NCX_NT_STRING
xmlChar *, error only
Definition: ncxtypes.h:279
cfg_unlock
status_t cfg_unlock(cfg_template_t *cfg, ses_id_t locked_by)
Unlock the specified config.
Definition: cfg.c:2565
agt_cap.h
NETCONF Server capabilities handler.
agt_modtags.h
YumaPro Module tags handler.
cfg.h
NCX_CC_EVENT_START
@ NCX_CC_EVENT_START
start event
Definition: ncxtypes.h:1224
dlq_block_enque
void dlq_block_enque(dlq_hdrT *srcP, dlq_hdrT *dstP)
add all the queue entries in the srcP queue list to the end of the dstP queue list
Definition: dlq.c:731
AGT_CCPARM_NONE
@ AGT_CCPARM_NONE
not set
Definition: agt.h:674
NCX_CC_EVENT_TIMEOUT
@ NCX_CC_EVENT_TIMEOUT
timeout event
Definition: ncxtypes.h:1226
OP_ERROP_ROLLBACK
@ OP_ERROP_ROLLBACK
rollback-on-error
Definition: op.h:177
val_compare_max
int32 val_compare_max(const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing)
Compare 2 val_value_t struct value contents.
Definition: val.c:9108
cfg_rwlock_acquire_lock_pair
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.
Definition: cfg.c:839
agt_curl.h
YumaPro libcurl API.
ncx_file_remove
status_t ncx_file_remove(const xmlChar *filespec, boolean do_warn)
Close a file; check result.
Definition: ncx.c:13262
agt_ses.h
Server Session Management.
agt_util.h
Utility Functions for NCX Server method routines.
agt_rpc_register_method
status_t agt_rpc_register_method(const xmlChar *module, const xmlChar *method_name, agt_rpc_phase_t phase, agt_rpc_method_t method)
add callback for 1 phase of RPC processing
Definition: agt_rpc.c:2557
OP_EDITOP_REPLACE
@ OP_EDITOP_REPLACE
edit op is replace
Definition: op.h:125
cfg_ok_to_write
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.
Definition: cfg.c:2286
tstamp.h
Timestamp utilities.
agt_ncx_cfg_save
status_t agt_ncx_cfg_save(cfg_template_t *cfg)
Save the specified cfg to the its startup source, which should be stored in the cfg struct.
Definition: agt_ncx.c:5489
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
val_find_meta
val_value_t * val_find_meta(val_value_t *val, xmlns_id_t nsid, const xmlChar *name)
Get the corresponding meta data node.
Definition: val.c:5532
AGT_CFG_EDIT_TYPE_FULL
@ AGT_CFG_EDIT_TYPE_FULL
REPLACE = full database replace.
Definition: agt_cfg.h:191
agt_val_apply_commit
status_t agt_val_apply_commit(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *source, cfg_template_t *target, boolean save_nvstore, boolean save_backup, const xmlChar *backup_source, boolean *save_backup_done, boolean *rootcheck_done, status_t *rootcheck_res)
Apply the requested commit operation.
Definition: agt_val.c:13428
cfg_rwlock_acquire_single_wrlock
status_t cfg_rwlock_acquire_single_wrlock(thd_tcb_t *tcb, cfg_template_t *cfg)
Acquire a single RWLOCK for write access.
Definition: cfg.c:978
cfg_ok_to_lock
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.
Definition: cfg.c:2097
ncxmod_test_filespec
boolean ncxmod_test_filespec(const xmlChar *filespec)
Check the exact filespec to see if it a file.
Definition: ncxmod.c:8275
agt_ncx_cfg_save_inline
status_t agt_ncx_cfg_save_inline(const xmlChar *source_url, val_value_t *newroot)
Save the specified cfg to the its startup source, which should be stored in the cfg struct.
val_find_child
val_value_t * val_find_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname)
Find the first instance of the specified child node.
Definition: val.c:8560
agt_state.h
NETCONF State Monitoring Data Model Module support.
val_find_child_fast
val_value_t * val_find_child_fast(const val_value_t *parent, xmlns_id_t nsid, const xmlChar *childname)
Find the first instance of the specified child node.
Definition: val.c:8588
ses_new_dummy_scb
ses_cb_t * ses_new_dummy_scb(void)
Create a new dummy session control block.
Definition: ses.c:2100
agt_get_url_from_parm
status_t agt_get_url_from_parm(const xmlChar *parmname, rpc_msg_t *msg, xml_node_t *methnode, const xmlChar **returl, val_value_t **retval)
Get the URL string for the config in the target param.
Definition: agt_util.c:1703
tstamp_convert_to_utctime
xmlChar * tstamp_convert_to_utctime(const xmlChar *timestr, boolean *isNegative, status_t *res)
Check if the specified string is a valid dateTime or date-and-time string is valid and if so,...
Definition: tstamp.c:298
ncx_mod_has_data_nodes
boolean ncx_mod_has_data_nodes(ncx_module_t *mod, boolean check_config, boolean check_operational)
Check if the module has any datastore definitions.
Definition: ncx.c:10981
ncx_delete_mod_obsolete_objects
void ncx_delete_mod_obsolete_objects(ncx_module_t *mod)
Delete all obsolete objects in mod.
Definition: ncx.c:10576
OP_GET
@ OP_GET
get
Definition: op.h:76
op_method_name
const xmlChar * op_method_name(op_method_t op_id)
Get the keyword for the specified STD RPC method.
Definition: op.c:58
OP_UNLOCK
@ OP_UNLOCK
unlock
Definition: op.h:75
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
agt_not_cancel_subscription
void agt_not_cancel_subscription(ses_id_t sid)
Cancel any notification subscription for the specified session.
Definition: agt_not.c:6298
ERR_NCX_UNKNOWN_ELEMENT
@ ERR_NCX_UNKNOWN_ELEMENT
265
Definition: status_enum.h:306
NCX_CFG_STATE_BAD
@ NCX_CFG_STATE_BAD
bad datastore being used anyway
Definition: ncxtypes.h:1421
XML_MSG_EDIT_CONFIG_ROOT
#define XML_MSG_EDIT_CONFIG_ROOT(M)
NACM data rule support to test incoming message <config>
Definition: xml_msg.h:323
val.h
Value Node Basic Support.
ncx_get_first_module
ncx_module_t * ncx_get_first_module(void)
Get the first module in the ncx_modQ.
Definition: ncx.c:4729
agt_val_add_module_commit_tests
void agt_val_add_module_commit_tests(ncx_module_t *mod, boolean set_augment)
Invoke module commit tests.
Definition: agt_val.c:13934
agt_ncx_check_cc_timeout
void agt_ncx_check_cc_timeout(void)
Check if a confirmed-commit has timed out, and needs to be canceled.
Definition: agt_ncx.c:5689
agt_state_add_backup_file
status_t agt_state_add_backup_file(const xmlChar *filename, boolean overwrite)
Add a backup-file entry to the netconf-state DM for the.
Definition: agt_state.c:2673
ERR_NCX_DATA_EXISTS
@ ERR_NCX_DATA_EXISTS
271
Definition: status_enum.h:312
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
agt_ncx_commit_invoke
status_t agt_ncx_commit_invoke(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *running, const xmlChar *comment_str, boolean confirmed, uint32 confirm_timeout, const xmlChar *persist, const xmlChar *persist_id, agt_ccparm_t *ret_ccparm, boolean *errdone, boolean *save_startup)
commit : invoke commit or confirmed-commit API
Definition: agt_ncx.c:6369
ncxmod_find_server_data_file
xmlChar * ncxmod_find_server_data_file(const xmlChar *fname, boolean fileloc_fhs, boolean generrors, boolean backup_file, boolean keep_result, status_t *res)
Find a server data file.
Definition: ncxmod.c:5233
AGT_RPC_PH_VALIDATE
@ AGT_RPC_PH_VALIDATE
(2) cb after the input is parsed
Definition: agt_rpc.h:115
NCX_LAYER_OPERATION
@ NCX_LAYER_OPERATION
protocol operation layer
Definition: ncxtypes.h:346
NCX_PROTO_NETCONF11
@ NCX_PROTO_NETCONF11
RFC 6241 base:1.1.
Definition: ncxtypes.h:784
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
xml_wr.h
XML Write functions.
val_get_mod_name
const xmlChar * val_get_mod_name(const val_value_t *val)
Get the module name associated with this value node.
Definition: val.c:12223
OP_VALIDATE
@ OP_VALIDATE
validate, #validate capability
Definition: op.h:81
agt_val_delete_dead_nodes
status_t agt_val_delete_dead_nodes(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *root)
Mark nodes deleted for each false when-stmt from <validate>
Definition: agt_val.c:13882
OP_CANCEL_COMMIT
@ OP_CANCEL_COMMIT
cancel-commit, base:1.1 + conf-commit
Definition: op.h:82
OP_GET_CONFIG
@ OP_GET_CONFIG
get-config
Definition: op.h:70
agt_ncxserver.h
NCX Server Transport and IO Library.
agt_ncx_cfg_load
status_t agt_ncx_cfg_load(cfg_template_t *cfg, cfg_location_t cfgloc, const xmlChar *cfgparm)
Load the specifed config from the indicated source.
Definition: agt_ncx.c:5293
agt_ncx_cc_active
boolean agt_ncx_cc_active(void)
Check if a confirmed-commit is active, and the timeout may need to be processed.
Definition: agt_ncx.c:5623
agt_cb_run_startup_hook
status_t agt_cb_run_startup_hook(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *source_config, cfg_template_t *target_config)
Run startup hook callbacks.
Definition: agt_cb.c:4175
NCX_NT_CFG
@ NCX_NT_CFG
cfg_template_t *, error only
Definition: ncxtypes.h:280
AGT_CCPARM_CONFIRM_TIMEOUT
@ AGT_CCPARM_CONFIRM_TIMEOUT
confirm-timeout
Definition: agt.h:676
ncxmod_make_server_data_filespec
xmlChar * ncxmod_make_server_data_filespec(const xmlChar *fname, boolean fileloc_fhs, boolean backup_file, status_t *res)
Determine a suitable path location for the specified data file name.
Definition: ncxmod.c:5668
ncxmod_make_data_filespec_from_src
xmlChar * ncxmod_make_data_filespec_from_src(const xmlChar *srcspec, const xmlChar *fname, status_t *res)
Determine the directory path portion of the specified source_url and change the filename to the speci...
Definition: ncxmod.c:5763
op.h
NETCONF protocol operations.
VAL_NAME
#define VAL_NAME(V)
Access the value name.
Definition: val.h:399
ncxmod.h
NCX Module Load Manager.
agt_cap_get_caps
cap_list_t * agt_cap_get_caps(void)
Get the NETCONF server capabilities.
Definition: agt_cap.c:931
ncxmod_make_data_filespec
xmlChar * ncxmod_make_data_filespec(const xmlChar *fname, boolean backup_file, status_t *res)
Determine a suitable path location for the specified data file name.
Definition: ncxmod.c:5526
cap_std_set
boolean cap_std_set(const cap_list_t *caplist, cap_stdid_t capstd)
fast search of standard protocol capability set
Definition: cap.c:2168
agt_modtags_setup_filter
status_t agt_modtags_setup_filter(xml_msg_hdr_t *msg, val_value_t *inputval, val_value_t **errval)
Setup a modtag filter in the specified msg.
Definition: agt_modtags.c:889
cfg_get_dirty_flag
boolean cfg_get_dirty_flag(const cfg_template_t *cfg)
Get the config dirty flag value.
Definition: cfg.c:2066
agt_backups_enabled
boolean agt_backups_enabled(void)
Check if the backup commands are enabled.
Definition: agt_util.c:5144
agt_rpc_get_config_file
val_value_t * agt_rpc_get_config_file(const xmlChar *filespec, cfg_template_t *targetcfg, ses_id_t use_sid, dlq_hdr_t *errorQ, status_t *res)
Dispatch an internal <load-config> request except skip the INVOKE phase and just remove the 'config' ...
Definition: agt_rpc.c:3344
agt_ncx_init
status_t agt_ncx_init(void)
Initialize the NETCONF Server standard method routines.
Definition: agt_ncx.c:5230
cfg_get_root
val_value_t * cfg_get_root(ncx_cfg_t cfgid)
Get the config root for the specified config.
Definition: cfg.c:3240
agt_ncx_cfg_save_ex
status_t agt_ncx_cfg_save_ex(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *cfg)
Save the specified cfg to the its startup source, which should be stored in the cfg struct and invoke...
Definition: agt_ncx.c:5374
ses_id_t
uint32 ses_id_t
Session ID.
Definition: ses.h:306
xml_clean_attrs
void xml_clean_attrs(xml_attrs_t *attrs)
clean an xml_attrs_t variable
Definition: xml_util.c:1243
agt_cfg_new_transaction_ex3
agt_cfg_transaction_t * agt_cfg_new_transaction_ex3(ncx_cfg_t cfgid, agt_cfg_edit_type_t edit_type, boolean rootcheck, boolean is_validate, boolean is_rollback, boolean no_cb, boolean no_silsa_cb, ses_cb_t *scb, status_t *res)
Malloc and initialize agt_cfg_transaction_t struct Extended3.
Definition: agt_cfg.c:960
agt_ncx_cc_ses_id
ses_id_t agt_ncx_cc_ses_id(void)
Get the confirmed commit session ID.
Definition: agt_ncx.c:5640
agt_cb.h
NETCONF Server Data Model callback handler.
agt_cfg_rerun_transaction
agt_cfg_transaction_t * agt_cfg_rerun_transaction(ncx_cfg_t cfgid, agt_cfg_edit_type_t edit_type, boolean rootcheck, boolean is_validate, boolean is_rollback, boolean no_silsa_cb, ncx_transaction_id_t txid, ses_cb_t *scb, status_t *res)
Malloc and initialize agt_cfg_transaction_t struct.
Definition: agt_cfg.c:1162
OP_EDITOP_MERGE
@ OP_EDITOP_MERGE
edit op is merge
Definition: op.h:124
agt_ncx_load_config_ha
status_t agt_ncx_load_config_ha(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *config_val, ncx_transaction_id_t txid)
load-config : validate params callback
Definition: agt_ncx.c:6645
VAL_ENUM_NAME
#define VAL_ENUM_NAME(V)
Access the enum name in the value ONLY if BCX_NT_ENUM This is the macro used to check values in SIL c...
Definition: val.h:434
NCX_CC_EVENT_CANCEL
@ NCX_CC_EVENT_CANCEL
cancel event
Definition: ncxtypes.h:1225
agt_output_filter
status_t agt_output_filter(ses_cb_t *scb, rpc_msg_t *msg, int32 indent)
output the proper data for the get or get-config operation generate the data that matched the subtree...
Definition: agt_util.c:2890
agt_ses_session_id_valid
boolean agt_ses_session_id_valid(ses_id_t sid)
Check if a session-id is for an active session.
Definition: agt_ses.c:1031
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
xmlns_id_t
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
ERR_NCX_CC_NOT_ACTIVE
@ ERR_NCX_CC_NOT_ACTIVE
380
Definition: status_enum.h:423
AGT_CFG_SET_TOP_REPLACE
#define AGT_CFG_SET_TOP_REPLACE(C)
set the top replace mode
Definition: agt_cfg.h:150
agt_record_error
void agt_record_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:1942
agt_rpc_unregister_method
void agt_rpc_unregister_method(const xmlChar *module, const xmlChar *method_name)
remove the callback functions for all phases of RPC or Action processing for the specified RPC method...
Definition: agt_rpc.c:2759
NCX_CC_EVENT_COMPLETE
@ NCX_CC_EVENT_COMPLETE
CC complete event.
Definition: ncxtypes.h:1228
ERR_NCX_MISSING_PARM
@ ERR_NCX_MISSING_PARM
233
Definition: status_enum.h:272
log_debug2
void void void void void void void void void log_debug2(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG2 log entry.
agt_val.h
NETCONF Server database callback handler.
CAP_STDID_STARTUP
@ CAP_STDID_STARTUP
:startup:v1.0
Definition: cap.h:248
agt_validate_filter
status_t agt_validate_filter(ses_cb_t *scb, rpc_msg_t *msg)
Validate the <filter> parameter if present.
Definition: agt_util.c:2406
AGT_COMMIT_TYPE_REPLAY
@ AGT_COMMIT_TYPE_REPLAY
internal replay commit
Definition: agt.h:648
agt_yp_ha_nvstore
status_t agt_yp_ha_nvstore(void)
Do an <nvstore> in the active role.
Definition: agt_yp_ha.c:1184
NCX_DISPLAY_MODE_NONE
@ NCX_DISPLAY_MODE_NONE
not set
Definition: ncxtypes.h:448
errno_to_status
status_t errno_to_status(void)
Get the errno variable and convert it to a status_t.
Definition: status.c:968
ERR_NCX_CONFIG_NOT_TARGET
@ ERR_NCX_CONFIG_NOT_TARGET
376
Definition: status_enum.h:419
agt_ses_kill_session
void agt_ses_kill_session(ses_cb_t *scb, ses_id_t killedby, ses_term_reason_t termreason)
Kill the specified session.
Definition: agt_ses.c:1213
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
agt_commit_complete.h
NETCONF Server Commit Complete callback handler. This file contains functions to support registering,...
agt_ncx_check_commit_parms
status_t agt_ncx_check_commit_parms(boolean confirmed, uint32 confirm_timeout, const xmlChar *persist, const xmlChar *persist_id)
Check the commit parameters from a RESTCONF edit to see if they are valid for the current datastore s...
Definition: agt_ncx.c:6293
cfg_get_last_ch_time
const xmlChar * cfg_get_last_ch_time(cfg_template_t *cfg)
Get the last-modified timestamp.
Definition: cfg.c:2896
NCX_PROTO_RESTCONF
@ NCX_PROTO_RESTCONF
IETF RESTCONF.
Definition: ncxtypes.h:788
NC_MODULE
#define NC_MODULE
Internal NETCONF YANG module.
Definition: ncxconst.h:71
AGT_CFG_EDIT_TYPE_PARTIAL
@ AGT_CFG_EDIT_TYPE_PARTIAL
REPLACE = subtree replace.
Definition: agt_cfg.h:192
agt_request_shutdown
void agt_request_shutdown(ncx_shutdowntyp_t mode, int intnum)
Request some sort of server shutdown.
Definition: agt.c:4136
y_yumaworks_event_filter.h
System SIL callbacks for yumaworks-event-filter module.
OP_DISCARD_CHANGES
@ OP_DISCARD_CHANGES
discard-changes, #candidate capability
Definition: op.h:80
agt_val_root_check
status_t agt_val_root_check(ses_cb_t *scb, xml_msg_hdr_t *msghdr, agt_cfg_transaction_t *txcb, val_value_t *root)
Perform a YANG validation root-check.
Definition: agt_val.c:12863
agt_audit.h
NETCONF protocol audit log support.
xml_init_attrs
void xml_init_attrs(xml_attrs_t *attrs)
initialize an xml_attrs_t variable
Definition: xml_util.c:745
val_get_nsid
xmlns_id_t val_get_nsid(const val_value_t *val)
Get the namespace ID for the specified value node.
Definition: val.c:12277
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
agt_ncx.h
NETCONF Server standard method routines.
ses_get_protocol
ncx_protocol_t ses_get_protocol(const ses_cb_t *scb)
Get the NETCONF protocol set (or unset) for this session.
Definition: ses.c:3854
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
cfg_rwlock_release_all_locks
status_t cfg_rwlock_release_all_locks(thd_tcb_t *tcb)
Release all RWLOCKs recorded in TCB lock state structure.
Definition: cfg.c:675
AGT_CCPARM_CONFIRMED
@ AGT_CCPARM_CONFIRMED
confirmed
Definition: agt.h:675
agt_sil.h
SIL Transaction APIs.
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
agt_ncx_load_backup
status_t agt_ncx_load_backup(const xmlChar *filespec, cfg_template_t *cfg, ses_id_t use_sid, dlq_hdr_t *errQ)
Load a backup config into the specified config template.
Definition: agt_ncx.c:5596
cfg_sprintf_etag
status_t cfg_sprintf_etag(cfg_template_t *cfg, xmlChar *buff, int32 buffsize)
Write the Entity Tag for the datastore to the specified buffer.
Definition: cfg.c:2936
OP_ERROP_STOP
@ OP_ERROP_STOP
stop-on-error
Definition: op.h:175
OP_LOCK
@ OP_LOCK
lock
Definition: op.h:74
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
agt_val_apply_write
status_t agt_val_apply_write(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, val_value_t *pducfg, op_editop_t editop)
Apply the requested write operation.
Definition: agt_val.c:13229
cfg_clear_running_dirty_flag
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.
Definition: cfg.c:2024
log_warn
void void void log_warn(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_WARN log entry.
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
OP_TESTOP_TESTONLY
@ OP_TESTOP_TESTONLY
test-only
Definition: op.h:164
NCX_AGT_TARG_CANDIDATE
@ NCX_AGT_TARG_CANDIDATE
target=candidate
Definition: ncxtypes.h:354
agt_ncx_final_process_loaded_modules
status_t agt_ncx_final_process_loaded_modules(ses_cb_t *scb, rpc_msg_t *msg)
post-process all modules just loaded with load or load-bundle
Definition: agt_ncx.c:6248
agt_get_target_filespec
xmlChar * agt_get_target_filespec(const xmlChar *target_url, status_t *res)
Figure out where to store the URL target file.
Definition: agt_util.c:4266
agt_ncx_internal_commit
status_t agt_ncx_internal_commit(ses_cb_t *scb, rpc_msg_t *msg, boolean write_backup, boolean save_nvstore, ses_id_t rollback_sid, xmlChar **backup_source, boolean *errdone, boolean *rootcheck_done, status_t *rootcheck_res)
Apply a commit from candidate to running.
Definition: agt_ncx.c:5926
agt_time_filter.h
Support yuma-time-filter YANG module.
agt_set_with_defaults
status_t agt_set_with_defaults(rpc_msg_t *msg, const xmlChar *modname, val_value_t **errval)
Check if the <with-defaults> parameter is set in the request message, and if so, it is one of the ser...
Definition: agt_util.c:4540
ERR_NCX_IN_USE_COMMIT
@ ERR_NCX_IN_USE_COMMIT
373
Definition: status_enum.h:416
agt_cfg_new_transaction_ex2
agt_cfg_transaction_t * agt_cfg_new_transaction_ex2(ncx_cfg_t cfgid, agt_cfg_edit_type_t edit_type, boolean rootcheck, boolean is_validate, boolean is_rollback, boolean no_cb, ses_cb_t *scb, status_t *res)
Malloc and initialize agt_cfg_transaction_t struct Extended2.
Definition: agt_cfg.c:906
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
op_defop_id
op_editop_t op_defop_id(const xmlChar *defstr)
Get the ID for the default-operation from its keyword.
Definition: op.c:333
NCX_CFGID_CANDIDATE
@ NCX_CFGID_CANDIDATE
candidate datastore
Definition: ncxtypes.h:385
val_set_all_tags
void val_set_all_tags(val_value_t *val, time_t *timestamp, ncx_transaction_id_t txid)
Set the etag and last_modified field for the node and all config sub-children.
Definition: val.c:13540
agt_sil_lib.h
Server Instrumentation Library Support.
NCX_CFGID_STARTUP
@ NCX_CFGID_STARTUP
startup datastore
Definition: ncxtypes.h:386
NCX_DEF_STARTUP_FILE
#define NCX_DEF_STARTUP_FILE
Default startup config data file name.
Definition: ncxconst.h:457
agt_cfg_txid_in_progress
ncx_transaction_id_t agt_cfg_txid_in_progress(ncx_cfg_t cfgid)
Return the ID of the current transaction ID in progress.
Definition: agt_cfg.c:1479
OP_ERROP_CONTINUE
@ OP_ERROP_CONTINUE
continue-on-error
Definition: op.h:176
agt_get_ok_for_nolock
boolean agt_get_ok_for_nolock(rpc_msg_t *msg)
Check if the get has filters and if they are OK for a <get> without waiting for a pthreads filter.
Definition: agt_util.c:6568
agt_set_mod_defaults
status_t agt_set_mod_defaults(ncx_module_t *mod, val_value_t *valroot, boolean set_candidate, boolean set_augment, boolean force)
Check for any top-level config leafs that have a default value, and add them to the running configura...
Definition: agt_util.c:4375
rpc.h
NETCONF protocol remote procedure call common definitions.
agt_ses_request_close
boolean agt_ses_request_close(ses_cb_t *scb, ses_id_t killedby, ses_term_reason_t termreason)
Start the close of the specified session.
Definition: agt_ses.c:1056
agt_rpc_support_method
void agt_rpc_support_method(const xmlChar *module, const xmlChar *method_name)
mark an RPC method or action as supported within the server
Definition: agt_rpc.c:2637
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
xml_strncmp
int xml_strncmp(const xmlChar *s1, const xmlChar *s2, uint32 maxlen)
String compare for xmlChar for at most 'maxlen' xmlChars.
Definition: xml_util.c:1824
SES_TYP_DUMMY
@ SES_TYP_DUMMY
internal session for rollback, etc.
Definition: ses.h:321
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
agt_cap_add_module
status_t agt_cap_add_module(ncx_module_t *mod)
Add a module at runtime, after the initial set has been set.
Definition: agt_cap.c:858
NCX_AGT_TARG_CAND_RUNNING
@ NCX_AGT_TARG_CAND_RUNNING
TBD.
Definition: ncxtypes.h:358
log_debug
void void void void void void void log_debug(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG log entry.
OP_COPY_CONFIG
@ OP_COPY_CONFIG
copy-config
Definition: op.h:72
NCX_CFGID_RUNNING
@ NCX_CFGID_RUNNING
running datastore (no value for not set!)
Definition: ncxtypes.h:384
agt_sys_send_sysConfirmedCommit
void agt_sys_send_sysConfirmedCommit(const ses_cb_t *scb, ncx_confirm_event_t event, uint32 timeout)
Queue the Confirmed Commit notification.
Definition: agt_sys.c:1648
yangconst.h
Contains YANG constants separated to prevent H file include loops.
OP_EDITOP_COMMIT
@ OP_EDITOP_COMMIT
commit, internal enum
Definition: op.h:129
agt_templates_validate_parm
status_t agt_templates_validate_parm(ses_cb_t *scb, rpc_msg_t *msg, xml_node_t *methnode)
Check for with-template parameter.
Definition: agt_templates.c:394
log_write
void void void log_write(const char *fstr,...) __attribute__((format(printf
Write a new entry to the main log.
rpc_err_clean_errQ
void rpc_err_clean_errQ(dlq_hdr_t *errQ)
Clean all the entries from a Q of rpc_err_rec_t.
Definition: rpc_err.c:545
DUMP_VAL_STDOUT
@ DUMP_VAL_STDOUT
dump val to STDOUT
Definition: val.h:776
NCX_SHUT_RESTART
@ NCX_SHUT_RESTART
called from <restart>
Definition: ncxtypes.h:375
agt_ncx_force_write_config
status_t agt_ncx_force_write_config(const xmlChar *filespec, cfg_template_t *cfg)
Write the specified cfg->root to the the default backup source.
Definition: agt_ncx.c:6131
AGT_CCPARM_PERSIST_ID
@ AGT_CCPARM_PERSIST_ID
persist-id
Definition: agt.h:678
CAP_STDID_CANDIDATE
@ CAP_STDID_CANDIDATE
:candidate:1.0
Definition: cap.h:236
agt.h
Multi-Protocol Network Management Server.
agt_check_save_external_config
status_t agt_check_save_external_config(ncx_display_mode_t encoding, const xmlChar *filespec)
Check if an external NV handler needs to be used to save the config.
Definition: agt.c:4525
AGT_CFG_SET_VALIDATE_DEF
#define AGT_CFG_SET_VALIDATE_DEF(C)
set the validate-only flag
Definition: agt_cfg.h:109
NCX_AGT_START_MIRROR
@ NCX_AGT_START_MIRROR
with-startup=false
Definition: ncxtypes.h:365
val_dump_value_max
void val_dump_value_max(val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, log_debug_t lvl)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5859
ERR_NCX_RUNNING_NOT_VALID
@ ERR_NCX_RUNNING_NOT_VALID
394
Definition: status_enum.h:437
SES_TR_KILLED
@ SES_TR_KILLED
kill-session
Definition: ses.h:390
agt_acm_clean_xpath_cache
void agt_acm_clean_xpath_cache(void)
Clean any cached XPath results because the data rule results may not be valid anymore.
Definition: agt_acm.c:1023
ncx_get_display_mode
ncx_display_mode_t ncx_get_display_mode(void)
Get the current default display mode.
Definition: ncx.c:9816
val_clean_tree
void val_clean_tree(val_value_t *val)
Clear the dirty flag and the operation for all nodes within a value struct.
Definition: val.c:12075
ncx_get_config_state
ncx_config_state_t ncx_get_config_state(void)
Get the config_state flag.
Definition: ncx.c:14979
agt_ncxserver_thread_cancel_cc
boolean agt_ncxserver_thread_cancel_cc(ses_id_t sid, ncx_confirm_event_t event)
Signal confirmed commit cancel to either the thread representing session or, if terminated,...
Definition: agt_ncxserver.c:3203
ERR_NCX_OPERATION_NOT_SUPPORTED
@ ERR_NCX_OPERATION_NOT_SUPPORTED
273
Definition: status_enum.h:314
NCX_MAX_NUMLEN
#define NCX_MAX_NUMLEN
max number len to use for static buffer allocation only
Definition: ncxconst.h:136
agt_val_silcall.h
NETCONF Server database callback handler. SIL callback code.
agt_audit_handle_update_startup
void agt_audit_handle_update_startup(ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *sourcetype, const xmlChar *sourcename)
Create and store an update-startup audit record, if needed.
Definition: agt_audit.c:353
VAL_UINT
#define VAL_UINT(V)
Access the value as an uint32 ONLY if NCX_BT_UINT8, 16, 32.
Definition: val.h:482
NCX_AGT_START_DISTINCT
@ NCX_AGT_START_DISTINCT
with-startup=true
Definition: ncxtypes.h:366
agt_get_cfg_from_parm
status_t agt_get_cfg_from_parm(const xmlChar *parmname, rpc_msg_t *msg, xml_node_t *methnode, cfg_template_t **retcfg)
FUNCTION agt_get_cfg_from_parm.
Definition: agt_util.c:1464
ERR_NCX_FOUND_URL
@ ERR_NCX_FOUND_URL
2005
Definition: status_enum.h:555
cfg_update_stamps
void cfg_update_stamps(cfg_template_t *source, cfg_template_t *dest)
Update the last-modified and last-txid stamps.
Definition: cfg.c:2873
obj_find_child
obj_template_t * obj_find_child(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6116
NCX_NT_OBJ
@ NCX_NT_OBJ
obj_template_t
Definition: ncxtypes.h:277
agt_state_delete_backup_file
void agt_state_delete_backup_file(const xmlChar *filename)
Remove and delete a backup-file entry to the netconf-state DM for the specified file.
Definition: agt_state.c:2711
tstamp_datetime
void tstamp_datetime(xmlChar *buff)
Set the current date and time in an XML dateTime string format.
Definition: tstamp.c:160
agt_ncx_cleanup
void agt_ncx_cleanup(void)
Cleanup the NETCONF Server standard method routines.
Definition: agt_ncx.c:5261
agt_ncx_clear_cc_ses_id
void agt_ncx_clear_cc_ses_id(void)
Clear the confirmed commit session ID.
Definition: agt_ncx.c:5657
agt_cfg_free_transaction
void agt_cfg_free_transaction(agt_cfg_transaction_t *txcb)
Clean and free a agt_cfg_transaction_t struct.
Definition: agt_cfg.c:1278
val_purge_errors_from_root
void val_purge_errors_from_root(val_value_t *val)
Remove any error nodes under a root container that were saved for error recording purposes.
Definition: val_util.c:3342
ncx_str2txid
status_t ncx_str2txid(const xmlChar *str, ncx_transaction_id_t *txid)
Convert a string to a ncx_transaction_id_t.
Definition: ncx.c:12123
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
VAL_BOOL
#define VAL_BOOL(V)
Access the value as a boolean ONLY IF btyp == NCX_BT_BOOLEAN.
Definition: val.h:405
OP_EDITOP_LOAD
@ OP_EDITOP_LOAD
load, internal enum
Definition: op.h:128
agt_ncx_write_config
status_t agt_ncx_write_config(const xmlChar *filespec, cfg_template_t *cfg)
Write the specified cfg->root to the the default backup source.
Definition: agt_ncx.c:6099
val_set_by_default
boolean val_set_by_default(const val_value_t *val)
Check if the value was set by val_add_defaults.
Definition: val.c:12571
NCX_CC_EVENT_EXTEND
@ NCX_CC_EVENT_EXTEND
extend event
Definition: ncxtypes.h:1227
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
AGT_RPC_PH_INVOKE
@ AGT_RPC_PH_INVOKE
(3) cb to invoke the requested method
Definition: agt_rpc.h:118
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
agt_ncx_load.h
NETCONF Server load and unload operations.
agt_sys.h
NETCONF system.yang DM module support.
xmlns_nc_id
xmlns_id_t xmlns_nc_id(void)
Get the ID for the NETCONF namespace or 0 if it doesn't exist.
Definition: xmlns.c:880
agt_cli.h
NETCONF Server Command Line Interface handler.
op_testop_enum
op_testop_t op_testop_enum(const xmlChar *teststr)
Get the enum for the specified op_testop_t string.
Definition: op.c:396
cfg_ok_to_read
status_t cfg_ok_to_read(const cfg_template_t *cfg)
Check if the specified config can be read right now.
Definition: cfg.c:2226
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
agt_set_depth
void agt_set_depth(rpc_msg_t *msg)
Check if the <depth> parameter is set in the request message.
Definition: agt_util.c:4659
log_error_append
void void log_error_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_ERROR log entry.
agt_get_startup_filespec
xmlChar * agt_get_startup_filespec(status_t *res)
Figure out where to store the startup file.
Definition: agt_util.c:4197
rpc_err.h
NETCONF protocol standard error definitions.
NCX_DEF_BACKUP_FILE
#define NCX_DEF_BACKUP_FILE
Default backup config data file name.
Definition: ncxconst.h:481
xml_wr_check_file
status_t xml_wr_check_file(const xmlChar *filespec, val_value_t *val, xml_attrs_t *attrs, boolean docmode, boolean xmlhdr, boolean withns, boolean expand_varexpr, boolean with_owners, int32 startindent, int32 indent, val_nodetest_fn_t testfn)
Write the specified value to a FILE in XML format.
Definition: xml_wr.c:4036
agt_rpc_load_config_file
status_t agt_rpc_load_config_file(const xmlChar *filespec, cfg_template_t *cfg, boolean isload, ses_id_t use_sid, dlq_hdr_t *errQ)
Dispatch an internal <load-config> request.
Definition: agt_rpc.c:3278
ERR_NCX_CFG_NOT_FOUND
@ ERR_NCX_CFG_NOT_FOUND
307
Definition: status_enum.h:350
agt_templates.h
YANG Configuration Templates (yumaworks-templates.yang)
NCX_NT_VAL
@ NCX_NT_VAL
val_value_t
Definition: ncxtypes.h:276
agt_cfg.h
Manage Server configuration edit transactions.
agt_ncx_cc_persist_id
const xmlChar * agt_ncx_cc_persist_id(void)
Get the confirmed commit persist ID.
Definition: agt_ncx.c:5674
val_get_first_child
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
NCX_NT_NONE
@ NCX_NT_NONE
not set
Definition: ncxtypes.h:273
agt_ncx_cancel_confirmed_commit
void agt_ncx_cancel_confirmed_commit(ses_cb_t *scb, ncx_confirm_event_t event)
Cancel the confirmed-commit in progress and rollback to the backup-cfg.xml file.
Definition: agt_ncx.c:5775
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
agt_acm.h
NETCONF Server Access Control Entry Points.
agt_get_inline_cfg_from_parm
status_t agt_get_inline_cfg_from_parm(const xmlChar *parmname, rpc_msg_t *msg, xml_node_t *methnode, val_value_t **retval)
Get the val_value_t node for the inline config element.
Definition: agt_util.c:1601
thd.h
Thread support (for now limited to netconfd)
OP_DELETE_CONFIG
@ OP_DELETE_CONFIG
delete-config
Definition: op.h:73
xml_add_attr
status_t xml_add_attr(xml_attrs_t *attrs, xmlns_id_t ns_id, const xmlChar *attr_name, const xmlChar *attr_val)
add an attribute to an attribute list
Definition: xml_util.c:820
ERR_NCX_MISSING_ELEMENT
@ ERR_NCX_MISSING_ELEMENT
263
Definition: status_enum.h:304
xml_msg_set_cfgid
void xml_msg_set_cfgid(xml_msg_hdr_t *msg, ncx_cfg_t cfgid)
Set the config ID in the message.
Definition: xml_msg.c:1248
agt_state_add_module_schema
status_t agt_state_add_module_schema(ncx_module_t *mod)
Add a schema entry to the netconf-state DM.
Definition: agt_state.c:2510
agt_cfg_force_full_root_check
void agt_cfg_force_full_root_check(agt_cfg_transaction_t *txcb)
Tag this transaction as needing a full root check.
Definition: agt_cfg.c:1770
AGT_SYS_MODULE
#define AGT_SYS_MODULE
older yuma-system module
Definition: agt_sys.h:96
agt_ses_get_session_for_id
ses_cb_t * agt_ses_get_session_for_id(ses_id_t sid)
get the session for the supplied sid
Definition: agt_ses.c:2252
cfg_lock
status_t cfg_lock(cfg_template_t *cfg, ses_id_t locked_by, cfg_source_t lock_src)
Lock the specified config.
Definition: cfg.c:2518
OP_TESTOP_SET
@ OP_TESTOP_SET
set
Definition: op.h:163
AGT_YWSYS_MODULE
#define AGT_YWSYS_MODULE
newerr yumaworks-system module mostly replaces yuma-system
Definition: agt_sys.h:99
agt_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
RPC_DATA_STD
@ RPC_DATA_STD
STD is used by <get> and <get-config> to force a <data> container in the NETCONF namespace.
Definition: rpc.h:162
XML_MSG_WITH_MODTAGS_EMPTY
#define XML_MSG_WITH_MODTAGS_EMPTY(M)
Check if empty module-tags set.
Definition: xml_msg.h:284
cap.h
NETCONF protocol capabilities.
ERR_NCX_PROTO11_NOT_ENABLED
@ ERR_NCX_PROTO11_NOT_ENABLED
379
Definition: status_enum.h:422
NCX_LAYER_CONTENT
@ NCX_LAYER_CONTENT
application layer
Definition: ncxtypes.h:347
agt_val_unload.h
Handle SIL and SIL-SA callbacks for a library unload.
SES_TR_CLOSED
@ SES_TR_CLOSED
close-session
Definition: ses.h:389
agt_timer_get_timenow
void agt_timer_get_timenow(time_t *tnow)
Get the current time using the system or monotonic clock.
Definition: agt_timer.c:457
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
ERR_NCX_ACCESS_DENIED
@ ERR_NCX_ACCESS_DENIED
267
Definition: status_enum.h:308
op_errop_id
op_errop_t op_errop_id(const xmlChar *errstr)
Get the ID for the error-option from its keyword.
Definition: op.c:449
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
agt_val_check_commit_edits
status_t agt_val_check_commit_edits(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *source, cfg_template_t *target)
Check if the requested commit operation would cause any ACM or partial lock violations in the running...
Definition: agt_val.c:13723
TXID_T
#define TXID_T
For convenience.
Definition: ncxtypes.h:550
agt_rpcerr.h
NETCONF protocol <rpc-error> server-side handler.
xml_attrs_t
dlq_hdr_t xml_attrs_t
queue of xml_attr_t
Definition: xml_util.h:151
agt_yp_ha.h
YumaPro High Availability module (YP-HA)
obj.h
Data Object Support.
cfg_get_config_id
cfg_template_t * cfg_get_config_id(ncx_cfg_t cfgid)
Get the config struct from its ID.
Definition: cfg.c:1530
OP_TESTOP_TESTTHENSET
@ OP_TESTOP_TESTTHENSET
test-then-set (default)
Definition: op.h:162
cfg_fill_candidate_from_running
status_t cfg_fill_candidate_from_running(ses_id_t sesid)
Fill the <candidate> config with the config contents of the <running> config.
Definition: cfg.c:1582
TSTAMP_MIN_SIZE
#define TSTAMP_MIN_SIZE
normal minimum buffer size for a tstamp buffer
Definition: tstamp.h:67
SES_MY_SID
#define SES_MY_SID(S)
get session-id
Definition: ses.h:105
agt_set_with_owners
void agt_set_with_owners(rpc_msg_t *msg)
Check if the <with-owners> parameter is set in the request message.
Definition: agt_util.c:4605
agt_val_validate_write
status_t agt_val_validate_write(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, val_value_t *valroot, op_editop_t editop, boolean with_sil_callbacks)
Validate the requested <edit-config> write operation.
Definition: agt_val.c:12983
agt_cfg_set_transaction_commit
void agt_cfg_set_transaction_commit(agt_cfg_transaction_t *txcb)
Tag this transaction as a commit from candidate to running.
Definition: agt_cfg.c:1716
agt_output_empty
status_t agt_output_empty(ses_cb_t *scb, rpc_msg_t *msg, int32 indent)
output no data for the get or get-config operation because the if-modified-since fileter did not pass
Definition: agt_util.c:3055
agt_curl_put
status_t agt_curl_put(const xmlChar *urlspec, const xmlChar *srcspec)
PUT some file via libcurl.
agt_ncx_process_one_loaded_module
status_t agt_ncx_process_one_loaded_module(ses_cb_t *scb, ncx_module_t *mod)
process 1 modules just loaded with load or load-bundle
Definition: agt_ncx.c:6160
val_clone_config_data
val_value_t * val_clone_config_data(const val_value_t *val, status_t *res)
Clone a specified val_value_t struct and sub-trees with config=true only.
Definition: val.c:7903
NCX_DEF_CONFIRM_TIMEOUT
#define NCX_DEF_CONFIRM_TIMEOUT
default conrm-tmieout value in seconds
Definition: ncxconst.h:484
VAL_STR
#define VAL_STR(V)
Access the value as a string ONLY if typ_is_string() is true.
Definition: val.h:464
agt_timer.h
Handle timer services for the server.
ncx_get_next_module
ncx_module_t * ncx_get_next_module(const ncx_module_t *mod)
Get the next module in the ncx_modQ.
Definition: ncx.c:4751
agt_ncx_do_lock_validate
status_t agt_ncx_do_lock_validate(cfg_template_t *cfg)
lock : validate params common callback
Definition: agt_ncx.c:6698
ses_free_scb
void ses_free_scb(ses_cb_t *scb)
Free a session control block.
Definition: ses.c:2221
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
ERR_NCX_DATA_MISSING
@ ERR_NCX_DATA_MISSING
272
Definition: status_enum.h:313
thd_find_tcb_by_capability
thd_tcb_t * thd_find_tcb_by_capability(uint cap)
Find a TCB supporting the specified capability.
Definition: thd.c:791
xmlns_ncx_id
xmlns_id_t xmlns_ncx_id(void)
Get the ID for the NETCONF Extensions namespace or 0 if it doesn't exist.
Definition: xmlns.c:897
cap_make_moduri
xmlChar * cap_make_moduri(ncx_module_t *mod)
Malloc and construct a module URI for the specified module make the module URI string (for sysCapabil...
Definition: cap.c:2779
OP_CLOSE_SESSION
@ OP_CLOSE_SESSION
close-session
Definition: op.h:77
ERR_NCX_FOUND_INLINE
@ ERR_NCX_FOUND_INLINE
2004
Definition: status_enum.h:554
LOGERROR
#define LOGERROR
Check if at least log-level=error.
Definition: log.h:269
OP_EDIT_CONFIG
@ OP_EDIT_CONFIG
edit-config
Definition: op.h:71
val_free_value
void val_free_value(val_value_t *val)
Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct it...
Definition: val.c:2842
NCX_PROTO_NETCONF10
@ NCX_PROTO_NETCONF10
RFC 4741 base:1.0
Definition: ncxtypes.h:783
status.h
Global error messages for status code enumerations.
agt_curl_get
status_t agt_curl_get(const xmlChar *urlspec, const xmlChar *savespec)
GET some file via libcurl.
agt_cap_update_module_setid
status_t agt_cap_update_module_setid(void)
Update YANG-LIBRARY capability module setID.
Definition: agt_cap.c:1175
NCX_DISPLAY_MODE_XML
@ NCX_DISPLAY_MODE_XML
XML display mode.
Definition: ncxtypes.h:460
agt_commit_complete
status_t agt_commit_complete(rpc_msg_t *msg, agt_commit_type_t commit_type)
Complete a commit operation.
Definition: agt_commit_complete.c:252
y_yumaworks_event_filter_check_module
void y_yumaworks_event_filter_check_module(ncx_module_t *mod)
Check if the specified module that was just loaded has any notifications that are configured to be di...
Definition: y_yumaworks_event_filter.c:521
tstamp_diff
long int tstamp_diff(struct timeval *start_time, struct timeval *end_time, long int *usec)
Get the elapsed time between two timeval structs.
Definition: tstamp.c:612
OP_TESTOP_NONE
@ OP_TESTOP_NONE
not set
Definition: op.h:161
agt_get_filespec_from_url
xmlChar * agt_get_filespec_from_url(const xmlChar *urlstr, status_t *res)
Check the URL and get the filespec part out of it.
Definition: agt_util.c:1839
agt_val_silcall_run_validate_callbacks
status_t agt_val_silcall_run_validate_callbacks(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, op_editop_t editop)
Run the validate SIL callbacks for the transaction in progress.
Definition: agt_val_silcall.c:2175
agt_ncx_check_restconf_cc_timeout
void agt_ncx_check_restconf_cc_timeout(void)
Check if a confirmed-commit has timed out, and needs to be canceled.
Definition: agt_ncx.c:5729
AGT_CCPARM_PERSIST
@ AGT_CCPARM_PERSIST
persist
Definition: agt.h:677
ncx_set_config_state
void ncx_set_config_state(ncx_config_state_t val)
Set the config_state flag.
Definition: ncx.c:14962
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
cfg_ok_to_unlock
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 ...
Definition: cfg.c:2165
ERR_NCX_NO_ACCESS_STATE
@ ERR_NCX_NO_ACCESS_STATE
302
Definition: status_enum.h:345
agt_check_save
boolean agt_check_save(xml_msg_hdr_t *mhdr, ncx_withdefaults_t withdef, boolean realtest, val_value_t *node)
Used by agt_ncx_cfg_save function to filter just what is supposed to be saved in the <startup> config...
Definition: agt_util.c:2788
thd_find_tcb_by_sid
thd_tcb_t * thd_find_tcb_by_sid(ses_id_t sid, boolean strict)
Lookup TCB by session ID.
Definition: thd.c:704
ncx_transaction_id_t
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:548
NCX_DEF_INDENT
#define NCX_DEF_INDENT
default indent amount for nesting XML or other structured output
Definition: ncxconst.h:441