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_IETF_DISTRIBUTED_NOTIF \
195 (const xmlChar *)"ietf-distributed-notif"
197#define NCXMOD_IETF_YANG_PUSH_REVISION \
198 (const xmlChar *)"ietf-yang-push-revision"
200#define NCXMOD_WITH_DEFAULTS (const xmlChar *)"ietf-netconf-with-defaults"
202#define NCXMOD_YUMAWORKS_EXTENSIONS (const xmlChar *)"yumaworks-extensions"
204#define NCXMOD_YUMAWORKS_YANG_CBOR (const xmlChar *)"yumaworks-yang-cbor"
206#define NCXMOD_FHS_RUNDIR (const xmlChar *)"/var/run/netconfd-pro"
208#define NCXMOD_FHS_LIBDIR (const xmlChar *)"/var/lib/netconfd-pro"
210#define NCXMOD_FHS_LOGDIR (const xmlChar *)"/var/log/netconfd-pro"
212#define NCXMOD_FHS_LOGSPEC \
213 (const xmlChar *)"/var/log/netconfd-pro/server.log"
215#define NCXMOD_FHS_AUDIT_LOGSPEC \
216 (const xmlChar *)"/var/log/netconfd-pro/audit.log"
218#define NCXMOD_SRID_FHS_LOGSPEC \
219 (const xmlChar *)"/var/log/netconfd-pro/server.%s.log"
221#define NCXMOD_SRID_FHS_AUDIT_LOGSPEC \
222 (const xmlChar *)"/var/log/netconfd-pro/audit.%s.log"
225#define NCXMOD_NETCONF_NOTIFICATIONS \
226 (const xmlChar *)"ietf-netconf-notifications"
228#define NCXMOD_PARTIAL_LOCK (const xmlChar *)"ietf-netconf-partial-lock"
230#define NCXMOD_CRYPT_HASH (const xmlChar *)"iana-crypt-hash"
235#define NCXMOD_YANG_LIBRARY (const xmlChar *)"ietf-yang-library"
236#define NCXMOD_RESTMON (const xmlChar *)"ietf-restconf-monitoring"
239#define NCXMOD_IETF_DATASTORES (const xmlChar *)"ietf-datastores"
240#define NCXMOD_IETF_ORIGIN (const xmlChar *)"ietf-origin"
241#define NCXMOD_IETF_NETCONF_NMDA (const xmlChar *)"ietf-netconf-nmda"
244#define NCXMOD_IETF_SM_MODULE (const xmlChar *)"ietf-yang-schema-mount"
247#define NCXMOD_IETF_SM_MODULE_ANNOT \
248 (const xmlChar *)"yumaworks-schema-mount-annot"
253#define NCXMOD_HOOKS_TEST (const xmlChar *)"hooks-test"
255#define NCXMOD_YUMA_SYSTEM (const xmlChar *)"yuma-system"
261#define NCXMOD_OC_EXT (const xmlChar *)"openconfig-extensions"
266#define NCXMOD_DIR (const xmlChar *)"modules"
271#define NCXMOD_DATA_DIR (const xmlChar *)"data"
276#define NCXMOD_SCRIPT_DIR (const xmlChar *)"scripts"
279#define NCXMOD_TEST_SUITE_DIR (const xmlChar *)"test-suites"
282#define NCXMOD_PWD "PWD"
285#define USER_HOME "HOME"
288#define NCXMOD_HOME "YUMAPRO_HOME"
293#define NCXMOD_INSTALL "YUMAPRO_INSTALL"
296#if defined(FREEBSD) || defined(MACOSX)
297#define NCXMOD_DEFAULT_INSTALL (const xmlChar *)"/usr/local/share/yumapro"
299#define NCXMOD_DEFAULT_INSTALL (const xmlChar *)"/usr/share/yumapro"
303#define NCXMOD_DEFAULT_YUMALIB64 (const xmlChar *)"/usr/lib64/yumapro"
306#define NCXMOD_DEFAULT_YUMALIB (const xmlChar *)"/usr/local/lib/yumapro"
308#define NCXMOD_DEFAULT_YUMALIB (const xmlChar *)"/usr/lib/yumapro"
313#define NCXMOD_ETC_DATA (const xmlChar *)"/etc/yumapro"
316#define NCXMOD_MODPATH "YUMAPRO_MODPATH"
319#define NCXMOD_DATAPATH "YUMAPRO_DATAPATH"
322#define NCXMOD_RUNPATH "YUMAPRO_RUNPATH"
325#define NCXMOD_LOADPATH "YUMAPRO_LOADPATH"
328#define NCXMOD_YUMA_DIR (const xmlChar *)"~/.yumapro"
331#define NCXMOD_TEMP_YUMA_DIR (const xmlChar *)"/tmp/yumapro"
334#define NCXMOD_YUMA_DIRNAME (const xmlChar *)".yumapro"
339#define NCXMOD_TEMP_DIR (const xmlChar *)"/tmp"
343#define NCXMOD_UT_RECORDTEST_DIR (const xmlChar *)"/recordtest"
346#define NCXMOD_YANGCLI_CACHE_DIR (const xmlChar *)"/.yangcli_cache"
349#define NCXMOD_YANGLIB_CACHE_DIR (const xmlChar *)"/.yanglib_cache"
352#define NCXMOD_YANGLIB_ID_FILE (const xmlChar *)"yangid.txt"
355#define NCXMOD_GET_SOURCE_NEEDED(s) \
356 (*(s) == (xmlChar)'~' || *(s) == (xmlChar)'.' || *(s) == (xmlChar)'$')
358#define NCXMOD_SEARCH_MODULE(R) (R)->module
360#define NCXMOD_SEARCH_REVISION(R) (R)->revision
362#define NCXMOD_SEARCH_SOURCE(R) (R)->source
364#define NCXMOD_SEARCH_NAMESPACE(R) (R)->namespacestr
367#define NCXMOD_FL_CAPMATCH bit0
368#define NCXMOD_FL_ISMOD bit1
369#define NCXMOD_FL_BEST bit2
371#define NCXMOD_SET_CAPMATCH(R) (R)->flags |= NCXMOD_FL_CAPMATCH
372#define NCXMOD_CLR_CAPMATCH(R) (R)->flags &= ~NCXMOD_FL_CAPMATCH
373#define NCXMOD_IS_CAPMATCH(R) ((R)->flags & NCXMOD_FL_CAPMATCH)
375#define NCXMOD_SET_ISMOD(R) (R)->flags |= NCXMOD_FL_ISMOD
376#define NCXMOD_IS_ISMOD(R) ((R)->flags & NCXMOD_FL_ISMOD)
378#define NCXMOD_SET_BEST(R) (R)->flags |= NCXMOD_FL_BEST
379#define NCXMOD_IS_BEST(R) ((R)->flags & NCXMOD_FL_BEST)
404typedef struct ncxmod_temp_progcb_t_ {
412typedef struct ncxmod_temp_sescb_t_ {
421typedef struct ncxmod_temp_filcb_t_ {
433typedef struct ncxmod_search_result_t_ {
489 const xmlChar *mtime,
594 ncxmod_load_module (
const xmlChar *modname,
595 const xmlChar *revision,
628 const xmlChar *revision,
669 const xmlChar *revision,
672 dlq_hdr_t *topfailedQ,
704 const xmlChar *revision);
781 ncxmod_load_deviation (
const xmlChar *deviname,
782 dlq_hdr_t *deviationQ);
811 dlq_hdr_t *deviationQ);
845 const xmlChar *revision,
877 const xmlChar *revision,
878 boolean with_submods,
907 const xmlChar *revision,
908 boolean with_submods,
909 const xmlChar *modpath,
1048 boolean backup_file,
1070 boolean fileloc_fhs,
1071 boolean backup_file,
1091 const xmlChar *fname,
1197extern const xmlChar *
1220extern const xmlChar *
1230extern const xmlChar *
1293extern const xmlChar *
1336extern const xmlChar *
1348extern const xmlChar *
1660 const xmlChar *filename,
1682 const xmlChar *yanglib_id,
1683 boolean is_replace);
1763 const xmlChar *filename,
1804 const xmlChar *revision);
1841 const xmlChar *modname,
1842 const xmlChar *revision,
1843 const xmlChar *nsuri);
1915 boolean fileloc_fhs,
1931 boolean fileloc_fhs,
1949 boolean file_error);
1974 const xmlChar *dest_filespec);
1992 const xmlChar *ipaddr,
2133#define ncxmod_is_pschar(ch) \
2134 (((ch) == NCXMOD_PSCHAR) || ((ch) == NCXMOD_WIN_PSCHAR))
2136#define ncxmod_is_pschar(ch) ((ch) == NCXMOD_PSCHAR)
2147extern const xmlChar *
2158extern const xmlChar *
2169extern 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:7240
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:7636
status_t ncxmod_get_file_mtime(const xmlChar *filespec, time_t *timebuff)
Get the last-modified time for a file.
Definition: ncxmod.c:10199
status_t ncxmod_init(void)
Initialize the ncxmod module.
Definition: ncxmod.c:4891
const xmlChar * ncxmod_get_modpath(void)
Get the ncxmod_mod_path value.
Definition: ncxmod.c:11494
status_t ncxmod_load_annotation(const xmlChar *deviname, dlq_hdr_t *deviationQ)
Load an annotation module (special compiler processing)
Definition: ncxmod.c:5628
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:9656
void ncxmod_set_altpath(const xmlChar *altpath)
Set the alternate path that should be used first (for yangdiff)
Definition: ncxmod.c:7587
ncxmod_search_result_t * ncxmod_clone_search_result(const ncxmod_search_result_t *sr)
Clone a search result.
Definition: ncxmod.c:10051
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:467
boolean ncxmod_test_subdir(const xmlChar *dirspec)
Check if the specified string is a directory.
Definition: ncxmod.c:7471
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:6284
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:7982
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:7403
void ncxmod_set_runpath(const xmlChar *runpath)
Override the YUMAPRO_RUNPATH env var with the runpath CLI var.
Definition: ncxmod.c:7331
status_t ncxmod_setup_fhs_dirs(void)
Setup the following FHS location server directories if they do not already exist.
Definition: ncxmod.c:8366
void ncxmod_free_program_tempdir(ncxmod_temp_progcb_t *progcb)
Remove a program instance temp files directory.
Definition: ncxmod.c:9482
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:5941
void ncxmod_clear_altpath(void)
Clear the alternate path so none is used (for yangdiff)
Definition: ncxmod.c:7606
const xmlChar * ncxmod_get_yumadir(void)
Get the yuma directory being used.
Definition: ncxmod.c:7376
status_t ncxmod_setup_tempdir(void)
Setup the ~/.yuma/tmp directory if it does not exist.
Definition: ncxmod.c:8536
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:7809
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:11360
status_t ncxmod_set_private_bestmatch(const xmlChar *modpath)
Check for all the modules avialable for bestmatch checking.
Definition: ncxmod.c:10875
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:10279
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:10790
status_t ncxmod_set_home(const xmlChar *home)
Override the HOME env var with the home CLI var.
Definition: ncxmod.c:7071
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:5782
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:8991
status_t ncxmod_set_bestmatch_modules(void)
Check for all the modules avialable for bestmatch checking.
Definition: ncxmod.c:10831
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:10235
uint32 ncxmod_get_pathlen_from_filespec(const xmlChar *filespec)
Get the length of th path part of the filespec string.
Definition: ncxmod.c:10158
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:7200
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:9509
boolean ncxmod_test_filespec(const xmlChar *filespec)
Check the exact filespec to see if it a file.
Definition: ncxmod.c:10129
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:5526
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:6164
status_t ncxmod_setup_yumadir(void)
Setup the ~/.yumapro directory if it does not exist.
Definition: ncxmod.c:8141
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:6457
status_t ncxmod_clear_yanglib_cache(const xmlChar *server_dir)
Clear the yanglib cache on this machine.
Definition: ncxmod.c:8930
boolean(* private_bestmatch_fn_t)(const ncxmod_search_result_t *sr, void *cookie)
Callback to walk the private_bastmatch_dict.
Definition: ncxmod.h:529
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:6812
void ncxmod_subsys_info_remove(const xmlChar *filespec)
Remove the subsystem info file.
Definition: ncxmod.c:10755
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:6609
ncxmod_search_result_t * ncxmod_new_search_result(void)
Malloc and initialize a search result struct.
Definition: ncxmod.c:9756
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:11020
void ncxmod_set_loadpath(const xmlChar *loadpath)
Override the YUMAPRO_LOADPATH env var with the loadpath CLI var.
Definition: ncxmod.c:7271
status_t ncxmod_setup_backup_dir(const xmlChar *backup_dir)
Setup the ~/.yumapro/backups directory if it does not exist.
Definition: ncxmod.c:8315
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:8681
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:5498
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:9979
status_t ncxmod_walk_private_bestmatch(private_bestmatch_fn_t cbfn, void *cookie)
Walk the private bastmatch dict.
Definition: ncxmod.c:10945
status_t ncxmod_set_yuma_home(const xmlChar *yumahome)
Override the YUMAPRO_HOME env var with the yuma-home CLI var.
Definition: ncxmod.c:7154
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:5673
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:9058
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:506
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:5210
const xmlChar * ncxmod_get_home(void)
Get the HOME or –home parameter value, whichever is in effect, if any.
Definition: ncxmod.c:7136
void ncxmod_free_session_tempfile(ncxmod_temp_filcb_t *filcb)
Clean and free a session instance temp files directory.
Definition: ncxmod.c:9734
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:10430
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:8724
status_t ncxmod_setup_recordtest_dir(void)
Setup the ~/.yumapro/recordtest directory if it does not exist.
Definition: ncxmod.c:8585
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:9105
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:5325
status_t ncxmod_setup_fhs_srid_dirs(const xmlChar *server_root)
Setup the following FHS SRID subdir location.
Definition: ncxmod.c:8453
void ncxmod_free_session_tempdir(ncxmod_temp_progcb_t *progcb, uint32 sidnum)
Clean and free a session instance temp files directory.
Definition: ncxmod.c:9605
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:488
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:5859
void ncxmod_clean_private_bestmatch(void)
clean up the private_bestmatch_dict after each use
Definition: ncxmod.c:10998
const xmlChar * ncxmod_get_datapath(void)
Get the ncxmod_data_path value.
Definition: ncxmod.c:11511
status_t ncxmod_setup_yumadir_force(const xmlChar *path)
Setup the ~/.yumapro directory if it does not exist.
Definition: ncxmod.c:8283
void ncxmod_dump_module_search_path(search_dumpfn_t dumpfn, log_debug_t loglevel)
Output the YANG module search path.
Definition: ncxmod.c:11100
status_t ncxmod_setup_yumadir_srid(const xmlChar *srid)
Setup the ~/.yumapro/SRID directory if it does not exist.
Definition: ncxmod.c:8216
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:10516
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:10360
void ncxmod_cleanup(void)
Cleanup the ncxmod module.
Definition: ncxmod.c:5091
status_t ncxmod_subsys_info_write(const xmlChar *filespec, const xmlChar *ipaddr, uint16 portnum)
Write the subsystem info file;.
Definition: ncxmod.c:10674
void ncxmod_set_subdirs(boolean usesubdirs)
Set the subdirs flag to FALSE if the no-subdirs CLI param is set.
Definition: ncxmod.c:7360
void ncxmod_set_datapath(const xmlChar *datapath)
Override the YUMA_DATAPATH env var with the datapath CLI var.
Definition: ncxmod.c:7301
ncxmod_temp_progcb_t * ncxmod_new_program_tempdir(status_t *res)
Setup a program instance temp files directory.
Definition: ncxmod.c:9379
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:9144
const xmlChar * ncxmod_get_runpath(void)
Get the ncxmod_run_path value.
Definition: ncxmod.c:11528
void ncxmod_log_env(void)
Report the environment variables used by the running system.
Definition: ncxmod.c:5040
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:8636
const xmlChar * ncxmod_get_envvar(const xmlChar *name, uint32 namelen)
Get the specified shell environment variable.
Definition: ncxmod.c:7552
boolean ncxmod_use_bestmatch_now(const xmlChar *revision)
Check if the bestmatch can be used for this module.
Definition: ncxmod.c:11084
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:9317
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:9866
const xmlChar * ncxmod_get_userhome(const xmlChar *user, uint32 userlen)
Get the user home dir from the passwd file.
Definition: ncxmod.c:7501
ncxmod_search_result_t * ncxmod_new_search_result_ex(const ncx_module_t *mod)
Malloc and initialize a search result struct.
Definition: ncxmod.c:9783
void ncxmod_free_search_result(ncxmod_search_result_t *searchresult)
Clean and free a search result struct.
Definition: ncxmod.c:9910
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:6717
xmlChar * ncxmod_find_script_file(const xmlChar *fname, status_t *res)
Determine the location of the specified script file.
Definition: ncxmod.c:6804
const xmlChar * ncxmod_get_yuma_install(void)
Get the YUMAPRO_INSTALL or default install parameter value, whichever is in effect.
Definition: ncxmod.c:7217
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:11051
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:9946
xmlChar * ncxmod_find_test_suite_file(const xmlChar *fname, status_t *res)
Determine the location of the specified test-suite file.
Definition: ncxmod.c:6944
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:10581
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:5422
void(* search_dumpfn_t)(log_debug_t level, const char *fstr,...)
Callback to do log dump function for show searchpath.
Definition: ncxmod.h:518
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:1118
struct for storing YANG file search results this is used by yangcli for schema auto-load also for fin...
Definition: ncxmod.h:433
xmlChar * source
file location
Definition: ncxmod.h:439
xmlChar * module
module or submodule name
Definition: ncxmod.h:435
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:434
xmlChar * namespacestr
set if module & namespace found
Definition: ncxmod.h:438
status_t res
search result, only use if NO_ERR
Definition: ncxmod.h:441
xmlChar * revision
set if most recent revision found
Definition: ncxmod.h:437
ncx_module_t * mod
back-ptr to found module if loaded
Definition: ncxmod.h:440
xmlChar * belongsto
set if submodule & belongs-to found
Definition: ncxmod.h:436
uint8 flags
replaces capmatch and ismod
Definition: ncxmod.h:444
cap_rec_t * cap
back-ptr to source capability URI
Definition: ncxmod.h:443
uint32 nslen
length of base part of namespacestr
Definition: ncxmod.h:442
temporary file control block
Definition: ncxmod.h:421
xmlChar * source
filespec source string
Definition: ncxmod.h:423
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:422
const xmlChar * filename
ptr into source
Definition: ncxmod.h:424
program-level temp dir control block
Definition: ncxmod.h:404
xmlChar * source
filespec source string
Definition: ncxmod.h:406
dlq_hdr_t temp_sescbQ
Q of ncxmod_temp_sescb_t.
Definition: ncxmod.h:407
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:405
session-level temp-dir control block
Definition: ncxmod.h:412
xmlChar * source
filespec source string
Definition: ncxmod.h:414
dlq_hdr_t temp_filcbQ
Q of ncxmod_temp_filcb_t.
Definition: ncxmod.h:416
dlq_hdr_t qhdr
queue header
Definition: ncxmod.h:413
uint32 sidnum
session ID number
Definition: ncxmod.h:415
YANG parser control block.
Definition: yang.h:204
YANG Module parser utilities.