yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
agt.h File Reference

Multi-Protocol Network Management Server. More...

#include "agt_not.h"
#include "help.h"
#include "log.h"
#include "ncxtypes.h"
#include "status.h"
Include dependency graph for agt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  agt_replay_subsys_t
 for the list of subsystems requesting or in progress for a config load or replay More...
 
struct  agt_maxuser_t
 for the list of username / max-session values to support the –max-per-user-sessions CLI parameter More...
 
struct  agt_profile_t
 Multiple instances are not supported. More...
 
struct  agt_syslib_cb_t
 struct to keep track of the dynamic external yp-system hooks library More...
 
struct  agt_edit_parms_cb_t
 struct to contain all agt_send_edit parameters More...
 

Macros

#define AGT_NUM_CB   (AGT_CB_ROLLBACK+1)
 number of callbacks based on agt_cbtyp_t enumeration
 
#define AGT_MAX_PORTS   4
 maximum number of "--port" leaf-list values that will be saved
 
#define AGT_DEF_SUBSYS_TIMEOUT   30
 number of seconds before timeout for subsystems to respond to an edit request
 
#define AGT_DEF_CONF_FILE    (const xmlChar *)"/etc/yumapro/netconfd-pro.conf"
 default etc config filespec
 
#define AGT_DEF_FACTORY_CONFIG_FILE    (const xmlChar *)"factory-startup-cfg.xml"
 default startup-factory-file value
 
#define AGT_DEF_CONF_DIR   (const xmlChar *)"/etc/yumapro/netconfd-pro.d"
 default "--confdir" value
 
#define AGT_DEF_FHS_LOG_FILE    (const xmlChar *)"/var/log/netconfd-pro/server.log"
 default FHS main log location
 
#define AGT_DEF_SYSLIB_FILE   (const xmlChar *)"libyp_system.so"
 hard-wired yp-startup full library name
 
#define AGT_SYSLIB_NAME   (const xmlChar *)"yp_system"
 hard-wired yp-startup library name
 
#define AGT_DEF_BACKUP_DIR   (const xmlChar *)"$HOME/.yumapro/backups"
 default server backups directory
 
#define AGT_DEF_BACKUPS_NAME   (const xmlChar *)"backups"
 hard-wired server backups dir name
 
#define AGT_DEF_FHS_BACKUP_DIR    (const xmlChar *)"/var/lib/netconfd-pro/backups"
 hardwired FHS backups dir location
 
#define AGT_SRID_FHS_BACKUP_DIR    (const xmlChar *)"/var/lib/netconfd-pro/%s/backups"
 pattern: FHS backups dir location with SRID placeholder
 
#define AGT_DEF_DELETE_EMPTY_NP   FALSE
 default default delete empty NP containers. More...
 
#define AGT_DEF_SYSTEM_SORTED   FALSE
 this can be over-ridden by the "--system-sorted" CLI parameter THIS PARAMETER IGNORED SINCE val_child DOES NOT NEED SORTING
 
#define AGT_DEF_LAX_NAMESPACES   TRUE
 default allow missing namespaces if element is unique
 
#define AGT_DEF_EVENTLOG_SIZE   1000
 default –eventlog-size value
 
#define AGT_DEF_MAX_BURST   10
 default –max-burst value
 
#define AGT_DEF_HELLO_TIMEOUT   300
 default –hello-timeout value
 
#define AGT_DEF_IDLE_TIMEOUT   3600
 default idle timeout value
 
#define AGT_DEF_LINESIZE   72
 default line size
 
#define AGT_DEF_INDENT   1
 default –indent value
 
#define AGT_DEF_MESSAGE_INDENT   (-1)
 default –message-indent value
 
#define AGT_DEF_MAX_SESSIONS   8
 default –max-sessions value
 
#define AGT_DEF_MAX_CLI_SESSIONS   0
 default –max-cli-sessions value
 
#define AGT_DEF_MAX_USER_SESSIONS   0
 default –max-user-sessions value
 
#define AGT_MAX_USERNAME_LEN   1024
 hardwired max username length for agt_maxuser_t matches description in max-per-user-sessions CLI
 
#define AGT_MAX_PER_USER_SESSIONS   1024
 hardwired max per user sessions for agt_maxuser_t matches description in max-per-user-sessions CLI
 
#define AGT_DEF_YANGAPI_SERVER_URL   (const xmlChar *)"http://localhost"
 default YANG-API URI start (obsolete)
 
#define AGT_DEF_RESTCONF_SERVER_URL   (const xmlChar *)"http://localhost"
 default RESTCONF URI start
 
#define AGT_DEF_SAVE_OWNERS   FALSE
 default –save-owners value
 
#define AGT_DEF_JSON_LEAF_LIST_1LINE   FALSE
 default allow leaf-lists on 1 line in JSON
 
#define AGT_DEF_SAVE_CONFIG_SYSTEM   FALSE
 default save config system
 
#define AGT_DEF_WITH_CONFIG_ID   TRUE
 default with config-id value
 
#define AGT_DEF_WITH_OCPATTERN   FALSE
 default –with-ocpattern value
 
#define AGT_DEF_NO_NVSTORE   FALSE
 default –no-nvstore value
 
#define AGT_DEF_WITH_CALLHOME   FALSE
 default –with-callhome value
 
#define AGT_DEF_WITH_SCHEMA_MOUNT   TRUE
 default –with-schema-mount value
 
#define AGT_DEF_CALLHOME_RETRY_INT   60
 default –callhome-retry-interval value
 
#define AGT_DEF_CALLHOME_RETRY_MAX   10
 default –callhome-retry-max value
 
#define AGT_DEF_CALLHOME_PORT   NCX_DEF_SSH_CALLHOME
 default SSH callhome port
 
#define AGT_DEF_CALLHOME_TLS_PORT   NCX_DEF_TLS_CALLHOME
 default TLS callhome port
 
#define AGT_DEF_CALLHOME_RESTCONF_TLS_PORT   NCX_DEF_RESTCONF_TLS_CALLHOME
 default RESTCONF callhome port (not implemented)
 
#define AGT_YUMAWORKS_CALLHOME_MODULE   (const xmlChar *)"yumaworks-callhome"
 yumaworks callhome module name to configure callhome connections
 
#define AGT_YUMAWORKS_CALLHOME_REVISION   (const xmlChar *)"2020-10-17"
 yumaworks callhome module revision to configure callhome connections
 
#define AGT_DEF_NO_AUDIT_LOG   FALSE
 default –no-auditlog value
 
#define AGT_DEF_CRYPT_HASH_PREFIX   (const xmlChar *)"$6$"
 default for crypt-hash is SHA-512 id=6 This prefix includes the just the <id> field The <salt> will be generated for each new password
 
#define AGT_DEF_MIN_PASSWD_LEN   8
 hard-wired minimum password length
 
#define AGT_DEF_HA_ENABLED   FALSE
 YP-HA service enabled.
 
#define AGT_DEF_HA_SIL_STANDBY   FALSE
 default –ha-sil-standby value
 
#define AGT_DEF_HA_PORT   8088
 default –ha-port value
 
#define AGT_DEF_HA_STANDBY_MODE   AGT_HA_MODE_HOT_STANDBY
 default –ha-standby-mode value
 
#define AGT_DEF_YPCOAP_PORT   5683
 default agt_ypcoap_port value
 
#define AGT_DEF_YPCOAP_DTLS_PORT   5684
 YP-CoAP over DTLS port number (not implemented)
 
#define AGT_DEF_YPCOAP_ADDRESS   (const xmlChar *)"0.0.0.0"
 YP-CoAP over DTLS IPv4 address (not implemented)
 
#define AGT_DEF_RESTCONF_DEFAULT_ENCODING   NCX_MSG_ENCODING_JSON
 default RESTCONF encoding when no Accept header
 
#define AGT_DEF_TLS_PORT   6513
 port assignment for netconf-tls in RFC 7589
 
#define AGT_DEF_DB_LOCK_RETRY   500
 db-lock default retry interval (milli-seconds)
 
#define AGT_DEF_DB_LOCK_TIMEOUT   20
 db-lock default timeout (seconds )
 
#define AGT_DEF_WITH_YUMAWORKS_CONFIG_CHANGE   FALSE
 allow netconf-config-change to include data that changed
 
#define AGT_DEF_WITH_YUMAWORKS_CALLHOME   TRUE
 allow yumaworks-callhome module to be present
 
#define AGT_DEF_WITH_YUMAWORKS_EVENT_STREAM   TRUE
 allow yumaworks-callhome module to be present
 
#define AGT_DEF_WITH_NMDA   FALSE
 enable NMDA modules and standard datastores
 
#define AGT_DEF_STARTUP_SKIP_VALIDATION   FALSE
 enable skip startup validation at boot-time
 
#define AGT_DEF_RETURN_STATUS   FALSE
 return status to the shell on exit or not
 
#define AGT_DEF_WAIT_DATASTORE_READY   FALSE
 do not wait for datastore startup to allow sessions This is the only behavior before this parameter
 
#define AGT_DEF_YANG_SID_MODE   NCX_YANG_SID_MODE_SID_FILE
 YANG SID mode is default to use SID files only.
 
#define AGT_DEF_WITH_YANG_CBOR   FALSE
 Enable YANG to CBOR binary mode.
 
#define AGT_DEF_SILCALL_DELETE_FIRST   TRUE
 YPW-1975: During SILCALL processing for EDIT. More...
 
#define AGT_DEF_XPATH_DBLSLASH_OK   FALSE
 YPW-1981: XPath Dblslash OK Not implemented for GET2. More...
 
#define AGT_DEF_SIL_CC_CALLBACK_ALL   FALSE
 Allow Commit Completeness Callback for all operations.
 
#define AGT_DEF_DISABLED_PROTOCOLS   EMPTY_STRING
 default –disabled-protocols is empty bithset
 
#define AGT_SELECT_TIMEOUT_SEC   0
 number of seconds for each select timeout
 
#define AGT_SELECT_TIMEOUT_USEC   10000
 number of microseconds for each select timeout set to 1/100th sec

 
#define AGT_USER_VAR   (const xmlChar *)"user"
 identify a user variable
 
#define AGT_URL_SCHEME_LIST   (const xmlChar *)"file"
 hard-wired schema list for –with-url
 
#define AGT_URL_SCHEME_LIST_TFTP   (const xmlChar *)"file,tftp"
 hard-wired schema list for –with-url and –with-url-tftp
 
#define AGT_FILE_SCHEME   (const xmlChar *)"file:///"
 hard-wired start of file schem URL
 
#define AGT_TOASTER_MOD   (const xmlChar *)"toaster"
 name of the toaster module
 
#define AGT_TEST_MOD   (const xmlChar *)"test"
 name of the test module
 
#define AGT_SIL_SA   (const xmlChar *)"sil-sa"
 SIL-SA service name for YControl.
 
#define AGT_DB_API   (const xmlChar *)"db-api"
 DB-API service name for YControl.
 
#define AGT_YP_HA   (const xmlChar *)"yp-ha"
 YP-HA service name for YControl.
 
#define AGT_YP_GNMI   (const xmlChar *)"yp-gnmi"
 YP-GNMI service name for YControl.
 
#define AGT_YP_GRPC   (const xmlChar *)"yp-grpc"
 YP-GRPC service name for YControl.
 
#define AGT_YCONTROL_MOD   (const xmlChar *)"yumaworks-ycontrol"
 YANG module used for subsystem message transport.
 
#define AGT_DB_API_MOD   (const xmlChar *)"yumaworks-db-api"
 YANG module used for DB-API service messages.
 
#define AGT_SIL_SA_MOD   (const xmlChar *)"yumaworks-sil-sa"
 YANG module used for SIL-SA service messages.
 
#define AGT_PROFILE_MOD   (const xmlChar *)"yumaworks-agt-profile"
 YANG module for the agent profile.
 
#define AGT_ACTION_MOD   (const xmlChar *)"yang-attributes"
 YANG attributes module name.
 
#define AGT_YP_HA_MOD   (const xmlChar *)"yumaworks-yp-ha"
 YANG module used for YP-HA service messages.
 
#define AGT_TEMPLATES_MOD   (const xmlChar *)"yumaworks-templates"
 YANG module for yumaworks templates.
 
#define AGT_LOCK_MOD   (const xmlChar *)"yumaworks-lock"
 YANG module for yumaworks lock-all operation.
 
#define AGT_YP_GNMI_MOD   (const xmlChar *)"yumaworks-yp-gnmi"
 YANG module used for YP-GNMI service messages.
 
#define AGT_YP_GRPC_MOD   (const xmlChar *)"yumaworks-yp-grpc"
 YANG module used for YP-GRPC service messages.
 
#define AGT_YP_SCHEMA_MOUNT_MOD   (const xmlChar *)"yumaworks-schema-mount"
 YANG module used for sm-config struct.
 
#define AGT_YP_SM_YANGLIB_MOD   (const xmlChar *)"yumaworks-sm-yanglib"
 YANG module used for get-sm-yanglib operation.
 
#define AGT_DEF_SERVER_ID   (const xmlChar *)"server1"
 default –server-id value
 
#define AGT_WITHDEF_MOD   (const xmlChar *)"ietf-netconf-with-defaults"
 YANG module for with-defaults definitions.
 
#define AGT_TEST_FL_MIN_ELEMS   bit0
 begin tests for agt_commit_test_t flags field test min-elements
 
#define AGT_TEST_FL_MAX_ELEMS   bit1
 test max-elements
 
#define AGT_TEST_FL_MANDATORY   bit2
 test mandatory
 
#define AGT_TEST_FL_MUST   bit3
 test must-stmt
 
#define AGT_TEST_FL_UNIQUE   bit4
 test unique-stmt
 
#define AGT_TEST_FL_XPATH_TYPE   bit5
 test xpath leaf path-stmt
 
#define AGT_TEST_FL_CHOICE   bit6
 test a choice
 
#define AGT_TEST_FL_WHEN   bit7
 not really a commit test; done during delete_dead_nodes()
 
#define AGT_TEST_ALL_COMMIT_MASK   (bit0|bit1|bit2|bit3|bit4|bit5|bit6)
 mask for all the commit tests
 
#define AGT_TEST_INSTANCE_MASK   (bit0|bit1|bit2|bit4|bit6)
 mask for the subset of instance tests
 
#define AGT_CLI_NOSTARTUP   (const xmlChar *)"no-startup"
 name of no-startup case
 
#define AGT_CLI_STARTUP   (const xmlChar *)"startup"
 name of startup case
 
#define AGT_CLI_FACTORY_STARTUP   (const xmlChar *)"factory-startup"
 name of factory-startup case
 
#define AGT_CLI_STARTUP_FACTORY_FILE   (const xmlChar *)"startup-factory-file"
 name of startup factory file parameter
 
#define AGT_EVAL_REQUEST_LIMIT   500
 max. More...
 
#define AGT_MAX_OWNER_ID   255
 max. More...
 
#define AGT_WATCHER   (const xmlChar *)"ypwatcher"
 name of YP-watcher program
 
#define AGT_DEF_WAT_INTERVAL   10
 default watcher check interval in seconds
 
#define AGT_DEF_SSHD_COMMAND   (const xmlChar *)"/usr/sbin/sshd"
 default SSH command for callhome use
 
#define AGT_DEF_SUBSYS_COMMAND    (const xmlChar *)"/usr/sbin/netconf-subsystem-pro"
 default subsystem command for callhome use
 
#define AGT_DEF_SNMP_SUBAGENT_PRIO   127
 internal SNMP priority
 
#define AGT_FL_AUDIT_EDIT_RUNNING   bit1
 edit-running events are generated when an edit or commit to <running> is completed.
 
#define AGT_FL_AUDIT_UPDATE_STARTUP   bit2
 update-startup events are generated when a copy to <startup> is completed.
 
#define AGT_FL_AUDIT_CLIENT_SESSION   bit3
 client session start and end events
 
#define AGT_FL_AUDIT_CONTROL_SESSION   bit4
 YControl session start and end events.
 
#define AGT_FL_AUDIT_NACM_WRITE_ERROR   bit5
 NACM write violation events.
 
#define AGT_FL_AUDIT_NACM_EXEC_ERROR   bit6
 NACM exec violation events.
 
#define AGT_FL_AUDIT_RPC_SUMMARY   bit7
 RPC summary events are generated after every RPC is handled.
 
#define AGT_FL_AUDIT_EDIT_DATA   bit8
 Add edit data to the audit log for an edit transaction log entry.
 
#define AGT_FL_AUDIT_RPC_ERROR   bit9
 Add rpc-error reports to the audit log for a failed RPC operation.
 
#define AGT_DEF_AUDIT_EVENTS   AGT_FL_AUDIT_EDIT_RUNNING
 default bits set for audit-log-events parameter
 
#define AGT_DEF_CRL_MISSING_OK   false
 default CRL missing for TLS
 
#define AGT_DEF_CRL_MODE   AGT_CRL_MODE_OFF
 default CRL mode for TLS
 
#define AGT_DEF_CVT_SUBTREE_FILTER   false
 default convert subtree to XPath parameter
 
#define AGT_DEF_PUSH_MIN_PERIOD   100
 YANG Push Periodic Subscription: units centiseconds min period 1 second.
 
#define AGT_DEF_PUSH_MIN_DAMPENING   100
 YANG Push min dampening 1 second.
 
#define AGT_DEF_PUSH_MAX_PERIODIC   16
 default max number of periodic subscriptions
 
#define AGT_DEF_PUSH_MAX_OPERATIONAL   4
 default max number of operational subscriptions
 
#define AGT_DEF_PUSH_SIMOP_ENABLED   true
 default simulated operational mode
 
#define AGT_DEF_PUSH_SIMOP_PERIOD   500
 default simop period is 5 seconds
 
#define AGT_DEF_PUSH_SIMOP_PATCH_UPDATE   true
 default simop message mode (patch or update)
 
#define AGT_NON_NMDA_YANGLIB_REV   (const xmlChar *)"2016-06-21"
 YANG revision date for non-NMDA YANG Library.
 
#define AGT_NMDA_YANGLIB_REV   (const xmlChar *)"2019-01-04"
 YANG revision date for NMDA YANG Library.
 
#define AGT_SIL_SA_MODULE   (const xmlChar *)"yumaworks-sil-sa"
 SIL-SA module name used in agt_sm.c.
 
#define AGT_DEF_TLS_DEPRECATED_OK   false
 default TLS deprecated OK NOT BACKWARD COMPATIBLE WITH VERSIONS BEFORE 22.10-2
 
#define AGT_DEF_TLS_DH_ENABLED   true
 default enable TLS Diffie Hellman parameters
 
#define AGT_DEF_SAVE_CONFIG_TEMPNAME   true
 default enable saving XML config files with temp filename
 
#define AGT_SAVE_CONFIG_TEMPNAME_EXT   (const xmlChar *)".temp"
 save config temp file extension
 
#define AGT_DEF_RETURN_EMPTY_NPCONTAINERS   TRUE
 default return-empty-npcontainers default is TRUE for backward compatibility but recommended setting is FALSE
 
#define AGT_DEF_MAX_DBLSLASH_MATCHES   25
 if a dblslash XPath expression on operational data is done then the check_cvt_dblslash function will do an object search for the //foo-name object. More...
 
#define AGT_DEF_MAX_NODES_PER_UPDATE   10000
 RFC 9196 Notification Capabilities The max-nodes-per-update is an implementation specific leaf that does not apply to this server! It is not even clear what a 'node' means for counting purposes. More...
 

Typedefs

typedef void(* agt_system_init_profile_fn_t) (agt_profile_t *profile)
 system init server profile callback More...
 
typedef status_t(* agt_system_init1_fn_t) (boolean pre_cli)
 system init1 callback More...
 
typedef status_t(* agt_system_init2_fn_t) (boolean pre_load)
 system init2 callback More...
 
typedef void(* agt_system_cleanup_fn_t) (void)
 system cleanup callback More...
 
typedef status_t(* agt_nvsave_fn_t) (ncx_display_mode_t encoding, const xmlChar *filespec)
 brief nvsave callback More...
 
typedef status_t(* agt_nvload_fn_t) (ncx_display_mode_t *encoding, xmlChar **filespec)
 nvload callback More...
 
typedef void(* agt_replay_fn_t) (boolean is_start)
 replay callback (agt_replay_fn_t) More...
 

Enumerations

enum  agt_acmode_t {
  AGT_ACMOD_NONE ,
  AGT_ACMOD_ENFORCING ,
  AGT_ACMOD_PERMISSIVE ,
  AGT_ACMOD_DISABLED ,
  AGT_ACMOD_OFF
}
 matches access-control enumeration in netconfd.yang More...
 
enum  agt_cbtyp_t {
  AGT_CB_VALIDATE ,
  AGT_CB_APPLY ,
  AGT_CB_COMMIT ,
  AGT_CB_ROLLBACK
}
 enumeration of the different server EDIT callback types These are used as array indices so there is no dummy zero enum AGT_CB_TEST_APPLY has been replaced by AGT_CB_APPLY during the edit-config procedure AGT_CB_COMMIT_CHECK has been replaced by AGT_CB_VALIDATE during the commit procedure More...
 
enum  agt_acm_model_t {
  AGT_ACM_MODEL_NONE ,
  AGT_ACM_MODEL_IETF_NACM ,
  AGT_ACM_MODEL_YUMA_NACM ,
  AGT_ACM_MODEL_EXTERNAL
}
 select the YANG module for the access control model More...
 
enum  agt_transaction_model_t {
  AGT_TM_NONE ,
  AGT_TM_SHARED ,
  AGT_TM_PRIVATE
}
 not used yet in YANG-API or NETCONF! More...
 
enum  agt_commit_type_t {
  AGT_COMMIT_TYPE_NONE ,
  AGT_COMMIT_TYPE_NORMAL ,
  AGT_COMMIT_TYPE_REPLAY
}
 NETCONF commit types. More...
 
enum  agt_exit_mode_t {
  AGT_EXIT_MODE_NONE ,
  AGT_EXIT_MODE_OK ,
  AGT_EXIT_MODE_ERROR ,
  AGT_EXIT_MODE_TIMEOUT ,
  AGT_EXIT_MODE_DROPPED
}
 exit reasons for YControl IO loop More...
 
enum  agt_tx_type_t {
  AGT_TX_TYPE_NONE ,
  AGT_TX_TYPE_GET ,
  AGT_TX_TYPE_EDIT ,
  AGT_TX_TYPE_RPC ,
  AGT_TX_TYPE_HOOK
}
 YControl transaction type. More...
 
enum  agt_ccparm_t {
  AGT_CCPARM_NONE ,
  AGT_CCPARM_CONFIRMED ,
  AGT_CCPARM_CONFIRM_TIMEOUT ,
  AGT_CCPARM_PERSIST ,
  AGT_CCPARM_PERSIST_ID
}
 confirmed-commit parms More...
 
enum  agt_ha_role_t {
  AGT_HA_ROLE_NONE ,
  AGT_HA_ROLE_NOT_SET ,
  AGT_HA_ROLE_STANDBY ,
  AGT_HA_ROLE_ACTIVE
}
 server HA mode mode More...
 
enum  agt_ch_proto_t {
  AGT_CH_PROTO_NONE ,
  AGT_CH_PROTO_NETCONF_SSH ,
  AGT_CH_PROTO_NETCONF_TLS ,
  AGT_CH_PROTO_RESTCONF_TLS
}
 server callhome protocol More...
 
enum  agt_crl_mode_t {
  AGT_CRL_MODE_NONE ,
  AGT_CRL_MODE_OFF ,
  AGT_CRL_MODE_CLIENT ,
  AGT_CRL_MODE_CA
}
 server TLS CRL mode More...
 
enum  agt_hook_type_t {
  AGT_HOOK_TYPE_NONE ,
  AGT_HOOK_TYPE_SETHOOK ,
  AGT_HOOK_TYPE_TRANSACTION ,
  AGT_HOOK_TYPE_POST_SETHOOK
}
 Hook types enumeration to specify Hook type. More...
 

Functions

status_t agt_init1 (int argc, char *argv[], boolean *showver, help_mode_t *showhelpmode)
 Initialize the Server Library: stage 1: CLI and profile. More...
 
status_t agt_init1_ex (int argc, char *argv[], boolean factory_restart, boolean *showver, help_mode_t *showhelpmode)
 Initialize the Server Library: stage 1: CLI and profile Added factory_restart parameter. More...
 
status_t agt_init1_sil_sa (void)
 Initialize the Server Library: stage 1: CLI and profile. More...
 
status_t agt_init1_ypserver (int argc, char *argv[], boolean factory_restart, boolean *showver, help_mode_t *showhelpmode)
 Initialize the Server Library: stage 1: CLI and profile Added factory_restart parameter yp-controller is running. More...
 
status_t agt_init2 (void)
 Initialize the Server Library (phase 2 init) More...
 
status_t agt_init2_ex (boolean factory_restart)
 Initialize the Server Library (phase 2 init - extended) More...
 
status_t agt_init2_sil_sa (void)
 Initialize the Server Library for SIL-SA. More...
 
void agt_cleanup (void)
 Cleanup the Server Library. More...
 
void agt_cleanup_sil_sa (void)
 Cleanup the Server Library for SIL-SA usage. More...
 
agt_profile_tagt_get_profile (void)
 Get the server profile struct. More...
 
void agt_request_shutdown (ncx_shutdowntyp_t mode, int intnum)
 Request some sort of server shutdown. More...
 
boolean agt_shutdown_requested (void)
 Check if some sort of server shutdown is in progress. More...
 
ncx_shutdowntyp_t agt_shutdown_mode_requested (void)
 Check what shutdown mode was requested. More...
 
int agt_shutdown_term_signal (void)
 Get the shutdown termination signal if any. More...
 
const xmlChar * agt_cbtype_name (agt_cbtyp_t cbtyp)
 Get the string for the server callback phase. More...
 
boolean agt_advertise_module_needed (const xmlChar *modname)
 Check if the module should be advertised or not. More...
 
void agt_request_replay (void)
 Request replay of the running config to SIL modules because SIL hardware has reset somehow. More...
 
void agt_request_replay_ex (void *cookie)
 Request replay of the running config to SIL modules because SIL hardware has reset somehow. More...
 
void * agt_get_replay_cookie (void)
 Get the current replay cookie. More...
 
void agt_request_replay_subsys (const xmlChar *subsys_id)
 Request replay of the running config to the SIL-SA modules on the specified subsystem. More...
 
boolean agt_replay_requested (void)
 Check if config replay is pending. More...
 
void agt_start_replay (void)
 Start replay of the running config to SIL modules. More...
 
void agt_finish_replay (void)
 Finish replay of the running config to SIL modules. More...
 
status_t agt_register_local_nv_handler (agt_nvload_fn_t load_fn, agt_nvsave_fn_t store_fn)
 Register a set of nvstore and nvload callback functions to handle the non-volatile storage of the configuration. More...
 
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. More...
 
status_t agt_add_allowed_user (const xmlChar *username)
 Add a backptr to the string in the val_value_t containing the username that is allowed. More...
 
void agt_remove_allowed_user (const xmlChar *username)
 Remove an allowed-user name from the running system Does not change any config file allowed-user parameter. More...
 
status_t agt_check_allowed_user (const xmlChar *username)
 Check a username in the allowed-user Q. More...
 
status_t agt_add_superuser (const xmlChar *username)
 Add a backptr to the string in the val_value_t containing the username that is a superuser. More...
 
void agt_remove_superuser (const xmlChar *username)
 Remove a superuser name from the running system Does not change any config file allowed-user parameter. More...
 
status_t agt_check_superuser (const xmlChar *username)
 Check a username in the superuser Q. More...
 
void agt_register_replay_callback (agt_replay_fn_t cbfn)
 Register a callback function for a replay config event. More...
 
const xmlChar * agt_get_server_id (void)
 Get the server-id string. More...
 
const xmlChar * agt_get_server_root (void)
 Get the server-root string. More...
 
const xmlChar * agt_get_server_key (void)
 Get the ha-server-key string. More...
 
boolean agt_is_sil_sa (void)
 Check if server running in SIL-SA mode. More...
 
dlq_hdr_t * agt_get_savedevQ (void)
 Get the agt_savedevQ pointer. More...
 
boolean agt_replay_subsys_is_active (const xmlChar *subsys_id)
 Find a subsys replay request struct in the activeQ. More...
 
boolean agt_replay_main_is_active (void)
 Check if the replay in progress is for the main server or could be for a subsystem. More...
 
const xmlChar * agt_ha_role_str (agt_ha_role_t ha_role)
 Get the string for the specified HA role enumeration. More...
 
agt_ha_role_t agt_ha_role_enum (const xmlChar *ha_role)
 Get the enum for the specified HA role string. More...
 
boolean agt_use_notifications (void)
 Check if notifications currently enabled. More...
 
status_t agt_check_load_config (agt_ha_role_t ha_role)
 Check if the boot-time load-config should be done because it was deferred while waiting for the YP-HA role to be set. More...
 
boolean agt_init2_done (void)
 Check if the init2 phase is complete. More...
 
boolean agt_init2_load_done (void)
 Check if the init2 phase is complete and all modules loaded. More...
 
boolean agt_advertise_yang11_module_needed (ncx_module_t *mod)
 Check whether the NETCONF hello message should conform to the standard and leave out YANG 1.1 modules. More...
 
void agt_set_factory_restart (void)
 Set the flag so the server will restart with the factory config. More...
 
boolean agt_in_factory_restart (void)
 Check if a factory restort is in progress. More...
 
status_t agt_add_modcache (ncx_modcache_t *mc)
 Add a module to the modcache queue and hash table. More...
 
ncx_modcache_tagt_find_modcache (const xmlChar *modname)
 Find a module to the modcache queue and hash table. More...
 
status_t agt_run_extloop (void)
 Run the agt_ncxserver in external loop mode. More...
 
status_t agt_enter_maintenance_mode (boolean read_ok, boolean operation_ok)
 Set the server to mainenance mode to block client activity. More...
 
status_t agt_exit_maintenance_mode (void)
 Exit the server from mainenance mode to unblock client activity. More...
 
boolean agt_in_maintenance_mode (void)
 Return true if in mainenance mode now. More...
 
boolean agt_maintenance_mode_read_ok (void)
 Return true if in maintenance mode reads OK;. More...
 
boolean agt_maintenance_mode_operation_ok (void)
 Return true if in maintenance mode operations OK;. More...
 
boolean agt_maintenance_mode_session_ok (void)
 Return true if in maintenance mode new sessions OK;. More...
 
void agt_set_eventlog_size (uint32 eventlog_size)
 Set the eventlog-size parameter. More...
 
void agt_set_max_burst (uint32 max_burst)
 Set the max-burst parameter. More...
 
void agt_set_max_getbulk (uint32 max_getbulk)
 Set the max-getbulk parameter. More...
 
agt_not_msg_tagt_make_term_msg (const xmlChar *msg, status_t *res)
 Create a <term-msg> notification. More...
 
status_t agt_init_term_msg_module (void)
 Init the term-msg module and object backptr. More...
 
boolean agt_use_nmda (void)
 Check if NMDA is enabled. More...
 
boolean agt_use_new_yanglib (void)
 Check if NMDA or use-new-yanglib is enabled. More...
 
boolean agt_waiting_datastore_ready (void)
 Check if client sessions are blocked until the datastore is ready. More...
 
boolean agt_use_yang_cbor (void)
 Check if YANG CBOR is enabled. More...
 
const char * agt_get_aflocal_sockname (void)
 Get the AFLOCAL socket name to use for <ncx-connect> More...
 
const xmlChar * agt_get_user_parm (void)
 Get the user-parm string (if any) More...
 
status_t agt_add_maxuser_parm (const xmlChar *cliparm)
 Add a maxuser parameter value. More...
 
status_t agt_get_maxuser_parm (const xmlChar *username, uint16 *retval)
 Get the maxuser max-sessions value for a specified user. More...
 
boolean agt_protocol_enabled (const xmlChar *proto)
 Check if protocol sessions are enabled. More...
 
status_t agt_enable_protocol (const xmlChar *proto)
 Enable the named protocol. More...
 
status_t agt_disable_protocol (const xmlChar *proto)
 Disable the named protocol. More...
 
boolean agt_yang_push_is_enabled (void)
 Check if agt_push is enabled. More...
 

Detailed Description

Multi-Protocol Network Management Server.