/******************************************************************** * FUNCTION mgr_not_init * * Initialize the mgr_not module * call once to init module * Adds the mgr_not_dispatch function as the handler * for the NETCONF <rpc> top-level element. * * INPUTS: * none * RETURNS: * NO_ERR if all okay, the minimum spare requests will be malloced *********************************************************************/ status_t mgr_not_init (void) { if (mgr_not_init_done) { return ERR_INTERNAL_INIT_SEQ; } /* get the notification template */ notification_obj = NULL; callbackfn = NULL; ncx_module_t *mod = ncx_find_module(NCN_MODULE, NULL); if (mod == NULL) { return ERR_NCX_MOD_NOT_FOUND; } notification_obj = ncx_find_object(mod, NCX_EL_NOTIFICATION); if (notification_obj == NULL) { return ERR_NCX_DEF_NOT_FOUND; } status_t res = top_register_node(NCN_MODULE, NCX_EL_NOTIFICATION, mgr_not_dispatch); if (res != NO_ERR) { return res; } mgr_not_init_done = TRUE; return NO_ERR; } /* mgr_not_init */
/******************************************************************** * FUNCTION mgr_hello_init * * Initialize the mgr_hello module * Adds the mgr_hello_dispatch function as the handler * for the NETCONF <hello> top-level element. * * INPUTS: * none * RETURNS: * NO_ERR if all okay, the minimum spare requests will be malloced *********************************************************************/ status_t mgr_hello_init (void) { if (!mgr_hello_init_done) { status_t res = top_register_node(NC_MODULE, NCX_EL_HELLO, mgr_hello_dispatch); if (res != NO_ERR) { return res; } mgr_hello_init_done = TRUE; } return NO_ERR; } /* mgr_hello_init */
/******************************************************************** * FUNCTION agt_hello_init * * Initialize the agt_hello module * Adds the agt_hello_dispatch function as the handler * for the NETCONF <hello> top-level element. * * INPUTS: * none * RETURNS: * NO_ERR if all okay, the minimum spare requests will be malloced *********************************************************************/ status_t agt_hello_init (void) { status_t res; if (!agt_hello_init_done) { res = top_register_node(NC_MODULE, NCX_EL_HELLO, agt_hello_dispatch); if (res != NO_ERR) { return res; } mytotals = ses_get_total_stats(); agt_hello_init_done = TRUE; } return NO_ERR; } /* agt_hello_init */
/******************************************************************** * FUNCTION mgr_rpc_init * * Initialize the mgr_rpc module * call once to init RPC mgr module * Adds the mgr_rpc_dispatch function as the handler * for the NETCONF <rpc> top-level element. * * INPUTS: * none * RETURNS: * NO_ERR if all okay, the minimum spare requests will be malloced *********************************************************************/ status_t mgr_rpc_init (void) { status_t res; if (!mgr_rpc_init_done) { res = top_register_node(NC_MODULE, NCX_EL_RPC_REPLY, mgr_rpc_dispatch); if (res != NO_ERR) { return res; } mgr_rpc_init_done = TRUE; } return NO_ERR; } /* mgr_rpc_init */