yumapro  24.10-11
YumaPro SDK
Loading...
Searching...
No Matches
ncx.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2025, 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_ncx
13#define _H_ncx
14
15/*
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
32/********************************************************************
33* *
34* C H A N G E H I S T O R Y *
35* *
36*********************************************************************
37
38date init comment
39----------------------------------------------------------------------
4029-oct-05 abb Begun
4120-jul-08 abb Start YANG rewrite; remove PSD and PS
4223-aug-09 abb Update diagram in header
43*/
44
45#include <xmlstring.h>
46
47#ifndef _H_dlq
48#include "dlq.h"
49#endif
50
51#ifndef _H_getcb
52#include "getcb.h"
53#endif
54
55#ifndef _H_grp
56#include "grp.h"
57#endif
58
59#ifndef _H_log
60#include "log.h"
61#endif
62
63#ifndef _H_ncxconst
64#include "ncxconst.h"
65#endif
66
67#ifndef _H_ncxtypes
68#include "ncxtypes.h"
69#endif
70
71#ifndef _H_obj
72#include "obj.h"
73#endif
74
75#ifndef _H_rpc
76#include "rpc.h"
77#endif
78
79#ifndef _H_tk
80#include "tk.h"
81#endif
82
83#ifndef _H_typ
84#include "typ.h"
85#endif
86
87#ifndef _H_val
88#include "val.h"
89#endif
90
91#ifndef _H_xmlns
92#include "xmlns.h"
93#endif
94
95#ifndef _H_yang
96#include "yang.h"
97#endif
98
99#ifdef __cplusplus
100extern "C" {
101#endif
102
103/* macro to convert 'foo' in -DRELEASE=foo to a string */
104#define STRINGIFY0(v) #v
105#define STRINGIFY(v) STRINGIFY0(v)
106
108#define MOD_NAME(M) (M)->name
109
110
111#define PROGNAME_BUFFLEN 128
112
113/********************************************************************
114* *
115* F U N C T I O N S *
116* *
117*********************************************************************/
118
156/* access the rootcb 'active' flag; set differently
157 * on server than on the client
158 */
159#define ROOTCB_ACTIVE(R) (R)->active
160
161/* access label in rootcb */
162#define ROOTCB_LABEL(R) (R)->label
163
164/* access modname in rootcb */
165#define ROOTCB_MODNAME(R) (R)->modname
166
167/* access yanglib_cb field in rootcb */
168#define ROOTCB_YANGLIB_CB(R) &((R)->yanglib_cb)
169
170/* access objpath field */
171#define ROOTCB_OBJPATH(R) (R)->objpath
172
173/* access rootobj field */
174#define ROOTCB_ROOTOBJ(R) (R)->rootobj
175
176/* access module queue */
177#define ROOTCB_MODQ(R) &((R)->modQ)
178
179/* access deviation queue */
180#define ROOTCB_DEVQ(R) &((R)->devQ)
181
183#define ROOTCB_CAPLIST(R) (R)->caplist
184
220extern status_t
221 ncx_init (boolean netconfd,
222 boolean savestr,
223 log_debug_t dlevel,
224 boolean logtstamps,
225 boolean collapse_submods,
226 boolean xpath_backptrs,
227 const char *startmsg,
228 int argc,
229 char *argv[]);
230
231
237extern void
238 ncx_cleanup (void);
239 // END ncxlib/ncxinit
241
242
243
244
245// Header only for NCX Global Data Docs
246
256// Header only for Protocol Support Docs
257
267// Header only for NCX Global Data Docs
268
278// Header only for YANG Compiler Docs
279
289// heading only for YANG Library Docs
290
301// Heading only for YANG Module Docs
302 // BEGIN ncxlib/yang/yangcomp/yangcompgen
322
323
330extern ncx_module_t *
331 ncx_new_module (void);
332
333
350extern void
352
353
363extern status_t
365 boolean tempmod);
366
367
377extern status_t
379
380
392extern status_t
394 dlq_hdr_t *modQ);
395
396
407extern status_t
409
410
420extern status_t
422
423
436extern void
438 const xmlChar *modname,
439 const xmlChar *rpcname,
440 boolean match,
441 boolean firstmsg);
442
443
453extern const xmlChar *
454 ncx_get_name_segment (const xmlChar *str,
455 xmlChar *buff,
456 uint32 buffsize);
457
458
466extern status_t
468 ncx_status_t depstatus);
469
470
479extern void
480 ncx_free_node (ncx_node_t nodetyp,
481 void *node);
482
483
490extern ncx_tclass_t
492
493
505extern status_t
506 ncx_parse_name (const xmlChar *str,
507 uint32 *len);
508
509
523extern status_t
525 ncx_module_t *mod,
526 const xmlChar *name,
527 ncx_opt_t opt);
528
529
550extern status_t
552 ncx_module_t *mod,
553 const xmlChar *name,
554 xmlChar **namebuff,
555 ncx_opt_t opt,
556 tk_type_t ctyp);
557
558
573extern status_t
575 ncx_module_t *mod,
576 tk_type_t ttyp);
577
578
589 boolean annotation);
590
591
597extern void
599
600
606extern void
607 ncx_clean_save_deviationsQ (dlq_hdr_t *savedevQ);
608
609
622extern void
624 ncx_module_t *mod,
625 uint32 linenum,
626 uint32 linepos);
627
628
634extern void
636
637
646extern boolean
647 ncx_need_modchecks (const xmlChar *modname);
648
649
655extern status_t
656 ncx_init_user_types (void);
657
658
667extern boolean
668 ncx_check_any_object_nolock_get (const xmlChar *objname);
669
670 // END ncxlib/yang/yangcomp/yangcompgen
672
673
674 // BEGIN ncxlib/yang/yanglib/yanglibstatus
682
683
690extern boolean
691 ncx_any_mod_errors (void);
692
693
700extern boolean
701 ncx_save_descr (void);
702
703
714extern uint32
716 const xmlChar *modname);
717
718
728extern uint32
730 dlq_hdr_t *modQ,
731 const xmlChar *modname);
732
733
743extern uint32
745 dlq_hdr_t *deviationQ,
746 const xmlChar *modname);
747
748
754extern void
755 dump_modQ (dlq_hdr_t *modQ);
756
757 // END ncxlib/yang/yanglib/yanglibstatus
759
760 // BEGIN ncxlib/yang/yanglib/yanglibfind
779
780
791extern ncx_module_t *
792 ncx_find_module (const xmlChar *modname,
793 const xmlChar *revision);
794
795
807extern ncx_module_t *
808 ncx_find_module_ex (const xmlChar *modname,
809 const xmlChar *revision);
810
811
822extern ncx_module_t *
823 ncx_find_module_by_prefix (const xmlChar *prefix);
824
825
835extern ncx_module_t *
836 ncx_find_module_que (dlq_hdr_t *modQ,
837 const xmlChar *modname,
838 const xmlChar *revision);
839
840
848extern ncx_module_t *
849 ncx_find_module_que_by_prefix (dlq_hdr_t *modQ,
850 const xmlChar *prefix);
851
852
862extern ncx_module_t *
863 ncx_find_module_que_nsid (dlq_hdr_t *modQ,
864 xmlns_id_t nsid);
865
866
876extern obj_template_t *
877 ncx_find_first_rpc (const xmlChar *rpcname);
878
879
892extern obj_template_t *
893 ncx_match_any_rpc (const xmlChar *module,
894 const xmlChar *rpcname,
895 uint32 *retcount);
896
897
907extern obj_template_t *
908 ncx_find_any_object (const xmlChar *objname);
909
910
928extern obj_template_t *
929 ncx_match_any_object (const xmlChar *objname,
930 ncx_name_match_t name_match,
931 boolean alt_names,
932 status_t *retres);
933
934
955extern obj_template_t *
956 ncx_match_any_object_ex (const xmlChar *modname,
957 const xmlChar *objname,
958 boolean dataonly,
959 ncx_name_match_t name_match,
960 boolean alt_names,
961 status_t *retres);
962
963
964
975extern obj_template_t *
976 ncx_find_any_object_que (dlq_hdr_t *modQ,
977 const xmlChar *objname);
978
979
986extern ncx_module_t *
988
989
998extern ncx_module_t *
1000
1001
1008extern ncx_module_t *
1010
1011
1019extern ncx_module_t *
1020 ncx_get_next_module (const ncx_module_t *mod);
1021
1022
1032extern ncx_module_t *
1034
1035
1045extern ncx_module_t *
1047
1048
1055extern ncx_module_t *
1056 ncx_find_first_importer (const xmlChar *module);
1057
1058
1066extern ncx_module_t *
1067 ncx_find_next_importer (const xmlChar *module,
1068 ncx_module_t *curmod);
1069
1070
1077extern ncx_module_t *
1078 ncx_find_deviation_module (const xmlChar *modname);
1079
1080
1088extern obj_template_t *
1089 ncx_first_data_node (boolean cfgonly);
1090
1091
1099extern obj_template_t *
1101
1102
1108extern ncx_module_t *
1110
1111
1118extern ncx_module_t *
1120
1121 // END ncxlib/yang/yanglib/yanglibfind
1123
1124
1125
1144extern obj_template_t *
1146 const xmlChar *rpcname,
1147 uint32 *retcount);
1148
1149
1164extern typ_template_t *
1166 const xmlChar *typname,
1167 boolean useall);
1168
1169
1181extern typ_template_t *
1182 ncx_find_type_que (const dlq_hdr_t *typeQ,
1183 const xmlChar *typname);
1184
1185
1201extern grp_template_t *
1203 const xmlChar *grpname,
1204 boolean useall);
1205
1206
1215extern grp_template_t *
1216 ncx_find_grouping_que (const dlq_hdr_t *groupingQ,
1217 const xmlChar *grpname);
1218
1219
1227extern obj_template_t *
1228 ncx_find_rpc (const ncx_module_t *mod,
1229 const xmlChar *rpcname);
1230
1231
1241extern obj_template_t *
1243 const xmlChar *rpcname,
1244 uint32 *retcount);
1245
1246
1257extern obj_template_t *
1259
1260
1270extern obj_template_t *
1272 obj_template_t *obj);
1273
1274
1282extern obj_template_t *
1284 const xmlChar *objname);
1285
1293extern obj_template_t *
1295 const xmlChar *objname);
1296
1297
1307extern obj_template_t *
1309
1310
1320extern obj_template_t *
1322 boolean augment_ok);
1323
1324
1336extern obj_template_t *
1338 boolean augment_ok);
1339
1340
1351extern obj_template_t *
1353 obj_template_t *curobj);
1354
1355
1369extern obj_template_t *
1371 obj_template_t *curobj,
1372 boolean augment_ok);
1373
1374
1387extern obj_template_t *
1389 obj_template_t *curobj,
1390 boolean augment_ok);
1391
1392
1400extern obj_template_t *
1402 obj_template_t *curobj);
1403
1404
1413extern obj_template_t *
1415 boolean config);
1416
1417
1427extern obj_template_t *
1429 obj_template_t *curobj);
1430
1431 // END ncxlib/yang/yangmod/yangmodfind
1433
1434 // BEGIN ncxlib/yang/yangmod/yangmodprop
1442
1443
1451extern boolean
1453
1454
1465extern boolean
1467 const xmlChar *defname);
1468
1469
1476extern const xmlChar *
1477 ncx_get_modname (const ncx_module_t *mod);
1478
1479
1486extern xmlns_id_t
1487 ncx_get_mod_nsid (const ncx_module_t *mod);
1488
1489
1496extern const xmlChar *
1497 ncx_get_modversion (const ncx_module_t *mod);
1498
1499
1506extern const xmlChar *
1508
1509
1516extern const xmlChar *
1517 ncx_get_modsource (const ncx_module_t *mod);
1518
1519
1526extern ncx_module_t *
1528
1529
1530
1537extern const xmlChar *
1538 ncx_get_mod_prefix (const ncx_module_t *mod);
1539
1540
1552extern const xmlChar *
1554
1555
1562extern const xmlChar *
1563 ncx_get_mod_source (const ncx_module_t *mod);
1564
1565
1572extern const xmlChar *
1574
1575
1582extern const xmlChar *
1584
1585
1595extern status_t
1597 const xmlChar *ocversion);
1598
1599
1607extern dlq_hdr_t *
1609
1610
1618extern const dlq_hdr_t *
1620
1621
1629extern ncx_module_t *
1631
1632
1639extern boolean
1641
1642
1651extern boolean
1653 boolean check_config,
1654 boolean check_operational);
1655
1656
1666extern boolean
1668 boolean check_config,
1669 boolean check_operational);
1670
1671
1680extern boolean
1682
1683
1690extern void
1692
1693
1700extern ncx_module_t *
1702
1703
1704
1712extern ncx_module_t *
1714 ncx_module_t *submod);
1715
1716
1723extern void
1725 boolean supported);
1726
1727
1734extern ncx_yang_version_t
1736
1737
1743extern void
1745
1746
1758extern boolean
1759 ncx_mod_is_hidden (const ncx_module_t *mod);
1760
1761
1771extern void
1772 ncx_set_mod_hidden (ncx_module_t *mod);
1773
1774
1782extern status_t
1784 const xmlChar *idstr);
1785
1786
1793extern void
1795 boolean mode);
1796
1797
1803extern void
1805
1806
1813extern boolean
1815
1816
1823extern boolean
1824 ncx_modname_is_ocpattern (const xmlChar *modname);
1825
1826
1837extern boolean
1838 ncx_skip_child_node_warn (const xmlChar *modname);
1839
1840
1847extern void ncx_clr_enable_chk (ncx_module_t *mod);
1848
1849
1856extern void
1858 boolean is_src);
1859
1860
1868extern boolean
1870 boolean is_src);
1871
1872
1881extern boolean
1883
1884 // END ncxlib/yang/yangmod/yangmodprop
1886
1887
1888 // BEGIN ncxlib/yang/yangmod/yangmodutil
1896
1897
1907extern void
1909
1910
1921extern void
1923
1924
1941extern void
1943
1944
1945
1955extern status_t
1957
1958
1965extern void
1967
1968
1975extern void
1977
1978
1985extern void
1987
1988 // END ncxlib/yang/yangmod/yangmodutil
1990
1991
1992
1993
1994// Heading only for YANG Data Docs
1995
1996
2022extern ncx_import_t *
2023 ncx_new_import (void);
2024
2025
2036extern void
2037 ncx_free_import (ncx_import_t *import);
2038
2039
2047extern ncx_import_t *
2048 ncx_find_import (const ncx_module_t *mod,
2049 const xmlChar *module);
2050
2051
2059extern ncx_import_t *
2060 ncx_find_import_que (const dlq_hdr_t *importQ,
2061 const xmlChar *module);
2062
2063
2073extern ncx_import_t *
2075 const xmlChar *module);
2076
2077
2085extern ncx_import_t *
2087 const xmlChar *prefix);
2088
2089
2097extern ncx_import_t *
2098 ncx_find_pre_import_que (const dlq_hdr_t *importQ,
2099 const xmlChar *prefix);
2100
2101
2111extern ncx_import_t *
2113 const xmlChar *prefix);
2114
2115
2124extern boolean
2126 const xmlChar *module,
2127 const xmlChar *revision);
2128
2129
2149extern void *
2151 ncx_import_t *imp,
2152 const xmlChar *defname,
2153 ncx_node_t *deftyp);
2154 // END ncxlib/yang/yangdata/yangimport
2156
2157
2158
2174extern ncx_include_t *
2175 ncx_new_include (void);
2176
2177
2188extern void
2190
2191
2199extern ncx_include_t *
2200 ncx_find_include (const ncx_module_t *mod,
2201 const xmlChar *submodule);
2202
2203 // END ncxlib/yang/yangdata/yanginclude
2205
2206
2228extern ncx_binary_t *
2229 ncx_new_binary (void);
2230
2231
2236extern void
2237 ncx_init_binary (ncx_binary_t *binary);
2238
2239
2245extern void
2247
2248
2254extern void
2255 ncx_free_binary (ncx_binary_t *binary);
2256
2257 // END ncxlib/yang/yangdata/yangbindata
2259
2260 // BEGIN ncxlib/yang/yangdata/yangidentity
2268
2269
2275extern ncx_identity_t *
2276 ncx_new_identity (void);
2277
2278
2285extern ncx_identity_base_t *
2286 ncx_new_identity_base (void);
2287
2288
2294extern void
2296
2297
2304extern ncx_identity_base_t *
2306
2307
2314extern ncx_identity_base_t *
2316
2317
2324extern uint32
2325 ncx_identity_base_count (ncx_identity_t *identity);
2326
2327
2333extern void
2335
2336
2347extern ncx_identity_t *
2349 const xmlChar *name,
2350 boolean useall);
2351
2352
2361extern void
2364 void *cookie);
2365
2366
2367/*
2368 * @brief Iterate all the YANG object definitions in the module
2369 *
2370 * @param mod module to search
2371 * @param cbfn The object_cbfn_t to invoke for each object found
2372 * @param cookie User cookie to pass to callback (may be NULL)
2373 */
2374extern void
2375 ncx_for_all_objects (ncx_module_t *mod,
2376 ncx_object_cbfn_t cbfn,
2377 void *cookie);
2378
2379
2387extern ncx_identity_t *
2388 ncx_find_identity_que (dlq_hdr_t *identityQ,
2389 const xmlChar *name);
2390
2391
2398extern xmlns_id_t
2399 ncx_get_identity_nsid (const ncx_identity_t *identity);
2400
2401
2408extern boolean
2410
2411
2424extern void
2427 void *cookie);
2428
2429
2430 // END ncxlib/yang/yangdata/yangidentity
2432
2433
2450extern ncx_filptr_t *
2451 ncx_new_filptr (void);
2452
2453
2459extern void
2460 ncx_free_filptr (ncx_filptr_t *filptr);
2461
2462
2468extern ncx_revhist_t *
2469 ncx_new_revhist (void);
2470
2471
2476extern void
2478
2479
2487extern ncx_revhist_t *
2488 ncx_find_revhist (const ncx_module_t *mod,
2489 const xmlChar *ver);
2490
2491 // END ncxlib/yang/yangdata/yangcompgen
2493
2494
2510extern void
2512
2513
2519extern void
2521
2522
2534extern int32
2535 ncx_compare_enums (const ncx_enum_t *enu1,
2536 const ncx_enum_t *enu2);
2537
2538
2550extern status_t
2551 ncx_set_enum (const xmlChar *enum_name,
2552 const int32 enum_val,
2553 ncx_enum_t *retenu);
2554
2555 // END ncxlib/yang/yangdata/yangenum
2557
2558
2573extern void
2574 ncx_init_bit (ncx_bit_t *bit);
2575
2576
2582extern void
2583 ncx_clean_bit (ncx_bit_t *bit);
2584
2585
2598extern int32
2599 ncx_compare_bits (const ncx_bit_t *bitone,
2600 const ncx_bit_t *bittwo);
2601
2602 // END ncxlib/yang/yangdata/yangbit
2604
2605
2606
2621extern ncx_typname_t *
2622 ncx_new_typname (void);
2623
2624
2631extern void
2633
2634
2642extern const xmlChar *
2643 ncx_find_typname (const typ_template_t *typ,
2644 const dlq_hdr_t *que);
2645
2646
2655extern const typ_template_t *
2656 ncx_find_typname_type (const dlq_hdr_t *que,
2657 const xmlChar *typname);
2658
2659
2665extern void
2666 ncx_clean_typnameQ (dlq_hdr_t *que);
2667
2668 // END ncxlib/yang/yangdata/yangtypname
2670
2671
2687extern ncx_errinfo_t *
2688 ncx_new_errinfo (void);
2689
2690
2696extern void
2698
2699
2706extern void
2708
2709
2716extern void
2718
2719
2730extern boolean
2731 ncx_errinfo_set (const ncx_errinfo_t *errinfo);
2732
2733
2742extern status_t
2743 ncx_copy_errinfo (const ncx_errinfo_t *src,
2744 ncx_errinfo_t *dest);
2745
2746
2747 // END ncxlib/yang/yangdata/yangdataerrinfo
2749
2750
2751
2752
2753
2754
2755
2756 // BEGIN ncxlib/ncxglobals/ncxgenobj
2766
2767
2773extern obj_template_t *
2774 ncx_get_gen_anyxml (void);
2775
2776
2782extern obj_template_t *
2783 ncx_get_gen_container (void);
2784
2785
2791extern obj_template_t *
2792 ncx_get_gen_string (void);
2793
2794
2800extern obj_template_t *
2801 ncx_get_gen_empty (void);
2802
2803
2809extern obj_template_t *
2810 ncx_get_gen_root (void);
2811
2812
2818extern obj_template_t *
2819 ncx_get_gen_binary (void);
2820
2826extern obj_template_t *
2827 ncx_get_gen_leaflist (void);
2828
2829
2835extern obj_template_t *
2836 ncx_get_yang_insert (void);
2837
2838
2844extern obj_template_t *
2845 ncx_get_yang_key (void);
2846
2847
2853extern obj_template_t *
2854 ncx_get_yang_value (void);
2855
2856
2863extern obj_template_t *
2864 ncx_get_nc_operation (void);
2865
2866
2873extern obj_template_t *
2874 ncx_get_datapath_obj (void);
2875
2876
2883extern obj_template_t *
2885
2886
2893extern obj_template_t *
2894 ncx_get_btype_obj (void);
2895
2896
2902extern boolean
2904
2905 // END ncxlib/ncxglobals/ncxgenobj
2907
2908
2909 // BEGIN ncxlib/ncxglobals/ncxgenvar
2920
2921
2927extern ncx_display_mode_t
2928 ncx_get_display_mode (void);
2929
2930
2936extern uint32
2938
2939
2947extern boolean
2948 ncx_get_useprefix (void);
2949
2950
2958extern void
2959 ncx_set_useprefix (boolean val);
2960
2961
2969extern boolean
2970 ncx_get_system_sorted (void);
2971
2972
2980extern void
2981 ncx_set_system_sorted (boolean val);
2982
2983
2992extern ncx_sort_type_t
2994
2995
3002extern void
3004
3005
3015extern boolean
3016 ncx_get_cwd_subdirs (void);
3017
3018
3026extern boolean
3028
3029
3036extern void
3038
3039
3045extern void
3047
3048
3056extern void
3057 ncx_set_use_deadmodQ (void);
3058
3059
3069extern int8
3071
3072
3079extern void
3080 ncx_set_message_indent (int8 msg_indent);
3081
3082
3089extern boolean
3091
3092
3099extern status_t
3101
3102
3108extern boolean
3109 ncx_fastpath_enabled (void);
3110
3111
3117extern boolean
3118 ncx_netconfd_running (void);
3119
3120
3126extern void
3127 ncx_use_data_templates (boolean enabled);
3128
3129
3135extern boolean
3136 ncx_data_templates_ok (void);
3137
3138
3144extern void
3145 ncx_ignore_missing_vars (boolean enabled);
3146
3147
3153extern boolean
3154 ncx_missing_vars_ok (void);
3155
3156
3160extern void
3162
3163
3167extern void
3169
3175extern boolean
3177
3178
3185extern status_t
3186 ncx_set_subsys_id (const xmlChar *id);
3187
3193extern const xmlChar *
3194 ncx_get_subsys_id (void);
3195
3196
3201extern void
3202 ncx_set_use_objptrs (void);
3203
3211extern boolean
3212 ncx_use_objptrs (void);
3213
3214
3220extern ncx_backptr_t *
3221 ncx_first_objptr (void);
3222
3223
3230extern ncx_backptr_t *
3232
3233
3234#ifdef DEBUG
3239extern void
3240 ncx_dump_objptrQ (void);
3241#endif // DEBUG
3242
3243
3251extern void
3252 ncx_set_getbulk_max (uint32 max_entries);
3253
3254
3260extern uint32
3261 ncx_get_getbulk_max (void);
3262
3263
3269extern void
3271
3272
3278extern boolean
3280
3281
3291extern void
3293
3294
3301extern boolean
3303
3304
3312extern boolean
3313 ncx_base_schema_set (void);
3314
3315
3321extern void
3322 ncx_set_base_schema (void);
3323
3324
3333extern boolean
3334 ncx_need_get2_xpath (void);
3335
3336
3343extern void
3344 ncx_set_with_ocpattern (boolean mode);
3345
3346
3352extern boolean
3354
3355
3361extern void
3363
3364
3372extern boolean
3373 ncx_is_with_snmp (void);
3374
3375
3383extern void
3384 ncx_set_with_snmp (boolean val);
3385
3386
3392extern void
3393 ncx_enable_bestmatch (void);
3394
3395
3404extern status_t
3405 ncx_set_bestmatch (void);
3406
3407
3413extern void
3415
3416
3423extern boolean
3425
3426
3432extern boolean
3434
3435
3442extern void
3443 ncx_set_sethook_registered (boolean val);
3444
3445
3451extern void
3452 ncx_set_binary_display_maxlen (uint32 val);
3453
3454
3460extern uint32
3462
3463
3469extern boolean
3470 ncx_is_with_dblock (void);
3471
3472
3478extern void
3479 ncx_set_with_dblock (boolean val);
3480
3481
3488extern boolean
3490
3491
3497extern void
3498 ncx_set_db_lock_init_done (boolean val);
3499
3500
3506extern void
3507 ncx_set_max_strlen (int32 num);
3508
3509
3515extern int32
3516 ncx_get_max_strlen (void);
3517
3518
3523extern void
3525
3526
3532extern boolean
3534
3535
3540extern void
3542
3543
3549extern boolean
3551
3552
3562extern void
3563 ncx_set_trim_whitespace (boolean val);
3564
3565
3572extern boolean
3574
3575
3584extern void
3585 ncx_set_startup_prune (boolean val);
3586
3587
3596extern boolean
3597 ncx_get_startup_prune (void);
3598
3599
3609extern boolean
3611
3612
3620extern void
3622
3623
3629extern ncx_config_state_t
3630 ncx_get_config_state (void);
3631
3632
3640extern void
3641 ncx_set_xmlorder (boolean val);
3642
3643
3650extern boolean
3651 ncx_get_xmlorder (void);
3652
3653
3661extern void
3662 ncx_set_list_deleteall_ok (boolean val);
3663
3664
3672extern boolean
3674
3675
3683extern void
3684 ncx_set_leaflist_deleteall_ok (boolean val);
3685
3686
3694extern boolean
3696
3697
3705extern boolean
3707
3708
3715extern void
3716 ncx_set_with_canonical (boolean val);
3717
3718
3725extern boolean
3727
3728
3738extern void
3739 ncx_set_save_owners (boolean val);
3740
3741
3748extern boolean
3749 ncx_get_save_owners (void);
3750
3751 // END ncxlib/ncxglobals/ncxgenvar
3753
3754
3755// heading only
3756 // BEGIN ncxlib/ncxstrenum
3774
3775
3784extern const xmlChar *
3785 ncx_get_layer (ncx_layer_t layer);
3786
3787
3794extern ncx_cvttyp_t
3795 ncx_get_cvttyp_enum (const char *str);
3796
3797
3804extern ncx_status_t
3805 ncx_get_status_enum (const xmlChar *str);
3806
3807
3814extern const xmlChar *
3816
3817
3824extern ncx_data_class_t
3825 ncx_get_data_class_enum (const xmlChar *str);
3826
3827
3834extern const xmlChar *
3836
3837
3844extern const xmlChar *
3845 ncx_get_access_str (ncx_access_t max_access);
3846
3847
3854extern ncx_access_t
3855 ncx_get_access_enum (const xmlChar *str);
3856
3857
3866extern boolean
3867 ncx_is_true (const xmlChar *str);
3868
3869
3877extern boolean
3878 ncx_is_false (const xmlChar *str);
3879
3880
3887extern ncx_bad_data_t
3888 ncx_get_baddata_enum (const xmlChar *valstr);
3889
3890
3897extern const xmlChar *
3899
3900
3907extern const xmlChar *
3909
3910
3917extern ncx_withdefaults_t
3918 ncx_get_withdefaults_enum (const xmlChar *withdefstr);
3919
3920
3927extern int32
3928 ncx_get_withdefaults_value (const xmlChar *withdefstr);
3929
3930
3938extern ncx_display_mode_t
3939 ncx_get_display_mode_enum (const xmlChar *dmstr);
3940
3941
3948extern const xmlChar *
3950
3951
3958extern const xmlChar *
3960
3961
3970extern const xmlChar *
3971 ncx_get_protocols_enabled (uint16 flags);
3972
3973
3980extern const xmlChar *
3982
3983
3990extern ncx_name_match_t
3991 ncx_get_name_match_enum (const xmlChar *str);
3992
3993
4000extern const xmlChar *
4002
4003
4010extern int32
4012
4013
4022extern status_t
4023 ncx_str2txid (const xmlChar *str,
4024 ncx_transaction_id_t *txid);
4025
4026
4035extern status_t
4037 xmlChar **retbuff);
4038
4039
4046extern const xmlChar *
4048
4049
4056extern const xmlChar *
4058
4059
4066extern ncx_msg_encoding_t
4067 ncx_cvt_encoding_str (const xmlChar *msg_encoding);
4068
4069
4075extern const xmlChar *
4077
4078
4085extern const xmlChar *
4087
4088 // END ncxlib/ncxutil/ncxstrenum
4090
4091
4092
4112extern void
4114 ncx_module_t *mod,
4115 status_t res);
4116
4117
4131extern void
4133 ncx_module_t *mod,
4134 status_t res,
4135 const char *filename,
4136 uint32 linenum,
4137 boolean fineoln);
4138
4139
4147extern void
4149 status_t result,
4150 const char *expstr);
4151
4152
4161extern void
4163 ncx_module_t *mod,
4164 status_t result,
4165 const char *expstr);
4166
4167
4177extern void
4179 ncx_module_t *mod,
4180 const char *stmtstr,
4181 const char *expstr);
4182
4183
4194extern ncx_errmsg_t *
4196 const xmlChar *str);
4197
4198
4204extern void
4206
4207
4208 // END ncxlib/yang/yangcomp/yangcomperr
4210
4211
4212 // BEGIN ncxlib/yang/yangcomp/yangcompidentifier
4222
4223
4230extern boolean
4231 ncx_valid_name_ch (uint32 ch);
4232
4233
4240extern boolean
4241 ncx_valid_fname_ch (uint32 ch);
4242
4243
4251extern boolean
4252 ncx_valid_name (const xmlChar *str,
4253 uint32 len);
4254
4255
4269extern boolean
4270 ncx_valid_num_name (const xmlChar *str);
4271
4272
4281extern boolean
4282 ncx_valid_name2 (const xmlChar *str);
4283
4284 // END ncxlib/yang/yangcomp/yangcompidentifier
4286
4287
4288 // BEGIN ncxlib/ncxutil/ncxutilgen
4296
4319extern xmlChar *
4320 ncx_get_source_ex (const xmlChar *fspec,
4321 boolean expand_cwd,
4322 status_t *res);
4323
4324
4347extern xmlChar *
4348 ncx_get_source (const xmlChar *fspec,
4349 status_t *res);
4350
4351
4361extern boolean
4362 ncx_prefix_different (const xmlChar *prefix1,
4363 const xmlChar *prefix2,
4364 const xmlChar *modprefix);
4365
4366
4376extern status_t
4377 ncx_get_version (xmlChar *buffer,
4378 uint32 buffsize);
4379
4380
4390extern status_t
4391 ncx_get_semver (xmlChar *buffer,
4392 uint32 buffsize);
4393
4394
4404extern status_t
4405 ncx_get_full_version (xmlChar *buffer,
4406 uint32 buffsize);
4407
4408
4409
4417extern const char *
4418 ncx_get_build_date (void);
4419
4420
4421
4429extern status_t
4430 ncx_get_feature_code (xmlChar *buffer,
4431 uint32 buffsize);
4432
4441extern int32
4442 ncx_compare_base_uris (const xmlChar *str1,
4443 const xmlChar *str2);
4444
4445
4454extern boolean
4456 uint16 flags);
4457
4458
4459
4469extern void
4471 uint16 *flags);
4472
4473
4482extern void
4484 uint16 *flags);
4485
4486
4493extern boolean
4495
4496
4505extern void
4506 ncx_write_tracefile (const char *buff, uint32 count);
4507
4508
4519extern status_t
4520 ncx_decode_url_string (const xmlChar *urlstr,
4521 uint32 urlstrlen,
4522 xmlChar *buffer,
4523 uint32 *cnt);
4524
4525
4526
4537extern status_t
4538 ncx_create_pidfile (const xmlChar *progname,
4539 boolean fileloc_fhs);
4540
4541
4548extern status_t
4549 ncx_add_ydtrace (const xmlChar *fspec);
4550
4551
4558extern boolean
4559 ncx_find_ydtrace (const xmlChar *fspec);
4560
4561
4570 ncx_get_file_result_format (const xmlChar *filespec);
4571
4572
4585extern boolean
4586 ncx_library_mode_ok (const xmlChar *modname,
4587 const xmlChar *rpcname);
4588
4589
4595extern const char *
4596 ncx_get_progname (void);
4597
4598
4605extern boolean
4607
4608
4616extern boolean
4617 ncx_check_inline_data_state (const xmlChar *line,
4618 boolean curstate);
4619
4620 // END ncxlib/ncxutil/ncxutilgen
4622
4623
4624
4625// Heading Only
4650extern void
4651 ncx_set_cur_modQ (dlq_hdr_t *que);
4652
4653
4657extern void
4658 ncx_reset_modQ (void);
4659
4660
4675extern void
4676 ncx_set_session_modQ (dlq_hdr_t *que);
4677
4678
4684extern dlq_hdr_t *
4685 ncx_get_session_modQ (void);
4686
4687
4700extern void
4702
4703
4709extern void
4710 ncx_set_temp_modQ (dlq_hdr_t *modQ);
4711
4712
4718extern dlq_hdr_t *
4719 ncx_get_temp_modQ (void);
4720
4721
4726extern void
4727 ncx_clear_temp_modQ (void);
4728
4729
4730 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfq
4732
4733
4750extern status_t
4752
4753
4759extern void
4761
4762
4769extern status_t
4771
4772
4778extern void
4780
4781
4788extern status_t
4790
4791
4797extern void
4799
4800
4807extern void
4809 obj_template_t *obj);
4810
4811
4817extern void
4819
4820
4827extern const xmlChar *
4829
4830 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfcb
4832
4849extern void
4850 ncx_set_warn_idlen (uint32 warnlen);
4851
4852
4858extern uint32
4859 ncx_get_warn_idlen (void);
4860
4861
4867extern void
4868 ncx_set_warn_linelen (uint32 warnlen);
4869
4870
4876extern uint32
4877 ncx_get_warn_linelen (void);
4878
4879
4889extern void
4891 ncx_module_t *mod,
4892 const xmlChar *id);
4893
4894
4904extern void
4906 ncx_module_t *mod,
4907 const xmlChar *line);
4908
4909
4916extern status_t
4918
4919
4926extern status_t
4928
4929
4936extern status_t
4938
4939
4945extern void
4946 ncx_set_warn_error (boolean val);
4947
4948
4954extern void
4955 ncx_set_warn_off_yang (boolean val);
4956
4957
4963extern boolean
4964 ncx_get_warn_off_yang (void);
4965
4973extern boolean
4975
4976
4984extern boolean
4986
4987
4994extern void
4996
4997
5013extern void
5014 ncx_set_top_mandatory_allowed (boolean allowed);
5015
5016
5023extern boolean
5025
5026
5036extern boolean
5038
5039
5045extern void
5046 ncx_set_module_setid (uint32 new_setid);
5047
5048
5054extern uint32
5055 ncx_get_module_setid (void);
5056
5057
5067extern status_t
5068 ncx_sprintf_module_setid (uint32 id,
5069 xmlChar *buff,
5070 int32 buffsize);
5071
5072
5079extern boolean
5081
5082
5089extern void
5090 ncx_set_empty_npcon_presence (boolean val);
5091
5092
5102extern boolean
5104
5105
5116extern void
5117 ncx_set_empty_npcon_presence_ro (boolean val);
5118
5119
5120
5121
5122 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfset
5124
5125
5126
5127
5128 // BEGIN ncxlib/ncxutil/ncxbackptr
5143
5144
5151extern ncx_backptr_t *
5152 ncx_new_backptr (void *node);
5153
5154
5161extern void
5163
5164
5175extern void
5177
5178
5184extern void
5185 ncx_clean_backptrQ (dlq_hdr_t *backptrQ);
5186
5187
5194extern void
5195 ncx_clean_mbackptrQ (dlq_hdr_t *backptrQ);
5196
5197
5204extern ncx_backptr_t *
5205 ncx_first_backptr (dlq_hdr_t *que);
5206
5207
5214extern const ncx_backptr_t *
5215 ncx_first_const_backptr (const dlq_hdr_t *que);
5216
5217
5224extern ncx_backptr_t *
5225 ncx_last_backptr (dlq_hdr_t *que);
5226
5227
5234extern ncx_backptr_t *
5236
5243extern const ncx_backptr_t *
5244 ncx_next_const_backptr (const ncx_backptr_t *curptr);
5245
5246
5253extern ncx_backptr_t *
5255
5256
5263extern void *
5265
5266
5273extern const void *
5275
5276
5282extern void
5284
5285
5293extern ncx_backptr_t *
5294 ncx_find_backptr (const dlq_hdr_t *que,
5295 void *node);
5296
5297
5298
5299 // END ncxlib/ncxutil/ncxbackptr
5301
5302
5324extern ncx_save_deviations_t *
5325 ncx_find_save_deviations (const xmlChar *deviname,
5326 dlq_hdr_t *deviationQ);
5327
5328
5334extern void
5336
5337
5346extern boolean
5347 ncx_ok_skip_deviation_module (const xmlChar *modname,
5348 dlq_hdr_t *save_deviationsQ);
5349
5350
5351 // END ncxlib/yang/yangdata/yangdeviation
5353
5354
5355
5356 // BEGIN ncxlib/ncxutil/ncxutilfile
5364
5365
5371extern void
5372 ncx_socket_close (int fd);
5373
5384extern void
5385 ncx_socket_close_noerr (int fd);
5386
5387
5393extern void
5394 ncx_file_close (FILE *fp);
5395
5396
5404extern status_t
5405 ncx_file_remove (const xmlChar *filespec,
5406 boolean do_warn);
5407
5408
5417extern status_t
5418 ncx_file_rename (const xmlChar *old_filespec,
5419 const xmlChar *new_filespec,
5420 boolean do_warn);
5421
5422
5430 extern status_t
5431 ncx_file_flush (FILE *fp,
5432 boolean do_warn);
5433
5434
5442extern status_t
5443 ncx_file_copy (const xmlChar *src_filespec,
5444 const xmlChar *dst_filespec);
5445
5446
5455extern status_t
5456 ncx_file_buffcopy (const xmlChar *src_buff,
5457 uint32 src_bufflen,
5458 const xmlChar *dst_filespec);
5459
5460
5469extern status_t
5470 ncx_file_size (const char *filespec,
5471 uint32 *siz);
5472
5473
5483extern status_t
5484 ncx_file_to_buffer (const char *filespec,
5485 xmlChar **outbuff);
5486
5494extern status_t
5495 ncx_buffer_to_file (const char *filespec,
5496 const xmlChar *inbuff);
5497
5498
5508extern status_t
5509 ncx_get_temp_filespec (xmlChar *buff,
5510 uint32 bufflen,
5511 const xmlChar *rootpart,
5512 const xmlChar *ext);
5513
5514
5524extern ncx_modcache_t *
5525 ncx_new_modcache (const xmlChar *modname,
5526 boolean hidemod);
5527
5528
5534extern void
5536
5537
5538 // END ncxlib/ncxutil/ncxutilfile
5540
5541
5542
5554extern void ncx_set_use_return_status (void);
5555
5556
5557
5563extern boolean ncx_use_return_status (void);
5564
5565
5572extern ncx_bad_reply_enum
5573 ncx_get_handle_badreply_enum (const xmlChar *valstr);
5574
5575
5582extern const xmlChar *
5584
5585
5591extern void
5593
5594
5600extern ncx_bad_reply_enum
5602
5603
5612extern boolean
5614
5615
5616
5626extern ncx_etag_t
5628
5629
5636extern const xmlChar *
5638
5639
5646extern uint16
5648
5649
5655extern dlq_hdr_t *
5656 ncx_get_rootQ (void);
5657
5658
5664extern ncx_sm_rootcb_t *
5665 ncx_first_rootcb (void);
5666
5667
5675extern ncx_sm_rootcb_t *
5677
5678
5689extern boolean
5690 ncx_is_sm_mode (void);
5691
5692
5703extern void
5704 ncx_set_sm_mode (boolean val);
5705
5706
5714extern ncx_sm_rootcb_t *
5715 ncx_get_cur_rootcb (void);
5716
5717
5725extern void
5727
5728
5736extern obj_template_t *
5738
5739
5740
5751extern boolean
5752 ncx_get_sm_enabled (void);
5753
5754
5760extern void
5761 ncx_set_sm_enabled (boolean val);
5762
5768extern boolean
5769 ncx_yang_cbor_enabled (void);
5770
5776extern unsigned short
5778
5779
5785extern void
5786 ncx_set_tcp_connect_timeout (unsigned short timeout_sec);
5787
5788
5797extern ncx_module_t *
5798 ncx_find_module_que_all (dlq_hdr_t *modQ,
5799 const xmlChar *modname,
5800 const xmlChar *revision);
5810extern void
5811 ncx_invoke_load_callbacks (ncx_module_t *mod);
5812
5821extern void
5822 ncx_redo_loadmod_all (void);
5823
5824
5830extern void
5832
5833
5839extern boolean
5841
5847extern void
5849
5850
5857extern boolean
5858 ncx_save_error_input (void);
5859
5865extern void
5867
5875extern boolean
5876 ncx_mod_parse_done (const ncx_module_t *mod);
5877
5878 // END ncxlib/ncxutil/ncxutilfile
5880
5881#ifdef __cplusplus
5882} /* end extern 'C' */
5883#endif
5884
5885#endif /* _H_ncx */
dlq provides general double-linked list and queue support:
GET1 and GET2 Callback Support.
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
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
const ncx_backptr_t * ncx_first_const_backptr(const dlq_hdr_t *que)
Get first back pointer struct CONST.
Definition: ncx.c:12992
void ncx_free_mbackptr(ncx_backptr_t *ptr)
Free an ncx_backptr_t struct; Free the 'node' pointer first.
Definition: ncx.c:12911
void ncx_clean_backptrQ(dlq_hdr_t *backptrQ)
Clean an entire Q of ncx_backptr_t structs.
Definition: ncx.c:12930
ncx_backptr_t * ncx_first_backptr(dlq_hdr_t *que)
Get first back pointer struct.
Definition: ncx.c:12973
ncx_backptr_t * ncx_new_backptr(void *node)
Malloc and initialize a new ncx_backptr_t struct.
Definition: ncx.c:12872
ncx_backptr_t * ncx_next_backptr(ncx_backptr_t *curptr)
Get next back pointer struct.
Definition: ncx.c:13030
ncx_backptr_t * ncx_last_backptr(dlq_hdr_t *que)
Get last back pointer struct.
Definition: ncx.c:13011
ncx_backptr_t * ncx_find_backptr(const dlq_hdr_t *que, void *node)
Find the specified back pointer struct.
Definition: ncx.c:13144
void * ncx_get_backptr_node(ncx_backptr_t *backptr)
Get the back pointer node pointer.
Definition: ncx.c:13087
void ncx_free_backptr(ncx_backptr_t *ptr)
Free an ncx_backptr_t struct.
Definition: ncx.c:12893
ncx_backptr_t * ncx_prev_backptr(ncx_backptr_t *curptr)
Get previous back pointer struct.
Definition: ncx.c:13068
const void * ncx_get_const_backptr_node(const ncx_backptr_t *backptr)
Get the back pointer node pointer CONST.
Definition: ncx.c:13106
void ncx_clean_mbackptrQ(dlq_hdr_t *backptrQ)
Clean an entire Q of ncx_backptr_t structs Use ncx_free_mbackptr to free node pointers.
Definition: ncx.c:12952
const ncx_backptr_t * ncx_next_const_backptr(const ncx_backptr_t *curptr)
Get next back pointer struct CONST.
Definition: ncx.c:13049
void ncx_remove_backptr(ncx_backptr_t *ptr)
Remove the specified backptr for deletion.
Definition: ncx.c:13124
boolean ncx_obj_is_generic(const obj_template_t *obj)
Check if the object is 1 of the gen_foo object templates.
Definition: ncx.c:14684
obj_template_t * ncx_get_btype_obj(void)
Get the cached datapath meta-object template used to contruct a metaval for the attribute.
Definition: ncx.c:13298
obj_template_t * ncx_get_nc_operation(void)
Get the cached operation meta-object template used to contruct a metaval for the attribute.
Definition: ncx.c:13198
obj_template_t * ncx_get_yang_insert(void)
Get the object template for the YANG insert attribute.
Definition: ncx.c:7783
obj_template_t * ncx_get_yang_value(void)
Get the object template for the YANG value attribute.
Definition: ncx.c:7809
obj_template_t * ncx_get_gen_root(void)
Get the object template for the NCX generic root container.
Definition: ncx.c:7740
obj_template_t * ncx_get_gen_empty(void)
Get the object template for the NCX generic empty leaf.
Definition: ncx.c:7726
obj_template_t * ncx_get_gen_container(void)
Get the object template for the NCX generic container.
Definition: ncx.c:7698
obj_template_t * ncx_get_fixed_value_obj(void)
Get the cached fixed-value meta-object template used to contruct a metaval for the attribute.
Definition: ncx.c:13265
obj_template_t * ncx_get_yang_key(void)
Get the object template for the YANG key attribute.
Definition: ncx.c:7796
obj_template_t * ncx_get_gen_leaflist(void)
Get the object template for the NCX generic leaf-list string.
Definition: ncx.c:7770
obj_template_t * ncx_get_datapath_obj(void)
Get the cached datapath meta-object template used to contruct a metaval for the attribute.
Definition: ncx.c:13232
obj_template_t * ncx_get_gen_anyxml(void)
Get the object template for the NCX generic anyxml container.
Definition: ncx.c:7684
obj_template_t * ncx_get_gen_binary(void)
Get the object template for the NCX generic binary leaf.
Definition: ncx.c:7755
obj_template_t * ncx_get_gen_string(void)
Get the object template for the NCX generic string leaf.
Definition: ncx.c:7712
boolean ncx_get_pidfile_cleaned(void)
Get the PID file cleaned flag.
Definition: ncx.c:16727
const xmlChar * ncx_get_subsys_id(void)
Get the subsys_id value; NULL if not set.
Definition: ncx.c:14238
boolean ncx_get_startup_prune(void)
Get the startup_prune flag.
Definition: ncx.c:16816
boolean ncx_need_get2_xpath(void)
Check if GET2 callback support needed in XPath.
Definition: ncx.c:15485
boolean ncx_is_with_snmp(void)
Get the with_snmp value.
Definition: ncx.c:15805
boolean ncx_get_search_modQ_ok(void)
Get the search_modQ_ok flag.
Definition: ncx.c:14204
void ncx_set_sil_priority_used(void)
Flag that an object set a non-default SIL priority.
Definition: ncx.c:14623
ncx_backptr_t * ncx_first_objptr(void)
Get the first object pointer.
Definition: ncx.c:14315
boolean ncx_netconfd_running(void)
Check if netconfd running.
Definition: ncx.c:13346
boolean ncx_data_templates_ok(void)
Get the use-data-templates flag.
Definition: ncx.c:14033
uint32 ncx_get_binary_display_maxlen(void)
Get the binary_display_maxlen parameter.
Definition: ncx.c:16565
void ncx_set_binary_display_maxlen(uint32 val)
Set the binary_display_maxlen parameter.
Definition: ncx.c:16549
boolean ncx_get_leaflist_deleteall_ok(void)
Get the leaflist_deleteall_ok flag.
Definition: ncx.c:16977
void ncx_set_base_schema(void)
Set the base_schema_set flag to true.
Definition: ncx.c:14828
boolean ncx_get_sethook_registered(void)
Check if the Set-Hook callbacks were registered.
Definition: ncx.c:16514
uint32 ncx_get_vtimeout_value(void)
Get the virtual node cache timeout value.
Definition: ncx.c:11423
void ncx_set_max_strlen(int32 num)
Set the –max-strlen parameter.
Definition: ncx.c:16651
void ncx_set_protocol_disabled(ncx_protocol_t proto)
Set the specified protocol version to be disabled.
Definition: ncx.c:11755
status_t ncx_set_all_obj_xpath_backptrs(void)
Add Xpath back pointers to the data-db objects in the database.
Definition: ncx.c:12812
void ncx_set_save_owners(boolean val)
Set the save_owners flag.
Definition: ncx.c:17048
void ncx_set_trim_whitespace(boolean val)
Set the trim_whitespace flag.
Definition: ncx.c:16768
boolean ncx_get_secondary_sil_priority_used(void)
Get the secondary_sil_priority_used flag.
Definition: ncx.c:14671
boolean ncx_protocol_enabled(ncx_protocol_t proto)
Check if the specified protocol version is enabled.
Definition: ncx.c:11635
ncx_sort_type_t ncx_get_system_sort_type(void)
Get the system_sort_type value.
Definition: ncx.c:11561
boolean ncx_check_delete_all_allowed(obj_template_t *testobj)
Check if the delete-all or remove-all operation is enabled for for specified object.
Definition: ncx.c:16996
boolean ncx_get_cwd_subdirs(void)
Get the CLI parameter value whether to search for modules in subdirs of the CWD by default.
Definition: ncx.c:11619
boolean ncx_get_with_canonical(void)
Get the with_canonical flag.
Definition: ncx.c:17034
void ncx_set_ypwatcher_running(void)
Set the ypwatcher running flag.
Definition: ncx.c:16681
void ncx_set_db_lock_init_done(boolean val)
Set if the <db-lock-init> message was processed by the server.
Definition: ncx.c:16635
boolean ncx_use_objptrs(void)
Get the use_objptrs flag.
Definition: ncx.c:14300
ncx_display_mode_t ncx_get_display_mode(void)
Get the current default display mode.
Definition: ncx.c:11135
boolean ncx_get_system_sorted(void)
Get the system_sorted value.
Definition: ncx.c:11526
void ncx_set_config_state(ncx_config_state_t val)
Set the config_state flag.
Definition: ncx.c:16830
boolean ncx_get_save_owners(void)
Get the save_owners flag.
Definition: ncx.c:17065
boolean ncx_is_add_toplevel_default_mode(void)
Get the add_toplevel_default_mode value.
Definition: ncx.c:15773
void ncx_set_leaflist_deleteall_ok(boolean val)
Set the leaflist_deleteall_ok flag.
Definition: ncx.c:16960
boolean ncx_use_xpath_backptrs(void)
Check if it is OK to use XPath back pointers or not.
Definition: ncx.c:12796
void ncx_ignore_missing_vars(boolean enabled)
Set the ignore-missing-vars flag.
Definition: ncx.c:14046
void ncx_set_getbulk_max(uint32 max_entries)
Set the max_entries parameter for GET2 callbacks.
Definition: ncx.c:14555
void ncx_set_list_deleteall_ok(boolean val)
Set the list_deleteall_ok flag.
Definition: ncx.c:16929
void ncx_set_system_sorted(boolean val)
Set the system_sorted value.
Definition: ncx.c:11545
status_t ncx_set_bestmatch(void)
Setup the bestmatch module versions, if enabled.
Definition: ncx.c:15907
void ncx_set_with_dblock(boolean val)
Set the is_with_dblock value.
Definition: ncx.c:16599
void ncx_set_search_modQ_ok(void)
Set the search_modQ_ok flag to TRUE.
Definition: ncx.c:14192
void ncx_set_add_toplevel_default_mode(boolean val)
Set the add_toplevel_default_mode value.
Definition: ncx.c:15789
status_t ncx_set_subsys_id(const xmlChar *id)
Set the subsys_id parameter for this subsystem.
Definition: ncx.c:14215
void ncx_allow_get_when_check(void)
Allow server get retrievals to test for false when-stmt during retrieval operations on YANG data.
Definition: ncx.c:16482
void ncx_set_startup_prune(boolean val)
Set the startup_prune flag.
Definition: ncx.c:16799
int8 ncx_get_message_indent(void)
Get the protoco9l output indent amount.
Definition: ncx.c:12221
ncx_config_state_t ncx_get_config_state(void)
Get the config_state flag.
Definition: ncx.c:16847
void ncx_enable_bestmatch(void)
Enable the bestmatch import processing feature.
Definition: ncx.c:15892
boolean ncx_is_db_lock_init_done(void)
Check if the <db-lock-init> message was processed by the server.
Definition: ncx.c:16618
boolean ncx_base_schema_set(void)
Check if the base schema features have been set yet.
Definition: ncx.c:14816
boolean ncx_get_ypwatcher_running(void)
Get the ypwatcher running flag.
Definition: ncx.c:16697
int32 ncx_get_max_strlen(void)
Get the –max-strlen parameter.
Definition: ncx.c:16667
void ncx_set_useprefix(boolean val)
Set the use_prefix value.
Definition: ncx.c:11509
boolean ncx_get_xmlorder(void)
Get the xmlorder flag.
Definition: ncx.c:16915
void ncx_set_protocol_enabled(ncx_protocol_t proto)
Set the specified protocol version to be enabled.
Definition: ncx.c:11718
boolean ncx_is_with_dblock(void)
Get the is_with_dblock value.
Definition: ncx.c:16582
void ncx_set_ycontrol_running(void)
Set the ycontrol_running flag to TRUE.
Definition: ncx.c:14180
void ncx_set_pidfile_cleaned(void)
Set the pidfile cleaned flag.
Definition: ncx.c:16711
void ncx_set_with_snmp(boolean val)
Set the with_snmp value.
Definition: ncx.c:15822
void ncx_set_with_ocpattern(boolean mode)
Set the openconfig pattern mode for the entire system.
Definition: ncx.c:15758
void ncx_set_xmlorder(boolean val)
Set the xmlorder flag.
Definition: ncx.c:16898
void ncx_set_system_sort_type(ncx_sort_type_t val)
Set the system_sort_type value.
Definition: ncx.c:11580
boolean ncx_missing_vars_ok(void)
Get the ignore-missing-vars flag.
Definition: ncx.c:14059
boolean ncx_get_useprefix(void)
Get the use_prefix value.
Definition: ncx.c:11491
boolean ncx_get_sil_priority_used(void)
Get the sil_priority_used flag.
Definition: ncx.c:14636
boolean ncx_use_get_when_check(void)
Check server get retrievals to test for false when-stmt during retrieval operations on YANG data.
Definition: ncx.c:16497
void ncx_set_use_deadmodQ(void)
Set the usedeadmodQ flag.
Definition: ncx.c:11982
void ncx_set_message_indent(int8 msg_indent)
Set the protocol output message indent amount.
Definition: ncx.c:12237
boolean ncx_get_list_deleteall_ok(void)
Get the list_deleteall_ok flag.
Definition: ncx.c:16946
void ncx_use_data_templates(boolean enabled)
Set the use-data-templates flag.
Definition: ncx.c:14020
boolean ncx_get_trim_whitespace(void)
Get the trim_whitespace flag.
Definition: ncx.c:16785
boolean ncx_fastpath_enabled(void)
Check if fast path value tree comparisons enabled.
Definition: ncx.c:13330
void ncx_set_with_canonical(boolean val)
Set the with_canonical flag.
Definition: ncx.c:17017
ncx_backptr_t * ncx_next_objptr(ncx_backptr_t *curptr)
Get the next object pointer.
Definition: ncx.c:14334
void ncx_set_sethook_registered(boolean val)
Set the sethook_registered value.
Definition: ncx.c:16532
uint32 ncx_get_getbulk_max(void)
Get the max_entries parameter for GET2 callbacks.
Definition: ncx.c:14567
void ncx_set_secondary_sil_priority_used(void)
Flag that a value node set a non-default secondary SIL priority.
Definition: ncx.c:14655
boolean ncx_check_startup_prune(ses_cb_t *scb)
Check if the namespace error can be skipped.
Definition: ncx.c:16868
void ncx_set_use_objptrs(void)
Set the use_objptrs flag.
Definition: ncx.c:14284
void ncx_cleanup(void)
Cleanup the NCX library.
Definition: ncx.c:3388
status_t ncx_init(boolean netconfd, boolean savestr, log_debug_t dlevel, boolean logtstamps, boolean collapse_submods, boolean xpath_backptrs, const char *startmsg, int argc, char *argv[])
Initialize the NCX library.
Definition: ncx.c:2913
const xmlChar * ncx_get_display_mode_str(ncx_display_mode_t dmode)
Get the string for the specified enum value.
Definition: ncx.c:10236
int32 ncx_get_name_match_value(ncx_name_match_t match)
Get the YANG integer value for the ncx_name_match_t enum.
Definition: ncx.c:12133
const xmlChar * ncx_cvt_encoding_enum(ncx_msg_encoding_t msg_encoding)
Convert an ncx_msg_encoding_t enum to a string.
Definition: ncx.c:14496
const xmlChar * ncx_get_yang_version_str(ncx_yang_version_t langver)
Get the yang-version string value for the enum.
Definition: ncx.c:14579
const xmlChar * ncx_get_btyp_string(ncx_btype_t btyp)
Get the enumeration string to the base type enum.
Definition: ncx.c:13895
ncx_access_t ncx_get_access_enum(const xmlChar *str)
Get the enum for the string name of a ncx_access_t enum.
Definition: ncx.c:8498
const xmlChar * ncx_get_protocols_enabled(uint16 flags)
Get the string for the NETCONF protocols enabled in the flags.
Definition: ncx.c:11883
status_t ncx_str2txid(const xmlChar *str, ncx_transaction_id_t *txid)
Convert a string to a ncx_transaction_id_t.
Definition: ncx.c:13750
ncx_msg_encoding_t ncx_cvt_encoding_str(const xmlChar *msg_encoding)
Convert a ncx_msg_encoding_t string to its enum.
Definition: ncx.c:14527
const xmlChar * ncx_get_baddata_string(ncx_bad_data_t baddata)
Get the string for the specified enum value.
Definition: ncx.c:9896
ncx_name_match_t ncx_get_name_match_enum(const xmlChar *str)
Get the enum for the string name of a ncx_name_match_t enum.
Definition: ncx.c:12056
ncx_withdefaults_t ncx_get_withdefaults_enum(const xmlChar *withdefstr)
Get the enum for the specified string value.
Definition: ncx.c:9964
const xmlChar * ncx_get_data_class_str(ncx_data_class_t dataclass)
Get the string value for the ncx_data_class_t enum.
Definition: ncx.c:8450
const xmlChar * ncx_get_protocol_name(ncx_protocol_t proto)
Get the name string for the protocol.
Definition: ncx.c:11923
const xmlChar * ncx_get_withdefaults_string(ncx_withdefaults_t withdef)
Get the string for the specified enum value.
Definition: ncx.c:9930
status_t ncx_txid2str(ncx_transaction_id_t *txid, xmlChar **retbuff)
Convert a transaction ID to a string.
Definition: ncx.c:13787
const xmlChar * ncx_get_access_str(ncx_access_t max_access)
Get the string name of a ncx_access_t enum.
Definition: ncx.c:8476
const xmlChar * ncx_get_name_match_string(ncx_name_match_t match)
Get the string for the ncx_name_match_t enum.
Definition: ncx.c:12095
ncx_status_t ncx_get_status_enum(const xmlChar *str)
Get the enum for the string name of a ncx_status_t enum.
Definition: ncx.c:7947
const xmlChar * ncx_get_confirm_event_str(ncx_confirm_event_t event)
Get the string for the specified enum value.
Definition: ncx.c:11155
const xmlChar * ncx_get_status_string(ncx_status_t status)
Get the string for the enum value of a ncx_status_t enum.
Definition: ncx.c:7976
ncx_data_class_t ncx_get_data_class_enum(const xmlChar *str)
Get the enum for the string name of a ncx_data_class_t enum.
Definition: ncx.c:8425
boolean ncx_is_false(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:8796
const xmlChar * ncx_get_ses_event_str(ncx_ses_event_t ses_event)
Get the session event string for the enum.
Definition: ncx.c:16743
const xmlChar * ncx_get_layer(ncx_layer_t layer)
Translate ncx_layer_t enum to a string.
Definition: ncx.c:7826
ncx_bad_data_t ncx_get_baddata_enum(const xmlChar *valstr)
Check if the specified string matches an ncx_baddata_t enum.
Definition: ncx.c:9860
boolean ncx_is_true(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:8770
int32 ncx_get_withdefaults_value(const xmlChar *withdefstr)
Get the YANG integer value for the enum for the specified string value.
Definition: ncx.c:9999
ncx_cvttyp_t ncx_get_cvttyp_enum(const char *str)
Get the enum for the string name of a ncx_cvttyp_t enum.
Definition: ncx.c:7891
ncx_display_mode_t ncx_get_display_mode_enum(const xmlChar *dmstr)
Get the enum for the specified string value.
Definition: ncx.c:10192
ncx_node_t
NCX Internal Node Types.
Definition: ncxtypes.h:437
ncx_status_t
enumeration for different YANG data-def status values
Definition: ncxtypes.h:583
uint32 ncx_etag_t
The ETag used in RESTCONF messages is the lower 32 bits of a ncx_transaction_id_t.
Definition: ncxtypes.h:771
ncx_ses_event_t
internal enumerations for session event types
Definition: ncxtypes.h:1703
ncx_confirm_event_t
type of confirmEvent in the sysConfirmedCommit notification Used in confirmed-commit standard as well
Definition: ncxtypes.h:1515
void(* ncx_yang_obj_cbfn_t)(ncx_module_t *mod, struct obj_template_t_ *obj)
user function callback template when a YANG object is parsed by yang_obj.c.
Definition: ncxtypes.h:1442
ncx_sort_type_t
the sort type enumeration used for system-ordered list aand leaf-list objects
Definition: ncxtypes.h:1801
ncx_cvttyp_t
enumeration for different NCX module conversion output types
Definition: ncxtypes.h:1255
ncx_yang_version_t
enumeration for different YANG language versions
Definition: ncxtypes.h:1013
ncx_tclass_t
Enumeration of the basic value type classifications.
Definition: ncxtypes.h:407
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:728
ncx_msg_encoding_t
enumeration for message encoding formats
Definition: ncxtypes.h:647
ncx_protocol_t
NCX session protocol versions supported.
Definition: ncxtypes.h:1001
ncx_btype_t
enumeration of the built-in NCX types These types cannot be overridden and cannot be imported
Definition: ncxtypes.h:213
ncx_access_t
NCX Access Control 'max-access' enumeration values Note that access control is applied to the session...
Definition: ncxtypes.h:182
void(* ncx_unload_cbfn_t)(ncx_module_t *mod)
user function callback template when a module is unloaded from the system
Definition: ncxtypes.h:1422
boolean(* ncx_identity_cbfn_t)(ncx_identity_t *identity, void *cookie)
user function callback template to traverse all module identities looking for matches for a specified...
Definition: ncxtypes.h:1550
ncx_bad_reply_enum
enumeration for CLI handling of bad nodes from RPC reply Controls the behavior of the MGR XML parser
Definition: ncxtypes.h:1758
ncx_data_class_t
NCX Persistence Control.
Definition: ncxtypes.h:203
uint8 ncx_owner_id_t
used as index into the agt_owner registry
Definition: ncxtypes.h:1554
const xmlChar *(* ncx_get_owner_fn_t)(ncx_owner_id_t owner_id)
get owner name callback function to check if a value node has an owner name; get the value if so
Definition: ncxtypes.h:1565
ncx_opt_t
enum for REQUIRED vs.
Definition: ncxtypes.h:1350
ncx_bad_data_t
enumeration for CLI handling of bad input data used by yangcli, all others use NCX_BAD_DATA_ERROR
Definition: ncxtypes.h:594
ncx_name_match_t
Node name match modes.
Definition: ncxtypes.h:695
ncx_layer_t
Enumeration of NETCONF protocol layers.
Definition: ncxtypes.h:507
ncx_result_format_t
specify the requested result format type Used by yangcli-pro assign statement
Definition: ncxtypes.h:719
boolean(* ncx_object_cbfn_t)(const ncx_module_t *mod, struct obj_template_t_ *object, void *cookie)
user function callback template to traverse all module objects for a specified module
Definition: ncxtypes.h:1463
ncx_xpath_type_t
enumeration for different XPath back pointer types
Definition: ncxtypes.h:1287
ncx_config_state_t
server config state Root Check
Definition: ncxtypes.h:1711
ncx_display_mode_t
enumeration of val_dump_value display modes Some RESTCONF code uses this field incorrectly for messag...
Definition: ncxtypes.h:617
ncx_withdefaults_t
enum for with-defaults enum values
Definition: ncxtypes.h:1278
void(* ncx_load_cbfn_t)(ncx_module_t *mod)
user function callback template when a module is loaded into the system
Definition: ncxtypes.h:1408
status_t ncx_file_rename(const xmlChar *old_filespec, const xmlChar *new_filespec, boolean do_warn)
Rename a file; check result.
Definition: ncx.c:15016
ncx_modcache_t * ncx_new_modcache(const xmlChar *modname, boolean hidemod)
New ncx_modcache_t record.
Definition: ncx.c:16152
status_t ncx_file_remove(const xmlChar *filespec, boolean do_warn)
Close a file; check result.
Definition: ncx.c:14982
status_t ncx_file_buffcopy(const xmlChar *src_buff, uint32 src_bufflen, const xmlChar *dst_filespec)
Copy a buffer to a file; check result.
Definition: ncx.c:15214
void ncx_socket_close_noerr(int fd)
Close a socket; check result; SUPPRESS ERROR MESSAGE.
Definition: ncx.c:14905
void ncx_file_close(FILE *fp)
Close a file; check result.
Definition: ncx.c:14955
void ncx_socket_close(int fd)
Close a socket; check result.
Definition: ncx.c:14930
status_t ncx_file_to_buffer(const char *filespec, xmlChar **outbuff)
Read a text file into a malloced buffer.
Definition: ncx.c:15983
status_t ncx_file_size(const char *filespec, uint32 *siz)
Get a file size.
Definition: ncx.c:15942
status_t ncx_buffer_to_file(const char *filespec, const xmlChar *inbuff)
Write a buffer to a text file.
Definition: ncx.c:16060
status_t ncx_file_copy(const xmlChar *src_filespec, const xmlChar *dst_filespec)
Copy a file; check result.
Definition: ncx.c:15109
void ncx_free_modcache(ncx_modcache_t *mc)
Free a ncx_modcache_t record.
Definition: ncx.c:16181
status_t ncx_file_flush(FILE *fp, boolean do_warn)
Flush file data to disk to prevent corruption on crash/power loss.
Definition: ncx.c:15056
status_t ncx_get_temp_filespec(xmlChar *buff, uint32 bufflen, const xmlChar *rootpart, const xmlChar *ext)
Generate a temporary filespec.
Definition: ncx.c:16206
ncx_sm_rootcb_t * ncx_get_cur_rootcb(void)
Gte the current root control block value.
Definition: ncx.c:17380
void ncx_redo_loadmod_all(void)
Set the redo_loadmod flag for all modules.
Definition: ncx.c:17609
void ncx_set_cur_rootcb(ncx_sm_rootcb_t *rootcb)
Set the current root control block.
Definition: ncx.c:17398
const xmlChar * ncx_get_xpath_type_str(ncx_xpath_type_t xpath_typ)
Get the string for the ncx_xpath_type_t enum.
Definition: ncx.c:17245
boolean ncx_is_sm_mode(void)
Check if the Schema Mount mode is enabled.
Definition: ncx.c:17349
boolean ncx_protocol_is_netconf(ncx_protocol_t proto)
Check if the protocol is a NETCONF protocol.
Definition: ncx.c:11960
void ncx_set_handle_badreply(ncx_bad_reply_enum enumval)
Set the enum value for the Bad Reply handling option.
Definition: ncx.c:17182
void ncx_set_mod_augmented(ncx_module_t *mod)
Set the module as supported because it is being augmented.
Definition: ncx.c:17707
obj_template_t * ncx_get_cur_rootcb_obj(void)
Get the current root control block object.
Definition: ncx.c:17416
void ncx_set_disable_imported(void)
Allow the obj_is_enabled funtion to disable all import-only modules.
Definition: ncx.c:17646
boolean ncx_ok_for_inline_data(obj_template_t *obj)
Check if the object is OK for inline data.
Definition: ncx.c:16262
void ncx_set_sm_enabled(boolean val)
Set schema mount enabled flag.
Definition: ncx.c:17453
int32 ncx_compare_base_uris(const xmlChar *str1, const xmlChar *str2)
Compare the base part of 2 URI strings.
Definition: ncx.c:11445
boolean ncx_check_inline_data_state(const xmlChar *line, boolean curstate)
Check the input line for Start or End of data tags.
Definition: ncx.c:16284
status_t ncx_get_version(xmlChar *buffer, uint32 buffsize)
Get the the Yuma version ID string.
Definition: ncx.c:10776
boolean ncx_use_return_status(void)
Check if the return_status should be returned.
Definition: ncx.c:17111
ncx_bad_reply_enum ncx_get_handle_badreply(void)
Get the enum for the Bad Reply Handling option.
Definition: ncx.c:17195
unsigned short ncx_get_tcp_connect_timeout(void)
Get the configured TCP connect timeout value.
Definition: ncx.c:17488
void ncx_set_sm_mode(boolean val)
Set the Schema Mount mode.
Definition: ncx.c:17365
ncx_etag_t ncx_txid2etag(ncx_transaction_id_t txid)
Cast ncx_txid_t to ncx_etag_t.
Definition: ncx.c:17229
boolean ncx_find_ydtrace(const xmlChar *fspec)
Find the filespec of a yangdump file being processed.
Definition: ncx.c:14001
boolean ncx_prefix_different(const xmlChar *prefix1, const xmlChar *prefix2, const xmlChar *modprefix)
Check if the specified prefix pair reference different modules.
Definition: ncx.c:9826
void ncx_set_save_error_input(void)
Allow the audit-log reporting to show the bad input instead of discarding nodes with invalid-value er...
Definition: ncx.c:17675
const char * ncx_get_progname(void)
Get the progname buffer.
Definition: ncx.c:15840
boolean ncx_mod_parse_done(const ncx_module_t *mod)
Check if the module is completely parsed yet.
Definition: ncx.c:17629
void ncx_set_use_return_status(void)
Enable the return_status parameter.
Definition: ncx.c:17100
boolean ncx_disable_imported_ok(void)
Check if disable all import-only modules OK.
Definition: ncx.c:17659
status_t ncx_get_feature_code(xmlChar *buffer, uint32 buffsize)
Get the the Feature Code String.
Definition: ncx.c:10668
void ncx_set_tcp_connect_timeout(unsigned short timeout_sec)
Set the configured TCP connect timeout value.
Definition: ncx.c:17504
ncx_sm_rootcb_t * ncx_next_rootcb(ncx_sm_rootcb_t *rootcb)
Get the next Mount Point Entry in the rootcbQ.
Definition: ncx.c:17330
xmlChar * ncx_get_source(const xmlChar *fspec, status_t *res)
Expand a filespec into an absolute path.
Definition: ncx.c:9471
boolean ncx_save_error_input(void)
Check if the error input should be saved instead of discarding nodes with invalid-value errors.
Definition: ncx.c:17690
boolean ncx_yang_cbor_enabled(void)
Get the YANG to CBOR Code enabled flag.
Definition: ncx.c:17469
status_t ncx_add_ydtrace(const xmlChar *fspec)
Add the filespec of a yangdump file being processed.
Definition: ncx.c:13975
status_t ncx_get_semver(xmlChar *buffer, uint32 buffsize)
Get the the Yuma SEMVER version ID string.
Definition: ncx.c:10884
ncx_sm_rootcb_t * ncx_first_rootcb(void)
Get the first Mount Point Control Block Entry in the rootcbQ.
Definition: ncx.c:17315
boolean ncx_library_mode_ok(const xmlChar *modname, const xmlChar *rpcname)
Check if RPC OK to use in library mode.
Definition: ncx.c:14848
status_t ncx_create_pidfile(const xmlChar *progname, boolean fileloc_fhs)
Create the pidfile for the specified program.
Definition: ncx.c:13367
void ncx_write_tracefile(const char *buff, uint32 count)
Write a byte to the tracefile.
Definition: ncx.c:12169
void ncx_set_val_protocol_enabled(ncx_protocol_t proto, uint16 *flags)
Set the specified protocol version to be enabled in a uint16 bits val.
Definition: ncx.c:11797
ncx_module_t * ncx_find_module_que_all(dlq_hdr_t *modQ, const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the specified Q and check the namespace ID check submodules,...
Definition: ncx.c:17524
xmlChar * ncx_get_source_ex(const xmlChar *fspec, boolean expand_cwd, status_t *res)
Expand a filespec into an absolute path.
Definition: ncx.c:9262
boolean ncx_conf_env_vars_enabled(void)
Get the Config Environment Variable Replacement flag.
Definition: ncx.c:17211
uint16 ncx_get_curQ_mod_count(void)
Get the total count of the currently fully loaded modules in the ncx_curQ.
Definition: ncx.c:17276
ncx_result_format_t ncx_get_file_result_format(const xmlChar *filespec)
Check the filespec string for a file assignment statement to see if it is text, XML,...
Definition: ncx.c:14079
boolean ncx_val_protocol_enabled(ncx_protocol_t proto, uint16 flags)
Check if the specified protocol version is enabled.
Definition: ncx.c:11678
boolean ncx_get_sm_enabled(void)
Get schema mount enabled flag.
Definition: ncx.c:17437
ncx_bad_reply_enum ncx_get_handle_badreply_enum(const xmlChar *valstr)
Check if the specified string matches an ncx_bad_reply_enum enum.
Definition: ncx.c:17129
status_t ncx_get_full_version(xmlChar *buffer, uint32 buffsize)
Get the the Yuma version ID string and SEMVER added.
Definition: ncx.c:10923
const char * ncx_get_build_date(void)
Get the build date string encoded into this C file.
Definition: ncx.c:10962
const xmlChar * ncx_get_handle_badreply_string(ncx_bad_reply_enum badreply)
Get the string for the specified enum value.
Definition: ncx.c:17157
void ncx_set_val_protocol_disabled(ncx_protocol_t proto, uint16 *flags)
Set the specified protocol version to be disabled in a uint16 bits val.
Definition: ncx.c:11840
dlq_hdr_t * ncx_get_rootQ(void)
Get the Root control block queue.
Definition: ncx.c:17302
status_t ncx_decode_url_string(const xmlChar *urlstr, uint32 urlstrlen, xmlChar *buffer, uint32 *cnt)
Fill buffer with a plain string from a URL string.
Definition: ncx.c:12268
void ncx_free_binary(ncx_binary_t *binary)
Free all the memory in a ncx_binary_t struct.
Definition: ncx.c:6729
ncx_binary_t * ncx_new_binary(void)
Malloc and fill in a new ncx_binary_t struct.
Definition: ncx.c:6666
void ncx_init_binary(ncx_binary_t *binary)
Init the memory of a ncx_binary_t struct.
Definition: ncx.c:6687
void ncx_clean_binary(ncx_binary_t *binary)
Scrub the memory of a ncx_binary_t but do not delete it.
Definition: ncx.c:6707
void ncx_clean_bit(ncx_bit_t *bit)
Scrub the memory of a ncx_bit_t but do not delete it.
Definition: ncx.c:7501
void ncx_init_bit(ncx_bit_t *bit)
Init the memory of a ncx_bit_t.
Definition: ncx.c:7479
int32 ncx_compare_bits(const ncx_bit_t *bitone, const ncx_bit_t *bittwo)
Compare 2 bit values by their schema order position.
Definition: ncx.c:7526
tk_type_t
different types of tokens parsed during 1st pass
Definition: tk.h:279
void ncx_print_errormsg_ex(tk_chain_t *tkc, ncx_module_t *mod, status_t res, const char *filename, uint32 linenum, boolean fineoln)
Print an parse error message to STDOUT (Extended)
Definition: ncx.c:8098
void ncx_mod_exp_err(tk_chain_t *tkc, ncx_module_t *mod, status_t result, const char *expstr)
Print an error for wrong token, expected a different token.
Definition: ncx.c:8247
void ncx_conf_exp_err(tk_chain_t *tkc, status_t result, const char *expstr)
Print an error for wrong token, expected a different token.
Definition: ncx.c:8219
void ncx_print_errormsg(tk_chain_t *tkc, ncx_module_t *mod, status_t res)
Print an parse error message to STDOUT.
Definition: ncx.c:8076
void ncx_free_errmsg(ncx_errmsg_t *msg)
Clean and free an ncx_errmsg_t struct.
Definition: ncx.c:16401
ncx_errmsg_t * ncx_new_errmsg(status_t res, const xmlChar *str)
Malloc and init an ncx_errmsg_t struct.
Definition: ncx.c:16373
void ncx_mod_missing_err(tk_chain_t *tkc, ncx_module_t *mod, const char *stmtstr, const char *expstr)
Print an error for wrong token, mandatory sub-statement is missing.
Definition: ncx.c:8343
void ncx_match_rpc_error(ncx_module_t *mod, const xmlChar *modname, const xmlChar *rpcname, boolean match, boolean firstmsg)
Generate an error for multiple matches.
Definition: ncx.c:4409
status_t ncx_add_namespace_to_registry(ncx_module_t *mod, boolean tempmod)
Add the namespace and prefix to the registry or retrieve it if already set.
Definition: ncx.c:4838
void ncx_set_error(ncx_error_t *tkerr, ncx_module_t *mod, uint32 linenum, uint32 linepos)
Set the fields in an ncx_error_t struct.
Definition: ncx.c:11062
boolean ncx_check_any_object_nolock_get(const xmlChar *objname)
Check if the object name will match any config=true nodes.
Definition: ncx.c:16438
status_t ncx_add_to_registry(ncx_module_t *mod)
Add all the definitions stored in an ncx_module_t to the registry.
Definition: ncx.c:5035
void ncx_clean_save_deviationsQ(dlq_hdr_t *savedevQ)
Clean a Q of deviation save structs.
Definition: ncx.c:11033
void ncx_free_save_deviations(ncx_save_deviations_t *savedev)
Free a deviation save struct.
Definition: ncx.c:11013
status_t ncx_check_yang_status(ncx_status_t mystatus, ncx_status_t depstatus)
Check the backward compatibility of the 2 YANG status fields.
Definition: ncx.c:8004
void ncx_inc_warnings(ncx_module_t *mod)
Increment the module warning count for mod.
Definition: ncx.c:11596
status_t ncx_add_to_modQ(ncx_module_t *mod, dlq_hdr_t *modQ)
Add module to the current module Q.
Definition: ncx.c:5122
status_t ncx_consume_tstring(tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *name, ncx_opt_t opt)
Consume a TK_TT_TSTRING with the specified value.
Definition: ncx.c:8830
void ncx_free_module(ncx_module_t *mod)
Free a YANG module.
Definition: ncx.c:3841
ncx_save_deviations_t * ncx_new_save_deviations(ncx_module_t *devmod, boolean annotation)
Create a deviation save structure.
Definition: ncx.c:10982
status_t ncx_parse_name(const xmlChar *str, uint32 *len)
Check if the next N chars represent a valid NcxName.
Definition: ncx.c:8734
status_t ncx_setup_mounted_mod(ncx_module_t *mod)
Setup a module for yangcli in parsemode in SM mode.
Definition: ncx.c:5210
boolean ncx_need_modchecks(const xmlChar *modname)
Check if xpath_backptr and obj commit tests needed.
Definition: ncx.c:15268
status_t ncx_consume_name(tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *name, xmlChar **namebuff, ncx_opt_t opt, tk_type_t ctyp)
Consume a TK_TSTRING that matches the 'name', then retrieve the next TK_TSTRING token into the namebu...
Definition: ncx.c:8888
status_t ncx_consume_token(tk_chain_t *tkc, ncx_module_t *mod, tk_type_t ttyp)
Consume the next token which should be a 1 or 2 char token without any value.
Definition: ncx.c:8988
void ncx_free_node(ncx_node_t nodetyp, void *node)
Delete a node based on its type.
Definition: ncx.c:8377
const xmlChar * ncx_get_name_segment(const xmlChar *str, xmlChar *buff, uint32 buffsize)
Get the name string between the dots.
Definition: ncx.c:7856
ncx_tclass_t ncx_get_tclass(ncx_btype_t btyp)
Get the token class.
Definition: ncx.c:8527
ncx_module_t * ncx_new_module(void)
Malloc and initialize the fields in a ncx_module_t.
Definition: ncx.c:3569
status_t ncx_init_user_types(void)
Initialize the user types after ietf-inet-types module loaded.
Definition: ncx.c:16421
status_t ncx_add_to_root_modQ(ncx_module_t *mod)
Add module to the current module Q.
Definition: ncx.c:5151
boolean ncx_errinfo_set(const ncx_errinfo_t *errinfo)
Check if error-app-tag or error-message set.
Definition: ncx.c:9166
void ncx_clean_errinfo(ncx_errinfo_t *err)
Scrub the memory in a ncx_errinfo_t by freeing all the sub-fields.
Definition: ncx.c:9108
ncx_errinfo_t * ncx_new_errinfo(void)
Malloc and init a new ncx_errinfo_t.
Definition: ncx.c:9067
status_t ncx_copy_errinfo(const ncx_errinfo_t *src, ncx_errinfo_t *dest)
Copy the fields from one errinfo to a blank errinfo.
Definition: ncx.c:9191
void ncx_init_errinfo(ncx_errinfo_t *err)
Init the fields in an ncx_errinfo_t struct.
Definition: ncx.c:9087
void ncx_free_errinfo(ncx_errinfo_t *err)
Scrub the memory in a ncx_errinfo_t by freeing all the sub-fields, then free the errinfo struct.
Definition: ncx.c:9143
void ncx_free_filptr(ncx_filptr_t *filptr)
Free a new ncx_filptr_t struct or add to the cache if room.
Definition: ncx.c:7265
ncx_filptr_t * ncx_new_filptr(void)
Get a new ncx_filptr_t struct.
Definition: ncx.c:7228
ncx_revhist_t * ncx_new_revhist(void)
Create a revision history entry.
Definition: ncx.c:7296
ncx_revhist_t * ncx_find_revhist(const ncx_module_t *mod, const xmlChar *ver)
Search the revhistQ for a specified revision.
Definition: ncx.c:7345
void ncx_free_revhist(ncx_revhist_t *revhist)
Free a revision history entry.
Definition: ncx.c:7316
void ncx_clean_typnameQ(dlq_hdr_t *que)
Delete all the Q entries, of typname mapping structs.
Definition: ncx.c:7661
void ncx_free_typname(ncx_typname_t *typnam)
Free a typname struct.
Definition: ncx.c:7576
const xmlChar * ncx_find_typname(const typ_template_t *typ, const dlq_hdr_t *que)
Find a typname struct in the specified Q for a typ pointer.
Definition: ncx.c:7599
ncx_typname_t * ncx_new_typname(void)
Malloc and init a typname struct.
Definition: ncx.c:7556
const typ_template_t * ncx_find_typname_type(const dlq_hdr_t *que, const xmlChar *typname)
Find a typ_template_t pointer in a typename mapping, in the specified Q.
Definition: ncx.c:7631
void ncx_save_deviation_module(ncx_module_t *mod)
Save the deviations for the YANG module.
Definition: ncx.c:14437
boolean ncx_ok_skip_deviation_module(const xmlChar *modname, dlq_hdr_t *save_deviationsQ)
Check if it is OK to skip this YANG module for deviations.
Definition: ncx.c:14461
ncx_save_deviations_t * ncx_find_save_deviations(const xmlChar *deviname, dlq_hdr_t *deviationQ)
Find the specified deviname in the deviationQ.
Definition: ncx.c:14400
void ncx_init_enum(ncx_enum_t *enu)
Init the memory of a ncx_enum_t.
Definition: ncx.c:7377
status_t ncx_set_enum(const xmlChar *enum_name, const int32 enum_val, ncx_enum_t *retenu)
Parse an enumerated integer string into an ncx_enum_t without matching it against any typdef.
Definition: ncx.c:7450
void ncx_clean_enum(ncx_enum_t *enu)
Scrub the memory of a ncx_enum_t but do not delete it.
Definition: ncx.c:7399
int32 ncx_compare_enums(const ncx_enum_t *enu1, const ncx_enum_t *enu2)
Compare 2 enum values.
Definition: ncx.c:7424
boolean ncx_valid_name(const xmlChar *str, uint32 len)
Check if an xmlChar string is a valid YANG identifier value.
Definition: ncx.c:8622
boolean ncx_valid_name2(const xmlChar *str)
Check if an xmlChar string is a valid NCX name.
Definition: ncx.c:8667
boolean ncx_valid_name_ch(uint32 ch)
Check if the character is a valid YANG identifier chara.
Definition: ncx.c:8575
boolean ncx_valid_fname_ch(uint32 ch)
Check if an xmlChar is a valid NCX name string first char.
Definition: ncx.c:8599
ncx_identity_base_t * ncx_next_identity_base(ncx_identity_base_t *idbase)
Get the next base record for an identity.
Definition: ncx.c:6834
void ncx_free_identity_base(ncx_identity_base_t *identity_base)
Free a malloced ncx_identity_base_t struct.
Definition: ncx.c:6796
void ncx_for_all_identities(ncx_module_t *mod, ncx_identity_cbfn_t cbfn, void *cookie)
Iterate all the YANG identities in the module.
Definition: ncx.c:7019
ncx_identity_base_t * ncx_new_identity_base(void)
Get a new ncx_identity_base_t struct.
Definition: ncx.c:6776
void ncx_find_all_identities(ncx_identity_t *base, ncx_identity_cbfn_t cbfn, void *cookie)
Invoke callback for all the found identities.
Definition: ncx.c:13174
xmlns_id_t ncx_get_identity_nsid(const ncx_identity_t *identity)
Get the namespace ID for an identity.
Definition: ncx.c:7188
void ncx_free_identity(ncx_identity_t *identity)
Free a malloced ncx_identity_t struct.
Definition: ncx.c:6870
ncx_identity_t * ncx_new_identity(void)
Get a new ncx_identity_t struct.
Definition: ncx.c:6750
ncx_identity_base_t * ncx_first_identity_base(ncx_identity_t *identity)
Get the first base record for an identity.
Definition: ncx.c:6815
ncx_identity_t * ncx_find_identity_que(dlq_hdr_t *identityQ, const xmlChar *name)
Find a ncx_identity_t struct in the specified Q.
Definition: ncx.c:7158
ncx_identity_t * ncx_find_identity(ncx_module_t *mod, const xmlChar *name, boolean useall)
Find a ncx_identity_t struct in the module and perhaps any of its submodules.
Definition: ncx.c:6925
boolean ncx_get_identity_conditional(const ncx_identity_t *identity)
Check if the identity is conditional on if-feature.
Definition: ncx.c:7207
ncx_import_t * ncx_new_import(void)
Malloc and initialize the fields in a ncx_import_t.
Definition: ncx.c:6261
ncx_import_t * ncx_find_import_que(const dlq_hdr_t *importQ, const xmlChar *module)
Search the specified importQ for a specified module name.
Definition: ncx.c:6350
void * ncx_locate_modqual_import(yang_pcb_t *pcb, ncx_import_t *imp, const xmlChar *defname, ncx_node_t *deftyp)
Search the specific module for the specified definition name.
Definition: ncx.c:6551
ncx_import_t * ncx_find_pre_import(const ncx_module_t *mod, const xmlChar *prefix)
Search the importQ for a specified prefix value.
Definition: ncx.c:6413
void ncx_free_import(ncx_import_t *import)
Free an ncx_import_t.
Definition: ncx.c:6285
ncx_import_t * ncx_find_import_test(const ncx_module_t *mod, const xmlChar *module)
Search the importQ for a specified module name.
Definition: ncx.c:6383
boolean ncx_import_match_mod(const ncx_import_t *imp, const xmlChar *module, const xmlChar *revision)
Check if the import matches the specified module.
Definition: ncx.c:6497
ncx_import_t * ncx_find_pre_import_que(const dlq_hdr_t *importQ, const xmlChar *prefix)
Search the specified importQ for a specified prefix value.
Definition: ncx.c:6435
ncx_import_t * ncx_find_import(const ncx_module_t *mod, const xmlChar *module)
Search the importQ for a specified module name.
Definition: ncx.c:6328
ncx_import_t * ncx_find_pre_import_test(const ncx_module_t *mod, const xmlChar *prefix)
Search the importQ for a specified prefix value.
Definition: ncx.c:6467
ncx_include_t * ncx_new_include(void)
Malloc and initialize the fields in a ncx_include_t.
Definition: ncx.c:6576
void ncx_free_include(ncx_include_t *inc)
Free a ncx_include_t.
Definition: ncx.c:6600
ncx_include_t * ncx_find_include(const ncx_module_t *mod, const xmlChar *submodule)
Search the includeQ for a specified submodule name.
Definition: ncx.c:6637
void ncx_clear_unload_callback(ncx_unload_cbfn_t cbfn)
Clear the callback function for an unload-module event.
Definition: ncx.c:9696
status_t ncx_set_load_callback(ncx_load_cbfn_t cbfn)
Set the callback function for a load-module event.
Definition: ncx.c:9589
void ncx_register_get_owner_fn(ncx_get_owner_fn_t cbfn)
Register a callback to get the owner name.
Definition: ncx.c:14253
void ncx_invoke_yang_obj_callbacks(ncx_module_t *mod, obj_template_t *obj)
Invoke all the callback functions for a parse-object event.
Definition: ncx.c:9795
status_t ncx_set_unload_callback(ncx_unload_cbfn_t cbfn)
Set the callback function for an unload-module event.
Definition: ncx.c:9658
status_t ncx_set_yang_obj_callback(ncx_yang_obj_cbfn_t cbfn)
Set the callback function for a YANG object parse event.
Definition: ncx.c:9727
void ncx_clear_load_callback(ncx_load_cbfn_t cbfn)
Clear the callback function for a load-module event.
Definition: ncx.c:9627
void ncx_clear_yang_obj_callback(ncx_yang_obj_cbfn_t cbfn)
Clear the callback function for a parse-object event.
Definition: ncx.c:9766
const xmlChar * ncx_get_owner_name(ncx_owner_id_t owner_id)
Get the registered YANG library owner namefor owner_id.
Definition: ncx.c:14268
dlq_hdr_t * ncx_get_session_modQ(void)
Get the current session modQ.
Definition: ncx.c:9549
void ncx_set_cur_modQ(dlq_hdr_t *que)
Set the current module Q to an alternate (for yangdiff)
Definition: ncx.c:9488
void ncx_clear_temp_modQ(void)
Clear the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:11119
void ncx_clear_session_modQ(void)
Clear the current session modQ.
Definition: ncx.c:9569
dlq_hdr_t * ncx_get_temp_modQ(void)
Get the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:11105
void ncx_set_temp_modQ(dlq_hdr_t *modQ)
Set the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:11089
void ncx_reset_modQ(void)
Set the current module Q to the original ncx_modQ.
Definition: ncx.c:9507
void ncx_set_session_modQ(dlq_hdr_t *que)
Get the session module Q.
Definition: ncx.c:9530
status_t ncx_turn_up_warning(status_t res)
Add a warning elevation entry.
Definition: ncx.c:10512
void ncx_check_warn_idlen(tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *id)
Check if the identifier length is greater than the specified amount.
Definition: ncx.c:10347
void ncx_set_warn_error(boolean val)
Set the warn_error flag.
Definition: ncx.c:10529
void ncx_set_top_mandatory_allowed(boolean allowed)
Allow or disallow modules with top-level mandatory object to be loaded; used by the server when agt_r...
Definition: ncx.c:12191
void ncx_set_warn_idlen(uint32 warnlen)
Set the warning length for identifiers.
Definition: ncx.c:10275
uint32 ncx_get_warn_idlen(void)
Get the warning length for identifiers.
Definition: ncx.c:10291
void ncx_set_empty_npcon_presence(boolean val)
Set the empty_npcon_presence value.
Definition: ncx.c:15428
void ncx_set_module_setid(uint32 new_setid)
Update YANG-LIBRARY module set ID.
Definition: ncx.c:15297
boolean ncx_get_empty_npcon_presence(void)
Get the empty_npcon_presence value.
Definition: ncx.c:15410
void ncx_set_warn_linelen(uint32 warnlen)
Set the warning length for YANG file lines.
Definition: ncx.c:10308
void ncx_set_warn_off_yang(boolean val)
Set the warn_off_yang flag.
Definition: ncx.c:10546
void ncx_check_warn_linelen(tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *line)
Check if the line display length is greater than the specified amount.
Definition: ncx.c:10390
status_t ncx_turn_off_warning(status_t res)
Add a warning suppression entry.
Definition: ncx.c:10449
boolean ncx_get_empty_npcon_presence_ro(void)
Get the empty_npcon_presence value READ-ONLY check.
Definition: ncx.c:15447
boolean ncx_get_warn_off_yang(void)
Get the warn_off_yang flag.
Definition: ncx.c:10563
boolean ncx_get_top_mandatory_allowed(void)
Check if top-level mandatory objects are allowed or not.
Definition: ncx.c:12206
uint32 ncx_get_module_setid(void)
GET YANG-LIBRARY module set ID.
Definition: ncx.c:15315
uint32 ncx_get_warn_linelen(void)
Get the warning length for YANG file lines.
Definition: ncx.c:10325
status_t ncx_turn_on_warning(status_t res)
Remove a warning suppression entry if it exists.
Definition: ncx.c:10468
status_t ncx_sprintf_module_setid(uint32 id, xmlChar *buff, int32 buffsize)
Write the module set ID for the yang-library to the specified buffer.
Definition: ncx.c:15338
void ncx_delete_all_obsolete_objects(void)
Go through all the modules and delete the obsolete nodes.
Definition: ncx.c:11996
boolean ncx_collapse_submodules_ok(void)
Check if it is OK to collapse submodule definitions into the main module.
Definition: ncx.c:12722
void ncx_set_empty_npcon_presence_ro(boolean val)
Set the empty_npcon_presence value READ-ONLY check.
Definition: ncx.c:15466
boolean ncx_warning_elevated(status_t res)
Check if a specific status_t code is elevated.
Definition: ncx.c:10629
boolean ncx_warning_enabled(status_t res)
Check if a specific status_t code is enabled.
Definition: ncx.c:10586
ncx_module_t * ncx_find_deviation_module(const xmlChar *modname)
Find a deviation module ncx_module_t in the deviation_moduleQ;.
Definition: ncx.c:15381
obj_template_t * ncx_next_data_node(obj_template_t *curnode)
Check if an obj_template_t in in any module that matches a data node either config or all.
Definition: ncx.c:15559
ncx_module_t * ncx_get_first_module(void)
Get the first module in the ncx_modQ.
Definition: ncx.c:5296
obj_template_t * ncx_match_any_object_ex(const xmlChar *modname, const xmlChar *objname, boolean dataonly, ncx_name_match_t name_match, boolean alt_names, status_t *retres)
Match any object in any YANG module with double extra search options.
Definition: ncx.c:4608
obj_template_t * ncx_match_any_object(const xmlChar *objname, ncx_name_match_t name_match, boolean alt_names, status_t *retres)
Match any object in any YANG module with extra search options.
Definition: ncx.c:4519
ncx_module_t * ncx_find_module_que(dlq_hdr_t *modQ, const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the specified Q of ncx_module_t.
Definition: ncx.c:3720
obj_template_t * ncx_find_first_rpc(const xmlChar *rpcname)
Find the specified RPC Method in any module.
Definition: ncx.c:4228
ncx_module_t * ncx_get_next_module(const ncx_module_t *mod)
Get the next module in the ncx_modQ.
Definition: ncx.c:5318
ncx_module_t * ncx_find_next_importer(const xmlChar *module, ncx_module_t *curmod)
Search all modules importQs for a specified module name.
Definition: ncx.c:13467
ncx_module_t * ncx_find_module_que_nsid(dlq_hdr_t *modQ, xmlns_id_t nsid)
Find a ncx_module_t in the specified Q by namespace ID.
Definition: ncx.c:3805
ncx_module_t * ncx_get_next_module_all(const ncx_module_t *mod)
Get the first module entry in the ncx_modQ.
Definition: ncx.c:5378
obj_template_t * ncx_find_any_object_que(dlq_hdr_t *modQ, const xmlChar *objname)
Find any top-level YANG object in a module in the modQ.
Definition: ncx.c:4754
ncx_module_t * ncx_find_module_by_prefix(const xmlChar *prefix)
Find an ncx_module_t in the ncx_sesmodQ by prefix.
Definition: ncx.c:3687
ncx_module_t * ncx_get_first_session_module(void)
Get the first module in the ncx_sesmodQ.
Definition: ncx.c:5399
ncx_module_t * ncx_first_deviation_module(void)
Get the first deviation module.
Definition: ncx.c:15855
obj_template_t * ncx_match_any_rpc(const xmlChar *module, const xmlChar *rpcname, uint32 *retcount)
Match the specified module name in any module.
Definition: ncx.c:4318
ncx_module_t * ncx_next_deviation_module(ncx_module_t *curmod)
Get the next deviation module after curmod.
Definition: ncx.c:15874
ncx_module_t * ncx_find_module_que_by_prefix(dlq_hdr_t *modQ, const xmlChar *prefix)
Find a ncx_module_t in the specified Q by prefix value.
Definition: ncx.c:3769
ncx_module_t * ncx_find_first_importer(const xmlChar *module)
Search all modules importQs for a specified module name.
Definition: ncx.c:13436
obj_template_t * ncx_find_any_object(const xmlChar *objname)
Find any top-level object in any YANG module.
Definition: ncx.c:4457
ncx_module_t * ncx_get_next_session_module(const ncx_module_t *mod)
Get the next module in the ncx_sesmodQ.
Definition: ncx.c:5419
obj_template_t * ncx_first_data_node(boolean cfgonly)
Check if an obj_template_t in in any module that matches a data node either config or all.
Definition: ncx.c:15501
ncx_module_t * ncx_get_prev_module(const ncx_module_t *mod)
Get the previous module.
Definition: ncx.c:5346
ncx_module_t * ncx_find_module_ex(const xmlChar *modname, const xmlChar *revision)
Find an ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3656
ncx_module_t * ncx_find_module(const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3622
uint32 ncx_mod_revision_count_que(xml_msg_hdr_t *msg, dlq_hdr_t *modQ, const xmlChar *modname)
Find all the ncx_module_t structs in the specified queue that have the same module name.
Definition: ncx.c:11227
boolean ncx_any_mod_errors(void)
Check if any of the loaded modules are loaded with non-fatal errors.
Definition: ncx.c:3861
uint32 ncx_mod_revision_count(xml_msg_hdr_t *msg, const xmlChar *modname)
Find all the ncx_module_t structs in the ncx_modQ that have the same module name.
Definition: ncx.c:11191
void dump_modQ(dlq_hdr_t *modQ)
dump module Q contents [name, revision] for debugging
Definition: ncx.c:12353
boolean ncx_save_descr(void)
Get the value of the save description strings variable.
Definition: ncx.c:8060
uint32 ncx_dev_revision_count_que(xml_msg_hdr_t *msg, dlq_hdr_t *deviationQ, const xmlChar *modname)
Find all the ncx_save_deviations_t structs in the specified queue that have the same module name.
Definition: ncx.c:11288
obj_template_t * ncx_get_last_object(ncx_module_t *mod, boolean augment_ok)
Find the last data node.
Definition: ncx.c:5680
obj_template_t * ncx_match_rpc(ncx_module_t *mod, const xmlChar *rpcname, uint32 *retcount)
Check if a rpc_template_t in the mod->rpcQ.
Definition: ncx.c:4268
obj_template_t * ncx_get_next_object_ex(ncx_module_t *mod, obj_template_t *curobj, boolean augment_ok)
Get the next object in the specified module.
Definition: ncx.c:5772
obj_template_t * ncx_find_object(ncx_module_t *mod, const xmlChar *objname)
Find a top level module object.
Definition: ncx.c:4788
obj_template_t * ncx_find_next_data_object(ncx_module_t *mod, obj_template_t *obj)
Check the next obj_template_t in in any module that matches the object name string.
Definition: ncx.c:4705
grp_template_t * ncx_find_grouping(ncx_module_t *mod, const xmlChar *grpname, boolean useall)
Find the YANG grouping.
Definition: ncx.c:4068
obj_template_t * ncx_get_first_data_object(ncx_module_t *mod)
Get the first datastore object in the module.
Definition: ncx.c:5946
obj_template_t * ncx_match_any_rpc_mod(ncx_module_t *mod, const xmlChar *rpcname, uint32 *retcount)
Check if a rpc_template_t is in the specified module.
Definition: ncx.c:4376
obj_template_t * ncx_find_rpc(const ncx_module_t *mod, const xmlChar *rpcname)
Check if a rpc_template_t in the mod->rpcQ.
Definition: ncx.c:4196
obj_template_t * ncx_get_prev_object(ncx_module_t *mod, obj_template_t *curobj, boolean augment_ok)
Find the previous object node.
Definition: ncx.c:5861
obj_template_t * ncx_get_next_data_object_same(ncx_module_t *mod, obj_template_t *curobj)
Get the next database object in the specified module.
Definition: ncx.c:6182
obj_template_t * ncx_get_first_object_ex(ncx_module_t *mod, boolean augment_ok)
Get the first object in the datadefQs for the specified module.
Definition: ncx.c:5602
typ_template_t * ncx_find_type(ncx_module_t *mod, const xmlChar *typname, boolean useall)
Check if a typ_template_t in the mod->typeQ.
Definition: ncx.c:3935
typ_template_t * ncx_find_type_que(const dlq_hdr_t *typeQ, const xmlChar *typname)
ncx_find_type_que
Definition: ncx.c:4035
obj_template_t * ncx_get_next_data_object(ncx_module_t *mod, obj_template_t *curobj)
Get the next database object in the specified module.
Definition: ncx.c:6018
obj_template_t * ncx_get_next_object(ncx_module_t *mod, obj_template_t *curobj)
Get the next object in the specified module.
Definition: ncx.c:5754
obj_template_t * ncx_find_object_nsid(xmlns_id_t nsid, const xmlChar *objname)
Find a top level module object by module NSID.
Definition: ncx.c:4808
grp_template_t * ncx_find_grouping_que(const dlq_hdr_t *groupingQ, const xmlChar *grpname)
Check if a grp_template_t in the specified Q.
Definition: ncx.c:4165
obj_template_t * ncx_get_first_object(ncx_module_t *mod)
Get the first object in the datadefQs for the specified module.
Definition: ncx.c:5584
obj_template_t * ncx_get_first_data_object_pick(ncx_module_t *mod, boolean config)
Get the first database object in the datadefQs for the specified module.
Definition: ncx.c:6100
const xmlChar * ncx_get_modversion(const ncx_module_t *mod)
Get the [sub]module version.
Definition: ncx.c:5484
const xmlChar * ncx_get_mod_source(const ncx_module_t *mod)
Get the module file source string for the specified module.
Definition: ncx.c:10086
ncx_module_t * ncx_get_mainmod(ncx_module_t *mod)
Get the main module.
Definition: ncx.c:5557
const xmlChar * ncx_get_mod_xmlprefix(const ncx_module_t *mod)
Get the module XML prefix for the specified module.
Definition: ncx.c:10058
boolean ncx_mod_unloadable(ncx_module_t *mod)
Check if this module can be unloaded.
Definition: ncx.c:13701
ncx_module_t * ncx_first_submodule(ncx_module_t *mod)
Get the first submodule in the specified main module.
Definition: ncx.c:13824
const dlq_hdr_t * ncx_get_const_allincQ(const ncx_module_t *mod)
Find the correct Q of yang_node_t for all include files that have the same 'belongs-to' value (const ...
Definition: ncx.c:11366
void ncx_clr_enable_chk(ncx_module_t *mod)
Clear the enable check test done flag in all objects in the specified module.
Definition: ncx.c:16120
const xmlChar * ncx_get_mod_prefix(const ncx_module_t *mod)
Get the module prefix for the specified module.
Definition: ncx.c:10033
void ncx_set_mod_unloadable(ncx_module_t *mod)
Set this module so it can be unloaded.
Definition: ncx.c:13723
boolean ncx_modname_is_ocpattern(const xmlChar *modname)
Check if the module name is an openconfig file.
Definition: ncx.c:15731
const xmlChar * ncx_get_mod_ocversion(const ncx_module_t *mod)
Get the module openconfig-version string for the specified module.
Definition: ncx.c:10134
const xmlChar * ncx_get_modnamespace(const ncx_module_t *mod)
Get the module namespace URI.
Definition: ncx.c:5504
boolean ncx_get_ocpattern_mode(const ncx_module_t *mod)
Get the openconfig pattern mode.
Definition: ncx.c:15709
ncx_module_t * ncx_get_parent_mod(ncx_module_t *mod)
Find the correct module by checking mod->parent nodes.
Definition: ncx.c:11394
boolean ncx_is_yangmap_type(ncx_module_t *mod, boolean is_src)
Check the yangmap type flags.
Definition: ncx.c:16342
status_t ncx_check_yang_identity(ncx_module_t *impmod, const xmlChar *idstr)
Check if an identity string is available in the module.
Definition: ncx.c:15598
xmlns_id_t ncx_get_mod_nsid(const ncx_module_t *mod)
Get the main module namespace ID.
Definition: ncx.c:5460
const xmlChar * ncx_get_mod_revision(const ncx_module_t *mod)
Get the module revision string for the specified module.
Definition: ncx.c:10111
boolean ncx_mod_has_rpcs(ncx_module_t *mod)
Check if the module has any RPC operation definitions.
Definition: ncx.c:12383
void ncx_set_ocpattern_mode(ncx_module_t *mod, boolean mode)
Set the openconfig pattern mode.
Definition: ncx.c:15657
boolean ncx_mod_has_submodules(const ncx_module_t *mod)
Check if this is a main module with submodules.
Definition: ncx.c:17083
void ncx_set_module_supported(ncx_module_t *mod, boolean supported)
Set the module supported field.
Definition: ncx.c:14143
const xmlChar * ncx_get_modsource(const ncx_module_t *mod)
Get the module filespec source string.
Definition: ncx.c:5537
boolean ncx_skip_child_node_warn(const xmlChar *modname)
Internal compiler check to suppress warnings.
Definition: ncx.c:16097
void ncx_force_ocpattern_mode(ncx_module_t *mod)
Force the openconfig pattern mode to TRUE.
Definition: ncx.c:15684
boolean ncx_mod_is_hidden(const ncx_module_t *mod)
Check if the module is forced no advertise (e.g.
Definition: ncx.c:14779
ncx_yang_version_t ncx_get_yang_version(const ncx_module_t *mod)
Get the yang-version used in the module.
Definition: ncx.c:14605
ncx_module_t * ncx_next_submodule(ncx_module_t *mod, ncx_module_t *submod)
Get the next submodule in the specified main module.
Definition: ncx.c:13858
status_t ncx_set_mod_ocversion(ncx_module_t *mod, const xmlChar *ocversion)
Set the module openconfig-version string for the specified module.
Definition: ncx.c:10155
boolean ncx_is_duplicate(ncx_module_t *mod, const xmlChar *defname)
Check if a module definition name is a duplicate.
Definition: ncx.c:5270
dlq_hdr_t * ncx_get_allincQ(ncx_module_t *mod)
Find the correct Q of yang_node_t for all include files that have the same 'belongs-to' value.
Definition: ncx.c:11338
boolean ncx_mod_has_augment_data_nodes(ncx_module_t *mod, boolean check_config, boolean check_operational)
Check if the module has any augment datastore definitions.
Definition: ncx.c:12534
boolean ncx_mod_has_data_nodes(ncx_module_t *mod, boolean check_config, boolean check_operational)
Check if the module has any datastore definitions.
Definition: ncx.c:12430
boolean ncx_any_dependency_errors(const ncx_module_t *mod)
Check if any of the imports that this module relies on were loadeds are loaded with non-fatal errors.
Definition: ncx.c:3888
const xmlChar * ncx_get_modname(const ncx_module_t *mod)
Get the main module name.
Definition: ncx.c:5440
void ncx_number_all_objects(ncx_module_t *mod)
Number all objects for internal ordering comparisons.
Definition: ncx.c:14700
void ncx_set_yangmap_type(ncx_module_t *mod, boolean is_src)
Set the yangmap type flags.
Definition: ncx.c:16313
void ncx_unload_and_free_module(ncx_module_t *mod)
Clear out the xmlns, def_ref, and modQ entries for a module and then delete the module.
Definition: ncx.c:13569
void ncx_clear_mod_xpath_backptrs(ncx_module_t *mod)
Clear Xpath back pointers for the data-db objects in the database for 1 module.
Definition: ncx.c:13502
void ncx_collapse_submod_defs(ncx_module_t *mod)
Collapse submodule definitions into the main module.
Definition: ncx.c:12745
void ncx_soft_unload_and_free_module(ncx_module_t *mod)
Clear out the modQ entries for a module and then delete the module.
Definition: ncx.c:13640
void ncx_remove_augment_data_nodes(ncx_module_t *mod)
Check if YANG objects related to this augment need to be removed.
Definition: ncx.c:12648
status_t ncx_set_obj_xpath_backptrs(ncx_module_t *mod)
Add Xpath back pointers to the data-db objects in the database for 1 module.
Definition: ncx.c:12842
void ncx_delete_mod_obsolete_objects(ncx_module_t *mod)
Delete all obsolete objects in mod.
Definition: ncx.c:12019
YANG Grouping Statement Handler.
NCX System Logging Manager.
Contains NCX constants.
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
NETCONF protocol remote procedure call common definitions.
One YANG 'grouping' definition – sibling set template.
Definition: grp.h:87
used with various structs to cache back-ptrs the 'node' pointer may or may not be malloced!...
Definition: ncxtypes.h:1530
NCX base64 string node for YANG 'binary' built-in type.
Definition: ncxtypes.h:866
one NCX_BT_BITS bit value
Definition: ncxtypes.h:819
one NCX_BT_ENUM enumeration value (user may enter 1 of 3 forms)
Definition: ncxtypes.h:811
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1366
error message replacement record
Definition: ncxtypes.h:1624
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:877
struct for holding r/o pointer to generic internal node for filtering purposes
Definition: ncxtypes.h:1061
YANG identity base.
Definition: ncxtypes.h:1095
YANG identity entry.
Definition: ncxtypes.h:1104
One 'import' clause in YANG.
Definition: ncxtypes.h:1298
One 'include' clause, YANG only.
Definition: ncxtypes.h:1328
server module info cache record for def_reg_add_mod
Definition: ncxtypes.h:1615
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1138
YANG revision entry.
Definition: ncxtypes.h:915
used with obj_deviation_t to defer object lookups
Definition: ncxtypes.h:1505
Schema Mount Root Control Block used in the object template.
Definition: ncxtypes.h:1893
keep track of the typenames used for local typedefs only used by ncxdump to generate XSDs OBSOLETE: D...
Definition: ncxtypes.h:1388
One YANG data-def-stmt.
Definition: obj.h:1232
Session Control Block.
Definition: ses.h:573
token parsing chain (main parser control block)
Definition: tk.h:415
One YANG 'typedef' definition – top-level type template.
Definition: typ.h:477
Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR parsing as well!...
Definition: xml_msg.h:404
YANG parser control block.
Definition: yang.h:204
NCX Syntax Token Handler.
Parameter Type Handler.
Value Node Basic Support.
XML namespace support.
YANG Module parser utilities.