yumapro  21.10T-8
YumaPro SDK
agt.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_agt
13 #define _H_agt
14 
15 /* FILE: agt.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
28 /*********************************************************************
29 * *
30 * C H A N G E H I S T O R Y *
31 * *
32 *********************************************************************
33 
34 date init comment
35 ----------------------------------------------------------------------
36 04-nov-05 abb Begun
37 02-aug-08 abb Convert from NCX typdef to YANG object design
38 03-oct-08 abb Convert to YANG only, remove app, parmset,
39  and parm layers in the NETCONF database
40 */
41 
42 #ifndef _H_agt_not
43 #include "agt_not.h"
44 #endif
45 
46 #ifndef _H_help
47 #include "help.h"
48 #endif
49 
50 #ifndef _H_log
51 #include "log.h"
52 #endif
53 
54 #ifndef _H_ncxtypes
55 #include "ncxtypes.h"
56 #endif
57 
58 #ifndef _H_status
59 #include "status.h"
60 #endif
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 
67 /* define a top-level header here here */
68 
69 
157 /* header field defined here, used in rest of library */
158 
170 /********************************************************************
171 * *
172 * C O N S T A N T S *
173 * *
174 *********************************************************************/
175 
185 #define AGT_NUM_CB (AGT_CB_ROLLBACK+1)
186 
188 #define AGT_MAX_PORTS 4
189 
193 #define AGT_DEF_SUBSYS_TIMEOUT 30
194 
196 #define AGT_DEF_CONF_FILE \
197  (const xmlChar *)"/etc/yumapro/netconfd-pro.conf"
198 
200 #define AGT_DEF_FACTORY_CONFIG_FILE \
201  (const xmlChar *)"factory-startup-cfg.xml"
202 
204 #define AGT_DEF_CONF_DIR (const xmlChar *)"/etc/yumapro/netconfd-pro.d"
205 
207 #define AGT_DEF_FHS_LOG_FILE \
208  (const xmlChar *)"/var/log/netconfd-pro/server.log"
209 
211 #define AGT_DEF_SYSLIB_FILE (const xmlChar *)"libyp_system.so"
212 
214 #define AGT_SYSLIB_NAME (const xmlChar *)"yp_system"
215 
217 #define AGT_DEF_BACKUP_DIR (const xmlChar *)"$HOME/.yumapro/backups"
218 
220 #define AGT_DEF_BACKUPS_NAME (const xmlChar *)"backups"
221 
223 #define AGT_DEF_FHS_BACKUP_DIR \
224  (const xmlChar *)"/var/lib/netconfd-pro/backups"
225 
229 #define AGT_DEF_DELETE_EMPTY_NP FALSE
230 
234 #define AGT_DEF_SYSTEM_SORTED FALSE
235 
237 #define AGT_DEF_LAX_NAMESPACES TRUE
238 
240 #define AGT_DEF_EVENTLOG_SIZE 1000
241 
243 #define AGT_DEF_MAX_BURST 10
244 
246 #define AGT_DEF_HELLO_TIMEOUT 300
247 
249 #define AGT_DEF_IDLE_TIMEOUT 3600
250 
252 #define AGT_DEF_LINESIZE 72
253 
255 #define AGT_DEF_INDENT 1
256 
258 #define AGT_DEF_MESSAGE_INDENT (-1)
259 
261 #define AGT_DEF_MAX_SESSIONS 8
262 
264 #define AGT_DEF_MAX_CLI_SESSIONS 0
265 
267 #define AGT_DEF_YANGAPI_SERVER_URL (const xmlChar *)"http://localhost"
268 
270 #define AGT_DEF_RESTCONF_SERVER_URL (const xmlChar *)"http://localhost"
271 
273 #define AGT_DEF_SAVE_OWNERS FALSE
274 
276 #define AGT_DEF_JSON_LEAF_LIST_1LINE FALSE
277 
279 #define AGT_DEF_SAVE_CONFIG_SYSTEM FALSE
280 
282 #define AGT_DEF_GETBULK_MAX 10
283 
285 #define AGT_DEF_WITH_CONFIG_ID TRUE
286 
288 #define AGT_DEF_WITH_OCPATTERN FALSE
289 
291 #define AGT_DEF_NO_NVSTORE FALSE
292 
294 #define AGT_DEF_WITH_CALLHOME FALSE
295 
297 #define AGT_DEF_CALLHOME_RETRY_INT 60
298 
300 #define AGT_DEF_CALLHOME_RETRY_MAX 10
301 
303 #define AGT_DEF_CALLHOME_PORT NCX_DEF_SSH_CALLHOME
304 
306 #define AGT_DEF_CALLHOME_TLS_PORT NCX_DEF_TLS_CALLHOME
307 
309 #define AGT_DEF_CALLHOME_RESTCONF_TLS_PORT NCX_DEF_RESTCONF_TLS_CALLHOME
310 
312 #define AGT_YUMAWORKS_CALLHOME_MODULE (const xmlChar *)"yumaworks-callhome"
313 
315 #define AGT_YUMAWORKS_CALLHOME_REVISION (const xmlChar *)"2020-10-17"
316 #define AGT_DEF_FILELOC_FHS FALSE
317 
319 #define AGT_DEF_NO_AUDIT_LOG FALSE
320 
325 #define AGT_DEF_CRYPT_HASH_PREFIX (const xmlChar *)"$6$"
326 
328 #define AGT_DEF_MIN_PASSWD_LEN 8
329 
331 #define AGT_DEF_HA_ENABLED FALSE
332 
334 #define AGT_DEF_HA_SIL_STANDBY FALSE
335 
337 #define AGT_DEF_HA_PORT 8088
338 
340 #define AGT_DEF_HA_STANDBY_MODE AGT_HA_MODE_HOT_STANDBY
341 
343 #define AGT_DEF_YPCOAP_PORT 5683
344 
346 #define AGT_DEF_YPCOAP_DTLS_PORT 5684
347 
349 #define AGT_DEF_YPCOAP_ADDRESS (const xmlChar *)"0.0.0.0"
350 
352 #define AGT_DEF_RESTCONF_DEFAULT_ENCODING NCX_MSG_ENCODING_JSON
353 
355 #define AGT_DEF_TLS_PORT 6513
356 
358 #define AGT_DEF_DB_LOCK_RETRY 500 // mSec
359 
361 #define AGT_DEF_DB_LOCK_TIMEOUT 20 // Sec
362 
364 #define AGT_DEF_WITH_YUMAWORKS_CONFIG_CHANGE FALSE
365 
367 #define AGT_DEF_WITH_YUMAWORKS_CALLHOME TRUE
368 
370 #define AGT_DEF_WITH_YUMAWORKS_EVENT_STREAM TRUE
371 
373 #define AGT_DEF_WITH_NMDA FALSE
374 
376 #define AGT_DEF_STARTUP_SKIP_VALIDATION FALSE
377 
379 #define AGT_DEF_RETURN_STATUS FALSE
380 
384 #define AGT_DEF_WAIT_DATASTORE_READY FALSE
385 
387 #define AGT_SELECT_TIMEOUT_SEC 0
388 
391 #define AGT_SELECT_TIMEOUT_USEC 10000
392 
394 #define AGT_USER_VAR (const xmlChar *)"user"
395 
397 #define AGT_URL_SCHEME_LIST (const xmlChar *)"file"
398 
400 #define AGT_URL_SCHEME_LIST_TFTP (const xmlChar *)"file,tftp"
401 
403 #define AGT_FILE_SCHEME (const xmlChar *)"file:
404 
405 
406 #define AGT_TOASTER_MOD (const xmlChar *)"toaster"
407 
409 #define AGT_TEST_MOD (const xmlChar *)"test"
410 
412 #define AGT_SIL_SA (const xmlChar *)"sil-sa"
413 
415 #define AGT_DB_API (const xmlChar *)"db-api"
416 
418 #define AGT_YP_HA (const xmlChar *)"yp-ha"
419 
421 #define AGT_YP_GNMI (const xmlChar *)"yp-gnmi"
422 
424 #define AGT_YP_GRPC (const xmlChar *)"yp-grpc"
425 
427 #define AGT_YCONTROL_MOD (const xmlChar *)"yumaworks-ycontrol"
428 
430 #define AGT_DB_API_MOD (const xmlChar *)"yumaworks-db-api"
431 
433 #define AGT_SIL_SA_MOD (const xmlChar *)"yumaworks-sil-sa"
434 
436 #define AGT_PROFILE_MOD (const xmlChar *)"yumaworks-agt-profile"
437 
439 #define AGT_ACTION_MOD (const xmlChar *)"yang-attributes"
440 
442 #define AGT_YP_HA_MOD (const xmlChar *)"yumaworks-yp-ha"
443 
445 #define AGT_TEMPLATES_MOD (const xmlChar *)"yumaworks-templates"
446 
448 #define AGT_YP_GNMI_MOD (const xmlChar *)"yumaworks-yp-gnmi"
449 
451 #define AGT_YP_GRPC_MOD (const xmlChar *)"yumaworks-yp-grpc"
452 
454 #define AGT_DEF_SERVER_ID (const xmlChar *)"server1"
455 
457 #define AGT_WITHDEF_MOD (const xmlChar *)"ietf-netconf-with-defaults"
458 
459 
463 #define AGT_TEST_FL_MIN_ELEMS bit0
464 
466 #define AGT_TEST_FL_MAX_ELEMS bit1
467 
469 #define AGT_TEST_FL_MANDATORY bit2
470 
472 #define AGT_TEST_FL_MUST bit3
473 
475 #define AGT_TEST_FL_UNIQUE bit4
476 
478 #define AGT_TEST_FL_XPATH_TYPE bit5
479 
481 #define AGT_TEST_FL_CHOICE bit6
482 
484 #define AGT_TEST_FL_WHEN bit7
485 
487 #define AGT_TEST_ALL_COMMIT_MASK (bit0|bit1|bit2|bit3|bit4|bit5|bit6)
488 
490 #define AGT_TEST_INSTANCE_MASK (bit0|bit1|bit2|bit4|bit6)
491 
493 #define AGT_CLI_NOSTARTUP (const xmlChar *)"no-startup"
494 
496 #define AGT_CLI_STARTUP (const xmlChar *)"startup"
497 
499 #define AGT_CLI_FACTORY_STARTUP (const xmlChar *)"factory-startup"
500 
502 #define AGT_CLI_STARTUP_FACTORY_FILE (const xmlChar *)"startup-factory-file"
503 
505 #define AGT_EVAL_REQUEST_LIMIT 250
506 
510 #define AGT_MAX_OWNER_ID 255
511 
513 #define AGT_WATCHER (const xmlChar *)"ypwatcher"
514 
516 #define AGT_DEF_WAT_INTERVAL 10
517 
519 #define AGT_DEF_SSHD_COMMAND (const xmlChar *)"/usr/sbin/sshd"
520 
522 #define AGT_DEF_SUBSYS_COMMAND \
523  (const xmlChar *)"/usr/sbin/netconf-subsystem-pro"
524 
526 #define AGT_DEF_SNMP_SUBAGENT_PRIO 127
527 
528 /* flags for the agt_auditlog_events mask from
529  * --audit-log-events CLI parameter.
530  * edit-candidate events are generated when an edit
531 * to <candidate> is completed.
532  */
533 #define AGT_FL_AUDIT_EDIT_CANDIDATE bit0
534 
538 #define AGT_FL_AUDIT_EDIT_RUNNING bit1
539 
543 #define AGT_FL_AUDIT_UPDATE_STARTUP bit2
544 
546 #define AGT_FL_AUDIT_CLIENT_SESSION bit3
547 
549 #define AGT_FL_AUDIT_CONTROL_SESSION bit4
550 
552 #define AGT_FL_AUDIT_NACM_WRITE_ERROR bit5
553 
555 #define AGT_FL_AUDIT_NACM_EXEC_ERROR bit6
556 
558 #define AGT_FL_AUDIT_RPC_SUMMARY bit7
559 
561 #define AGT_FL_AUDIT_EDIT_DATA bit8
562 
564 #define AGT_DEF_AUDIT_EVENTS AGT_FL_AUDIT_EDIT_RUNNING
565 
567 #define AGT_DEF_CRL_MISSING_OK false
568 
570 #define AGT_DEF_CRL_MODE AGT_CRL_MODE_OFF
571 
573 #define AGT_DEF_CVT_SUBTREE_FILTER false
574 
578 #define AGT_DEF_PUSH_MIN_PERIOD 100
579 
581 #define AGT_DEF_PUSH_MIN_DAMPENING 100
582 
584 #define AGT_DEF_PUSH_MAX_PERIODIC 16
585 
587 #define AGT_DEF_PUSH_MAX_OPERATIONAL 4
588 
590 #define AGT_DEF_PUSH_SIMOP_ENABLED true
591 
593 #define AGT_DEF_PUSH_SIMOP_PERIOD 500
594 
596 #define AGT_DEF_PUSH_SIMOP_PATCH_UPDATE true
597 
598 
599 
600 
601 
602 /********************************************************************
603 * *
604 * T Y P E S *
605 * *
606 *********************************************************************/
607 
609 typedef enum agt_acmode_t_ {
615 } agt_acmode_t;
616 
617 
625 typedef enum agt_cbtyp_t_ {
630 } agt_cbtyp_t;
631 
632 
634 typedef enum agt_acm_model_t_ {
640 
641 
643 typedef enum agt_transaction_model_t_ {
648 
649 
651 typedef enum agt_commit_type_t_ {
656 
657 
659 typedef enum agt_exit_mode_t_ {
666 
667 
669 typedef enum agt_tx_type_t_ {
675 } agt_tx_type_t;
676 
677 
679 typedef enum agt_ccparm_t_ {
685 } agt_ccparm_t;
686 
687 
689 typedef enum agt_ha_role_t_ {
694 } agt_ha_role_t;
695 
696 
698 typedef enum agt_ch_proto_t_ {
704 
705 
707 typedef enum agt_crl_mode_t_ {
713 
714 
716 typedef enum agt_hook_type_t_ {
722 
723 
727 typedef struct agt_replay_subsys_t_ {
728  dlq_hdr_t qhdr;
729  xmlChar *subsys_id;
731 
732 
766 typedef struct agt_profile_t_ {
771 
774 
777 
780 
783 
786 
789 
792 
795 
798 
800  boolean agt_usestartup;
801 
804 
806  boolean agt_startup_error; /* T: stop, F: check fallback */
807 
809  boolean agt_running_error; /* T: stop, F: check fallback */
810 
812  boolean agt_logappend;
813 
815  boolean agt_xmlorder;
816 
819 
822 
825 
828 
837 
839  boolean agt_term_msg;
840 
842  boolean agt_alt_names;
843 
845  boolean agt_wildcards;
846 
849 
851  agt_transaction_model_t agt_transaction_model;
852 
854  const xmlChar *agt_accesscontrol;
855 
857  const xmlChar *agt_conffile;
858 
860  const xmlChar *agt_confdir;
861 
863  const xmlChar *agt_logfile;
864 
866  const xmlChar *agt_startup;
867 
869  const xmlChar *agt_startup_factory_file;
870 
872  const xmlChar *agt_defaultStyle;
873 
878  //const xmlChar *agt_superuser;
879 
881  const xmlChar *agt_extern_libspec;
882 
884  const xmlChar *agt_backup_dir;
885 
887  const xmlChar *agt_server_id;
888 
891 
893  uint32 agt_maxburst;
894 
897 
900 
902  uint32 agt_linesize;
903 
905  int32 agt_indent;
906 
909 
912 
914  boolean agt_useurl;
915 
918 
921 
924 
926  boolean agt_use_cli;
927 
930 
933 
936 
939 
942 
944  agt_acm_model_t agt_acm_model;
945 
948 
951 
954 
957 
960 
962  uint16 agt_ports[AGT_MAX_PORTS];
963 
966 
969 
971  const xmlChar *agt_coap_address;
972 
974  const xmlChar *agt_yangapi_server_url;
975 
977  const xmlChar *agt_restconf_server_url;
978 
981 
984 
987 
990 
993 
996 
1002 
1005 
1013 
1016 
1019 
1022 
1025 
1028 
1031 
1033  const xmlChar *agt_subsys_info_file;
1034 
1037 
1040 
1048 
1059 
1065 
1072 
1078 
1083 
1088 
1097 
1102  const xmlChar *agt_crypt_hash_prefix;
1103 
1106 
1114 
1117 
1120 
1123 
1126 
1129 
1132 
1135 
1138 
1141 
1144 
1146  uint16 agt_ha_port;
1147 
1149  const xmlChar *agt_ha_server_key;
1150 
1152  const xmlChar *agt_ha_initial_active;
1153 
1154  // leaf-list ha-server not stored here; not sent to subsys
1155 
1158 
1163 
1164  /* TBD: add this data to subsystems in the near future */
1165 
1170 
1176 
1182 
1194 
1198  boolean agt_with_yang11_hello; /* d: false */
1199 
1206 
1211 
1217 
1218  /* the callhome-server parameter is handled by agt_callhome */
1219 
1224  const xmlChar *agt_sshd_path;
1225 
1230  const xmlChar *agt_subsys_path;
1231 
1236  const xmlChar *agt_sshd_config;
1237 
1238 
1245 
1248 
1251 
1254 
1256  boolean agt_startup_fallback; /* T: restart, F: continue */
1257 
1259  boolean agt_running_fallback; /* T: restart, F: continue */
1260 
1261 
1262  /* the SNMP agent parameters */
1263 
1265  boolean agt_with_snmp;
1266 
1269 
1274 
1277  boolean agt_useurl_ftp;
1281 
1284 
1286  const xmlChar *agt_netconf_tls_address;
1287 
1290 
1292  const xmlChar *agt_netconf_tls_key;
1293 
1296 
1299 
1302 
1304  const xmlChar *agt_cert_default_user;
1305 
1307  const xmlChar *agt_errmsg_lang;
1308 
1311 
1316 
1319 
1322 
1325 
1327  boolean agt_with_gnmi;
1328 
1333 
1336 
1339 
1345 
1351 
1354 
1357 
1364 
1367 
1370 
1373 
1376 
1379 
1382 
1385 
1388 
1390  agt_crl_mode_t agt_crl_mode;
1391 
1394 
1396  boolean agt_with_nmda;
1397 
1400 
1403 
1406 
1409 
1411  uint16 agt_push_min_period; // centiseconds
1412 
1414  uint16 agt_push_min_dampening; // centiseconds
1415 
1417  uint32 agt_push_max_periodic; // count
1418 
1420  uint32 agt_push_max_operational; // count
1421 
1424 
1427 
1430 
1433 
1436 
1439 
1449 
1450  /****** state variables; TBD: move out of profile ******/
1451 
1454 
1456  boolean agt_load_done;
1457 
1460 
1463 
1466 
1469 
1472 
1475 
1477  dlq_hdr_t agt_savedevQ;
1478 
1480  dlq_hdr_t agt_commit_testQ;
1481 
1484 
1487 
1490 
1493  boolean agt_confdir_skipped;
1494 
1496  agt_ha_role_t agt_ha_role;
1497 
1500 
1501 
1503  boolean agt_with_grpc;
1504 
1505 } agt_profile_t;
1506 
1507 
1511 /******************* External System Callbacks ***********************/
1512 
1526 typedef void (*agt_system_init_profile_fn_t)
1527  (agt_profile_t *profile);
1528 
1529 
1543  (boolean pre_cli);
1544 
1545 
1560  (boolean pre_load);
1561 
1562 
1568 typedef void (*agt_system_cleanup_fn_t) (void);
1569 
1570 
1581 typedef status_t (*agt_nvsave_fn_t)
1583  const xmlChar *filespec);
1584 
1585 
1600 typedef status_t (*agt_nvload_fn_t)
1602  xmlChar **filespec);
1603 
1604 
1608 typedef struct agt_syslib_cb_t_ {
1610  dlq_hdr_t qhdr;
1611 
1613  void *handle;
1614 
1616  xmlChar *libspec;
1617 
1620 
1623 
1626 
1629 
1632 
1635 
1637  boolean cleanup_done;
1638 } agt_syslib_cb_t;
1639 
1640 
1650 typedef void (*agt_replay_fn_t) (boolean is_start);
1651 
1652 
1656 /********************************************************************
1657 * *
1658 * F U N C T I O N S *
1659 * *
1660 *********************************************************************/
1661 
1662 
1686 extern status_t
1687  agt_init1 (int argc,
1688  char *argv[],
1689  boolean *showver,
1690  help_mode_t *showhelpmode);
1691 
1692 
1706 extern status_t
1707  agt_init1_ex (int argc,
1708  char *argv[],
1709  boolean factory_restart,
1710  boolean *showver,
1711  help_mode_t *showhelpmode);
1712 
1713 
1721 extern status_t
1722  agt_init1_sil_sa (void);
1723 
1724 
1739 extern status_t
1740  agt_init1_ypserver (int argc,
1741  char *argv[],
1742  boolean factory_restart,
1743  boolean *showver,
1744  help_mode_t *showhelpmode);
1745 
1746 
1759 extern status_t
1760  agt_init2 (void);
1761 
1762 
1776 extern status_t
1777  agt_init2_ex (boolean factory_restart);
1778 
1779 
1785 extern status_t
1786  agt_init2_sil_sa (void);
1787 
1788 
1795 extern void
1796  agt_cleanup (void);
1797 
1798 
1805 extern void
1806  agt_cleanup_sil_sa (void);
1807 
1808 
1816 extern agt_profile_t *
1817  agt_get_profile (void);
1818 
1819 
1827 extern void
1829  int intnum);
1830 
1831 
1837 extern boolean
1838  agt_shutdown_requested (void);
1839 
1840 
1846 extern ncx_shutdowntyp_t
1848 
1849 
1856 extern int
1857  agt_shutdown_term_signal (void);
1858 
1859 
1866 extern const xmlChar *
1867  agt_cbtype_name (agt_cbtyp_t cbtyp);
1868 
1869 
1879 extern boolean
1880  agt_advertise_module_needed (const xmlChar *modname);
1881 
1882 
1891 extern void agt_request_replay (void);
1892 
1893 
1903 extern void agt_request_replay_ex (void *cookie);
1904 
1905 
1911 extern void * agt_get_replay_cookie (void);
1912 
1913 
1924 extern void
1925  agt_request_replay_subsys (const xmlChar *subsys_id);
1926 
1927 
1933 extern boolean agt_replay_requested (void);
1934 
1935 
1941 extern void agt_start_replay (void);
1942 
1943 
1949 extern void agt_finish_replay (void);
1950 
1951 
1960 extern status_t
1962  agt_nvsave_fn_t store_fn);
1963 
1964 
1975 extern status_t
1977  const xmlChar *filespec);
1978 
1979 
1988 extern status_t
1989  agt_add_allowed_user (const xmlChar *username);
1990 
1991 
1998 extern void
1999  agt_remove_allowed_user (const xmlChar *username);
2000 
2001 
2008 extern status_t
2009  agt_check_allowed_user (const xmlChar *username);
2010 
2011 
2012 
2021 extern status_t
2022  agt_add_superuser (const xmlChar *username);
2023 
2024 
2031 extern void
2032  agt_remove_superuser (const xmlChar *username);
2033 
2034 
2041 extern status_t
2042  agt_check_superuser (const xmlChar *username);
2043 
2044 
2050 extern void
2052 
2053 
2059 extern const xmlChar *
2060  agt_get_server_id (void);
2061 
2062 
2068 extern const xmlChar *
2069  agt_get_server_key (void);
2070 
2071 
2077 extern boolean
2078  agt_is_sil_sa (void);
2079 
2080 
2086 extern dlq_hdr_t *
2087  agt_get_savedevQ (void);
2088 
2089 
2096 extern boolean
2097  agt_replay_subsys_is_active (const xmlChar *subsys_id);
2098 
2099 
2106 extern boolean
2108 
2109 
2116 extern const xmlChar *
2117  agt_ha_role_str (agt_ha_role_t ha_role);
2118 
2119 
2126 extern agt_ha_role_t
2127  agt_ha_role_enum (const xmlChar *ha_role);
2128 
2129 
2136 extern boolean
2137  agt_use_notifications (void);
2138 
2139 
2147 extern status_t
2148  agt_check_load_config (agt_ha_role_t ha_role);
2149 
2150 
2156 extern boolean
2157  agt_init2_done (void);
2158 
2159 
2171 extern boolean
2173 
2174 
2180 extern void
2181  agt_set_factory_restart (void);
2182 
2183 
2193 extern boolean
2194  agt_in_factory_restart (void);
2195 
2196 
2203 extern status_t
2205 
2206 
2213 extern ncx_modcache_t *
2214  agt_find_modcache (const xmlChar *modname);
2215 
2216 
2222 extern status_t
2223  agt_run_extloop (void);
2224 
2225 
2233 extern status_t
2234  agt_enter_maintenance_mode (boolean read_ok,
2235  boolean operation_ok);
2236 
2237 
2243 extern status_t
2245 
2246 
2252 extern boolean
2253  agt_in_maintenance_mode (void);
2254 
2255 
2263 extern boolean
2265 
2266 
2274 extern boolean
2276 
2277 
2283 extern boolean
2285 
2286 
2292 extern void
2293  agt_set_eventlog_size (uint32 eventlog_size);
2294 
2295 
2301 extern void
2302  agt_set_max_burst (uint32 max_burst);
2303 
2304 
2310 extern void
2311  agt_set_max_getbulk (uint32 max_getbulk);
2312 
2313 
2322 extern agt_not_msg_t *
2323  agt_make_term_msg (const xmlChar *msg,
2324  status_t *res);
2325 
2326 
2332 extern status_t
2333  agt_init_term_msg_module (void);
2334 
2335 
2341 extern boolean
2342  agt_use_nmda (void);
2343 
2344 
2351 extern boolean
2353 
2354 
2358 #ifdef __cplusplus
2359 } /* end extern 'C' */
2360 #endif
2361 
2362 #endif /* _H_agt */
not set
Definition: agt.h:717
const xmlChar * agt_coap_address
Coap over DTLS address (not implemented)
Definition: agt.h:971
boolean agt_use_cli
enable yp-shell
Definition: agt.h:926
boolean agt_support_save
d: true (needs WITH_SUPPORT_SAVE=1)
Definition: agt.h:836
const xmlChar * agt_restconf_server_url
RESTCONF server URL.
Definition: agt.h:977
boolean agt_use_restconf
enable RESTCONF protocol
Definition: agt.h:923
agt_acm_model_t
select the YANG module for the access control model
Definition: agt.h:634
status_t(* agt_nvload_fn_t)(ncx_display_mode_t *encoding, xmlChar **filespec)
nvload callback
Definition: agt.h:1601
status_t agt_init2_ex(boolean factory_restart)
Initialize the Server Library (phase 2 init - extended)
Definition: agt.c:3421
boolean agt_use_db_lock
db-lock used only if WITH_YCONTROL=1 and CLI set
Definition: agt.h:1375
agt_not_msg_t * agt_make_term_msg(const xmlChar *msg, status_t *res)
Create a <term-msg> notification.
Definition: agt.c:5577
uint16 agt_ha_port
port number is default 8088
Definition: agt.h:1146
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...
Definition: agt.c:5240
xmlChar * agt_conf_dirspec
malloced string indicating the confdir pathspec in use
Definition: agt.h:1492
uint8 agt_min_passwd_len
minimum password length when setting crypt-hash variables
Definition: agt.h:1105
agt_system_cleanup_fn_t cleanup_fn
cleanup callback
Definition: agt.h:1628
ncx_snmp_agt_role_t
enum to identify the SNMP agent native mode
Definition: ncxtypes.h:1466
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:386
const xmlChar * agt_netconf_tls_key
–netconf-tls-key parameter
Definition: agt.h:1292
P3-neg: write operation rollback.
Definition: agt.h:629
boolean agt_cvt_subtree_filter
convert-subtree-filterparameter
Definition: agt.h:1402
int32 agt_max_strlen
max-strlen parameter
Definition: agt.h:1378
boolean agt_allow_tcp_socket
allow a TCP socket instead of an AF_LOCAL socket for connections
Definition: agt.h:1027
const xmlChar * agt_startup_factory_file
factory startup filespec
Definition: agt.h:869
boolean agt_use_yumaworks_event_filter
load yumaworks-event-filter module
Definition: agt.h:992
boolean agt_has_startup
has startup flag for –with-startup
Definition: agt.h:797
boolean agt_trim_whitespace
–trim-whitespace CLI parameter
Definition: agt.h:1283
ncx_agttarg_t agt_targ
BEGIN DATA SENT TO SUBSYSTEMS; target type (candidate or running)
Definition: agt.h:770
boolean agt_replay_main_is_active(void)
Check if the replay in progress is for the main server or could be for a subsystem.
Definition: agt.c:5021
ncx_msg_encoding_t agt_restconf_default_encoding
this enum indicates the –restconf-default-encoding CLI parameter
Definition: agt.h:1253
not set
Definition: agt.h:708
status_t init1_status
init1 callback result
Definition: agt.h:1631
boolean agt_with_yang11_hello
this field indicates whether the NETCONF hello message should conform to the standard and leave out Y...
Definition: agt.h:1198
agt_crl_mode_t
server TLS CRL mode
Definition: agt.h:707
status_t(* agt_nvsave_fn_t)(ncx_display_mode_t encoding, const xmlChar *filespec)
brief nvsave callback
Definition: agt.h:1582
boolean agt_usevalidate
–with-validate parameter
Definition: agt.h:911
boolean agt_load_validate_errors
server load-config had errors flag
Definition: agt.h:1459
const xmlChar * agt_startup
startup filespec
Definition: agt.h:866
P1: write operation validate.
Definition: agt.h:626
boolean agt_use_rollback_on_error
Use rollback-on-error.
Definition: agt.h:1001
not set
Definition: agt.h:680
void agt_register_replay_callback(agt_replay_fn_t cbfn)
Register a callback function for a replay config event.
Definition: agt.c:4914
status_t(* agt_system_init2_fn_t)(boolean pre_load)
system init2 callback
Definition: agt.h:1560
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...
Definition: agt.c:3366
struct to keep track of the dynamic external yp-system hooks library
Definition: agt.h:1608
uint16 agt_subsys_timeout
subsystem timeout in seconds
Definition: agt.h:959
boolean agt_delete_empty_npcontainers
delete empty config=true NP containers: d: false
Definition: agt.h:827
const xmlChar * agt_get_server_key(void)
Get the ha-server-key string.
Definition: agt.c:4948
uint16 agt_coap_port
the CoAP port number used only if WITH_COAP and agt_use_coap set
Definition: agt.h:965
uint16 agt_push_min_dampening
push-min-dampening parameter
Definition: agt.h:1414
agt_system_init2_fn_t init2_fn
init2 callback
Definition: agt.h:1625
status_t agt_init1(int argc, char *argv[], boolean *showver, help_mode_t *showhelpmode)
Initialize the Server Library: stage 1: CLI and profile.
Definition: agt.c:3259
agt_tx_type_t
YControl transaction type.
Definition: agt.h:669
const xmlChar * agt_crypt_hash_prefix
specifies the string that will be pre-pended to the password before calling crypt_r to generate the h...
Definition: agt.h:1102
ncx_name_match_t
Node name match modes.
Definition: ncxtypes.h:673
boolean agt_load_factory_fallback
server load-config allowed to use factory-fallback flag
Definition: agt.h:1471
boolean agt_sil_wait_sa
No CLI parameter!! Set to TRUE in agt_profile.c the load-config will wait if agt_ncx_load_any_waiting...
Definition: agt.h:1350
boolean agt_with_config_id
this field indicates if the :config-id capability is enabled or not.
Definition: agt.h:1181
agt_exit_mode_t
exit reasons for YControl IO loop
Definition: agt.h:659
int32 agt_indent
–indent parameter
Definition: agt.h:905
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.
Definition: agt.c:3296
NACM completely off.
Definition: agt.h:614
const xmlChar * agt_accesscontrol
access control model
Definition: agt.h:854
boolean agt_is_sil_sa(void)
Check if server running in SIL-SA mode.
Definition: agt.c:4964
agt_transaction_model_t agt_transaction_model
TBD private transaction model.
Definition: agt.h:851
boolean agt_stream_output
stream message output: d:true; no CLI support yet
Definition: agt.h:824
const xmlChar * agt_netconf_tls_address
–netconf-tls-address parameter
Definition: agt.h:1286
boolean agt_load_top_rootcheck_errors
server load-config had top root-check errors flag
Definition: agt.h:1465
void agt_cleanup_sil_sa(void)
Cleanup the Server Library for SIL-SA usage.
Definition: agt.c:4189
boolean agt_maintenance_mode_operation_ok(void)
Return true if in maintenance mode operations OK;.
Definition: agt.c:5445
boolean agt_startup_create_ok
no CLI parameter!! set to TRUE! change in yp-system library or agt_profile.c
Definition: agt.h:1315
uint16 agt_snmp_subagent_priority
identify the SNMP subagent priority, what priority will be used for OID callbacks registration ...
Definition: agt.h:1273
Multiple instances are not supported.
Definition: agt.h:766
boolean agt_with_yumaworks_config_change
with-yumaworks-config-change
Definition: agt.h:1384
const xmlChar * agt_backup_dir
backup dir location
Definition: agt.h:884
permissive mode, read + exec allowed
Definition: agt.h:612
const xmlChar * agt_confdir
config dir: default: /etc/yumapro/netconfd-pro.d
Definition: agt.h:860
boolean agt_validate_all
validate all flag
Definition: agt.h:794
boolean agt_sil_invoke_for_defaults
–sil-invoke-for-defaults parameter
Definition: agt.h:1324
void agt_set_eventlog_size(uint32 eventlog_size)
Set the eventlog-size parameter.
Definition: agt.c:5400
ncx_agttarg_t
enum to identify the agent native target
Definition: ncxtypes.h:504
boolean agt_log_acm_reads
log NACM read requests
Definition: agt.h:788
agt_system_init1_fn_t init1_fn
init1 callback
Definition: agt.h:1622
uint16 agt_coap_dtls_port
Coap over DTLS port (not implemented)
Definition: agt.h:968
boolean agt_with_yumaworks_callhome
with-yumaworks-callhome
Definition: agt.h:1381
boolean agt_defer_load
saved defer load config flag
Definition: agt.h:1499
not set
Definition: agt.h:670
const xmlChar * agt_netconf_tls_trust_store
–netconf-tls-trust-store parameter
Definition: agt.h:1298
boolean agt_use_ycontrol
enable YControl protocol
Definition: agt.h:1004
boolean agt_use_ccommit
enable confirmed-comiit
Definition: agt.h:917
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1052
boolean agt_json_leaf_list_1line
flag to print JSON leaf-list value on 1 line
Definition: agt.h:1039
not set
Definition: agt.h:610
boolean agt_autodelete_pdu_error
If &#39;true&#39; the server will treat edit-config auto-delete because of false when-stmts as an error inste...
Definition: agt.h:1087
status_t agt_init2(void)
Initialize the Server Library (phase 2 init)
Definition: agt.c:3398
boolean agt_advertise_module_needed(const xmlChar *modname)
Check if the module should be advertised or not.
Definition: agt.c:4386
ncx_shutdowntyp_t
enumeration of the different program shutdown modes
Definition: ncxtypes.h:523
exit loop with OK
Definition: agt.h:661
boolean agt_startup_fallback
this flag indicates the –startup-error parm is set to fallback
Definition: agt.h:1256
boolean agt_simple_json_names
use simple JSON names instead of YANG JSON names
Definition: agt.h:1157
one notification message that will be sent to all subscriptions in the stream and kept in the replay ...
Definition: agt_not.h:143
uint16 agt_socket_port
listen on this TCP port if TCP socket is enabled
Definition: agt.h:1489
const xmlChar * agt_get_server_id(void)
Get the server-id string.
Definition: agt.c:4931
persist
Definition: agt.h:683
const xmlChar * agt_server_id
assigned server ID
Definition: agt.h:887
boolean agt_use_notifications(void)
Check if notifications currently enabled.
Definition: agt.c:5098
boolean agt_wildcards
Allow wildcards in filters.
Definition: agt.h:845
boolean agt_startup_error
–startup-error parameter: stop, continue enums only
Definition: agt.h:806
boolean agt_with_restconf
enable RESTCONF sessions
Definition: agt.h:1116
boolean agt_init2_done(void)
Check if the init2 phase is complete.
Definition: agt.c:5214
boolean agt_with_maint_mode
allow maintenance mode to be used
Definition: agt.h:1353
const xmlChar * agt_conffile
config file: default: /etc/yumapro/netconfd-pro.conf
Definition: agt.h:857
boolean agt_use_netconf
enable NETCONF protocol
Definition: agt.h:929
boolean agt_useurl_tftp
the libcurl variables
Definition: agt.h:1276
HA standby role.
Definition: agt.h:692
void(* agt_system_cleanup_fn_t)(void)
system cleanup callback
Definition: agt.h:1568
boolean agt_push_simop_enabled
push-simop-enabled parameter
Definition: agt.h:1426
uint32 agt_hello_timeout
–hello-timeout parameter
Definition: agt.h:896
boolean agt_save_config_system
flag to skip generation of the startup XML file when a save_config is done by the server...
Definition: agt.h:1047
boolean agt_log_acm_writes
log NACM write requests
Definition: agt.h:791
boolean agt_with_yang_patch_running
with-yang-patch-running parameter
Definition: agt.h:1408
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.
Definition: agt.c:4802
IETF NACM (default)
Definition: agt.h:636
boolean agt_factorystartup
track –factory-startup flag
Definition: agt.h:803
dlq_hdr_t * agt_get_savedevQ(void)
Get the agt_savedevQ pointer.
Definition: agt.c:4978
void agt_request_replay_ex(void *cookie)
Request replay of the running config to SIL modules because SIL hardware has reset somehow...
Definition: agt.c:4428
boolean agt_usestartup
track –no-startup flag
Definition: agt.h:800
boolean agt_return_status
return exit code or zero
Definition: agt.h:1435
boolean agt_sil_missing_error
treat missing SIL libraries as an error, not warning
Definition: agt.h:1018
agt_transaction_model_t
not used yet in YANG-API or NETCONF!
Definition: agt.h:643
netconf-over-ssh callhome
Definition: agt.h:700
boolean agt_startup_prune_ok
–startup-prune-ok parameter
Definition: agt.h:1310
boolean agt_replay_subsys_is_active(const xmlChar *subsys_id)
Find a subsys replay request struct in the activeQ.
Definition: agt.c:4995
agt_acmode_t agt_accesscontrol_enum
access control enum
Definition: agt.h:950
HA active role.
Definition: agt.h:693
xmlChar * subsys_id
malloced subsystem name string
Definition: agt.h:729
CRL check off.
Definition: agt.h:709
this value is used
Definition: agt.h:644
void agt_remove_superuser(const xmlChar *username)
Remove a superuser name from the running system Does not change any config file allowed-user paramete...
Definition: agt.c:4844
boolean agt_ietf_system_notifs
d: true
Definition: agt.h:831
boolean agt_use_notifications
enable notifications
Definition: agt.h:935
persist-id
Definition: agt.h:684
status_t agt_run_extloop(void)
Run the agt_ncxserver in external loop mode.
Definition: agt.c:5368
boolean agt_useurl_ftp
–with-url-ftp
Definition: agt.h:1277
YANG module data structures Many internal representations of YANG module constructs.
boolean agt_with_grpc
this flag indicates that the gRPC support should be enabled
Definition: agt.h:1503
void agt_request_shutdown(ncx_shutdowntyp_t mode, int intnum)
Request some sort of server shutdown.
Definition: agt.c:4225
boolean agt_session_sync_mutex
session sync mutex flag
Definition: agt.h:785
boolean agt_lax_namespaces
lax namespace usage: will try to match element name
Definition: agt.h:941
boolean agt_with_warnings
this field indicates if agt_record_warning will be allowed to set the error-severity field to warning...
Definition: agt.h:1169
external ACM via yp_system library
Definition: agt.h:638
log_debug_t agt_audit_log_level
audit log level
Definition: agt.h:1137
GET2 transaction.
Definition: agt.h:671
boolean agt_insecure_ok
–insecure-ok parameter
Definition: agt.h:1301
normal client operation
Definition: agt.h:653
boolean agt_sil_skip_load
skip the SIL callbacks for load-config Useful if the authoritative database is really the external sy...
Definition: agt.h:1012
restconf-over-ssh callhome
Definition: agt.h:702
ncx_modcache_t * agt_find_modcache(const xmlChar *modname)
Find a module to the modcache queue and hash table.
Definition: agt.c:5342
boolean agt_library_mode
this field indicates the server is operating in library mode It will look for YANG modules but only l...
Definition: agt.h:1175
boolean agt_logappend
–log-append parameter
Definition: agt.h:812
boolean agt_with_yp_coap
enable YP-CoAP sessions (not supported)
Definition: agt.h:1125
const xmlChar * agt_logfile
main logfile
Definition: agt.h:863
void * agt_get_replay_cookie(void)
Get the current replay cookie.
Definition: agt.c:4509
xmlChar * libspec
yp-system library spec that was loaded (bundle or module)
Definition: agt.h:1616
netconf-over-tls callhome
Definition: agt.h:701
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...
Definition: agt.c:5128
status_t agt_check_save_external_config(ncx_display_mode_t encoding, const xmlChar *filespec)
Check if an external NV handler needs to be used to save the config.
Definition: agt.c:4634
agt_acm_model_t agt_acm_model
NACM or external ACM model.
Definition: agt.h:944
const xmlChar * agt_subsys_path
set the netconf subsystem for sshd exectuable path for callhome default is /usr/sbin/netconf-subsyste...
Definition: agt.h:1230
server module info cache record for def_reg_add_mod
Definition: ncxtypes.h:1474
log_debug_t agt_log_level
requested log-level
Definition: agt.h:776
Set-Hook.
Definition: agt.h:718
almost all access control turned off
Definition: agt.h:613
exit loop with error
Definition: agt.h:662
not set
Definition: agt.h:690
uint16 agt_callhome_retry_max
this field specifies the number of retry attempts the server should attempt to the callhome server be...
Definition: agt.h:1216
boolean agt_no_nvstore
this field indicates that the server should not load or save using the normal APIs during transaction...
Definition: agt.h:1193
boolean agt_fileloc_fhs
this flag enables FHS file locations for server data files
Definition: agt.h:1247
const xmlChar * agt_defaultStyle
default-style for with-defaults
Definition: agt.h:872
const xmlChar * agt_cbtype_name(agt_cbtyp_t cbtyp)
Get the string for the server callback phase.
Definition: agt.c:4356
const xmlChar * agt_ha_initial_active
active server to use if standby
Definition: agt.h:1152
boolean agt_ypserver_mode
this flag indicates the server is rnning as yp-controller and not netconfd-pro
Definition: agt.h:1332
boolean agt_with_yang_api
enable YANG-API sessions (obsolete)
Definition: agt.h:1119
boolean agt_in_maintenance_mode(void)
Return true if in mainenance mode now.
Definition: agt.c:5415
hook callback for edit
Definition: agt.h:674
int agt_shutdown_term_signal(void)
Get the shutdown termination signal if any.
Definition: agt.c:4337
boolean agt_use_local_transport
use local transport flag
Definition: agt.h:932
int32 agt_message_indent
–message-indent parameter
Definition: agt.h:908
uint32 agt_sil_getbulk_max
Specifies the maximum number of getbulk entries to request from a GET2 callback.
Definition: agt.h:1096
boolean agt_useurl
–with-url parameter
Definition: agt.h:914
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 para...
Definition: agt.c:4707
boolean agt_sil_prio_reverse_for_deletes
–sil-prio-reverse-for-deletes parameter
Definition: agt.h:1335
boolean agt_use_yumaworks_cert_usermap
load yumaworks-cert-usermap module
Definition: agt.h:1438
boolean agt_with_yumaworks_event_stream
with-yumaworks-event-stream
Definition: agt.h:1387
DB-API RPC transaction.
Definition: agt.h:673
boolean agt_leaflist_deleteall_ok
allow delete-all and remove-all operations on a leaf-list
Definition: agt.h:821
NETCONF Notifications DM module support.
boolean agt_use_yuma_mysession
load yuma-mysession module
Definition: agt.h:989
agt_ha_role_t agt_ha_role_enum(const xmlChar *ha_role)
Get the enum for the specified HA role string.
Definition: agt.c:5069
boolean agt_with_canonical
–with-canonical parameter
Definition: agt.h:1318
boolean agt_sil_test_get_when
enable config=false when-stmt checking for GET1 and GET2 callback functions; if false then the callba...
Definition: agt.h:1363
agt_ccparm_t
confirmed-commit parms
Definition: agt.h:679
P2: write operation apply.
Definition: agt.h:627
xmlChar * agt_socket_address
strdup of socket-address CLI parameter
Definition: agt.h:1486
void agt_set_factory_restart(void)
Set the flag so the server will restart with the factory config.
Definition: agt.c:5267
boolean agt_save_owners
flag to save owner strings in the database
Definition: agt.h:1036
Transaction Hook.
Definition: agt.h:719
void * handle
handle from dlopen
Definition: agt.h:1613
void agt_request_replay_subsys(const xmlChar *subsys_id)
Request replay of the running config to the SIL-SA modules on the specified subsystem.
Definition: agt.c:4452
const xmlChar * agt_yangapi_server_url
YANG-API server URL (obsolete)
Definition: agt.h:974
boolean agt_use_tcp_socket
use a TCP socket instead of an AF_LOCAL socket for connections
Definition: agt.h:1030
boolean agt_replay_requested(void)
Check if config replay is pending.
Definition: agt.c:4492
const xmlChar * agt_sshd_path
set the sshd exectuable path for callhome default is /usr/sbin/sshd only set by vendor in agt_init1 p...
Definition: agt.h:1224
boolean agt_wait_datastore_ready
wait-datastore-ready parameter
Definition: agt.h:1432
boolean agt_yumaworks_templates
d: true
Definition: agt.h:833
uint8 obj_testflags_t
object test flags
Definition: obj.h:1133
boolean agt_use_rollback_failed_backup
save running config for a commit, in case the rollback fails
Definition: agt.h:1024
ncx_display_mode_t
enumeration of val_dump_value display modes
Definition: ncxtypes.h:599
agt_system_init_profile_fn_t init_profile_fn
init profile callback
Definition: agt.h:1619
status_t
global error return code
Definition: status_enum.h:186
exit loop with timeout
Definition: agt.h:663
this value is used
Definition: agt.h:660
uint32 agt_idle_timeout
–idle-timeout parameter
Definition: agt.h:899
status_t agt_check_superuser(const xmlChar *username)
Check a username in the superuser Q.
Definition: agt.c:4885
HA role not set.
Definition: agt.h:691
boolean agt_yuma_time_filter
use the yuma-time-filter module
Definition: agt.h:1366
boolean agt_shutdown_requested(void)
Check if some sort of server shutdown is in progress.
Definition: agt.c:4297
boolean agt_load_apply_errors
server load-config had apply phase errors flag
Definition: agt.h:1468
boolean agt_use_yuma_arp
load yuma-arp module
Definition: agt.h:983
boolean agt_use_nmda(void)
Check if NMDA is enabled.
Definition: agt.c:5655
confirm-timeout
Definition: agt.h:682
for the list of subsystems requesting or in progress for a config load or replay
Definition: agt.h:727
boolean agt_with_nmda
with-nmda
Definition: agt.h:1396
const xmlChar * agt_extern_libspec
superuser name (allowed to be NULL) moved to agt.c agt_superuserQ Q of ncx_backptr_t to malloced stri...
Definition: agt.h:881
ncx_withdefaults_t agt_defaultStyleEnum
default with-defaults enum
Definition: agt.h:947
const xmlChar * agt_ha_server_key
server-key to keep HA pools separate
Definition: agt.h:1149
boolean agt_restconf_strict_headers
If &#39;true&#39; the server will only accept requests with normative Accept header entries specified in the ...
Definition: agt.h:1082
status_t agt_init2_sil_sa(void)
Initialize the Server Library for SIL-SA.
Definition: agt.c:4135
boolean agt_use_yuma_system
load yuma-system module
Definition: agt.h:995
ncx_agtstart_t agt_start
startup type enum (distinct or mirror)
Definition: agt.h:773
boolean agt_list_deleteall_ok
allow delete-all and remove-all operations on a list
Definition: agt.h:818
xmlChar * agt_startup_txid_file
cached location of startup transaction ID file
Definition: agt.h:1483
boolean agt_with_gnmi
this flag indicates that the gNMI support should be enabled
Definition: agt.h:1327
obj_testflags_t agt_rootflags
root commit descendant test flags
Definition: agt.h:1453
void(* agt_replay_fn_t)(boolean is_start)
replay callback (agt_replay_fn_t)
Definition: agt.h:1650
log_debug_t agt_audit_log_console_level
log console level
Definition: agt.h:1134
agt_ch_proto_t
server callhome protocol
Definition: agt.h:698
boolean agt_with_snmp
this flag indicates that the snmp agent should be enabled
Definition: agt.h:1265
Post Set-Hook.
Definition: agt.h:720
uint32 agt_watcher_interval
Specifies the number of seconds the YPWatcher process will sleep before checking if the netconfd-pro ...
Definition: agt.h:1064
Global error messages for status code enumerations.
not set
Definition: agt.h:635
boolean agt_xmlorder
use strict XML order flag
Definition: agt.h:815
YANG help text support for CLI Print help text for various templates.
boolean agt_with_modtags
–with-modtags parameter
Definition: agt.h:1321
not set
Definition: agt.h:699
boolean agt_log_event_drops
log event drops
Definition: agt.h:1015
agt_crl_mode_t agt_crl_mode
tls-crl-mode parameter
Definition: agt.h:1390
uint16 agt_push_min_period
push-min-period parameter
Definition: agt.h:1411
boolean agt_sil_delete_children_first
–sil-delete-children-first CLI parameter
Definition: agt.h:1280
CRL check client cert.
Definition: agt.h:710
const xmlChar * agt_subsys_info_file
location of subsys info file
Definition: agt.h:1033
status_t agt_enter_maintenance_mode(boolean read_ok, boolean operation_ok)
Set the server to mainenance mode to block client activity.
Definition: agt.c:5508
exit loop with session dropped
Definition: agt.h:664
boolean cleanup_done
cleanup done flag
Definition: agt.h:1637
const xmlChar * agt_netconf_tls_certificate
–netconf-tls-cerificate parameter
Definition: agt.h:1289
boolean agt_sil_skip_keys
do not invoke the SIL callback for a key leaf
Definition: agt.h:1021
uint16 agt_max_cli_sessions
max CLI sessions
Definition: agt.h:956
uint16 agt_netconf_tls_port
–netconf-tls-port parameter
Definition: agt.h:1295
boolean agt_system_sorted
enable system-sorted (obsolete: sorted by val_child algorithms)
Definition: agt.h:938
boolean agt_use_yangapi
enable YANG-API protocol (obsolete: ignored)
Definition: agt.h:920
void(* agt_system_init_profile_fn_t)(agt_profile_t *profile)
system init server profile callback
Definition: agt.h:1527
YUMA NACM (obsolete, not supported)
Definition: agt.h:637
boolean agt_use_yuma_if
load yuma-if module
Definition: agt.h:986
log_debug_t agt_pthread_log_level
requested PTHREADS log level
Definition: agt.h:782
const xmlChar * agt_errmsg_lang
–errmsg-lang parameter
Definition: agt.h:1307
help_mode_t
modes to match the keywords brief, normal, full
Definition: help.h:84
const xmlChar * agt_ha_role_str(agt_ha_role_t ha_role)
Get the string for the specified HA role enumeration.
Definition: agt.c:5039
void agt_cleanup(void)
Cleanup the Server Library.
Definition: agt.c:4173
uint32 agt_linesize
line size for logging
Definition: agt.h:902
status_t agt_init_term_msg_module(void)
Init the term-msg module and object backptr.
Definition: agt.c:5623
boolean agt_audit_log_candidate
If true, then transactions to the candidate datastore will be recorded in the audit log...
Definition: agt.h:1071
status_t agt_exit_maintenance_mode(void)
Exit the server from mainenance mode to unblock client activity.
Definition: agt.c:5546
void agt_set_max_getbulk(uint32 max_getbulk)
Set the max-getbulk parameter.
Definition: agt.c:5488
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 con...
Definition: agt.c:4594
void agt_start_replay(void)
Start replay of the running config to SIL modules.
Definition: agt.c:4522
status_t(* agt_system_init1_fn_t)(boolean pre_cli)
system init1 callback
Definition: agt.h:1543
boolean agt_waiting_datastore_ready(void)
Check if client sessions are blocked until the datastore is ready.
Definition: agt.c:5672
uint32 agt_push_max_periodic
push-max-periodic parameter
Definition: agt.h:1417
shared transactions (only value supported)
Definition: agt.h:645
agt_ha_role_t agt_ha_role
saved HA role
Definition: agt.h:1496
CRL check client and CA certs.
Definition: agt.h:711
ncx_agtstart_t
enum to identify the agent native startup mode
Definition: ncxtypes.h:515
private transactions
Definition: agt.h:646
boolean agt_with_callhome
this field indicates that the IETF Callhome feature is enabled if true and WITH_CALLHOME is built int...
Definition: agt.h:1205
boolean agt_crl_missing_ok
tls-crl-missing-ok parameter
Definition: agt.h:1393
boolean agt_with_yp_coap_dtls
enable YP-CoAP DTLS sessions (not supported)
Definition: agt.h:1128
boolean agt_load_rootcheck_errors
server load-config root-check had errors flag
Definition: agt.h:1462
ncx_msg_encoding_t
enumeration for message encoding formats
Definition: ncxtypes.h:625
status_t agt_add_modcache(ncx_modcache_t *mc)
Add a module to the modcache queue and hash table.
Definition: agt.c:5309
boolean agt_alt_names
Yuma REST-API urlselect extra parameters.
Definition: agt.h:842
uint32 agt_push_simop_period
push-simop-period parameter
Definition: agt.h:1423
log_debug_t agt_syslog_log_level
requested SYSLOG log-level
Definition: agt.h:779
boolean agt_yumaworks_ids
use the yumaworks-ids module
Definition: agt.h:1372
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4207
ncx_name_match_t agt_match_names
match names behavior; needs to be EXACT for YANG
Definition: agt.h:848
EDIT1 or EDIT2 transaction.
Definition: agt.h:672
boolean agt_term_msg
d: true for <term-msg> notification
Definition: agt.h:839
uint32 agt_push_max_operational
push-max-operational parameter
Definition: agt.h:1420
uint32 agt_audit_log_events
–audit-log-events to control audit log content
Definition: agt.h:1338
const xmlChar * agt_cert_default_user
–cert-default-user parameter
Definition: agt.h:1304
void agt_finish_replay(void)
Finish replay of the running config to SIL modules.
Definition: agt.c:4555
boolean agt_callhome_reconnect
CLI parameter –callhome-reconnect.
Definition: agt.h:1356
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.
Definition: agt.c:4674
boolean agt_with_yp_shell
enable yp-shell sessions
Definition: agt.h:1122
ncx_snmp_agt_role_t agt_snmp_agent_role
identify the SNMP agent native mode master|subagent
Definition: agt.h:1268
boolean agt_with_netconf
If &#39;true&#39; then the corresponding protocol will be enabled.
Definition: agt.h:1113
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:625
const xmlChar * agt_sshd_config
set the sshd_config file to use for sshd exectuable for callhome default is $HOME/.yumapro/ch_sshd_config.
Definition: agt.h:1236
boolean agt_running_fallback
this flag indicates the –running-error parm is set to fallback
Definition: agt.h:1259
boolean agt_yuma_system_notifs
d: false
Definition: agt.h:830
#define AGT_MAX_PORTS
maximum number of –port leaf-list values that will be saved
Definition: agt.h:188
boolean agt_with_ocpattern
this flag enables/disables the special OpenConfig usage of the YANG pattern-statement.
Definition: agt.h:1244
NCX System Logging Manager.
boolean agt_ha_enabled
enable YP-HA
Definition: agt.h:1140
boolean agt_no_audit_log
this flag indicates the –no-audit-log CLI parameter
Definition: agt.h:1250
agt_ha_role_t
server HA mode mode
Definition: agt.h:689
uint32 agt_eventlog_size
eventlog-size set to 0 to disable replay
Definition: agt.h:890
status_t init2_status
init2 callback result
Definition: agt.h:1634
ncx_withdefaults_t
enum for with-defaults enum values
Definition: ncxtypes.h:1162
void agt_request_replay(void)
Request replay of the running config to SIL modules because SIL hardware has reset somehow...
Definition: agt.c:4410
uint32 agt_maxburst
–maxburst parameter
Definition: agt.h:893
boolean agt_load_done
server load-config done flag
Definition: agt.h:1456
status_t agt_check_allowed_user(const xmlChar *username)
Check a username in the allowed-user Q.
Definition: agt.c:4746
status_t agt_init1_sil_sa(void)
Initialize the Server Library: stage 1: CLI and profile.
Definition: agt.c:3323
agt_acmode_t
matches access-control enumeration in netconfd.yang
Definition: agt.h:609
boolean agt_yumaworks_system
d: true
Definition: agt.h:832
boolean agt_maintenance_mode_session_ok(void)
Return true if in maintenance mode new sessions OK;.
Definition: agt.c:5458
boolean agt_use_yuma_proc
load yuma-proc module
Definition: agt.h:980
boolean agt_yumaworks_getbulk
use the yumaworks-getbulk module
Definition: agt.h:1369
internal replay commit
Definition: agt.h:654
confirmed
Definition: agt.h:681
boolean agt_push_simop_patch_update
push-simop-patch-update parameter
Definition: agt.h:1429
uint16 agt_callhome_retry_interval
this field specifies the number of seconds to wait after a connect attempt to the callhome server has...
Definition: agt.h:1210
uint8 agt_withdef_enabled
bitmask of the with-defaults enumerations that should be enabled in the server
Definition: agt.h:1058
full enforcement
Definition: agt.h:611
boolean agt_sil_root_check_first
–sil-root-check-first to do root check in edit-config before the SIL validate callbacks are invoked ...
Definition: agt.h:1344
ncx_shutdowntyp_t agt_shutdown_mode_requested(void)
Check what shutdown mode was requested.
Definition: agt.c:4320
boolean agt_notif_sequence_id
d: false
Definition: agt.h:829
boolean agt_create_empty_npcontainers
LAST DATA SENT TO SUBSYSTEMS create empty NP containers d: true.
Definition: agt.h:1162
boolean agt_running_error
–running-error parameter: stop, continue enums only
Definition: agt.h:809
P3-pos: write operation commit.
Definition: agt.h:628
boolean agt_maintenance_mode_read_ok(void)
Return true if in maintenance mode reads OK;.
Definition: agt.c:5430
boolean agt_sil_validate_candidate
If true, the server will invoke the VALIDATE phase for SIL and SIL-SA callbacks when each edit is mad...
Definition: agt.h:1077
boolean agt_load_def_startup_factory
server load-config factory flag
Definition: agt.h:1474
boolean agt_import_version_bestmatch
import-version-bestmatch parameter
Definition: agt.h:1405
boolean agt_with_netconf_tls
enable NETCONF over TLS sessions
Definition: agt.h:1131
void agt_set_max_burst(uint32 max_burst)
Set the max-burst parameter.
Definition: agt.c:5473
boolean agt_ha_sil_standby
call SIL code in standby mode
Definition: agt.h:1143
boolean agt_remove_schema_aug_leafs
this flag indicates the deprecated schema list leafs added from yumaworks-system should be removed...
Definition: agt.h:1448
boolean agt_in_factory_restart(void)
Check if a factory restort is in progress.
Definition: agt.c:5289
agt_commit_type_t
NETCONF commit types.
Definition: agt.h:651
boolean agt_startup_skip_validation
startup-skip-validation
Definition: agt.h:1399
uint16 agt_max_sessions
max sessions (total)
Definition: agt.h:953
not set
Definition: agt.h:652
agt_hook_type_t
Hook types enumeration to specify Hook type.
Definition: agt.h:716