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_RESTCONF (const xmlChar *)"ietf-restconf"
114#define NCXMOD_YANG_DATA_EXT (const xmlChar *)"yang-data-ext"
116#define NCXMOD_YANG_STRUCTURE (const xmlChar *)"ietf-yang-structure-ext"
118#define NCXMOD_YUMA_NACM (const xmlChar *)"yuma-nacm"
120#define NCXMOD_YUMA_TIME_FILTER (const xmlChar *)"yuma-time-filter"
122#define NCXMOD_YUMAWORKS_ATTRS (const xmlChar *)"yumaworks-attrs"
124#define NCXMOD_YUMAWORKS_CERT_USERMAP \
125 (const xmlChar *)"yumaworks-cert-usermap"
127#define NCXMOD_YUMAWORKS_CONFIG_CHANGE \
128 (const xmlChar *)"yumaworks-config-change"
130#define NCXMOD_YUMAWORKS_EVENT_FILTER \
131 (const xmlChar *)"yumaworks-event-filter"
133#define NCXMOD_YUMAWORKS_EVENT_STREAM \
134 (const xmlChar *)"yumaworks-event-stream"
136#define NCXMOD_YUMAWORKS_GETBULK (const xmlChar *)"yumaworks-getbulk"
138#define NCXMOD_YUMAWORKS_IDS (const xmlChar *)"yumaworks-ids"
140#define NCXMOD_YUMAWORKS_INTERNAL (const xmlChar *)"yumaworks-internal"
142#define NCXMOD_YUMAWORKS_SERVER (const xmlChar *)"yumaworks-server"
144#define NCXMOD_YUMAWORKS_SYSTEM (const xmlChar *)"yumaworks-system"
146#define NCXMOD_YUMAWORKS_TYPES (const xmlChar *)"yumaworks-types"
148#define NCXMOD_YUMAWORKS_APP_COMMON (const xmlChar *)"yumaworks-app-common"
150#define NCXMOD_YUMA_APP_COMMON (const xmlChar *)"yuma-app-common"
152#define NCXMOD_YUMA_TYPES (const xmlChar *)"yuma-types"
154#define NCXMOD_YANGCLI (const xmlChar *)"yangcli-pro"
156#define NCXMOD_YANG_API (const xmlChar *)"yumaworks-yang-api"
158#define NCXMOD_YUMAWORKS_GRPC_STATE \
159 (const xmlChar *)"yumaworks-grpc-mon"
161#define NCXMOD_YUMA_RESTCONF (const xmlChar *)"yumaworks-restconf"
163#define NCXMOD_YUMA_IDS (const xmlChar *)"yumaworks-ids"
165#define NCXMOD_YUMA_SUPPORT_SAVE (const xmlChar *)"yumaworks-support-save"
167#define NCXMOD_YUMA_TERM_MSG (const xmlChar *)"yumaworks-term-msg"
172#define NCXMOD_NETCONF (const xmlChar *)"yuma-netconf"
174#define NCXMOD_YUMA_NETCONF (const xmlChar *)"yuma-netconf"
176#define NCXMOD_IETF_INTERFACES (const xmlChar *)"ietf-interfaces"
178#define NCXMOD_IETF_NETCONF (const xmlChar *)"ietf-netconf"
180#define NCXMOD_IETF_NETCONF_REV (const xmlChar *)"2011-06-01"
182#define NCXMOD_IETF_YANG_PATCH (const xmlChar *)"ietf-yang-patch"
184#define NCXMOD_IETF_YANG_TYPES (const xmlChar *)"ietf-yang-types"
186#define NCXMOD_IETF_INET_TYPES (const xmlChar *)"ietf-inet-types"
188#define NCXMOD_IETF_NETCONF_STATE (const xmlChar *)"ietf-netconf-monitoring"
190#define NCXMOD_IETF_NACM (const xmlChar *)"ietf-netconf-acm"
192#define NCXMOD_IETF_SID_FILE (const xmlChar *)"ietf-sid-file"
194#define NCXMOD_WITH_DEFAULTS (const xmlChar *)"ietf-netconf-with-defaults"
196#define NCXMOD_YUMAWORKS_EXTENSIONS (const xmlChar *)"yumaworks-extensions"
198#define NCXMOD_YUMAWORKS_YANG_CBOR (const xmlChar *)"yumaworks-yang-cbor"
200#define NCXMOD_FHS_RUNDIR (const xmlChar *)"/var/run/netconfd-pro"
202#define NCXMOD_FHS_LIBDIR (const xmlChar *)"/var/lib/netconfd-pro"
204#define NCXMOD_FHS_LOGDIR (const xmlChar *)"/var/log/netconfd-pro"
206#define NCXMOD_FHS_LOGSPEC \
207 (const xmlChar *)"/var/log/netconfd-pro/server.log"
209#define NCXMOD_FHS_AUDIT_LOGSPEC \
210 (const xmlChar *)"/var/log/netconfd-pro/audit.log"
212#define NCXMOD_SRID_FHS_LOGSPEC \
213 (const xmlChar *)"/var/log/netconfd-pro/server.%s.log"
215#define NCXMOD_SRID_FHS_AUDIT_LOGSPEC \
216 (const xmlChar *)"/var/log/netconfd-pro/audit.%s.log"
219#define NCXMOD_NETCONF_NOTIFICATIONS \
220 (const xmlChar *)"ietf-netconf-notifications"
222#define NCXMOD_PARTIAL_LOCK (const xmlChar *)"ietf-netconf-partial-lock"
224#define NCXMOD_CRYPT_HASH (const xmlChar *)"iana-crypt-hash"
229#define NCXMOD_YANG_LIBRARY (const xmlChar *)"ietf-yang-library"
230#define NCXMOD_RESTMON (const xmlChar *)"ietf-restconf-monitoring"
233#define NCXMOD_IETF_DATASTORES (const xmlChar *)"ietf-datastores"
234#define NCXMOD_IETF_ORIGIN (const xmlChar *)"ietf-origin"
235#define NCXMOD_IETF_NETCONF_NMDA (const xmlChar *)"ietf-netconf-nmda"
238#define NCXMOD_IETF_SM_MODULE (const xmlChar *)"ietf-yang-schema-mount"
241#define NCXMOD_IETF_SM_MODULE_ANNOT \
242 (const xmlChar *)"yumaworks-schema-mount-annot"
247#define NCXMOD_HOOKS_TEST (const xmlChar *)"hooks-test"
249#define NCXMOD_YUMA_SYSTEM (const xmlChar *)"yuma-system"
255#define NCXMOD_OC_EXT (const xmlChar *)"openconfig-extensions"
260#define NCXMOD_DIR (const xmlChar *)"modules"
265#define NCXMOD_DATA_DIR (const xmlChar *)"data"
270#define NCXMOD_SCRIPT_DIR (const xmlChar *)"scripts"
273#define NCXMOD_TEST_SUITE_DIR (const xmlChar *)"test-suites"
276#define NCXMOD_PWD "PWD"
279#define USER_HOME "HOME"
282#define NCXMOD_HOME "YUMAPRO_HOME"
287#define NCXMOD_INSTALL "YUMAPRO_INSTALL"
290#if defined(FREEBSD) || defined(MACOSX)
291#define NCXMOD_DEFAULT_INSTALL (const xmlChar *)"/usr/local/share/yumapro"
293#define NCXMOD_DEFAULT_INSTALL (const xmlChar *)"/usr/share/yumapro"
297#define NCXMOD_DEFAULT_YUMALIB64 (const xmlChar *)"/usr/lib64/yumapro"
300#define NCXMOD_DEFAULT_YUMALIB (const xmlChar *)"/usr/local/lib/yumapro"
302#define NCXMOD_DEFAULT_YUMALIB (const xmlChar *)"/usr/lib/yumapro"
307#define NCXMOD_ETC_DATA (const xmlChar *)"/etc/yumapro"
310#define NCXMOD_MODPATH "YUMAPRO_MODPATH"
313#define NCXMOD_DATAPATH "YUMAPRO_DATAPATH"
316#define NCXMOD_RUNPATH "YUMAPRO_RUNPATH"
319#define NCXMOD_LOADPATH "YUMAPRO_LOADPATH"
322#define NCXMOD_YUMA_DIR (const xmlChar *)"~/.yumapro"
325#define NCXMOD_TEMP_YUMA_DIR (const xmlChar *)"/tmp/yumapro"
328#define NCXMOD_YUMA_DIRNAME (const xmlChar *)".yumapro"
333#define NCXMOD_TEMP_DIR (const xmlChar *)"/tmp"
337#define NCXMOD_UT_RECORDTEST_DIR (const xmlChar *)"/recordtest"
341#define NCXMOD_YANGCLI_CACHE_DIR (const xmlChar *)"/.yangcli_cache"
344#define NCXMOD_GET_SOURCE_NEEDED(s) \
345 (*(s) == (xmlChar)'~' || *(s) == (xmlChar)'.' || *(s) == (xmlChar)'$')
347#define NCXMOD_SEARCH_MODULE(R) (R)->module
349#define NCXMOD_SEARCH_REVISION(R) (R)->revision
351#define NCXMOD_SEARCH_SOURCE(R) (R)->source
353#define NCXMOD_SEARCH_NAMESPACE(R) (R)->namespacestr
356#define NCXMOD_FL_CAPMATCH bit0
357#define NCXMOD_FL_ISMOD bit1
358#define NCXMOD_FL_BEST bit2
360#define NCXMOD_SET_CAPMATCH(R) (R)->flags |= NCXMOD_FL_CAPMATCH
361#define NCXMOD_CLR_CAPMATCH(R) (R)->flags &= ~NCXMOD_FL_CAPMATCH
362#define NCXMOD_IS_CAPMATCH(R) ((R)->flags & NCXMOD_FL_CAPMATCH)
364#define NCXMOD_SET_ISMOD(R) (R)->flags |= NCXMOD_FL_ISMOD
365#define NCXMOD_IS_ISMOD(R) ((R)->flags & NCXMOD_FL_ISMOD)
367#define NCXMOD_SET_BEST(R) (R)->flags |= NCXMOD_FL_BEST
368#define NCXMOD_IS_BEST(R) ((R)->flags & NCXMOD_FL_BEST)
393typedef struct ncxmod_temp_progcb_t_ {
401typedef struct ncxmod_temp_sescb_t_ {
410typedef struct ncxmod_temp_filcb_t_ {
422typedef struct ncxmod_search_result_t_ {
478 const xmlChar *mtime,
571 ncxmod_load_module (
const xmlChar *modname,
572 const xmlChar *revision,
605 const xmlChar *revision,
646 const xmlChar *revision,
649 dlq_hdr_t *topfailedQ,
681 const xmlChar *revision);
758 ncxmod_load_deviation (
const xmlChar *deviname,
759 dlq_hdr_t *deviationQ);
788 dlq_hdr_t *deviationQ);
822 const xmlChar *revision,
854 const xmlChar *revision,
855 boolean with_submods,
884 const xmlChar *revision,
885 boolean with_submods,
886 const xmlChar *modpath,
1025 boolean backup_file,
1047 boolean fileloc_fhs,
1048 boolean backup_file,
1068 const xmlChar *fname,
1143extern const xmlChar *
1166extern const xmlChar *
1176extern const xmlChar *
1239extern const xmlChar *
1282extern const xmlChar *
1294extern const xmlChar *
1545 const xmlChar *filename,
1586 const xmlChar *revision);
1623 const xmlChar *modname,
1624 const xmlChar *revision,
1625 const xmlChar *nsuri);
1697 boolean fileloc_fhs,
1713 boolean fileloc_fhs,
1731 boolean file_error);
1756 const xmlChar *dest_filespec);
1774 const xmlChar *ipaddr,
1873#define ncxmod_is_pschar(ch) \
1874 (((ch) == NCXMOD_PSCHAR) || ((ch) == NCXMOD_WIN_PSCHAR))
1876#define ncxmod_is_pschar(ch) ((ch) == NCXMOD_PSCHAR)
1887extern const xmlChar *
1898extern const xmlChar *
1909extern 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:6871
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:7267
status_t ncxmod_get_file_mtime(const xmlChar *filespec, time_t *timebuff)
Get the last-modified time for a file.
Definition: ncxmod.c:9133
status_t ncxmod_init(void)
Initialize the ncxmod module.
Definition: ncxmod.c:4541
const xmlChar * ncxmod_get_modpath(void)
Get the ncxmod_mod_path value.
Definition: ncxmod.c:10284
status_t ncxmod_load_annotation(const xmlChar *deviname, dlq_hdr_t *deviationQ)
Load an annotation module (special compiler processing)
Definition: ncxmod.c:5269
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:8590
void ncxmod_set_altpath(const xmlChar *altpath)
Set the alternate path that should be used first (for yangdiff)
Definition: ncxmod.c:7218
ncxmod_search_result_t * ncxmod_clone_search_result(const ncxmod_search_result_t *sr)
Clone a search result.
Definition: ncxmod.c:8985
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:456
boolean ncxmod_test_subdir(const xmlChar *dirspec)
Check if the specified string is a directory.
Definition: ncxmod.c:7102
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:5925
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:7613
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:7034
void ncxmod_set_runpath(const xmlChar *runpath)
Override the YUMAPRO_RUNPATH env var with the runpath CLI var.
Definition: ncxmod.c:6962
status_t ncxmod_setup_fhs_dirs(void)
Setup the following FHS location server directories if they do not already exist.
Definition: ncxmod.c:7997
void ncxmod_free_program_tempdir(ncxmod_temp_progcb_t *progcb)
Remove a program instance temp files directory.
Definition: ncxmod.c:8416
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:5582
void ncxmod_clear_altpath(void)
Clear the alternate path so none is used (for yangdiff)
Definition: ncxmod.c:7237
const xmlChar * ncxmod_get_yumadir(void)
Get the yuma directory being used.
Definition: ncxmod.c:7007
status_t ncxmod_setup_tempdir(void)
Setup the ~/.yuma/tmp directory if it does not exist.
Definition: ncxmod.c:8167
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:7440
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:10150
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:9213
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:9718
status_t ncxmod_set_home(const xmlChar *home)
Override the HOME env var with the home CLI var.
Definition: ncxmod.c:6702
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:5423
status_t ncxmod_set_bestmatch_modules(void)
Check for all the modules avialable for bestmatch checking.
Definition: ncxmod.c:9759
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:9169
uint32 ncxmod_get_pathlen_from_filespec(const xmlChar *filespec)
Get the length of th path part of the filespec string.
Definition: ncxmod.c:9092
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:6831
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:8443
boolean ncxmod_test_filespec(const xmlChar *filespec)
Check the exact filespec to see if it a file.
Definition: ncxmod.c:9063
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:5167
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:5805
status_t ncxmod_setup_yumadir(void)
Setup the ~/.yumapro directory if it does not exist.
Definition: ncxmod.c:7772
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:6098
void ncxmod_subsys_info_remove(const xmlChar *filespec)
Remove the subsystem info file.
Definition: ncxmod.c:9689
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:6250
ncxmod_search_result_t * ncxmod_new_search_result(void)
Malloc and initialize a search result struct.
Definition: ncxmod.c:8690
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:9810
void ncxmod_set_loadpath(const xmlChar *loadpath)
Override the YUMAPRO_LOADPATH env var with the loadpath CLI var.
Definition: ncxmod.c:6902
status_t ncxmod_setup_backup_dir(const xmlChar *backup_dir)
Setup the ~/.yumapro/backups directory if it does not exist.
Definition: ncxmod.c:7946
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:5139
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:8913
status_t ncxmod_set_yuma_home(const xmlChar *yumahome)
Override the YUMAPRO_HOME env var with the yuma-home CLI var.
Definition: ncxmod.c:6785
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:5314
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:495
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:4851
const xmlChar * ncxmod_get_home(void)
Get the HOME or –home parameter value, whichever is in effect, if any.
Definition: ncxmod.c:6767
void ncxmod_free_session_tempfile(ncxmod_temp_filcb_t *filcb)
Clean and free a session instance temp files directory.
Definition: ncxmod.c:8668
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:9364
status_t ncxmod_setup_recordtest_dir(void)
Setup the ~/.yuma/recordtest directory if it does not exist.
Definition: ncxmod.c:8216
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:4966
status_t ncxmod_setup_fhs_srid_dirs(const xmlChar *server_root)
Setup the following FHS SRID subdir location.
Definition: ncxmod.c:8084
void ncxmod_free_session_tempdir(ncxmod_temp_progcb_t *progcb, uint32 sidnum)
Clean and free a session instance temp files directory.
Definition: ncxmod.c:8539
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:477
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:5500
const xmlChar * ncxmod_get_datapath(void)
Get the ncxmod_data_path value.
Definition: ncxmod.c:10301
status_t ncxmod_setup_yumadir_force(const xmlChar *path)
Setup the ~/.yumapro directory if it does not exist.
Definition: ncxmod.c:7914
void ncxmod_dump_module_search_path(search_dumpfn_t dumpfn, log_debug_t loglevel)
Output the YANG module search path.
Definition: ncxmod.c:9890
status_t ncxmod_setup_yumadir_srid(const xmlChar *srid)
Setup the ~/.yumapro/SRID directory if it does not exist.
Definition: ncxmod.c:7847
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:9450
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:9294
void ncxmod_cleanup(void)
Cleanup the ncxmod module.
Definition: ncxmod.c:4734
status_t ncxmod_subsys_info_write(const xmlChar *filespec, const xmlChar *ipaddr, uint16 portnum)
Write the subsystem info file;.
Definition: ncxmod.c:9608
void ncxmod_set_subdirs(boolean usesubdirs)
Set the subdirs flag to FALSE if the no-subdirs CLI param is set.
Definition: ncxmod.c:6991
void ncxmod_set_datapath(const xmlChar *datapath)
Override the YUMA_DATAPATH env var with the datapath CLI var.
Definition: ncxmod.c:6932
ncxmod_temp_progcb_t * ncxmod_new_program_tempdir(status_t *res)
Setup a program instance temp files directory.
Definition: ncxmod.c:8313
const xmlChar * ncxmod_get_runpath(void)
Get the ncxmod_run_path value.
Definition: ncxmod.c:10318
void ncxmod_log_env(void)
Report the environment variables used by the running system.
Definition: ncxmod.c:4683
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:8266
const xmlChar * ncxmod_get_envvar(const xmlChar *name, uint32 namelen)
Get the specified shell environment variable.
Definition: ncxmod.c:7183
boolean ncxmod_use_bestmatch_now(const xmlChar *revision)
Check if the bestmatch can be used for this module.
Definition: ncxmod.c:9874
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:8800
const xmlChar * ncxmod_get_userhome(const xmlChar *user, uint32 userlen)
Get the user home dir from the passwd file.
Definition: ncxmod.c:7132
ncxmod_search_result_t * ncxmod_new_search_result_ex(const ncx_module_t *mod)
Malloc and initialize a search result struct.
Definition: ncxmod.c:8717
void ncxmod_free_search_result(ncxmod_search_result_t *searchresult)
Clean and free a search result struct.
Definition: ncxmod.c:8844
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:6358
xmlChar * ncxmod_find_script_file(const xmlChar *fname, status_t *res)
Determine the location of the specified script file.
Definition: ncxmod.c:6445
const xmlChar * ncxmod_get_yuma_install(void)
Get the YUMAPRO_INSTALL or default install parameter value, whichever is in effect.
Definition: ncxmod.c:6848
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:9841
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:8880
xmlChar * ncxmod_find_test_suite_file(const xmlChar *fname, status_t *res)
Determine the location of the specified test-suite file.
Definition: ncxmod.c:6575
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:9515
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:5063
void(* search_dumpfn_t)(log_debug_t level, const char *fstr,...)
Callback to do log dump function for show searchpath.
Definition: ncxmod.h:507
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:1138
struct for storing YANG file search results this is used by yangcli for schema auto-load also for fin...
Definition: ncxmod.h:422
xmlChar * source
file location
Definition: ncxmod.h:428
xmlChar * module
module or submodule name
Definition: ncxmod.h:424
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:423
xmlChar * namespacestr
set if module & namespace found
Definition: ncxmod.h:427
status_t res
search result, only use if NO_ERR
Definition: ncxmod.h:430
xmlChar * revision
set if most recent revision found
Definition: ncxmod.h:426
ncx_module_t * mod
back-ptr to found module if loaded
Definition: ncxmod.h:429
xmlChar * belongsto
set if submodule & belongs-to found
Definition: ncxmod.h:425
uint8 flags
replaces capmatch and ismod
Definition: ncxmod.h:433
cap_rec_t * cap
back-ptr to source capability URI
Definition: ncxmod.h:432
uint32 nslen
length of base part of namespacestr
Definition: ncxmod.h:431
temporary file control block
Definition: ncxmod.h:410
xmlChar * source
filespec source string
Definition: ncxmod.h:412
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:411
const xmlChar * filename
ptr into source
Definition: ncxmod.h:413
program-level temp dir control block
Definition: ncxmod.h:393
xmlChar * source
filespec source string
Definition: ncxmod.h:395
dlq_hdr_t temp_sescbQ
Q of ncxmod_temp_sescb_t.
Definition: ncxmod.h:396
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:394
session-level temp-dir control block
Definition: ncxmod.h:401
xmlChar * source
filespec source string
Definition: ncxmod.h:403
dlq_hdr_t temp_filcbQ
Q of ncxmod_temp_filcb_t.
Definition: ncxmod.h:405
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:402
uint32 sidnum
session ID number
Definition: ncxmod.h:404
YANG parser control block.
Definition: yang.h:204
YANG Module parser utilities.