yumapro  23.10T-12
YumaPro SDK
Loading...
Searching...
No Matches

Core callbacks and hooks used in the server. More...

Collaboration diagram for Core Functions:

Functions

status_t agt_cb_init (void)
 Init the server callback module. More...
 
void agt_cb_cleanup (void)
 Cleanup the server callback module. More...
 
status_t agt_cb_register_callback (const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_cb_fn_t cbfn)
 Register an object specific edit callback function use the same fn for all callback phases all phases will be invoked. More...
 
status_t agt_cb_register_edit2_callback (const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_cb_fn_t cbfn)
 Register an object specific edit2 callback function. More...
 
status_t agt_cb_register_edit3_callback (const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_edit3_fn_t edit3_cbfn)
 Register an object specific edit3 callback function. More...
 
status_t agt_cb_register_xpath_callback (const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, xpath_bool_eval_fn_t cbfn)
 Register an object specific XPath callback function. More...
 
void agt_cb_unregister_callbacks (const xmlChar *modname, const xmlChar *defpath)
 Unregister all EDIT callback functions for a specific object. More...
 
status_t agt_cb_register_get_callback (const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, getcb_fn2_t get_cbfn)
 Register an object specific GET callback function. More...
 
status_t agt_cb_hook_register (const xmlChar *defpath, agt_hook_fmt_t format, agt_hook_type_t type, agt_cb_hook_t cbfn)
 Register an object specific Hook callback function. More...
 
void agt_cb_hook_unregister (const xmlChar *defpath)
 Unregister a Hook callback. More...
 
status_t agt_cb_order_hook_register (const xmlChar *defpath, agt_cb_order_hook_t cbfn)
 Register an object specific Set-Order-Hook callback function. More...
 
void agt_cb_order_hook_unregister (const xmlChar *defpath)
 Unregister a Set-Order-Hook callback. More...
 
status_t agt_cb_trans_start_register (agt_cb_trans_start_t cbfn)
 Register a Transaction Start callback. More...
 
status_t agt_cb_trans_complete_register (agt_cb_trans_complete_t cbfn)
 Register a Transaction Complete callback. More...
 
void agt_cb_trans_start_unregister (agt_cb_trans_start_t cbfn)
 Unregister a Transaction Start callback. More...
 
void agt_cb_trans_complete_unregister (agt_cb_trans_complete_t cbfn)
 Unregister a Transaction Complete callback. More...
 
status_t agt_cb_run_trans_start (ses_cb_t *scb, agt_cfg_transaction_t *txcb, boolean isvalidate, boolean isrollback, boolean isrunning, boolean no_silsa_cb)
 Run Transaction start callbacks. More...
 
void agt_cb_run_trans_complete (agt_cfg_transaction_t *txcb)
 Run Transaction Complete callbacks. More...
 
status_t agt_cb_sa_trans_start_register (agt_cb_sa_trans_start_t cbfn)
 Register a Transaction Start callback. More...
 
status_t agt_cb_sa_trans_complete_register (agt_cb_sa_trans_complete_t cbfn)
 Register a Transaction Complete callback. More...
 
void agt_cb_sa_trans_start_unregister (agt_cb_sa_trans_start_t cbfn)
 Uregister a Transaction Start callback. More...
 
void agt_cb_sa_trans_complete_unregister (agt_cb_sa_trans_complete_t cbfn)
 Uregister a Transaction Complete callback. More...
 
status_t agt_cb_invoke_trans_start_cb (const xmlChar *transaction_id, boolean isvalidate, boolean isrollback, boolean isrunning)
 Invoke Transaction start callbacks. More...
 
void agt_cb_invoke_trans_complete (const xmlChar *transaction_id)
 Invoke Transaction Complete callbacks. More...
 
void agt_cb_sa_run_trans_complete (const xmlChar *transaction_id)
 This function simply calls agt_sil_transaction_complete_cb, which makes a <server-event> message and sends it to the subsystem. More...
 
status_t agt_cb_register_subsys_callback (const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, const xmlChar *subsys_id, agt_cb_calltype_t calltype)
 Register an object specific callback function. More...
 
void agt_cb_unregister_subsys_callback (const xmlChar *subsys_id, const xmlChar *modname, const xmlChar *defpath, const xmlChar *revision)
 Unregister remote subsystem callback for a specific object. More...
 
status_t agt_cb_make_register_msg (obj_template_t *request_obj, val_value_t *request_val, obj_template_t *register_obj, obj_template_t *module_obj, obj_template_t *revision_obj, obj_template_t *path_obj, obj_template_t *get_path_obj, obj_template_t *rpc_name_obj, obj_template_t *action_path_obj, obj_template_t *post_sethook_path_obj, obj_template_t *sethook_list, obj_template_t *txhook_list, obj_template_t *edit2_path_obj, obj_template_t *edit3_path_obj, boolean *any_rw_objs)
 Make a subsystem register message. More...
 
boolean agt_cb_obj_has_edit_callback (obj_template_t *obj)
 Check if the specified object has a local edit callback. More...
 
boolean agt_cb_obj_has_get_callback (obj_template_t *obj)
 Check if the specified object has a local get2 callback. More...
 
status_t agt_cb_skip_leafref_validation (const xmlChar *defpath)
 Set a previously registered callback as a node that the server should skip leafref validation in order to save processing time. More...
 
status_t agt_cb_set_sil_priority (const xmlChar *defpath, uint8 sil_priority)
 Set the desired SIL priority with a callback instead of using the YANG extension for this purpose. More...
 
status_t agt_cb_validate_complete_register (agt_cb_validate_complete_t cbfn)
 Register a Validate Complete callback. More...
 
status_t agt_cb_startup_hook_register (agt_cb_startup_hook_t cbfn)
 Register a Startup Hook callback. More...
 
void agt_cb_startup_hook_unregister (agt_cb_startup_hook_t cbfn)
 Unregister a Startup Hook callback. More...
 
void agt_cb_validate_complete_unregister (agt_cb_validate_complete_t cbfn)
 Unregister a Validate Complete callback. More...
 
status_t agt_cb_apply_complete_register (agt_cb_apply_complete_t cbfn)
 Register a Apply Complete callback. More...
 
void agt_cb_apply_complete_unregister (agt_cb_apply_complete_t cbfn)
 Unregister a Apply Complete callback. More...
 
status_t agt_cb_rollback_complete_register (agt_cb_rollback_complete_t cbfn)
 Register a Rollback Complete callback. More...
 
void agt_cb_rollback_complete_unregister (agt_cb_rollback_complete_t cbfn)
 Unregister a Rollback Complete callback. More...
 
status_t agt_cb_run_validate_complete (ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running, boolean epc_only)
 Run Validate Complete callbacks. More...
 
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. More...
 
status_t agt_cb_run_apply_complete (ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running, boolean epc_only)
 Run Apply Complete callbacks. More...
 
status_t agt_cb_run_rollback_complete (ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running, boolean epc_only)
 Run Rollback Complete callbacks. More...
 
status_t agt_cb_command_complete_register (agt_cb_command_complete_t cbfn)
 Register a Command Complete callback. More...
 
void agt_cb_run_command_complete (ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *command_modname, const xmlChar *command_name)
 Run Command Complete callbacks. More...
 
void agt_cb_command_complete_unregister (agt_cb_command_complete_t cbfn)
 Unregister a Command Complete callback. More...
 
status_t agt_cb_shutdown_register (agt_cb_shutdown_t cbfn)
 Register a Shutdown callback. More...
 
void agt_cb_shutdown_unregister (agt_cb_shutdown_t cbfn)
 Unregister a Shutdown callback. More...
 
void agt_cb_run_shutdown (void)
 Run Shutdown callbacks. More...
 
status_t agt_cb_post_sethook_register (const xmlChar *defpath, agt_cb_hook_t cbfn)
 Register an object specific Post Set Hook callback function. More...
 
void agt_cb_post_sethook_unregister (const xmlChar *defpath)
 Unregister a Post Set Hook callback. More...
 
status_t agt_cb_session_hook_register (agt_cb_session_hook_t cbfn)
 Register a Session Hook callback. More...
 
void agt_cb_session_hook_unregister (agt_cb_session_hook_t cbfn)
 Unregister a Session Hook callback. More...
 
void agt_cb_run_session_hook (ncx_ses_event_t ses_event, const ses_cb_t *scb)
 Run Session Hook callbacks. More...
 
status_t agt_cb_def_hook_register (const xmlChar *defpath, ncx_def_hook_cbfn_t cbfn)
 Register an object specific Dynamic Default callback function to enable custom default value setup for a specified node. More...
 
void agt_cb_def_hook_unregister (const xmlChar *defpath)
 Unregister Dynamic Default callback functions for a specific object. More...
 
status_t agt_cb_sa_hook_register (const xmlChar *defpath, agt_hook_fmt_t format, agt_hook_type_t type, agt_cb_sa_hook_t cbfn)
 Register an object specific Hook callback function. More...
 
void agt_cb_sa_hook_unregister (const xmlChar *defpath)
 Unregister a SIL-SA Hook SIL-SA callback. More...
 
status_t agt_cb_sa_post_sethook_register (const xmlChar *defpath, agt_cb_sa_hook_t cbfn)
 Register an object specific SIL-SA Post Set Hook callback function. More...
 
void agt_cb_sa_post_sethook_unregister (const xmlChar *defpath)
 Unregister a SIL-SA Post Set Hook callback. More...
 
void agt_cb_unload_module (const xmlChar *modname)
 Remove the modhdr for the specified module since it is being unloaded from the server or subsystem. More...
 
status_t agt_cb_sa_validate_complete_register (agt_cb_sa_validate_complete_t cbfn)
 Register a SIL-SA Validate Complete callback. More...
 
void agt_cb_sa_validate_complete_unregister (agt_cb_sa_validate_complete_t cbfn)
 Unregister a SIL-SA Validate Complete callback. More...
 
status_t agt_cb_sa_apply_complete_register (agt_cb_sa_apply_complete_t cbfn)
 Register a SIL-SA Apply Complete callback. More...
 
void agt_cb_sa_apply_complete_unregister (agt_cb_sa_apply_complete_t cbfn)
 Unregister a SIL-SA Apply Complete callback. More...
 
status_t agt_cb_sa_commit_complete_register (agt_cb_sa_commit_complete_t cbfn)
 Register a SIL-SA Commit Complete callback. More...
 
void agt_cb_sa_commit_complete_unregister (agt_cb_sa_commit_complete_t cbfn)
 Unregister a SIL-SA Commit Complete callback. More...
 
status_t agt_cb_sa_rollback_complete_register (agt_cb_sa_rollback_complete_t cbfn)
 Register a SIL-SA Rollback Complete callback. More...
 
void agt_cb_sa_rollback_complete_unregister (agt_cb_sa_rollback_complete_t cbfn)
 Unregister a SIL-SA Rollback Complete callback. More...
 
status_t agt_cb_sa_run_commit_completeness_cb (const xmlChar *transaction_id, agt_cbtyp_t cbtyp, agt_commit_type_t commit_type)
 Run SIL-SA Commit Completeness callbacks. More...
 
status_t agt_cb_edit_phase_complete_register (agt_cb_edit_phase_complete_t cbfn)
 Register an Edit Phase Complete callback. More...
 
void agt_cb_edit_phase_complete_unregister (agt_cb_edit_phase_complete_t cbfn)
 Unregister an Edit Phase Complete callback. More...
 
status_t agt_cb_sa_edit_phase_complete_register (agt_cb_sa_edit_phase_complete_t cbfn)
 Register a SIL-SA Edit Phase Complete callback. More...
 
void agt_cb_sa_edit_phase_complete_unregister (agt_cb_sa_edit_phase_complete_t cbfn)
 Unregister a SIL-SA Edit Phase Complete callback. More...
 
boolean agt_cb_any_edit_phase_complete (void)
 Return true if any edit phase complete callbacks registered. More...
 
status_t agt_cb_run_epc_commit_complete (ses_cb_t *scb, rpc_msg_t *msg, val_value_t *source, val_value_t *target)
 agt_cb_run_epc_commit_complete More...
 

Detailed Description

Core callbacks and hooks used in the server.

TBD: split each hook into its own section.

Function Documentation

◆ agt_cb_any_edit_phase_complete()

boolean agt_cb_any_edit_phase_complete ( void  )

Return true if any edit phase complete callbacks registered.

Returns
TRUE if any EPC callbacks registered

◆ agt_cb_apply_complete_register()

status_t agt_cb_apply_complete_register ( agt_cb_apply_complete_t  cbfn)

Register a Apply Complete callback.

This function registers a Apply Complete callback that will be called right after Apply Phase has been processed during the <commit>

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_apply_complete_unregister()

void agt_cb_apply_complete_unregister ( agt_cb_apply_complete_t  cbfn)

Unregister a Apply Complete callback.

This function unregisters a Apply Complete callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function:

◆ agt_cb_cleanup()

void agt_cb_cleanup ( void  )

Cleanup the server callback module.

Called by the server during shutdown

Here is the call graph for this function:

◆ agt_cb_command_complete_register()

status_t agt_cb_command_complete_register ( agt_cb_command_complete_t  cbfn)

Register a Command Complete callback.

Max Callbacks: No limit (except available heap memory)

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_command_complete_unregister()

void agt_cb_command_complete_unregister ( agt_cb_command_complete_t  cbfn)

Unregister a Command Complete callback.

This function unregisters a Command Complete callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function:

◆ agt_cb_def_hook_register()

status_t agt_cb_def_hook_register ( const xmlChar *  defpath,
ncx_def_hook_cbfn_t  cbfn 
)

Register an object specific Dynamic Default callback function to enable custom default value setup for a specified node.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callbacks
cbfnaddress of callback function to use for Dynamic Default callbacks
Returns
status
Here is the call graph for this function:

◆ agt_cb_def_hook_unregister()

void agt_cb_def_hook_unregister ( const xmlChar *  defpath)

Unregister Dynamic Default callback functions for a specific object.

Parameters
defpathdefinition XPath location
Here is the call graph for this function:

◆ agt_cb_edit_phase_complete_register()

status_t agt_cb_edit_phase_complete_register ( agt_cb_edit_phase_complete_t  cbfn)

Register an Edit Phase Complete callback.

This function registers an Edit Phase Complete callback that will be called right after each Edit Phase has been processed during an edit transaction.

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_edit_phase_complete_unregister()

void agt_cb_edit_phase_complete_unregister ( agt_cb_edit_phase_complete_t  cbfn)

Unregister an Edit Phase Complete callback.

This function unregisters an Edit Phase Complete callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function:

◆ agt_cb_hook_register()

status_t agt_cb_hook_register ( const xmlChar *  defpath,
agt_hook_fmt_t  format,
agt_hook_type_t  type,
agt_cb_hook_t  cbfn 
)

Register an object specific Hook callback function.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback
formatdifferent hook formats dictates specific hook functionality
typedifferent hook types dictates hook invocation point
cbfnaddress of callback function to use for all callback phases
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_hook_unregister()

void agt_cb_hook_unregister ( const xmlChar *  defpath)

Unregister a Hook callback.

This function unregisters a Hook callback.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback
Here is the call graph for this function:

◆ agt_cb_init()

status_t agt_cb_init ( void  )

Init the server callback module.

Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_invoke_trans_complete()

void agt_cb_invoke_trans_complete ( const xmlChar *  transaction_id)

Invoke Transaction Complete callbacks.

This function simply calls each registered trans_complete callbacks. This does not return any status even if a callback function fails. This API is available only for SIL-SA Subsystem

Parameters
transaction_idid of the transaction control block in progress
Here is the call graph for this function:

◆ agt_cb_invoke_trans_start_cb()

status_t agt_cb_invoke_trans_start_cb ( const xmlChar *  transaction_id,
boolean  isvalidate,
boolean  isrollback,
boolean  isrunning 
)

Invoke Transaction start callbacks.

This function will invoke each registered trans_start callbacks. If a Transaction start operation fails the status of the failing operation is returned immediately and no further trans_start callbacks are made. This API is available only for SIL-SA Subsystem

Parameters
transaction_idtransaction ID in progress
isvalidateTRUE if this is Transaction is for Validate
isrollbackTRUE if this is Transaction for Rollback or Load
isrunningTRUE if running datastore is being modified
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_make_register_msg()

status_t agt_cb_make_register_msg ( obj_template_t request_obj,
val_value_t request_val,
obj_template_t register_obj,
obj_template_t module_obj,
obj_template_t revision_obj,
obj_template_t path_obj,
obj_template_t get_path_obj,
obj_template_t rpc_name_obj,
obj_template_t action_path_obj,
obj_template_t post_sethook_path_obj,
obj_template_t sethook_list,
obj_template_t txhook_list,
obj_template_t edit2_path_obj,
obj_template_t edit3_path_obj,
boolean *  any_rw_objs 
)

Make a subsystem register message.

Used only in the SIL-SA subsystem.

Walk the register entries; Used by the sil_sa code to generate a SIL-SA <register-request> message

Parameters
request_objobject template <register-request> container
request_valadd the register message as a child of this value
register_objobject template for the register message
module_objmodule object used in register message
revision_objmodule object used in register message
path_objpath object used in register message
get_path_objget_path object used in register message
rpc_name_objrpc name object used in register message
action_path_objobject used in register message
post_sethook_path_objobject used in register message
sethook_listobject used in register message
txhook_listobject used in register message
edit2_path_objobject used in register message
edit3_path_objobject used in register message
[out]any_rw_objsaddress of any RW objects flag
*any_rw_objs any RW objects flag
Returns
status
Here is the call graph for this function:

◆ agt_cb_obj_has_edit_callback()

boolean agt_cb_obj_has_edit_callback ( obj_template_t obj)

Check if the specified object has a local edit callback.

Parameters
objobject to check
Returns
TRUE if cbset.cbfn or edit3_cbfn set; FALSE if not

◆ agt_cb_obj_has_get_callback()

boolean agt_cb_obj_has_get_callback ( obj_template_t obj)

Check if the specified object has a local get2 callback.

Parameters
objobject to check
Returns
TRUE if cbset.get_cbfn set; FALSE if not

◆ agt_cb_order_hook_register()

status_t agt_cb_order_hook_register ( const xmlChar *  defpath,
agt_cb_order_hook_t  cbfn 
)

Register an object specific Set-Order-Hook callback function.

Needs to be registered for the list object that will be 2nd-ordered Will not be called for subtree list nodes

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback
cbfnaddress of callback function to use for all callback phases
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_order_hook_unregister()

void agt_cb_order_hook_unregister ( const xmlChar *  defpath)

Unregister a Set-Order-Hook callback.

This function unregisters a Set-Order-Hook callback.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback
Here is the call graph for this function:

◆ agt_cb_post_sethook_register()

status_t agt_cb_post_sethook_register ( const xmlChar *  defpath,
agt_cb_hook_t  cbfn 
)

Register an object specific Post Set Hook callback function.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback
cbfnaddress of callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_post_sethook_unregister()

void agt_cb_post_sethook_unregister ( const xmlChar *  defpath)

Unregister a Post Set Hook callback.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback unregister
Here is the call graph for this function:

◆ agt_cb_register_callback()

status_t agt_cb_register_callback ( const xmlChar *  modname,
const xmlChar *  defpath,
const xmlChar *  version,
agt_cb_fn_t  cbfn 
)

Register an object specific edit callback function use the same fn for all callback phases all phases will be invoked.

Parameters
modnamemodule that defines the target object for these callback functions
defpathXpath with default (or no) prefixes defining the object that will get the callbacks
versionexact module revision date expected if condition not met then an error will be logged (TBD: force unload of module!)
NULL means use any version of the module
cbfnaddress of callback function to use for all callback phases
Returns
status
Here is the caller graph for this function:

◆ agt_cb_register_edit2_callback()

status_t agt_cb_register_edit2_callback ( const xmlChar *  modname,
const xmlChar *  defpath,
const xmlChar *  version,
agt_cb_fn_t  cbfn 
)

Register an object specific edit2 callback function.

Use the same fn for all callback phases all phases will be invoked

Only Callbacks for containers and lists are allowed in edit2 mode; Top Level Terminal Nodes are NOT SUPPORTED in edit2 mode

Parameters
modnamemodule that defines the target object for these callback functions
defpathXpath with default (or no) prefixes defining the object that will get the callbacks
versionexact module revision date expected if condition not met then an error will be logged (TBD: force unload of module!)
NULL means use any version of the module
cbfnaddress of callback function to use for all callback phases
Returns
status
Here is the caller graph for this function:

◆ agt_cb_register_edit3_callback()

status_t agt_cb_register_edit3_callback ( const xmlChar *  modname,
const xmlChar *  defpath,
const xmlChar *  version,
agt_edit3_fn_t  edit3_cbfn 
)

Register an object specific edit3 callback function.

Use the same fn for all callback phases all phases will be invoked

Only Callbacks for containers and lists are allowed in edit3 mode; Top Level Terminal Nodes are NOT SUPPORTED in edit3 mode

Parameters
modnamemodule that defines the target object for these callback functions
defpathXpath with default (or no) prefixes defining the object that will get the callbacks
versionexact module revision date expected if condition not met then an error will be logged (TBD: force unload of module!)
NULL means use any version of the module
edit3_cbfnaddress of callback function to use for all callback phases
Returns
status

◆ agt_cb_register_get_callback()

status_t agt_cb_register_get_callback ( const xmlChar *  modname,
const xmlChar *  defpath,
const xmlChar *  version,
getcb_fn2_t  get_cbfn 
)

Register an object specific GET callback function.

Use the same fn for all callback phases all phases will be invoked

Parameters
modnamemodule that defines the target object for these callback functions
defpathXpath with default (or no) prefixes defining the object that will get the callbacks
versionexact module revision date expected if condition not met then an error will be logged (TBD: force unload of module!)
NULL means use any version of the module
get_cbfnaddress of callback function to use for GET callbacks
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_register_subsys_callback()

status_t agt_cb_register_subsys_callback ( const xmlChar *  modname,
const xmlChar *  defpath,
const xmlChar *  version,
const xmlChar *  subsys_id,
agt_cb_calltype_t  calltype 
)

Register an object specific callback function.

setup array of callbacks, could be different or NULL to skip that phase

Parameters
modnamemodule that defines the target object for the remote callback functions
defpathXpath with default (or no) prefixes defining the object that will get the callbacks
versionexact module revision date expected if condition not met then an error will be logged (TBD: force unload of module!)
NULL means use any version of the module
subsys_idsubsystem ID registering the remote callback fn
calltypesubsystem callback call type enumeration
Returns
status
Here is the call graph for this function:

◆ agt_cb_register_xpath_callback()

status_t agt_cb_register_xpath_callback ( const xmlChar *  modname,
const xmlChar *  defpath,
const xmlChar *  version,
xpath_bool_eval_fn_t  cbfn 
)

Register an object specific XPath callback function.

Use the same fn for all must/when stmts for the object Function must return ERR_NCX_SKIPPED if invoked for an unsupported expression.

Parameters
modnamemodule that defines the target object for these callback functions
defpathXpath with default (or no) prefixes defining the object that will get the callbacks
versionexact module revision date expected if condition not met then an error will be logged (TBD: force unload of module!)
NULL means use any version of the module
cbfnaddress of callback function to use
Returns
status
Here is the call graph for this function:

◆ agt_cb_rollback_complete_register()

status_t agt_cb_rollback_complete_register ( agt_cb_rollback_complete_t  cbfn)

Register a Rollback Complete callback.

This function registers a Rollback Complete callback that will be called right after and if Rollback Phase has been processed during the <commit>

Max Callbacks: No limit (except available heap memory)

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_rollback_complete_unregister()

void agt_cb_rollback_complete_unregister ( agt_cb_rollback_complete_t  cbfn)

Unregister a Rollback Complete callback.

This function unregisters a Rollback Complete callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function:

◆ agt_cb_run_apply_complete()

status_t agt_cb_run_apply_complete ( ses_cb_t scb,
rpc_msg_t msg,
val_value_t candidate,
val_value_t running,
boolean  epc_only 
)

Run Apply Complete callbacks.

This function simply calls each registered apply complete callbacks.

If Apply Complete fails the status of the failing callback is returned immediately and no further callbacks are made. The server will start full Rollback.

Parameters
scbsession control block making the request
msgincoming rpc_msg_t in progress
candidatecandidate val_value_t for the config database to use
runningrunning val_value_t for the config database to use
epc_onlyTRUE for edit phase complete only; FALSE for all
Returns
the status of the callback
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_run_command_complete()

void agt_cb_run_command_complete ( ses_cb_t scb,
rpc_msg_t msg,
const xmlChar *  command_modname,
const xmlChar *  command_name 
)

Run Command Complete callbacks.

This function simply calls each registered Command complete callbacks.

Parameters
scbsession control block making the request
msgincoming rpc_msg_t in progress
command_modnamecommand module name
command_namecommand_name
Here is the call graph for this function:

◆ agt_cb_run_epc_commit_complete()

status_t agt_cb_run_epc_commit_complete ( ses_cb_t scb,
rpc_msg_t msg,
val_value_t source,
val_value_t target 
)

agt_cb_run_epc_commit_complete

Run Commit Complete for the Edit Phase Complete callbacks only. Does not handle legacy callbacks. That is done is agt_commit_complete.c

Parameters
scbsession control block making the request
msgincoming rpc_msg_t in progress
sourcecandidate val_value_t for the config database to use
targetrunning val_value_t for the config database to use
Returns
the status of the callback
Here is the caller graph for this function:

◆ agt_cb_run_rollback_complete()

status_t agt_cb_run_rollback_complete ( ses_cb_t scb,
rpc_msg_t msg,
val_value_t candidate,
val_value_t running,
boolean  epc_only 
)

Run Rollback Complete callbacks.

This function simply calls each registered Rollback complete callbacks.

If Rollback Complete fails the status of the failing callback is returned immediately and no further callbacks are made.

Parameters
scbsession control block making the request
msgincoming rpc_msg_t in progress
candidatecandidate val_value_t for the config database to use
runningrunning val_value_t for the config database to use
epc_onlyTRUE for edit phase complete only; FALSE for all
Returns
the status of the callback
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_run_session_hook()

void agt_cb_run_session_hook ( ncx_ses_event_t  ses_event,
const ses_cb_t scb 
)

Run Session Hook callbacks.

This function simply calls each registered Session Hook callbacks.

Parameters
ses_eventsession event type
scbsession control block
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_run_shutdown()

void agt_cb_run_shutdown ( void  )

Run Shutdown callbacks.

This function simply calls each registered Shutdown callbacks. Called by the server during shutdown.

Here is the call graph for this function:

◆ 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.

This function simply calls each registered startup_hook callbacks. If a Startup Hook operation fails the status of the failing operation is returned immediately and no further startup_hook callbacks are made.

Parameters
scbsession control block making the request
msgincoming rpc_msg_t in progress
source_configdatastore which is being copied
target_configdatastore that is being edited
Returns
the status of the operation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_run_trans_complete()

void agt_cb_run_trans_complete ( agt_cfg_transaction_t txcb)

Run Transaction Complete callbacks.

This function simply calls each registered trans_complete callbacks. This does not return any status even if a callback function fails.

Parameters
txcbtransaction control block in progress
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_run_trans_start()

status_t agt_cb_run_trans_start ( ses_cb_t scb,
agt_cfg_transaction_t txcb,
boolean  isvalidate,
boolean  isrollback,
boolean  isrunning,
boolean  no_silsa_cb 
)

Run Transaction start callbacks.

This function simply calls each registered trans_start callbacks. If a Transaction start operation fails the status of the failing operation is returned immediately and no further trans_start callbacks are made.

Parameters
scbsession to use
txcbtransaction control block in progress
isvalidateTRUE if this is Transaction is for Validate
isrollbackTRUE if this is Transaction for Rollback or Load
isrunningTRUE if running datastore is being modified
no_silsa_cbTRUE to skip start transaction callback for SIL-SA
Returns
the status of the operation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_run_validate_complete()

status_t agt_cb_run_validate_complete ( ses_cb_t scb,
rpc_msg_t msg,
val_value_t candidate,
val_value_t running,
boolean  epc_only 
)

Run Validate Complete callbacks.

This function simply calls each registered validate complete callbacks.

If Validate Complete fails the status of the failing callback is returned immediately and no further callbacks are made. The server will abort the commit.

Parameters
scbsession control block making the request
msgincoming rpc_msg_t in progress
candidatecandidate val_value_t for the config database to use
runningrunning val_value_t for the config database to use
epc_onlyTRUE for edit phase complete only; FALSE for all
Returns
the status of the callback
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_sa_apply_complete_register()

status_t agt_cb_sa_apply_complete_register ( agt_cb_sa_apply_complete_t  cbfn)

Register a SIL-SA Apply Complete callback.

This function registers a SIL-SA Apply Complete callback that will be called after the Validation phase has been processed during the <commit>.

Parameters
cbfnaddress of SIL-SA callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_sa_apply_complete_unregister()

void agt_cb_sa_apply_complete_unregister ( agt_cb_sa_apply_complete_t  cbfn)

Unregister a SIL-SA Apply Complete callback.

This function unregisters a SIL-SA Apply Complete callback.

Parameters
cbfnaddress of SIL-SA callback function to use
Here is the call graph for this function:

◆ agt_cb_sa_commit_complete_register()

status_t agt_cb_sa_commit_complete_register ( agt_cb_sa_commit_complete_t  cbfn)

Register a SIL-SA Commit Complete callback.

This function registers a SIL-SA Commit Complete callback that will be called after the Validation phase has been processed during the <commit>.

Parameters
cbfnaddress of SIL-SA callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_sa_commit_complete_unregister()

void agt_cb_sa_commit_complete_unregister ( agt_cb_sa_commit_complete_t  cbfn)

Unregister a SIL-SA Commit Complete callback.

This function unregisters a SIL-SA Commit Complete callback.

Parameters
cbfnaddress of SIL-SA callback function to use
Here is the call graph for this function:

◆ agt_cb_sa_edit_phase_complete_register()

status_t agt_cb_sa_edit_phase_complete_register ( agt_cb_sa_edit_phase_complete_t  cbfn)

Register a SIL-SA Edit Phase Complete callback.

This function registers a SIL-SA Edit Phase Complete callback that will be called after each edit transaction phase has been processed during an edit transaction.

Parameters
cbfnaddress of SIL-SA callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_sa_edit_phase_complete_unregister()

void agt_cb_sa_edit_phase_complete_unregister ( agt_cb_sa_edit_phase_complete_t  cbfn)

Unregister a SIL-SA Edit Phase Complete callback.

This function unregisters a SIL-SA Edit Phase Complete callback.

Parameters
cbfnaddress of SIL-SA callback function to use
Here is the call graph for this function:

◆ agt_cb_sa_hook_register()

status_t agt_cb_sa_hook_register ( const xmlChar *  defpath,
agt_hook_fmt_t  format,
agt_hook_type_t  type,
agt_cb_sa_hook_t  cbfn 
)

Register an object specific Hook callback function.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback
formatdifferent hook formats dictates specific hook functionality
typedifferent hook types dictates hook invocation point
cbfnaddress of SIL-SA callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_sa_hook_unregister()

void agt_cb_sa_hook_unregister ( const xmlChar *  defpath)

Unregister a SIL-SA Hook SIL-SA callback.

This function unregisters a Hook callback.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback
Here is the call graph for this function:

◆ agt_cb_sa_post_sethook_register()

status_t agt_cb_sa_post_sethook_register ( const xmlChar *  defpath,
agt_cb_sa_hook_t  cbfn 
)

Register an object specific SIL-SA Post Set Hook callback function.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback
cbfnaddress of SIL-SA callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_sa_post_sethook_unregister()

void agt_cb_sa_post_sethook_unregister ( const xmlChar *  defpath)

Unregister a SIL-SA Post Set Hook callback.

Parameters
defpathXpath with default (or no) prefixes defining the object that will get the callback unregister
Here is the call graph for this function:

◆ agt_cb_sa_rollback_complete_register()

status_t agt_cb_sa_rollback_complete_register ( agt_cb_sa_rollback_complete_t  cbfn)

Register a SIL-SA Rollback Complete callback.

This function registers a SIL-SA Rollback Complete callback that will be called after the Validation phase has been processed during the <commit>.

Parameters
cbfnaddress of SIL-SA callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_sa_rollback_complete_unregister()

void agt_cb_sa_rollback_complete_unregister ( agt_cb_sa_rollback_complete_t  cbfn)

Unregister a SIL-SA Rollback Complete callback.

This function unregisters a SIL-SA Rollback Complete callback.

Parameters
cbfnaddress of SIL-SA callback function to use
Here is the call graph for this function:

◆ agt_cb_sa_run_commit_completeness_cb()

status_t agt_cb_sa_run_commit_completeness_cb ( const xmlChar *  transaction_id,
agt_cbtyp_t  cbtyp,
agt_commit_type_t  commit_type 
)

Run SIL-SA Commit Completeness callbacks.

This function simply calls each registered corresponsing Commit Completeness callback.

If callback fails the status of the failing callback is returned immediately and no further callbacks are made.

Parameters
transaction_idtransaction ID in progress
cbtypcallback phase enum
commit_typecommit type; only if phase is Commit
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_sa_run_trans_complete()

void agt_cb_sa_run_trans_complete ( const xmlChar *  transaction_id)

This function simply calls agt_sil_transaction_complete_cb, which makes a <server-event> message and sends it to the subsystem.

This is invoked from functions in agt_cfg This API is available only for SIL-SA Subsystem

Parameters
transaction_idtranaction that is completing now
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_sa_trans_complete_register()

status_t agt_cb_sa_trans_complete_register ( agt_cb_sa_trans_complete_t  cbfn)

Register a Transaction Complete callback.

This function registers a Transaction Complete callback that will be called after the transactions has been processed. This API is available only for SIL-SA Subsystem

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_sa_trans_complete_unregister()

void agt_cb_sa_trans_complete_unregister ( agt_cb_sa_trans_complete_t  cbfn)

Uregister a Transaction Complete callback.

Uregister a Transaction Complete callback. This API is available only for SIL-SA Subsystem

Parameters
cbfnaddress of callback function to unregister
Here is the call graph for this function:

◆ agt_cb_sa_trans_start_register()

status_t agt_cb_sa_trans_start_register ( agt_cb_sa_trans_start_t  cbfn)

Register a Transaction Start callback.

This function registers a Transaction Start callback that will be called before any changes to the candidate database will be committed when the transaction is getting initialized. This API is available only for SIL-SA Subsystem

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_sa_trans_start_unregister()

void agt_cb_sa_trans_start_unregister ( agt_cb_sa_trans_start_t  cbfn)

Uregister a Transaction Start callback.

This function unregisters a Transaction Start callback. This API is available only for SIL-SA Subsystem

Parameters
cbfnaddress of callback function to unregister
Here is the call graph for this function:

◆ agt_cb_sa_validate_complete_register()

status_t agt_cb_sa_validate_complete_register ( agt_cb_sa_validate_complete_t  cbfn)

Register a SIL-SA Validate Complete callback.

This function registers a SIL-SA Validate Complete callback that will be called after the Validation phase has been processed during the <commit>.

Parameters
cbfnaddress of SIL-SA callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_sa_validate_complete_unregister()

void agt_cb_sa_validate_complete_unregister ( agt_cb_sa_validate_complete_t  cbfn)

Unregister a SIL-SA Validate Complete callback.

This function unregisters a SIL-SA Validate Complete callback.

Parameters
cbfnaddress of SIL-SA callback function to use
Here is the call graph for this function:

◆ agt_cb_session_hook_register()

status_t agt_cb_session_hook_register ( agt_cb_session_hook_t  cbfn)

Register a Session Hook callback.

Max Callbacks: No limit (except available heap memory)

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_session_hook_unregister()

void agt_cb_session_hook_unregister ( agt_cb_session_hook_t  cbfn)

Unregister a Session Hook callback.

This function unregisters a Session Hook callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function:

◆ agt_cb_set_sil_priority()

status_t agt_cb_set_sil_priority ( const xmlChar *  defpath,
uint8  sil_priority 
)

Set the desired SIL priority with a callback instead of using the YANG extension for this purpose.

Parameters
defpathXpath with default (or no) prefixes
sil_priority= SIL priority value to use (1..255)
Returns
status
Here is the call graph for this function:

◆ agt_cb_shutdown_register()

status_t agt_cb_shutdown_register ( agt_cb_shutdown_t  cbfn)

Register a Shutdown callback.

Max Callbacks: No limit (except available heap memory)

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_shutdown_unregister()

void agt_cb_shutdown_unregister ( agt_cb_shutdown_t  cbfn)

Unregister a Shutdown callback.

This function unregisters a Shutdown callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function:

◆ agt_cb_skip_leafref_validation()

status_t agt_cb_skip_leafref_validation ( const xmlChar *  defpath)

Set a previously registered callback as a node that the server should skip leafref validation in order to save processing time.

Parameters
defpathXpath with default (or no) prefixes
Returns
status
Here is the call graph for this function:

◆ agt_cb_startup_hook_register()

status_t agt_cb_startup_hook_register ( agt_cb_startup_hook_t  cbfn)

Register a Startup Hook callback.

This function registers a Startup Hook callback that will be called before any changes to the startup file/database.

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_startup_hook_unregister()

void agt_cb_startup_hook_unregister ( agt_cb_startup_hook_t  cbfn)

Unregister a Startup Hook callback.

This function unregisters a Startup Hook callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function:

◆ agt_cb_trans_complete_register()

status_t agt_cb_trans_complete_register ( agt_cb_trans_complete_t  cbfn)

Register a Transaction Complete callback.

This function registers a Transaction Complete callback that will be called after the transactions has been processed.

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation
Here is the call graph for this function:

◆ agt_cb_trans_complete_unregister()

void agt_cb_trans_complete_unregister ( agt_cb_trans_complete_t  cbfn)

Unregister a Transaction Complete callback.

This function unregisters a Transaction Complete callback.

Parameters
cbfnaddress of callback function to unregister
Here is the call graph for this function:

◆ agt_cb_trans_start_register()

status_t agt_cb_trans_start_register ( agt_cb_trans_start_t  cbfn)

Register a Transaction Start callback.

This function registers a Transaction Start callback that will be called before any changes to the candidate database will be committed when the transaction is getting initialized.

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_trans_start_unregister()

void agt_cb_trans_start_unregister ( agt_cb_trans_start_t  cbfn)

Unregister a Transaction Start callback.

This function unregisters a Transaction Start callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function:

◆ agt_cb_unload_module()

void agt_cb_unload_module ( const xmlChar *  modname)

Remove the modhdr for the specified module since it is being unloaded from the server or subsystem.

Parameters
modnamemodule name to remove
Here is the call graph for this function:

◆ agt_cb_unregister_callbacks()

void agt_cb_unregister_callbacks ( const xmlChar *  modname,
const xmlChar *  defpath 
)

Unregister all EDIT callback functions for a specific object.

Parameters
modnamemodule containing the object for this callback
defpathdefinition XPath location
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_cb_unregister_subsys_callback()

void agt_cb_unregister_subsys_callback ( const xmlChar *  subsys_id,
const xmlChar *  modname,
const xmlChar *  defpath,
const xmlChar *  revision 
)

Unregister remote subsystem callback for a specific object.

Parameters
subsys_idsubsystem identifier
modnamemodule containing the object for this callback
defpathdefinition XPath location
revisionrevision identifier for the 'modname' module
Here is the call graph for this function:

◆ agt_cb_validate_complete_register()

status_t agt_cb_validate_complete_register ( agt_cb_validate_complete_t  cbfn)

Register a Validate Complete callback.

This function registers a Validate Complete callback that will be called after the Validation phase has been processed during the <commit>.

Parameters
cbfnaddress of callback function to use
Returns
the status of the operation.
Here is the call graph for this function:

◆ agt_cb_validate_complete_unregister()

void agt_cb_validate_complete_unregister ( agt_cb_validate_complete_t  cbfn)

Unregister a Validate Complete callback.

This function unregisters a Validate Complete callback.

Parameters
cbfnaddress of callback function to use
Here is the call graph for this function: