![]() |
yumapro
25.10-1
YumaPro SDK
|
NETCONF Server Data Model callback handler. More...
#include "agt.h"#include "agt_editcb.h"#include "getcb.h"#include "op.h"#include "rpc.h"#include "ses.h"#include "status_enum.h"#include "val.h"#include "xpath.h"#include "agt_cfg.h"#include "agt_hook_util.h"

Go to the source code of this file.
Data Structures | |
| struct | agt_cb_subsys_t |
| struct | agt_cb_extra_flags_t |
| Structure to hold extra flags for callback registration. More... | |
| struct | agt_cb_fnset_t |
Macros | |
| #define | FORALL TRUE |
| symbolic tag for agt_cb_register_callback 'forall' boolean | |
| #define | FORONE FALSE |
| symbolic tag for agt_cb_register_callback 'forone' boolean | |
| #define | AGT_CB_FL_EDIT bit0 |
| total 7 bits for the agt_cb_subsys_t.flags field. More... | |
| #define | AGT_CB_FL_GET bit1 |
| GET2 callbacks for this subsystem. | |
| #define | AGT_CB_FL_EDIT2 bit2 |
| EDIT2 callbacks for this subsystem. | |
| #define | AGT_CB_FL_PSHOOK bit3 |
| 3 flags for the HOOKS support in agt_cb_subsys_t.flags field More... | |
| #define | AGT_CB_FL_SHOOK bit4 |
| Set Hook. | |
| #define | AGT_CB_FL_TXHOOK bit5 |
| Transaction Hook. | |
| #define | AGT_CB_FL_PUSH bit6 |
| 1 flag for the PUSH callback in agt_cb_subsys_t.flags field More... | |
| #define | AGT_CB_FL_SETHOOK_TREE bit0 |
| 8 flags for the agt_cb_fnset_t.flags field (bit0 to bit7) More... | |
| #define | AGT_CB_FL_TRANSHOOK_TREE bit1 |
| transaction hook tree | |
| #define | AGT_CB_FL_SKIP_SETHOOK bit2 |
| skip set-hook | |
| #define | AGT_CB_FL_SKIP_TRANSHOOK bit3 |
| skip transaction hook | |
| #define | AGT_CB_FL_PSETHOOK bit4 |
| Specifies whether post-set-hook is set in the cbset. | |
| #define | AGT_CB_FL_SETHOOK bit5 |
| Specifies whether set-hook is set in the cbset. | |
| #define | AGT_CB_FL_TRANSHOOK bit6 |
| Specifies whether transaction-hook is set in the cbset. | |
| #define | AGT_CB_FL_EDIT3 bit7 |
| EDIT3 callbacks for this subsystem. | |
| #define | AGT_CB_FL_SKIP_VALIDATE bit8 |
| skip validate phase | |
| #define | AGT_CB_FL_SKIP_APPLY bit9 |
| skip apply phase | |
| #define | AGT_CB_SUBSYS_HAS_EDIT(S) ((S)->flags & AGT_CB_FL_EDIT) |
| check subsystem has an EDIT1 callback | |
| #define | AGT_CB_SUBSYS_HAS_GET(S) ((S)->flags & AGT_CB_FL_GET) |
| check subsystem has a GET2 callback | |
| #define | AGT_CB_SUBSYS_HAS_EDIT2(S) ((S)->flags & AGT_CB_FL_EDIT2) |
| check subsystem has an EDIT2 callback | |
| #define | AGT_CB_SUBSYS_HAS_PUSH(S) ((S)->flags & AGT_CB_FL_PUSH) |
| check subsystem has a GET2 callback | |
| #define | AGT_CB_SUBSYS_HAS_EDIT3(S) ((S)->flags & AGT_CB_FL_EDIT3) |
| check subsystem has an EDIT3 callback | |
| #define | AGT_CB_SUBSYS_HAS_PSHOOK(S) ((S)->flags & AGT_CB_FL_PSHOOK) |
| Hooks Support flags handling check subsystem has a post-set-hook. | |
| #define | AGT_CB_SUBSYS_HAS_SHOOK(S) ((S)->flags & AGT_CB_FL_SHOOK) |
| check subsystem has a set-hook | |
| #define | AGT_CB_SUBSYS_HAS_TXHOOK(S) ((S)->flags & AGT_CB_FL_TXHOOK) |
| check subsystem has a transaction-hook | |
| #define | AGT_CB_SUBSYS_SET_PSHOOK(S) (S)->flags |= AGT_CB_FL_PSHOOK |
| set subsystem has a post-set-hook | |
| #define | AGT_CB_SUBSYS_SET_SHOOK(S) (S)->flags |= AGT_CB_FL_SHOOK |
| set subsystem has a set-hook | |
| #define | AGT_CB_SUBSYS_SET_TXHOOK(S) (S)->flags |= AGT_CB_FL_TXHOOK |
| set subsystem has a transaction-hook | |
| #define | AGT_CB_HAS_REMOTE_PSHOOK(C) ((C)->flags & AGT_CB_FL_PSETHOOK) |
| Flags to tell the server that the CBSET has remote hook callbacks check subsystem has a remote post-set-hook. | |
| #define | AGT_CB_HAS_REMOTE_SHOOK(C) ((C)->flags & AGT_CB_FL_SETHOOK) |
| check subsystem has a remote set-hook | |
| #define | AGT_CB_HAS_REMOTE_TXHOOK(C) ((C)->flags & AGT_CB_FL_TRANSHOOK) |
| check subsystem has a remote transaction-hook | |
| #define | AGT_CB_SET_REMOTE_PSHOOK(C) (C)->flags |= AGT_CB_FL_PSETHOOK |
| set remote has a post-set-hook | |
| #define | AGT_CB_SET_REMOTE_SHOOK(C) (C)->flags |= AGT_CB_FL_SETHOOK |
| set remote has a set-hook | |
| #define | AGT_CB_SET_REMOTE_TXHOOK(C) (C)->flags |= AGT_CB_FL_TRANSHOOK |
| set remote has a transaction-hook | |
| #define | AGT_CB_HAS_SKIP_VALIDATE(C) ((C)->flags & AGT_CB_FL_SKIP_VALIDATE) |
| Flags to check if the phase callback is skipped in the CBSET. More... | |
| #define | AGT_CB_SET_SKIP_VALIDATE(C) (C)->flags |= AGT_CB_FL_SKIP_VALIDATE |
| set the phase callback to be skipped | |
Typedefs | |
| typedef status_t(* | agt_cb_fn_t) (ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval) |
| EDIT1 and EDIT2 Callback function for server object handler. More... | |
| typedef status_t(* | agt_cb_hook_t) (ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval) |
| Typedef of the agt_cb_hook_t callback. More... | |
| typedef uint8(* | agt_cb_order_hook_t) (agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval, status_t *res) |
| Typedef of the agt_order_hook_cb callback. More... | |
| typedef status_t(* | agt_cb_trans_start_t) (agt_cfg_transaction_t *txcb) |
| Typedef of the trans_start callback. More... | |
| typedef status_t(* | agt_cb_sa_trans_start_t) (const xmlChar *transaction_id, boolean isvalidate, boolean isrollback, boolean isrunning) |
| Typedef of the sa_trans_start callback. More... | |
| typedef void(* | agt_cb_trans_complete_t) (agt_cfg_transaction_t *txcb) |
| Typedef of the trans_complete callback. More... | |
| typedef void(* | agt_cb_sa_trans_complete_t) (const xmlChar *transaction_id_val) |
| Typedef of the sa_trans_complete callback. More... | |
| typedef status_t(* | agt_cb_startup_hook_t) (ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *source_config, cfg_template_t *target_config) |
| Typedef of the agt_cb_startup_hook_t callback. More... | |
| typedef status_t(* | agt_cb_validate_complete_t) (ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running) |
| Typedef of the agt_cb_validate_complete_t callback. More... | |
| typedef status_t(* | agt_cb_sa_validate_complete_t) (const xmlChar *transaction_id) |
| Typedef of the agt_cb_sa_validate_complete_t callback. More... | |
| typedef status_t(* | agt_cb_apply_complete_t) (ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running) |
| Typedef of the agt_cb_apply_complete_t callback. More... | |
| typedef status_t(* | agt_cb_sa_apply_complete_t) (const xmlChar *transaction_id) |
| Typedef of the agt_cb_sa_apply_complete_t callback. More... | |
| typedef status_t(* | agt_cb_rollback_complete_t) (ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running) |
| Typedef of the agt_cb_rollback_complete_t callback. More... | |
| typedef status_t(* | agt_cb_sa_rollback_complete_t) (const xmlChar *transaction_id) |
| Typedef of the agt_cb_sa_rollback_complete_t callback. More... | |
| typedef status_t(* | agt_cb_sa_commit_complete_t) (const xmlChar *transaction_id, agt_commit_type_t commit_type) |
| Typedef of the agt_cb_sa_commit_complete_t callback. More... | |
| typedef status_t(* | agt_cb_command_start_t) (ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *command_modname, const xmlChar *command_name) |
| Typedef of the agt_cb_command_start_t callback. More... | |
| typedef void(* | agt_cb_command_complete_t) (ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *command_modname, const xmlChar *command_name) |
| Typedef of the agt_cb_command_complete_t callback. More... | |
| typedef void(* | agt_cb_shutdown_t) (void) |
| Typedef of the agt_cb_shutdown_t callback. More... | |
| typedef void(* | agt_cb_session_hook_t) (ncx_ses_event_t ses_event, const ses_cb_t *scb) |
| Typedef of the agt_cb_session_hook_t callback. More... | |
| typedef status_t(* | agt_cb_sa_hook_t) (ses_cb_t *scb, rpc_msg_t *msg, op_editop_t editop, val_value_t *newval, val_value_t *curval, const xmlChar *transaction_id, boolean isvalidate, boolean isload, boolean isrunning) |
| Typedef of the SIL-SA version of agt_cb_hook_t callback. More... | |
| typedef status_t(* | agt_cb_sa_push_t) (agt_sa_push_parms_t *sa_parms) |
| Callback function for PUSH object handler. More... | |
| typedef status_t(* | agt_cb_edit_phase_complete_t) (agt_cbtyp_t edit_phase, ses_cb_t *scb, rpc_msg_t *msg, val_value_t *source, val_value_t *target) |
| Typedef of the agt_cb_edit_phase_complete_t callback. More... | |
| typedef status_t(* | agt_cb_sa_edit_phase_complete_t) (agt_cbtyp_t edit_phase, const xmlChar *transaction_id) |
| Typedef of the agt_cb_sa_edit_phase_complete_t callback. More... | |
Enumerations | |
| enum | agt_cb_calltype_t { AGT_CB_CALLTYPE_NONE , AGT_CB_CALLTYPE_EDIT , AGT_CB_CALLTYPE_EDIT2 , AGT_CB_CALLTYPE_EDIT3 , AGT_CB_CALLTYPE_GET , AGT_CB_CALLTYPE_PUSH } |
| different data node callback types for SIL and SIL-SA to register More... | |
| enum | agt_edit_cbtype_t { AGT_EDIT_CBTYPE_NONE = 0 , AGT_EDIT_CBTYPE_EDIT , AGT_EDIT_CBTYPE_EDIT2 , AGT_EDIT_CBTYPE_EDIT3 } |
| Enumeration for EDIT callback types for SIL and SIL-SA to register. More... | |
Functions | |
| 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_edit_callback_extra (const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, void *cbfn, const agt_cb_extra_flags_t *extra_flags) |
| Register an edit callback function with extra flags. 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_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... | |
| 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... | |
| boolean | agt_cb_obj_has_push_callback (obj_template_t *obj) |
| Check if the specified object has a SIL-SA PUSH callback. 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_command_start_register (agt_cb_command_start_t cbfn) |
| Register a Command Start callback. More... | |
| void | agt_cb_command_start_unregister (agt_cb_command_start_t cbfn) |
| Unregister a Command Start callback. More... | |
| status_t | agt_cb_run_command_start (ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *command_modname, const xmlChar *command_name) |
| Run Command Start callbacks. More... | |
| status_t | agt_cb_command_complete_register (agt_cb_command_complete_t cbfn) |
| Register a Command Complete callback. 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... | |
| 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... | |
| 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... | |
| 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_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... | |
| boolean | agt_cb_is_skip_callback (const obj_template_t *obj, agt_cbtyp_t cbtyp) |
| Determine whether the edit phase callback for the given object and callback type should be skipped based on the registered flags. More... | |
| status_t | agt_cb_register_sa_push_callback (const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_cb_sa_push_t cbfn) |
| Register an object specific SIL-SA PUSH callback function. More... | |
NETCONF Server Data Model callback handler.