85#define NCXMOD_MAX_SEARCHPATH 64
88#define NCXMOD_MAX_FSPEC_LEN 2047
95#define NCXMOD_PSCHAR '/'
97#define NCXMOD_WIN_PSCHAR '\\'
99#define NCXMOD_HMCHAR '~'
101#define NCXMOD_ENVCHAR '$'
103#define NCXMOD_DOTCHAR '.'
108#define NCXMOD_NETCONFD (const xmlChar *)"netconfd-pro"
110#define NCXMOD_NCX (const xmlChar *)"yuma-ncx"
112#define NCXMOD_FACTORY_DEFAULT (const xmlChar *)"ietf-factory-default"
114#define NCXMOD_RESTCONF (const xmlChar *)"ietf-restconf"
116#define NCXMOD_YANG_DATA_EXT (const xmlChar *)"yang-data-ext"
118#define NCXMOD_YANG_METADATA (const xmlChar *)"ietf-yang-metadata"
120#define NCXMOD_YANG_STRUCTURE (const xmlChar *)"ietf-yang-structure-ext"
122#define NCXMOD_YUMA_NACM (const xmlChar *)"yuma-nacm"
124#define NCXMOD_YUMA_TIME_FILTER (const xmlChar *)"yuma-time-filter"
126#define NCXMOD_YUMAWORKS_ATTRS (const xmlChar *)"yumaworks-attrs"
128#define NCXMOD_YUMAWORKS_CERT_USERMAP \
129 (const xmlChar *)"yumaworks-cert-usermap"
131#define NCXMOD_YUMAWORKS_COMPARE (const xmlChar *)"yumaworks-compare"
133#define NCXMOD_YUMAWORKS_CONFIG_CHANGE \
134 (const xmlChar *)"yumaworks-config-change"
136#define NCXMOD_YUMAWORKS_EVENT_FILTER \
137 (const xmlChar *)"yumaworks-event-filter"
139#define NCXMOD_YUMAWORKS_EVENT_STREAM \
140 (const xmlChar *)"yumaworks-event-stream"
142#define NCXMOD_YUMAWORKS_GETBULK (const xmlChar *)"yumaworks-getbulk"
144#define NCXMOD_YUMAWORKS_IDS (const xmlChar *)"yumaworks-ids"
146#define NCXMOD_YUMAWORKS_INTERNAL (const xmlChar *)"yumaworks-internal"
148#define NCXMOD_YUMAWORKS_SERVER (const xmlChar *)"yumaworks-server"
150#define NCXMOD_YUMAWORKS_SYSTEM (const xmlChar *)"yumaworks-system"
152#define NCXMOD_YUMAWORKS_TYPES (const xmlChar *)"yumaworks-types"
154#define NCXMOD_YUMAWORKS_APP_COMMON (const xmlChar *)"yumaworks-app-common"
156#define NCXMOD_YUMA_APP_COMMON (const xmlChar *)"yuma-app-common"
158#define NCXMOD_YUMA_TYPES (const xmlChar *)"yuma-types"
160#define NCXMOD_YANGCLI (const xmlChar *)"yangcli-pro"
162#define NCXMOD_YANG_API (const xmlChar *)"yumaworks-yang-api"
164#define NCXMOD_YUMAWORKS_GRPC_STATE \
165 (const xmlChar *)"yumaworks-grpc-mon"
167#define NCXMOD_YUMA_RESTCONF (const xmlChar *)"yumaworks-restconf"
169#define NCXMOD_YUMA_IDS (const xmlChar *)"yumaworks-ids"
171#define NCXMOD_YUMA_SUPPORT_SAVE (const xmlChar *)"yumaworks-support-save"
173#define NCXMOD_YUMA_TERM_MSG (const xmlChar *)"yumaworks-term-msg"
178#define NCXMOD_NETCONF (const xmlChar *)"yuma-netconf"
180#define NCXMOD_YUMA_NETCONF (const xmlChar *)"yuma-netconf"
182#define NCXMOD_IETF_INTERFACES (const xmlChar *)"ietf-interfaces"
184#define NCXMOD_IETF_NETCONF (const xmlChar *)"ietf-netconf"
186#define NCXMOD_IETF_NETCONF_REV (const xmlChar *)"2011-06-01"
188#define NCXMOD_IETF_YANG_PATCH (const xmlChar *)"ietf-yang-patch"
190#define NCXMOD_IETF_YANG_TYPES (const xmlChar *)"ietf-yang-types"
192#define NCXMOD_IETF_INET_TYPES (const xmlChar *)"ietf-inet-types"
194#define NCXMOD_IETF_NETCONF_STATE (const xmlChar *)"ietf-netconf-monitoring"
196#define NCXMOD_IETF_NACM (const xmlChar *)"ietf-netconf-acm"
198#define NCXMOD_IETF_SID_FILE (const xmlChar *)"ietf-sid-file"
200#define NCXMOD_IETF_DISTRIBUTED_NOTIF \
201 (const xmlChar *)"ietf-distributed-notif"
203#define NCXMOD_IETF_YANG_PUSH_REVISION \
204 (const xmlChar *)"ietf-yang-push-revision"
206#define NCXMOD_WITH_DEFAULTS (const xmlChar *)"ietf-netconf-with-defaults"
208#define NCXMOD_YUMAWORKS_EXTENSIONS (const xmlChar *)"yumaworks-extensions"
210#define NCXMOD_YUMAWORKS_YANG_CBOR (const xmlChar *)"yumaworks-yang-cbor"
212#define NCXMOD_FHS_RUNDIR (const xmlChar *)"/var/run/netconfd-pro"
214#define NCXMOD_FHS_LIBDIR (const xmlChar *)"/var/lib/netconfd-pro"
216#define NCXMOD_FHS_LOGDIR (const xmlChar *)"/var/log/netconfd-pro"
218#define NCXMOD_FHS_LOGSPEC \
219 (const xmlChar *)"/var/log/netconfd-pro/server.log"
221#define NCXMOD_FHS_AUDIT_LOGSPEC \
222 (const xmlChar *)"/var/log/netconfd-pro/audit.log"
224#define NCXMOD_SRID_FHS_LOGSPEC \
225 (const xmlChar *)"/var/log/netconfd-pro/server.%s.log"
227#define NCXMOD_SRID_FHS_AUDIT_LOGSPEC \
228 (const xmlChar *)"/var/log/netconfd-pro/audit.%s.log"
231#define NCXMOD_NETCONF_NOTIFICATIONS \
232 (const xmlChar *)"ietf-netconf-notifications"
234#define NCXMOD_PARTIAL_LOCK (const xmlChar *)"ietf-netconf-partial-lock"
236#define NCXMOD_CRYPT_HASH (const xmlChar *)"iana-crypt-hash"
241#define NCXMOD_YANG_LIBRARY (const xmlChar *)"ietf-yang-library"
242#define NCXMOD_RESTMON (const xmlChar *)"ietf-restconf-monitoring"
245#define NCXMOD_IETF_DATASTORES (const xmlChar *)"ietf-datastores"
246#define NCXMOD_IETF_ORIGIN (const xmlChar *)"ietf-origin"
247#define NCXMOD_IETF_NETCONF_NMDA (const xmlChar *)"ietf-netconf-nmda"
250#define NCXMOD_IETF_SM_MODULE (const xmlChar *)"ietf-yang-schema-mount"
253#define NCXMOD_IETF_SM_MODULE_ANNOT \
254 (const xmlChar *)"yumaworks-schema-mount-annot"
259#define NCXMOD_HOOKS_TEST (const xmlChar *)"hooks-test"
261#define NCXMOD_YUMA_SYSTEM (const xmlChar *)"yuma-system"
267#define NCXMOD_OC_EXT (const xmlChar *)"openconfig-extensions"
272#define NCXMOD_DIR (const xmlChar *)"modules"
277#define NCXMOD_DATA_DIR (const xmlChar *)"data"
282#define NCXMOD_SCRIPT_DIR (const xmlChar *)"scripts"
285#define NCXMOD_TEST_SUITE_DIR (const xmlChar *)"test-suites"
288#define NCXMOD_PWD "PWD"
291#define USER_HOME "HOME"
294#define NCXMOD_HOME "YUMAPRO_HOME"
299#define NCXMOD_INSTALL "YUMAPRO_INSTALL"
302#if defined(FREEBSD) || defined(MACOSX)
303#define NCXMOD_DEFAULT_INSTALL (const xmlChar *)"/usr/local/share/yumapro"
305#define NCXMOD_DEFAULT_INSTALL (const xmlChar *)"/usr/share/yumapro"
309#define NCXMOD_DEFAULT_YUMALIB64 (const xmlChar *)"/usr/lib64/yumapro"
312#define NCXMOD_DEFAULT_YUMALIB (const xmlChar *)"/usr/local/lib/yumapro"
314#define NCXMOD_DEFAULT_YUMALIB (const xmlChar *)"/usr/lib/yumapro"
319#define NCXMOD_ETC_DATA (const xmlChar *)"/etc/yumapro"
322#define NCXMOD_MODPATH "YUMAPRO_MODPATH"
325#define NCXMOD_DATAPATH "YUMAPRO_DATAPATH"
328#define NCXMOD_RUNPATH "YUMAPRO_RUNPATH"
331#define NCXMOD_LOADPATH "YUMAPRO_LOADPATH"
334#define NCXMOD_YUMA_DIR (const xmlChar *)"~/.yumapro"
337#define NCXMOD_TEMP_YUMA_DIR (const xmlChar *)"/tmp/yumapro"
340#define NCXMOD_YUMA_DIRNAME (const xmlChar *)".yumapro"
345#define NCXMOD_TEMP_DIR (const xmlChar *)"/tmp"
349#define NCXMOD_UT_RECORDTEST_DIR (const xmlChar *)"/recordtest"
352#define NCXMOD_YANGCLI_CACHE_DIR (const xmlChar *)"/.yangcli_cache"
355#define NCXMOD_YANGLIB_CACHE_DIR (const xmlChar *)"/.yanglib_cache"
358#define NCXMOD_YANGLIB_ID_FILE (const xmlChar *)"yangid.txt"
361#define NCXMOD_GET_SOURCE_NEEDED(s) \
362 (*(s) == (xmlChar)'~' || *(s) == (xmlChar)'.' || *(s) == (xmlChar)'$')
364#define NCXMOD_SEARCH_MODULE(R) (R)->module
366#define NCXMOD_SEARCH_REVISION(R) (R)->revision
368#define NCXMOD_SEARCH_SOURCE(R) (R)->source
370#define NCXMOD_SEARCH_NAMESPACE(R) (R)->namespacestr
373#define NCXMOD_FL_CAPMATCH bit0
374#define NCXMOD_FL_ISMOD bit1
375#define NCXMOD_FL_BEST bit2
377#define NCXMOD_SET_CAPMATCH(R) (R)->flags |= NCXMOD_FL_CAPMATCH
378#define NCXMOD_CLR_CAPMATCH(R) (R)->flags &= ~NCXMOD_FL_CAPMATCH
379#define NCXMOD_IS_CAPMATCH(R) ((R)->flags & NCXMOD_FL_CAPMATCH)
381#define NCXMOD_SET_ISMOD(R) (R)->flags |= NCXMOD_FL_ISMOD
382#define NCXMOD_IS_ISMOD(R) ((R)->flags & NCXMOD_FL_ISMOD)
384#define NCXMOD_SET_BEST(R) (R)->flags |= NCXMOD_FL_BEST
385#define NCXMOD_IS_BEST(R) ((R)->flags & NCXMOD_FL_BEST)
410typedef struct ncxmod_temp_progcb_t_ {
418typedef struct ncxmod_temp_sescb_t_ {
427typedef struct ncxmod_temp_filcb_t_ {
439typedef struct ncxmod_search_result_t_ {
495 const xmlChar *mtime,
600 ncxmod_load_module (
const xmlChar *modname,
601 const xmlChar *revision,
634 const xmlChar *revision,
675 const xmlChar *revision,
678 dlq_hdr_t *topfailedQ,
710 const xmlChar *revision);
787 ncxmod_load_deviation (
const xmlChar *deviname,
788 dlq_hdr_t *deviationQ);
817 dlq_hdr_t *deviationQ);
851 const xmlChar *revision,
883 const xmlChar *revision,
884 boolean with_submods,
913 const xmlChar *revision,
914 boolean with_submods,
915 const xmlChar *modpath,
1006 ncxmod_delete_server_data_files (
boolean fileloc_fhs,
1007 const xmlChar *exclude_file);
1067 boolean backup_file,
1089 boolean fileloc_fhs,
1090 boolean backup_file,
1110 const xmlChar *fname,
1216extern const xmlChar *
1239extern const xmlChar *
1249extern const xmlChar *
1312extern const xmlChar *
1355extern const xmlChar *
1367extern const xmlChar *
1679 const xmlChar *filename,
1701 const xmlChar *yanglib_id,
1702 boolean is_replace);
1782 const xmlChar *filename,
1823 const xmlChar *revision);
1860 const xmlChar *modname,
1861 const xmlChar *revision,
1862 const xmlChar *nsuri);
1934 boolean fileloc_fhs,
1950 boolean fileloc_fhs,
1968 boolean file_error);
1993 const xmlChar *dest_filespec);
2011 const xmlChar *ipaddr,
2152#define ncxmod_is_pschar(ch) \
2153 (((ch) == NCXMOD_PSCHAR) || ((ch) == NCXMOD_WIN_PSCHAR))
2155#define ncxmod_is_pschar(ch) ((ch) == NCXMOD_PSCHAR)
2166extern const xmlChar *
2177extern const xmlChar *
2188extern const xmlChar *
NETCONF protocol capabilities.
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:348
status_t
global error return code
Definition: status_enum.h:219
help_mode_t
modes to match the keywords brief, normal, full
Definition: help.h:84
void ncxmod_set_modpath(const xmlChar *modpath)
Override the YUMAPRO_MODPATH env var with the modpath CLI var.
Definition: ncxmod.c:7372
status_t ncxmod_list_data_files(help_mode_t helpmode, boolean logstdout)
List the available data files found in the data search parh.
Definition: ncxmod.c:7768
status_t ncxmod_get_file_mtime(const xmlChar *filespec, time_t *timebuff)
Get the last-modified time for a file.
Definition: ncxmod.c:10337
status_t ncxmod_init(void)
Initialize the ncxmod module.
Definition: ncxmod.c:4938
const xmlChar * ncxmod_get_modpath(void)
Get the ncxmod_mod_path value.
Definition: ncxmod.c:11632
status_t ncxmod_load_annotation(const xmlChar *deviname, dlq_hdr_t *deviationQ)
Load an annotation module (special compiler processing)
Definition: ncxmod.c:5675
ncxmod_temp_filcb_t * ncxmod_new_session_tempfile(ncxmod_temp_sescb_t *sescb, const xmlChar *filename, status_t *res)
Setup a session instance temp file for writing.
Definition: ncxmod.c:9794
void ncxmod_set_altpath(const xmlChar *altpath)
Set the alternate path that should be used first (for yangdiff)
Definition: ncxmod.c:7719
ncxmod_search_result_t * ncxmod_clone_search_result(const ncxmod_search_result_t *sr)
Clone a search result.
Definition: ncxmod.c:10189
status_t(* ncxmod_callback_fn_t)(const char *fullspec, void *cookie)
user function callback template to process a module during a subtree traversal
Definition: ncxmod.h:473
boolean ncxmod_test_subdir(const xmlChar *dirspec)
Check if the specified string is a directory.
Definition: ncxmod.c:7603
xmlChar * ncxmod_find_sil_file(const xmlChar *fname, boolean generrors, status_t *res)
Determine the location of the specified server instrumentation library file.
Definition: ncxmod.c:6416
status_t ncxmod_list_yang_files(help_mode_t helpmode, boolean logstdout)
List the available YANG files found in the 'mod' search parh.
Definition: ncxmod.c:8114
status_t ncxmod_process_subtree(const char *startspec, ncxmod_callback_fn_t callback, void *cookie)
Search the entire specified subtree, looking for YANG modules.
Definition: ncxmod.c:7535
void ncxmod_set_runpath(const xmlChar *runpath)
Override the YUMAPRO_RUNPATH env var with the runpath CLI var.
Definition: ncxmod.c:7463
status_t ncxmod_setup_fhs_dirs(void)
Setup the following FHS location server directories if they do not already exist.
Definition: ncxmod.c:8498
void ncxmod_free_program_tempdir(ncxmod_temp_progcb_t *progcb)
Remove a program instance temp files directory.
Definition: ncxmod.c:9620
xmlChar * ncxmod_find_data_file(const xmlChar *fname, boolean generrors, boolean backup_file, status_t *res)
Determine the location of the specified data file.
Definition: ncxmod.c:5988
void ncxmod_clear_altpath(void)
Clear the alternate path so none is used (for yangdiff)
Definition: ncxmod.c:7738
const xmlChar * ncxmod_get_yumadir(void)
Get the yuma directory being used.
Definition: ncxmod.c:7508
status_t ncxmod_setup_tempdir(void)
Setup the ~/.yuma/tmp directory if it does not exist.
Definition: ncxmod.c:8668
status_t ncxmod_list_script_files(help_mode_t helpmode, boolean logstdout)
List the available script files found in the 'run' search parh.
Definition: ncxmod.c:7941
xmlChar * ncxmod_find_sid_file(const xmlChar *fname, boolean generrors, status_t *res)
Determine the location of the specified Schema Item Identifier file.
Definition: ncxmod.c:11498
status_t ncxmod_set_private_bestmatch(const xmlChar *modpath)
Check for all the modules avialable for bestmatch checking.
Definition: ncxmod.c:11013
xmlChar * ncxmod_get_pid_filespec(const xmlChar *progname, boolean fileloc_fhs, status_t *res)
Get the PID file specification for the given program name.
Definition: ncxmod.c:10417
status_t ncxmod_get_conf_files(const xmlChar *confdir, boolean must_exist, ncxmod_conf_cbfn_t cbfn, void *cookie)
Get all the available conf files found in the specified config directory if it exist; Invoke the call...
Definition: ncxmod.c:10928
status_t ncxmod_set_home(const xmlChar *home)
Override the HOME env var with the home CLI var.
Definition: ncxmod.c:7203
yang_pcb_t * ncxmod_load_module_ex(const xmlChar *modname, const xmlChar *revision, boolean with_submods, boolean savetkc, boolean keepmode, boolean docmode, dlq_hdr_t *savedevQ, status_t *res)
Load a YANG module (extended)
Definition: ncxmod.c:5829
status_t ncxmod_setup_yanglib_server_dir(const xmlChar *server_dir, uint16 portnum, boolean *created)
Setup the ~/.yumapro/.yanglib_cache/<server> directory if it does not exist.
Definition: ncxmod.c:9126
status_t ncxmod_set_bestmatch_modules(void)
Check for all the modules avialable for bestmatch checking.
Definition: ncxmod.c:10969
status_t ncxmod_get_backup_files(ncxmod_backup_cbfn_t cbfn, void *cookie)
Get all the available backup files found in the specified backup directory if it exist;.
Definition: ncxmod.c:10373
uint32 ncxmod_get_pathlen_from_filespec(const xmlChar *filespec)
Get the length of th path part of the filespec string.
Definition: ncxmod.c:10296
const xmlChar * ncxmod_get_yuma_home(void)
Get the YUMAPRO_HOME or –yuma-home parameter value, whichever is in effect, if any.
Definition: ncxmod.c:7332
ncxmod_temp_sescb_t * ncxmod_new_session_tempdir(ncxmod_temp_progcb_t *progcb, uint32 sidnum, status_t *res)
Setup a session instance temp files directory.
Definition: ncxmod.c:9647
boolean ncxmod_test_filespec(const xmlChar *filespec)
Check the exact filespec to see if it a file.
Definition: ncxmod.c:10267
status_t ncxmod_find_all_modules_ycli_cache(dlq_hdr_t *resultQ)
Find all modules in the search path for the yangcli cache.
Definition: ncxmod.c:5573
xmlChar * ncxmod_find_server_data_file(const xmlChar *fname, boolean fileloc_fhs, boolean generrors, boolean backup_file, boolean keep_result, status_t *res)
Find a server data file.
Definition: ncxmod.c:6211
status_t ncxmod_setup_yumadir(void)
Setup the ~/.yumapro directory if it does not exist.
Definition: ncxmod.c:8273
xmlChar * ncxmod_make_data_filespec(const xmlChar *fname, boolean backup_file, status_t *res)
Determine a suitable path location for the specified data file name.
Definition: ncxmod.c:6589
status_t ncxmod_clear_yanglib_cache(const xmlChar *server_dir)
Clear the yanglib cache on this machine.
Definition: ncxmod.c:9062
boolean(* private_bestmatch_fn_t)(const ncxmod_search_result_t *sr, void *cookie)
Callback to walk the private_bastmatch_dict.
Definition: ncxmod.h:535
xmlChar * ncxmod_find_script_file_ex(const xmlChar *fname, boolean no_err, status_t *res)
Determine the location of the specified script file but can suppress error if not found.
Definition: ncxmod.c:6944
void ncxmod_subsys_info_remove(const xmlChar *filespec)
Remove the subsystem info file.
Definition: ncxmod.c:10893
xmlChar * ncxmod_make_server_data_filespec(const xmlChar *fname, boolean fileloc_fhs, boolean backup_file, status_t *res)
Determine a suitable path location for the specified data file name.
Definition: ncxmod.c:6741
ncxmod_search_result_t * ncxmod_new_search_result(void)
Malloc and initialize a search result struct.
Definition: ncxmod.c:9894
status_t ncxmod_scan_loadpath(ncxmod_callback_fn_t cbfn, void *cookie)
Check for all the modules in the YUMAPRO_LOADPATH (–loadpath) Invoke the callback function which will...
Definition: ncxmod.c:11158
void ncxmod_set_loadpath(const xmlChar *loadpath)
Override the YUMAPRO_LOADPATH env var with the loadpath CLI var.
Definition: ncxmod.c:7403
status_t ncxmod_setup_backup_dir(const xmlChar *backup_dir)
Setup the ~/.yumapro/backups directory if it does not exist.
Definition: ncxmod.c:8447
status_t ncxmod_setup_yanglib_cache_dir(const xmlChar *cache_dir)
Setup the ~/.yumapro/.yanglib_cache directory if it does not exist.
Definition: ncxmod.c:8813
status_t ncxmod_find_all_modules(dlq_hdr_t *resultQ)
Find all modules in the path and create a Q of search results.
Definition: ncxmod.c:5545
ncxmod_search_result_t * ncxmod_find_search_result(dlq_hdr_t *searchQ, const xmlChar *modname, const xmlChar *revision, const xmlChar *nsuri)
Find a search result inthe specified Q.
Definition: ncxmod.c:10117
status_t ncxmod_walk_private_bestmatch(private_bestmatch_fn_t cbfn, void *cookie)
Walk the private bastmatch dict.
Definition: ncxmod.c:11083
status_t ncxmod_set_yuma_home(const xmlChar *yumahome)
Override the YUMAPRO_HOME env var with the yuma-home CLI var.
Definition: ncxmod.c:7286
status_t ncxmod_load_imodule(const xmlChar *modname, const xmlChar *revision, yang_pcb_t *pcb, yang_parsetype_t ptyp, ncx_module_t *parent, ncx_module_t **retmod)
Load an import module (special compiler processing)
Definition: ncxmod.c:5720
status_t ncxmod_get_yanglib_id(const xmlChar *server_dir, uint16 port_num, xmlChar **retbuff)
Get the YANG Library value ID for the server if found
Definition: ncxmod.c:9193
status_t(* ncxmod_conf_cbfn_t)(const xmlChar *fullspec, void *cookie)
internal .conf file handler Read all the foo.conf files in the specified directory Call the cbfn for ...
Definition: ncxmod.h:512
status_t ncxmod_load_module_loadpath(const xmlChar *modname, const xmlChar *revision, dlq_hdr_t *savedevQ, boolean is_loadpath, ncx_module_t **retmod)
Determine the location of the specified module and then load it into the system, if not already loade...
Definition: ncxmod.c:5257
const xmlChar * ncxmod_get_home(void)
Get the HOME or –home parameter value, whichever is in effect, if any.
Definition: ncxmod.c:7268
void ncxmod_free_session_tempfile(ncxmod_temp_filcb_t *filcb)
Clean and free a session instance temp files directory.
Definition: ncxmod.c:9872
status_t ncxmod_read_num_file(const xmlChar *numfile, uint64 *curnum, boolean file_error)
Read the uint64 file and return the value found Expects full filespec, does not call ncx_get_source!...
Definition: ncxmod.c:10568
void ncxmod_show_yanglib_cache(help_mode_t helpmode)
Show a summary of the contents of the yanglib cache on this machine.
Definition: ncxmod.c:8856
status_t ncxmod_setup_recordtest_dir(void)
Setup the ~/.yumapro/recordtest directory if it does not exist.
Definition: ncxmod.c:8717
status_t ncxmod_get_yanglib_filespec(const xmlChar *server_dir, uint16 port_num, const xmlChar *filename, xmlChar **retbuff)
Get the YANG Library full filespec for the filename
Definition: ncxmod.c:9240
status_t ncxmod_autoload_module(const xmlChar *modname, const xmlChar *revision, dlq_hdr_t *savedevQ, dlq_hdr_t *savemodQ, dlq_hdr_t *topfailedQ, ncx_module_t **retmod)
Load a YANG Module (Used by yangcli-pro)
Definition: ncxmod.c:5372
status_t ncxmod_setup_fhs_srid_dirs(const xmlChar *server_root)
Setup the following FHS SRID subdir location.
Definition: ncxmod.c:8585
void ncxmod_free_session_tempdir(ncxmod_temp_progcb_t *progcb, uint32 sidnum)
Clean and free a session instance temp files directory.
Definition: ncxmod.c:9743
status_t(* ncxmod_backup_cbfn_t)(const char *fullspec, const xmlChar *mtime, void *cookie)
user function callback template to process a backup file during a subtree traversal
Definition: ncxmod.h:494
yang_pcb_t * ncxmod_load_module_diff(const xmlChar *modname, const xmlChar *revision, boolean with_submods, const xmlChar *modpath, dlq_hdr_t *savedevQ, status_t *res)
Load a module (special yangdiff-pro handling)
Definition: ncxmod.c:5906
void ncxmod_clean_private_bestmatch(void)
clean up the private_bestmatch_dict after each use
Definition: ncxmod.c:11136
const xmlChar * ncxmod_get_datapath(void)
Get the ncxmod_data_path value.
Definition: ncxmod.c:11649
status_t ncxmod_setup_yumadir_force(const xmlChar *path)
Setup the ~/.yumapro directory if it does not exist.
Definition: ncxmod.c:8415
void ncxmod_dump_module_search_path(search_dumpfn_t dumpfn, log_debug_t loglevel)
Output the YANG module search path.
Definition: ncxmod.c:11238
status_t ncxmod_setup_yumadir_srid(const xmlChar *srid)
Setup the ~/.yumapro/SRID directory if it does not exist.
Definition: ncxmod.c:8348
status_t ncxmod_write_num_file(const xmlChar *numfile, uint64 curnum)
Write the number file with the supplied value Expects full filespec, does not call ncx_get_source!...
Definition: ncxmod.c:10654
xmlChar * ncxmod_get_subdir_filespec(const xmlChar *subdir, boolean fileloc_fhs, status_t *res)
Get the subdir specification for the given subdir name The correct .yumapro directory will be used fo...
Definition: ncxmod.c:10498
void ncxmod_cleanup(void)
Cleanup the ncxmod module.
Definition: ncxmod.c:5138
status_t ncxmod_subsys_info_write(const xmlChar *filespec, const xmlChar *ipaddr, uint16 portnum)
Write the subsystem info file;.
Definition: ncxmod.c:10812
void ncxmod_set_subdirs(boolean usesubdirs)
Set the subdirs flag to FALSE if the no-subdirs CLI param is set.
Definition: ncxmod.c:7492
void ncxmod_set_datapath(const xmlChar *datapath)
Override the YUMA_DATAPATH env var with the datapath CLI var.
Definition: ncxmod.c:7433
ncxmod_temp_progcb_t * ncxmod_new_program_tempdir(status_t *res)
Setup a program instance temp files directory.
Definition: ncxmod.c:9517
status_t ncxmod_set_yanglib_id(const xmlChar *server_dir, uint16 port_num, const xmlChar *yanglib_id, boolean is_replace)
Set the YANG Library value ID for the server.
Definition: ncxmod.c:9279
const xmlChar * ncxmod_get_runpath(void)
Get the ncxmod_run_path value.
Definition: ncxmod.c:11666
void ncxmod_log_env(void)
Report the environment variables used by the running system.
Definition: ncxmod.c:5087
status_t ncxmod_setup_yangcli_cache_dir(const xmlChar *cache_dir)
Setup the ~/.yumapro/.yangcli_cache directory if it does not exist.
Definition: ncxmod.c:8768
const xmlChar * ncxmod_get_envvar(const xmlChar *name, uint32 namelen)
Get the specified shell environment variable.
Definition: ncxmod.c:7684
boolean ncxmod_use_bestmatch_now(const xmlChar *revision)
Check if the bestmatch can be used for this module.
Definition: ncxmod.c:11222
status_t ncxmod_find_yanglib_server_dir(const xmlChar *server_dir, uint16 *portnum)
Find a server dir based on its IP address.
Definition: ncxmod.c:9455
ncxmod_search_result_t * ncxmod_new_search_result_str(const xmlChar *modname, const xmlChar *revision)
Malloc and initialize a search result struct.
Definition: ncxmod.c:10004
const xmlChar * ncxmod_get_userhome(const xmlChar *user, uint32 userlen)
Get the user home dir from the passwd file.
Definition: ncxmod.c:7633
ncxmod_search_result_t * ncxmod_new_search_result_ex(const ncx_module_t *mod)
Malloc and initialize a search result struct.
Definition: ncxmod.c:9921
void ncxmod_free_search_result(ncxmod_search_result_t *searchresult)
Clean and free a search result struct.
Definition: ncxmod.c:10048
xmlChar * ncxmod_make_data_filespec_from_src(const xmlChar *srcspec, const xmlChar *fname, status_t *res)
Determine the directory path portion of the specified source_url and change the filename to the speci...
Definition: ncxmod.c:6849
xmlChar * ncxmod_find_script_file(const xmlChar *fname, status_t *res)
Determine the location of the specified script file.
Definition: ncxmod.c:6936
const xmlChar * ncxmod_get_yuma_install(void)
Get the YUMAPRO_INSTALL or default install parameter value, whichever is in effect.
Definition: ncxmod.c:7349
status_t ncxmod_scan_loadpath_sm(ncxmod_callback_fn_t cbfn, xmlChar *load_path, void *cookie)
Check for all the modules in the YUMAPRO_LOADPATH (–loadpath) Invoke the callback function which will...
Definition: ncxmod.c:11189
void ncxmod_clean_search_result_queue(dlq_hdr_t *searchQ)
Clean and free all the search result structs in the specified Q.
Definition: ncxmod.c:10084
xmlChar * ncxmod_find_test_suite_file(const xmlChar *fname, status_t *res)
Determine the location of the specified test-suite file.
Definition: ncxmod.c:7076
status_t ncxmod_copy_text_file(const xmlChar *src_filespec, const xmlChar *dest_filespec)
Copy the source text file to the fully specified filespec.
Definition: ncxmod.c:10719
ncxmod_search_result_t * ncxmod_find_module(const xmlChar *modname, const xmlChar *revision)
Find a YANG module and generate a search result.
Definition: ncxmod.c:5469
void(* search_dumpfn_t)(log_debug_t level, const char *fstr,...)
Callback to do log dump function for show searchpath.
Definition: ncxmod.h:524
yang_parsetype_t
YANG parser mode entry types.
Definition: yang.h:104
YANG help text support for CLI Print help text for various templates.
YANG module data structures Many internal representations of YANG module constructs.
Global error messages for status code enumerations.
queue of this structure for list of enterprise capabilities
Definition: cap.h:319
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1181
struct for storing YANG file search results this is used by yangcli for schema auto-load also for fin...
Definition: ncxmod.h:439
xmlChar * source
file location
Definition: ncxmod.h:445
xmlChar * module
module or submodule name
Definition: ncxmod.h:441
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:440
xmlChar * namespacestr
set if module & namespace found
Definition: ncxmod.h:444
status_t res
search result, only use if NO_ERR
Definition: ncxmod.h:447
xmlChar * revision
set if most recent revision found
Definition: ncxmod.h:443
ncx_module_t * mod
back-ptr to found module if loaded
Definition: ncxmod.h:446
xmlChar * belongsto
set if submodule & belongs-to found
Definition: ncxmod.h:442
uint8 flags
replaces capmatch and ismod
Definition: ncxmod.h:450
cap_rec_t * cap
back-ptr to source capability URI
Definition: ncxmod.h:449
uint32 nslen
length of base part of namespacestr
Definition: ncxmod.h:448
temporary file control block
Definition: ncxmod.h:427
xmlChar * source
filespec source string
Definition: ncxmod.h:429
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:428
const xmlChar * filename
ptr into source
Definition: ncxmod.h:430
program-level temp dir control block
Definition: ncxmod.h:410
xmlChar * source
filespec source string
Definition: ncxmod.h:412
dlq_hdr_t temp_sescbQ
Q of ncxmod_temp_sescb_t.
Definition: ncxmod.h:413
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:411
session-level temp-dir control block
Definition: ncxmod.h:418
xmlChar * source
filespec source string
Definition: ncxmod.h:420
dlq_hdr_t temp_filcbQ
Q of ncxmod_temp_filcb_t.
Definition: ncxmod.h:422
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:419
uint32 sidnum
session ID number
Definition: ncxmod.h:421
YANG parser control block.
Definition: yang.h:204
YANG Module parser utilities.