yumapro  25.10-1
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
1606extern const xmlChar *
1608
1609
1619extern status_t
1621 const xmlChar *version);
1622
1623
1638extern status_t
1639 ncx_compare_semvers (const xmlChar *version1,
1640 const xmlChar *version2,
1641 int32 *ret);
1642
1643
1651extern dlq_hdr_t *
1653
1654
1662extern const dlq_hdr_t *
1664
1665
1673extern ncx_module_t *
1675
1676
1683extern boolean
1685
1686
1695extern boolean
1697 boolean check_config,
1698 boolean check_operational);
1699
1700
1710extern boolean
1712 boolean check_config,
1713 boolean check_operational);
1714
1715
1724extern boolean
1726
1727
1734extern void
1736
1737
1744extern ncx_module_t *
1746
1747
1748
1756extern ncx_module_t *
1758 ncx_module_t *submod);
1759
1760
1767extern void
1769 boolean supported);
1770
1771
1778extern ncx_yang_version_t
1780
1781
1787extern void
1789
1790
1802extern boolean
1803 ncx_mod_is_hidden (const ncx_module_t *mod);
1804
1805
1815extern void
1816 ncx_set_mod_hidden (ncx_module_t *mod);
1817
1818
1826extern status_t
1828 const xmlChar *idstr);
1829
1830
1837extern void
1839 boolean mode);
1840
1841
1847extern void
1849
1850
1857extern boolean
1859
1860
1867extern boolean
1868 ncx_modname_is_ocpattern (const xmlChar *modname);
1869
1870
1881extern boolean
1882 ncx_skip_child_node_warn (const xmlChar *modname);
1883
1884
1891extern void ncx_clr_enable_chk (ncx_module_t *mod);
1892
1893
1900extern void
1902 boolean is_src);
1903
1904
1912extern boolean
1914 boolean is_src);
1915
1916
1925extern boolean
1927
1928 // END ncxlib/yang/yangmod/yangmodprop
1930
1931
1932 // BEGIN ncxlib/yang/yangmod/yangmodutil
1940
1941
1951extern void
1953
1954
1965extern void
1967
1968
1985extern void
1987
1988
1989
1999extern status_t
2001
2002
2009extern void
2011
2012
2019extern void
2021
2022
2029extern void
2031
2032 // END ncxlib/yang/yangmod/yangmodutil
2034
2035
2036
2037
2038// Heading only for YANG Data Docs
2039
2040
2066extern ncx_import_t *
2067 ncx_new_import (void);
2068
2069
2080extern void
2081 ncx_free_import (ncx_import_t *import);
2082
2083
2091extern ncx_import_t *
2092 ncx_find_import (const ncx_module_t *mod,
2093 const xmlChar *module);
2094
2095
2103extern ncx_import_t *
2104 ncx_find_import_que (const dlq_hdr_t *importQ,
2105 const xmlChar *module);
2106
2107
2117extern ncx_import_t *
2119 const xmlChar *module);
2120
2121
2129extern ncx_import_t *
2131 const xmlChar *prefix);
2132
2133
2141extern ncx_import_t *
2142 ncx_find_pre_import_que (const dlq_hdr_t *importQ,
2143 const xmlChar *prefix);
2144
2145
2155extern ncx_import_t *
2157 const xmlChar *prefix);
2158
2159
2168extern boolean
2170 const xmlChar *module,
2171 const xmlChar *revision);
2172
2173
2193extern void *
2195 ncx_import_t *imp,
2196 const xmlChar *defname,
2197 ncx_node_t *deftyp);
2198 // END ncxlib/yang/yangdata/yangimport
2200
2201
2202
2218extern ncx_include_t *
2219 ncx_new_include (void);
2220
2221
2232extern void
2234
2235
2243extern ncx_include_t *
2244 ncx_find_include (const ncx_module_t *mod,
2245 const xmlChar *submodule);
2246
2247 // END ncxlib/yang/yangdata/yanginclude
2249
2250
2272extern ncx_binary_t *
2273 ncx_new_binary (void);
2274
2275
2280extern void
2281 ncx_init_binary (ncx_binary_t *binary);
2282
2283
2289extern void
2291
2292
2298extern void
2299 ncx_free_binary (ncx_binary_t *binary);
2300
2301 // END ncxlib/yang/yangdata/yangbindata
2303
2304 // BEGIN ncxlib/yang/yangdata/yangidentity
2312
2313
2319extern ncx_identity_t *
2320 ncx_new_identity (void);
2321
2322
2329extern ncx_identity_base_t *
2330 ncx_new_identity_base (void);
2331
2332
2338extern void
2340
2341
2348extern ncx_identity_base_t *
2350
2351
2358extern ncx_identity_base_t *
2360
2361
2368extern uint32
2369 ncx_identity_base_count (ncx_identity_t *identity);
2370
2371
2377extern void
2379
2380
2391extern ncx_identity_t *
2393 const xmlChar *name,
2394 boolean useall);
2395
2396
2405extern void
2408 void *cookie);
2409
2410
2411/*
2412 * @brief Iterate all the YANG object definitions in the module
2413 *
2414 * @param mod module to search
2415 * @param cbfn The object_cbfn_t to invoke for each object found
2416 * @param cookie User cookie to pass to callback (may be NULL)
2417 */
2418extern void
2419 ncx_for_all_objects (ncx_module_t *mod,
2420 ncx_object_cbfn_t cbfn,
2421 void *cookie);
2422
2423
2424
2425/*
2426 * @brief Iterate all the external augments YANG object definitions
2427 * in the module
2428 *
2429 * @param mod module to search
2430 * @param cbfn The object_cbfn_t to invoke for each object found
2431 * @param cookie User cookie to pass to callback (may be NULL)
2432 */
2433extern void
2434 ncx_for_all_ext_augments (ncx_module_t *mod,
2435 ncx_object_cbfn_t cbfn,
2436 void *cookie);
2437
2438
2446extern ncx_identity_t *
2447 ncx_find_identity_que (dlq_hdr_t *identityQ,
2448 const xmlChar *name);
2449
2450
2457extern xmlns_id_t
2458 ncx_get_identity_nsid (const ncx_identity_t *identity);
2459
2460
2467extern boolean
2469
2470
2483extern void
2486 void *cookie);
2487
2488
2489 // END ncxlib/yang/yangdata/yangidentity
2491
2492
2509extern ncx_filptr_t *
2510 ncx_new_filptr (void);
2511
2512
2518extern void
2519 ncx_free_filptr (ncx_filptr_t *filptr);
2520
2521
2527extern ncx_revhist_t *
2528 ncx_new_revhist (void);
2529
2530
2535extern void
2537
2538
2546extern ncx_revhist_t *
2547 ncx_find_revhist (const ncx_module_t *mod,
2548 const xmlChar *ver);
2549
2550 // END ncxlib/yang/yangdata/yangcompgen
2552
2553
2569extern void
2571
2572
2578extern void
2580
2581
2593extern int32
2594 ncx_compare_enums (const ncx_enum_t *enu1,
2595 const ncx_enum_t *enu2);
2596
2597
2609extern status_t
2610 ncx_set_enum (const xmlChar *enum_name,
2611 const int32 enum_val,
2612 ncx_enum_t *retenu);
2613
2614 // END ncxlib/yang/yangdata/yangenum
2616
2617
2632extern void
2633 ncx_init_bit (ncx_bit_t *bit);
2634
2635
2641extern void
2642 ncx_clean_bit (ncx_bit_t *bit);
2643
2644
2657extern int32
2658 ncx_compare_bits (const ncx_bit_t *bitone,
2659 const ncx_bit_t *bittwo);
2660
2661 // END ncxlib/yang/yangdata/yangbit
2663
2664
2665
2680extern ncx_typname_t *
2681 ncx_new_typname (void);
2682
2683
2690extern void
2692
2693
2701extern const xmlChar *
2702 ncx_find_typname (const typ_template_t *typ,
2703 const dlq_hdr_t *que);
2704
2705
2714extern const typ_template_t *
2715 ncx_find_typname_type (const dlq_hdr_t *que,
2716 const xmlChar *typname);
2717
2718
2724extern void
2725 ncx_clean_typnameQ (dlq_hdr_t *que);
2726
2727 // END ncxlib/yang/yangdata/yangtypname
2729
2730
2746extern ncx_errinfo_t *
2747 ncx_new_errinfo (void);
2748
2749
2755extern void
2757
2758
2765extern void
2767
2768
2775extern void
2777
2778
2789extern boolean
2790 ncx_errinfo_set (const ncx_errinfo_t *errinfo);
2791
2792
2801extern status_t
2802 ncx_copy_errinfo (const ncx_errinfo_t *src,
2803 ncx_errinfo_t *dest);
2804
2805
2806 // END ncxlib/yang/yangdata/yangdataerrinfo
2808
2809
2810
2811
2812
2813
2814
2815 // BEGIN ncxlib/ncxglobals/ncxgenobj
2825
2826
2832extern obj_template_t *
2833 ncx_get_gen_anyxml (void);
2834
2835
2841extern obj_template_t *
2842 ncx_get_gen_container (void);
2843
2844
2850extern obj_template_t *
2851 ncx_get_gen_string (void);
2852
2853
2859extern obj_template_t *
2860 ncx_get_gen_empty (void);
2861
2862
2868extern obj_template_t *
2869 ncx_get_gen_root (void);
2870
2871
2877extern obj_template_t *
2878 ncx_get_gen_binary (void);
2879
2885extern obj_template_t *
2886 ncx_get_gen_leaflist (void);
2887
2888
2894extern obj_template_t *
2895 ncx_get_yang_insert (void);
2896
2897
2903extern obj_template_t *
2904 ncx_get_yang_key (void);
2905
2906
2912extern obj_template_t *
2913 ncx_get_yang_value (void);
2914
2915
2922extern obj_template_t *
2923 ncx_get_nc_operation (void);
2924
2925
2932extern obj_template_t *
2933 ncx_get_datapath_obj (void);
2934
2935
2942extern obj_template_t *
2944
2945
2952extern obj_template_t *
2953 ncx_get_btype_obj (void);
2954
2955
2961extern boolean
2963
2964 // END ncxlib/ncxglobals/ncxgenobj
2966
2967
2968 // BEGIN ncxlib/ncxglobals/ncxgenvar
2979
2980
2986extern ncx_display_mode_t
2987 ncx_get_display_mode (void);
2988
2989
2995extern uint32
2997
2998
3006extern boolean
3007 ncx_get_useprefix (void);
3008
3009
3017extern void
3018 ncx_set_useprefix (boolean val);
3019
3020
3028extern boolean
3029 ncx_get_system_sorted (void);
3030
3031
3039extern void
3040 ncx_set_system_sorted (boolean val);
3041
3042
3051extern ncx_sort_type_t
3053
3054
3061extern void
3063
3064
3074extern boolean
3075 ncx_get_cwd_subdirs (void);
3076
3077
3085extern boolean
3087
3088
3095extern void
3097
3098
3104extern void
3106
3107
3115extern void
3116 ncx_set_use_deadmodQ (void);
3117
3118
3128extern int8
3130
3131
3138extern void
3139 ncx_set_message_indent (int8 msg_indent);
3140
3141
3148extern boolean
3150
3151
3158extern status_t
3160
3161
3167extern boolean
3168 ncx_fastpath_enabled (void);
3169
3170
3176extern boolean
3177 ncx_netconfd_running (void);
3178
3179
3185extern void
3186 ncx_use_data_templates (boolean enabled);
3187
3188
3194extern boolean
3195 ncx_data_templates_ok (void);
3196
3197
3203extern void
3204 ncx_ignore_missing_vars (boolean enabled);
3205
3206
3212extern boolean
3213 ncx_missing_vars_ok (void);
3214
3215
3219extern void
3221
3222
3226extern void
3228
3234extern boolean
3236
3237
3244extern status_t
3245 ncx_set_subsys_id (const xmlChar *id);
3246
3252extern const xmlChar *
3253 ncx_get_subsys_id (void);
3254
3255
3260extern void
3261 ncx_set_use_objptrs (void);
3262
3270extern boolean
3271 ncx_use_objptrs (void);
3272
3273
3279extern ncx_backptr_t *
3280 ncx_first_objptr (void);
3281
3282
3289extern ncx_backptr_t *
3291
3292
3293#ifdef DEBUG
3298extern void
3299 ncx_dump_objptrQ (void);
3300#endif // DEBUG
3301
3302
3310extern void
3311 ncx_set_getbulk_max (uint32 max_entries);
3312
3313
3319extern uint32
3320 ncx_get_getbulk_max (void);
3321
3322
3328extern void
3330
3331
3337extern boolean
3339
3340
3350extern void
3352
3353
3360extern boolean
3362
3363
3371extern boolean
3372 ncx_base_schema_set (void);
3373
3374
3380extern void
3381 ncx_set_base_schema (void);
3382
3383
3392extern boolean
3393 ncx_need_get2_xpath (void);
3394
3395
3402extern void
3403 ncx_set_with_ocpattern (boolean mode);
3404
3405
3411extern boolean
3413
3414
3420extern void
3422
3423
3431extern boolean
3432 ncx_is_with_snmp (void);
3433
3434
3442extern void
3443 ncx_set_with_snmp (boolean val);
3444
3445
3451extern void
3452 ncx_enable_bestmatch (void);
3453
3454
3463extern status_t
3464 ncx_set_bestmatch (void);
3465
3466
3474extern boolean
3475 ncx_get_bestmatch (void);
3476
3477
3483extern void
3485
3486
3493extern boolean
3495
3496
3502extern boolean
3504
3505
3512extern void
3513 ncx_set_sethook_registered (boolean val);
3514
3515
3521extern void
3522 ncx_set_binary_display_maxlen (uint32 val);
3523
3524
3530extern uint32
3532
3533
3539extern boolean
3540 ncx_is_with_dblock (void);
3541
3542
3548extern void
3549 ncx_set_with_dblock (boolean val);
3550
3551
3558extern boolean
3560
3561
3567extern void
3568 ncx_set_db_lock_init_done (boolean val);
3569
3570
3576extern void
3577 ncx_set_max_strlen (int32 num);
3578
3579
3585extern int32
3586 ncx_get_max_strlen (void);
3587
3588
3593extern void
3595
3596
3602extern boolean
3604
3605
3610extern void
3612
3613
3619extern boolean
3621
3622
3632extern void
3633 ncx_set_trim_whitespace (boolean val);
3634
3635
3642extern boolean
3644
3645
3654extern void
3655 ncx_set_startup_prune (boolean val);
3656
3657
3666extern boolean
3667 ncx_get_startup_prune (void);
3668
3669
3679extern boolean
3681
3682
3690extern void
3692
3693
3699extern ncx_config_state_t
3700 ncx_get_config_state (void);
3701
3702
3710extern void
3711 ncx_set_xmlorder (boolean val);
3712
3713
3720extern boolean
3721 ncx_get_xmlorder (void);
3722
3723
3731extern void
3732 ncx_set_list_deleteall_ok (boolean val);
3733
3734
3742extern boolean
3744
3745
3753extern void
3754 ncx_set_leaflist_deleteall_ok (boolean val);
3755
3756
3764extern boolean
3766
3767
3775extern boolean
3777
3778
3785extern void
3786 ncx_set_with_canonical (boolean val);
3787
3788
3795extern boolean
3797
3798
3808extern void
3809 ncx_set_save_owners (boolean val);
3810
3811
3818extern boolean
3819 ncx_get_save_owners (void);
3820
3821 // END ncxlib/ncxglobals/ncxgenvar
3823
3824
3825// heading only
3826 // BEGIN ncxlib/ncxstrenum
3844
3845
3854extern const xmlChar *
3855 ncx_get_layer (ncx_layer_t layer);
3856
3857
3864extern ncx_cvttyp_t
3865 ncx_get_cvttyp_enum (const char *str);
3866
3867
3874extern ncx_status_t
3875 ncx_get_status_enum (const xmlChar *str);
3876
3877
3884extern const xmlChar *
3886
3887
3894extern ncx_data_class_t
3895 ncx_get_data_class_enum (const xmlChar *str);
3896
3897
3904extern const xmlChar *
3906
3907
3914extern const xmlChar *
3915 ncx_get_access_str (ncx_access_t max_access);
3916
3917
3924extern ncx_access_t
3925 ncx_get_access_enum (const xmlChar *str);
3926
3927
3936extern boolean
3937 ncx_is_true (const xmlChar *str);
3938
3939
3947extern boolean
3948 ncx_is_false (const xmlChar *str);
3949
3950
3957extern ncx_bad_data_t
3958 ncx_get_baddata_enum (const xmlChar *valstr);
3959
3960
3967extern const xmlChar *
3969
3970
3977extern const xmlChar *
3979
3980
3987extern ncx_withdefaults_t
3988 ncx_get_withdefaults_enum (const xmlChar *withdefstr);
3989
3990
3997extern int32
3998 ncx_get_withdefaults_value (const xmlChar *withdefstr);
3999
4000
4008extern ncx_display_mode_t
4009 ncx_get_display_mode_enum (const xmlChar *dmstr);
4010
4011
4018extern const xmlChar *
4020
4021
4028extern const xmlChar *
4030
4031
4040extern const xmlChar *
4041 ncx_get_protocols_enabled (uint16 flags);
4042
4043
4050extern const xmlChar *
4052
4053
4060extern ncx_name_match_t
4061 ncx_get_name_match_enum (const xmlChar *str);
4062
4063
4070extern const xmlChar *
4072
4073
4080extern int32
4082
4083
4092extern status_t
4093 ncx_str2txid (const xmlChar *str,
4094 ncx_transaction_id_t *txid);
4095
4096
4105extern status_t
4107 xmlChar **retbuff);
4108
4109
4116extern const xmlChar *
4118
4119
4126extern const xmlChar *
4128
4129
4138extern const xmlChar *
4140
4141
4148extern ncx_msg_encoding_t
4149 ncx_cvt_encoding_str (const xmlChar *msg_encoding);
4150
4151
4160extern ncx_msg_encoding_t
4161 ncx_cvt_encoding_yang_str (const xmlChar *msg_encoding);
4162
4163
4169extern const xmlChar *
4171
4172
4179extern const xmlChar *
4181
4182 // END ncxlib/ncxutil/ncxstrenum
4184
4185
4186
4206extern void
4208 ncx_module_t *mod,
4209 status_t res);
4210
4211
4225extern void
4227 ncx_module_t *mod,
4228 status_t res,
4229 const char *filename,
4230 uint32 linenum,
4231 boolean fineoln);
4232
4233
4241extern void
4243 status_t result,
4244 const char *expstr);
4245
4246
4255extern void
4257 ncx_module_t *mod,
4258 status_t result,
4259 const char *expstr);
4260
4261
4271extern void
4273 ncx_module_t *mod,
4274 const char *stmtstr,
4275 const char *expstr);
4276
4277
4288extern ncx_errmsg_t *
4290 const xmlChar *str);
4291
4292
4298extern void
4300
4301
4302 // END ncxlib/yang/yangcomp/yangcomperr
4304
4305
4306 // BEGIN ncxlib/yang/yangcomp/yangcompidentifier
4316
4317
4324extern boolean
4325 ncx_valid_name_ch (uint32 ch);
4326
4327
4334extern boolean
4335 ncx_valid_fname_ch (uint32 ch);
4336
4337
4345extern boolean
4346 ncx_valid_name (const xmlChar *str,
4347 uint32 len);
4348
4349
4363extern boolean
4364 ncx_valid_num_name (const xmlChar *str);
4365
4366
4375extern boolean
4376 ncx_valid_name2 (const xmlChar *str);
4377
4378 // END ncxlib/yang/yangcomp/yangcompidentifier
4380
4381
4382 // BEGIN ncxlib/ncxutil/ncxutilgen
4390
4413extern xmlChar *
4414 ncx_get_source_ex (const xmlChar *fspec,
4415 boolean expand_cwd,
4416 status_t *res);
4417
4418
4441extern xmlChar *
4442 ncx_get_source (const xmlChar *fspec,
4443 status_t *res);
4444
4445
4455extern boolean
4456 ncx_prefix_different (const xmlChar *prefix1,
4457 const xmlChar *prefix2,
4458 const xmlChar *modprefix);
4459
4460
4470extern status_t
4471 ncx_get_version (xmlChar *buffer,
4472 uint32 buffsize);
4473
4474
4484extern status_t
4485 ncx_get_semver (xmlChar *buffer,
4486 uint32 buffsize);
4487
4488
4498extern status_t
4499 ncx_get_full_version (xmlChar *buffer,
4500 uint32 buffsize);
4501
4502
4503
4511extern const char *
4512 ncx_get_build_date (void);
4513
4514
4515
4523extern status_t
4524 ncx_get_feature_code (xmlChar *buffer,
4525 uint32 buffsize);
4526
4535extern int32
4536 ncx_compare_base_uris (const xmlChar *str1,
4537 const xmlChar *str2);
4538
4539
4548extern boolean
4550 uint16 flags);
4551
4552
4553
4563extern void
4565 uint16 *flags);
4566
4567
4576extern void
4578 uint16 *flags);
4579
4580
4587extern boolean
4589
4590
4599extern void
4600 ncx_write_tracefile (const char *buff, uint32 count);
4601
4602
4613extern status_t
4614 ncx_decode_url_string (const xmlChar *urlstr,
4615 uint32 urlstrlen,
4616 xmlChar *buffer,
4617 uint32 *cnt);
4618
4619
4620
4631extern status_t
4632 ncx_create_pidfile (const xmlChar *progname,
4633 boolean fileloc_fhs);
4634
4635
4642extern status_t
4643 ncx_add_ydtrace (const xmlChar *fspec);
4644
4645
4652extern boolean
4653 ncx_find_ydtrace (const xmlChar *fspec);
4654
4655
4664 ncx_get_file_result_format (const xmlChar *filespec);
4665
4666
4679extern boolean
4680 ncx_library_mode_ok (const xmlChar *modname,
4681 const xmlChar *rpcname);
4682
4683
4689extern const char *
4690 ncx_get_progname (void);
4691
4692
4699extern boolean
4701
4702
4710extern boolean
4711 ncx_check_inline_data_state (const xmlChar *line,
4712 boolean curstate);
4713
4714 // END ncxlib/ncxutil/ncxutilgen
4716
4717
4718
4719// Heading Only
4744extern void
4745 ncx_set_cur_modQ (dlq_hdr_t *que);
4746
4747
4751extern void
4752 ncx_reset_modQ (void);
4753
4754
4769extern void
4770 ncx_set_session_modQ (dlq_hdr_t *que);
4771
4772
4778extern dlq_hdr_t *
4779 ncx_get_session_modQ (void);
4780
4781
4794extern void
4796
4797
4803extern void
4804 ncx_set_temp_modQ (dlq_hdr_t *modQ);
4805
4806
4812extern dlq_hdr_t *
4813 ncx_get_temp_modQ (void);
4814
4815
4820extern void
4821 ncx_clear_temp_modQ (void);
4822
4823
4824 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfq
4826
4827
4844extern status_t
4846
4847
4853extern void
4855
4856
4863extern status_t
4865
4866
4872extern void
4874
4875
4882extern status_t
4884
4885
4891extern void
4893
4894
4901extern void
4903 obj_template_t *obj);
4904
4905
4911extern void
4913
4914
4921extern const xmlChar *
4923
4924 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfcb
4926
4943extern void
4944 ncx_set_warn_idlen (uint32 warnlen);
4945
4946
4952extern uint32
4953 ncx_get_warn_idlen (void);
4954
4955
4961extern void
4962 ncx_set_warn_linelen (uint32 warnlen);
4963
4964
4970extern uint32
4971 ncx_get_warn_linelen (void);
4972
4973
4983extern void
4985 ncx_module_t *mod,
4986 const xmlChar *id);
4987
4988
4998extern void
5000 ncx_module_t *mod,
5001 const xmlChar *line);
5002
5003
5010extern status_t
5012
5013
5020extern status_t
5022
5023
5030extern status_t
5032
5033
5039extern void
5040 ncx_set_warn_error (boolean val);
5041
5042
5048extern void
5049 ncx_set_warn_off_yang (boolean val);
5050
5051
5057extern boolean
5058 ncx_get_warn_off_yang (void);
5059
5067extern boolean
5069
5070
5078extern boolean
5080
5081
5088extern void
5090
5091
5107extern void
5108 ncx_set_top_mandatory_allowed (boolean allowed);
5109
5110
5117extern boolean
5119
5120
5130extern boolean
5132
5133
5139extern void
5140 ncx_set_module_setid (uint32 new_setid);
5141
5142
5148extern uint32
5149 ncx_get_module_setid (void);
5150
5151
5161extern status_t
5162 ncx_sprintf_module_setid (uint32 id,
5163 xmlChar *buff,
5164 int32 buffsize);
5165
5166
5173extern boolean
5175
5176
5183extern void
5184 ncx_set_empty_npcon_presence (boolean val);
5185
5186
5196extern boolean
5198
5199
5210extern void
5211 ncx_set_empty_npcon_presence_ro (boolean val);
5212
5213
5214
5215
5216 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfset
5218
5219
5220
5221
5222 // BEGIN ncxlib/ncxutil/ncxbackptr
5237
5238
5245extern ncx_backptr_t *
5246 ncx_new_backptr (void *node);
5247
5248
5255extern void
5257
5258
5269extern void
5271
5272
5278extern void
5279 ncx_clean_backptrQ (dlq_hdr_t *backptrQ);
5280
5281
5288extern void
5289 ncx_clean_mbackptrQ (dlq_hdr_t *backptrQ);
5290
5291
5298extern ncx_backptr_t *
5299 ncx_first_backptr (dlq_hdr_t *que);
5300
5301
5308extern const ncx_backptr_t *
5309 ncx_first_const_backptr (const dlq_hdr_t *que);
5310
5311
5318extern ncx_backptr_t *
5319 ncx_last_backptr (dlq_hdr_t *que);
5320
5321
5328extern ncx_backptr_t *
5330
5337extern const ncx_backptr_t *
5338 ncx_next_const_backptr (const ncx_backptr_t *curptr);
5339
5340
5347extern ncx_backptr_t *
5349
5350
5357extern void *
5359
5360
5367extern const void *
5369
5370
5376extern void
5378
5379
5387extern ncx_backptr_t *
5388 ncx_find_backptr (const dlq_hdr_t *que,
5389 void *node);
5390
5391
5392
5393 // END ncxlib/ncxutil/ncxbackptr
5395
5396
5418extern ncx_save_deviations_t *
5419 ncx_find_save_deviations (const xmlChar *deviname,
5420 dlq_hdr_t *deviationQ);
5421
5422
5428extern void
5430
5431
5440extern boolean
5441 ncx_ok_skip_deviation_module (const xmlChar *modname,
5442 dlq_hdr_t *save_deviationsQ);
5443
5444
5445 // END ncxlib/yang/yangdata/yangdeviation
5447
5448
5449
5450 // BEGIN ncxlib/ncxutil/ncxutilfile
5458
5459
5465extern void
5466 ncx_socket_close (int fd);
5467
5478extern void
5479 ncx_socket_close_noerr (int fd);
5480
5481
5487extern void
5488 ncx_file_close (FILE *fp);
5489
5490
5498extern status_t
5499 ncx_file_remove (const xmlChar *filespec,
5500 boolean do_warn);
5501
5502
5511extern status_t
5512 ncx_file_rename (const xmlChar *old_filespec,
5513 const xmlChar *new_filespec,
5514 boolean do_warn);
5515
5516
5524 extern status_t
5525 ncx_file_flush (FILE *fp,
5526 boolean do_warn);
5527
5528
5536extern status_t
5537 ncx_file_copy (const xmlChar *src_filespec,
5538 const xmlChar *dst_filespec);
5539
5540
5549extern status_t
5550 ncx_file_buffcopy (const xmlChar *src_buff,
5551 uint32 src_bufflen,
5552 const xmlChar *dst_filespec);
5553
5554
5563extern status_t
5564 ncx_file_size (const char *filespec,
5565 uint32 *siz);
5566
5567
5577extern status_t
5578 ncx_file_to_buffer (const char *filespec,
5579 xmlChar **outbuff);
5580
5588extern status_t
5589 ncx_buffer_to_file (const char *filespec,
5590 const xmlChar *inbuff);
5591
5592
5602extern status_t
5603 ncx_get_temp_filespec (xmlChar *buff,
5604 uint32 bufflen,
5605 const xmlChar *rootpart,
5606 const xmlChar *ext);
5607
5608
5618extern ncx_modcache_t *
5619 ncx_new_modcache (const xmlChar *modname,
5620 boolean hidemod);
5621
5622
5628extern void
5630
5631
5632 // END ncxlib/ncxutil/ncxutilfile
5634
5635
5636
5648extern void ncx_set_use_return_status (void);
5649
5650
5651
5657extern boolean ncx_use_return_status (void);
5658
5659
5666extern ncx_bad_reply_enum
5667 ncx_get_handle_badreply_enum (const xmlChar *valstr);
5668
5669
5676extern const xmlChar *
5678
5679
5685extern void
5687
5688
5694extern ncx_bad_reply_enum
5696
5697
5706extern boolean
5708
5709
5710
5720extern ncx_etag_t
5722
5723
5730extern const xmlChar *
5732
5733
5740extern uint16
5742
5743
5749extern dlq_hdr_t *
5750 ncx_get_rootQ (void);
5751
5752
5758extern ncx_sm_rootcb_t *
5759 ncx_first_rootcb (void);
5760
5761
5769extern ncx_sm_rootcb_t *
5771
5772
5783extern boolean
5784 ncx_is_sm_mode (void);
5785
5786
5797extern void
5798 ncx_set_sm_mode (boolean val);
5799
5800
5808extern ncx_sm_rootcb_t *
5809 ncx_get_cur_rootcb (void);
5810
5811
5819extern void
5821
5822
5830extern obj_template_t *
5832
5833
5834
5845extern boolean
5846 ncx_get_sm_enabled (void);
5847
5848
5854extern void
5855 ncx_set_sm_enabled (boolean val);
5856
5862extern boolean
5863 ncx_yang_cbor_enabled (void);
5864
5870extern unsigned short
5872
5873
5879extern void
5880 ncx_set_tcp_connect_timeout (unsigned short timeout_sec);
5881
5882
5891extern ncx_module_t *
5892 ncx_find_module_que_all (dlq_hdr_t *modQ,
5893 const xmlChar *modname,
5894 const xmlChar *revision);
5904extern void
5905 ncx_invoke_load_callbacks (ncx_module_t *mod);
5906
5915extern void
5916 ncx_redo_loadmod_all (void);
5917
5918
5924extern void
5926
5927
5933extern boolean
5935
5941extern void
5943
5944
5951extern boolean
5952 ncx_save_error_input (void);
5953
5959extern void
5961
5969extern boolean
5970 ncx_mod_parse_done (const ncx_module_t *mod);
5971
5972
5979extern status_t ncx_set_chunk_size (uint16 chunksize);
5980
5981
5987extern uint16 ncx_get_chunk_size (void);
5988
5989
6002extern const xmlChar *
6003 ncx_get_real_notif_modname (const xmlChar *modname,
6004 const xmlChar *name);
6005
6006
6019extern const xmlChar *
6020 ncx_get_fake_notif_modname (const xmlChar *modname,
6021 const xmlChar *name);
6022
6023
6038extern void
6039 ncx_set_mod_stable (boolean state);
6040
6041
6048extern boolean
6049 ncx_get_mod_stable (void);
6050
6051 // END ncxlib/ncxutil/ncxutilfile
6053
6054#ifdef __cplusplus
6055} /* end extern 'C' */
6056#endif
6057
6058#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:13199
void ncx_free_mbackptr(ncx_backptr_t *ptr)
Free an ncx_backptr_t struct; Free the 'node' pointer first.
Definition: ncx.c:13118
void ncx_clean_backptrQ(dlq_hdr_t *backptrQ)
Clean an entire Q of ncx_backptr_t structs.
Definition: ncx.c:13137
ncx_backptr_t * ncx_first_backptr(dlq_hdr_t *que)
Get first back pointer struct.
Definition: ncx.c:13180
ncx_backptr_t * ncx_new_backptr(void *node)
Malloc and initialize a new ncx_backptr_t struct.
Definition: ncx.c:13079
ncx_backptr_t * ncx_next_backptr(ncx_backptr_t *curptr)
Get next back pointer struct.
Definition: ncx.c:13237
ncx_backptr_t * ncx_last_backptr(dlq_hdr_t *que)
Get last back pointer struct.
Definition: ncx.c:13218
ncx_backptr_t * ncx_find_backptr(const dlq_hdr_t *que, void *node)
Find the specified back pointer struct.
Definition: ncx.c:13351
void * ncx_get_backptr_node(ncx_backptr_t *backptr)
Get the back pointer node pointer.
Definition: ncx.c:13294
void ncx_free_backptr(ncx_backptr_t *ptr)
Free an ncx_backptr_t struct.
Definition: ncx.c:13100
ncx_backptr_t * ncx_prev_backptr(ncx_backptr_t *curptr)
Get previous back pointer struct.
Definition: ncx.c:13275
const void * ncx_get_const_backptr_node(const ncx_backptr_t *backptr)
Get the back pointer node pointer CONST.
Definition: ncx.c:13313
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:13159
const ncx_backptr_t * ncx_next_const_backptr(const ncx_backptr_t *curptr)
Get next back pointer struct CONST.
Definition: ncx.c:13256
void ncx_remove_backptr(ncx_backptr_t *ptr)
Remove the specified backptr for deletion.
Definition: ncx.c:13331
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:14960
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:13505
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:13405
obj_template_t * ncx_get_yang_insert(void)
Get the object template for the YANG insert attribute.
Definition: ncx.c:7856
obj_template_t * ncx_get_yang_value(void)
Get the object template for the YANG value attribute.
Definition: ncx.c:7882
obj_template_t * ncx_get_gen_root(void)
Get the object template for the NCX generic root container.
Definition: ncx.c:7813
obj_template_t * ncx_get_gen_empty(void)
Get the object template for the NCX generic empty leaf.
Definition: ncx.c:7799
obj_template_t * ncx_get_gen_container(void)
Get the object template for the NCX generic container.
Definition: ncx.c:7771
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:13472
obj_template_t * ncx_get_yang_key(void)
Get the object template for the YANG key attribute.
Definition: ncx.c:7869
obj_template_t * ncx_get_gen_leaflist(void)
Get the object template for the NCX generic leaf-list string.
Definition: ncx.c:7843
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:13439
obj_template_t * ncx_get_gen_anyxml(void)
Get the object template for the NCX generic anyxml container.
Definition: ncx.c:7757
obj_template_t * ncx_get_gen_binary(void)
Get the object template for the NCX generic binary leaf.
Definition: ncx.c:7828
obj_template_t * ncx_get_gen_string(void)
Get the object template for the NCX generic string leaf.
Definition: ncx.c:7785
boolean ncx_get_pidfile_cleaned(void)
Get the PID file cleaned flag.
Definition: ncx.c:17021
const xmlChar * ncx_get_subsys_id(void)
Get the subsys_id value; NULL if not set.
Definition: ncx.c:14445
boolean ncx_get_startup_prune(void)
Get the startup_prune flag.
Definition: ncx.c:17110
boolean ncx_need_get2_xpath(void)
Check if GET2 callback support needed in XPath.
Definition: ncx.c:15761
boolean ncx_is_with_snmp(void)
Get the with_snmp value.
Definition: ncx.c:16081
boolean ncx_get_search_modQ_ok(void)
Get the search_modQ_ok flag.
Definition: ncx.c:14411
void ncx_set_sil_priority_used(void)
Flag that an object set a non-default SIL priority.
Definition: ncx.c:14899
ncx_backptr_t * ncx_first_objptr(void)
Get the first object pointer.
Definition: ncx.c:14522
boolean ncx_netconfd_running(void)
Check if netconfd running.
Definition: ncx.c:13553
boolean ncx_data_templates_ok(void)
Get the use-data-templates flag.
Definition: ncx.c:14240
uint32 ncx_get_binary_display_maxlen(void)
Get the binary_display_maxlen parameter.
Definition: ncx.c:16859
void ncx_set_binary_display_maxlen(uint32 val)
Set the binary_display_maxlen parameter.
Definition: ncx.c:16843
boolean ncx_get_leaflist_deleteall_ok(void)
Get the leaflist_deleteall_ok flag.
Definition: ncx.c:17271
void ncx_set_base_schema(void)
Set the base_schema_set flag to true.
Definition: ncx.c:15104
boolean ncx_get_sethook_registered(void)
Check if the Set-Hook callbacks were registered.
Definition: ncx.c:16808
uint32 ncx_get_vtimeout_value(void)
Get the virtual node cache timeout value.
Definition: ncx.c:11628
void ncx_set_max_strlen(int32 num)
Set the –max-strlen parameter.
Definition: ncx.c:16945
void ncx_set_protocol_disabled(ncx_protocol_t proto)
Set the specified protocol version to be disabled.
Definition: ncx.c:11960
status_t ncx_set_all_obj_xpath_backptrs(void)
Add Xpath back pointers to the data-db objects in the database.
Definition: ncx.c:13019
void ncx_set_save_owners(boolean val)
Set the save_owners flag.
Definition: ncx.c:17342
void ncx_set_trim_whitespace(boolean val)
Set the trim_whitespace flag.
Definition: ncx.c:17062
boolean ncx_get_secondary_sil_priority_used(void)
Get the secondary_sil_priority_used flag.
Definition: ncx.c:14947
boolean ncx_protocol_enabled(ncx_protocol_t proto)
Check if the specified protocol version is enabled.
Definition: ncx.c:11840
ncx_sort_type_t ncx_get_system_sort_type(void)
Get the system_sort_type value.
Definition: ncx.c:11766
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:17290
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:11824
boolean ncx_get_with_canonical(void)
Get the with_canonical flag.
Definition: ncx.c:17328
void ncx_set_ypwatcher_running(void)
Set the ypwatcher running flag.
Definition: ncx.c:16975
void ncx_set_db_lock_init_done(boolean val)
Set if the <db-lock-init> message was processed by the server.
Definition: ncx.c:16929
boolean ncx_use_objptrs(void)
Get the use_objptrs flag.
Definition: ncx.c:14507
ncx_display_mode_t ncx_get_display_mode(void)
Get the current default display mode.
Definition: ncx.c:11340
boolean ncx_get_system_sorted(void)
Get the system_sorted value.
Definition: ncx.c:11731
void ncx_set_config_state(ncx_config_state_t val)
Set the config_state flag.
Definition: ncx.c:17124
boolean ncx_get_save_owners(void)
Get the save_owners flag.
Definition: ncx.c:17359
boolean ncx_is_add_toplevel_default_mode(void)
Get the add_toplevel_default_mode value.
Definition: ncx.c:16049
void ncx_set_leaflist_deleteall_ok(boolean val)
Set the leaflist_deleteall_ok flag.
Definition: ncx.c:17254
boolean ncx_use_xpath_backptrs(void)
Check if it is OK to use XPath back pointers or not.
Definition: ncx.c:13003
void ncx_ignore_missing_vars(boolean enabled)
Set the ignore-missing-vars flag.
Definition: ncx.c:14253
void ncx_set_getbulk_max(uint32 max_entries)
Set the max_entries parameter for GET2 callbacks.
Definition: ncx.c:14831
void ncx_set_list_deleteall_ok(boolean val)
Set the list_deleteall_ok flag.
Definition: ncx.c:17223
void ncx_set_system_sorted(boolean val)
Set the system_sorted value.
Definition: ncx.c:11750
status_t ncx_set_bestmatch(void)
Setup the bestmatch module versions, if enabled.
Definition: ncx.c:16199
void ncx_set_with_dblock(boolean val)
Set the is_with_dblock value.
Definition: ncx.c:16893
void ncx_set_search_modQ_ok(void)
Set the search_modQ_ok flag to TRUE.
Definition: ncx.c:14399
void ncx_set_add_toplevel_default_mode(boolean val)
Set the add_toplevel_default_mode value.
Definition: ncx.c:16065
status_t ncx_set_subsys_id(const xmlChar *id)
Set the subsys_id parameter for this subsystem.
Definition: ncx.c:14422
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:16776
void ncx_set_startup_prune(boolean val)
Set the startup_prune flag.
Definition: ncx.c:17093
int8 ncx_get_message_indent(void)
Get the protoco9l output indent amount.
Definition: ncx.c:12428
ncx_config_state_t ncx_get_config_state(void)
Get the config_state flag.
Definition: ncx.c:17141
void ncx_enable_bestmatch(void)
Enable the bestmatch import processing feature.
Definition: ncx.c:16168
boolean ncx_is_db_lock_init_done(void)
Check if the <db-lock-init> message was processed by the server.
Definition: ncx.c:16912
boolean ncx_get_bestmatch(void)
Get the bestmatch module versions, if enabled.
Definition: ncx.c:16181
boolean ncx_base_schema_set(void)
Check if the base schema features have been set yet.
Definition: ncx.c:15092
boolean ncx_get_ypwatcher_running(void)
Get the ypwatcher running flag.
Definition: ncx.c:16991
int32 ncx_get_max_strlen(void)
Get the –max-strlen parameter.
Definition: ncx.c:16961
void ncx_set_useprefix(boolean val)
Set the use_prefix value.
Definition: ncx.c:11714
boolean ncx_get_xmlorder(void)
Get the xmlorder flag.
Definition: ncx.c:17209
void ncx_set_protocol_enabled(ncx_protocol_t proto)
Set the specified protocol version to be enabled.
Definition: ncx.c:11923
boolean ncx_is_with_dblock(void)
Get the is_with_dblock value.
Definition: ncx.c:16876
void ncx_set_ycontrol_running(void)
Set the ycontrol_running flag to TRUE.
Definition: ncx.c:14387
void ncx_set_pidfile_cleaned(void)
Set the pidfile cleaned flag.
Definition: ncx.c:17005
void ncx_set_with_snmp(boolean val)
Set the with_snmp value.
Definition: ncx.c:16098
void ncx_set_with_ocpattern(boolean mode)
Set the openconfig pattern mode for the entire system.
Definition: ncx.c:16034
void ncx_set_xmlorder(boolean val)
Set the xmlorder flag.
Definition: ncx.c:17192
void ncx_set_system_sort_type(ncx_sort_type_t val)
Set the system_sort_type value.
Definition: ncx.c:11785
boolean ncx_missing_vars_ok(void)
Get the ignore-missing-vars flag.
Definition: ncx.c:14266
boolean ncx_get_useprefix(void)
Get the use_prefix value.
Definition: ncx.c:11696
boolean ncx_get_sil_priority_used(void)
Get the sil_priority_used flag.
Definition: ncx.c:14912
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:16791
void ncx_set_use_deadmodQ(void)
Set the usedeadmodQ flag.
Definition: ncx.c:12189
void ncx_set_message_indent(int8 msg_indent)
Set the protocol output message indent amount.
Definition: ncx.c:12444
boolean ncx_get_list_deleteall_ok(void)
Get the list_deleteall_ok flag.
Definition: ncx.c:17240
void ncx_use_data_templates(boolean enabled)
Set the use-data-templates flag.
Definition: ncx.c:14227
boolean ncx_get_trim_whitespace(void)
Get the trim_whitespace flag.
Definition: ncx.c:17079
boolean ncx_fastpath_enabled(void)
Check if fast path value tree comparisons enabled.
Definition: ncx.c:13537
void ncx_set_with_canonical(boolean val)
Set the with_canonical flag.
Definition: ncx.c:17311
ncx_backptr_t * ncx_next_objptr(ncx_backptr_t *curptr)
Get the next object pointer.
Definition: ncx.c:14541
void ncx_set_sethook_registered(boolean val)
Set the sethook_registered value.
Definition: ncx.c:16826
uint32 ncx_get_getbulk_max(void)
Get the max_entries parameter for GET2 callbacks.
Definition: ncx.c:14843
void ncx_set_secondary_sil_priority_used(void)
Flag that a value node set a non-default secondary SIL priority.
Definition: ncx.c:14931
boolean ncx_check_startup_prune(ses_cb_t *scb)
Check if the namespace error can be skipped.
Definition: ncx.c:17162
void ncx_set_use_objptrs(void)
Set the use_objptrs flag.
Definition: ncx.c:14491
void ncx_cleanup(void)
Cleanup the NCX library.
Definition: ncx.c:3403
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:2924
const xmlChar * ncx_get_display_mode_str(ncx_display_mode_t dmode)
Get the string for the specified enum value.
Definition: ncx.c:10441
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:12340
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:14703
const xmlChar * ncx_get_yang_version_str(ncx_yang_version_t langver)
Get the yang-version string value for the enum.
Definition: ncx.c:14855
const xmlChar * ncx_get_btyp_string(ncx_btype_t btyp)
Get the enumeration string to the base type enum.
Definition: ncx.c:14102
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:8571
const xmlChar * ncx_get_protocols_enabled(uint16 flags)
Get the string for the NETCONF protocols enabled in the flags.
Definition: ncx.c:12088
status_t ncx_str2txid(const xmlChar *str, ncx_transaction_id_t *txid)
Convert a string to a ncx_transaction_id_t.
Definition: ncx.c:13957
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:14766
const xmlChar * ncx_get_baddata_string(ncx_bad_data_t baddata)
Get the string for the specified enum value.
Definition: ncx.c:9969
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:12263
ncx_withdefaults_t ncx_get_withdefaults_enum(const xmlChar *withdefstr)
Get the enum for the specified string value.
Definition: ncx.c:10037
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:8523
const xmlChar * ncx_get_protocol_name(ncx_protocol_t proto)
Get the name string for the protocol.
Definition: ncx.c:12128
const xmlChar * ncx_get_withdefaults_string(ncx_withdefaults_t withdef)
Get the string for the specified enum value.
Definition: ncx.c:10003
status_t ncx_txid2str(ncx_transaction_id_t *txid, xmlChar **retbuff)
Convert a transaction ID to a string.
Definition: ncx.c:13994
const xmlChar * ncx_get_access_str(ncx_access_t max_access)
Get the string name of a ncx_access_t enum.
Definition: ncx.c:8549
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:12302
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:8020
const xmlChar * ncx_get_confirm_event_str(ncx_confirm_event_t event)
Get the string for the specified enum value.
Definition: ncx.c:11360
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:8049
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:8498
ncx_msg_encoding_t ncx_cvt_encoding_yang_str(const xmlChar *msg_encoding)
Convert a ncx_msg_encoding_t string to its YANG enum.
Definition: ncx.c:14799
boolean ncx_is_false(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:8869
const xmlChar * ncx_cvt_encoding_yang_enum(ncx_msg_encoding_t msg_encoding)
Convert an ncx_msg_encoding_t enum to a YANG string.
Definition: ncx.c:14735
const xmlChar * ncx_get_ses_event_str(ncx_ses_event_t ses_event)
Get the session event string for the enum.
Definition: ncx.c:17037
const xmlChar * ncx_get_layer(ncx_layer_t layer)
Translate ncx_layer_t enum to a string.
Definition: ncx.c:7899
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:9933
boolean ncx_is_true(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:8843
int32 ncx_get_withdefaults_value(const xmlChar *withdefstr)
Get the YANG integer value for the enum for the specified string value.
Definition: ncx.c:10072
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:7964
ncx_display_mode_t ncx_get_display_mode_enum(const xmlChar *dmstr)
Get the enum for the specified string value.
Definition: ncx.c:10397
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:584
uint32 ncx_etag_t
The ETag used in RESTCONF messages is the lower 32 bits of a ncx_transaction_id_t.
Definition: ncxtypes.h:750
ncx_ses_event_t
internal enumerations for session event types
Definition: ncxtypes.h:1684
ncx_confirm_event_t
type of confirmEvent in the sysConfirmedCommit notification Used in confirmed-commit standard as well
Definition: ncxtypes.h:1496
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:1423
ncx_sort_type_t
the sort type enumeration used for system-ordered list aand leaf-list objects
Definition: ncxtypes.h:1782
ncx_cvttyp_t
enumeration for different NCX module conversion output types
Definition: ncxtypes.h:1236
ncx_yang_version_t
enumeration for different YANG language versions
Definition: ncxtypes.h:993
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:729
ncx_msg_encoding_t
enumeration for message encoding formats
Definition: ncxtypes.h:648
ncx_protocol_t
NCX session protocol versions supported.
Definition: ncxtypes.h:980
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:1403
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:1531
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:1739
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:1535
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:1546
ncx_opt_t
enum for REQUIRED vs.
Definition: ncxtypes.h:1331
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:595
ncx_name_match_t
Node name match modes.
Definition: ncxtypes.h:696
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:720
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:1444
ncx_xpath_type_t
enumeration for different XPath back pointer types
Definition: ncxtypes.h:1268
ncx_config_state_t
server config state Root Check
Definition: ncxtypes.h:1692
ncx_display_mode_t
enumeration of val_dump_value display modes Some RESTCONF code uses this field incorrectly for messag...
Definition: ncxtypes.h:618
ncx_withdefaults_t
enum for with-defaults enum values
Definition: ncxtypes.h:1259
void(* ncx_load_cbfn_t)(ncx_module_t *mod)
user function callback template when a module is loaded into the system
Definition: ncxtypes.h:1389
status_t ncx_file_rename(const xmlChar *old_filespec, const xmlChar *new_filespec, boolean do_warn)
Rename a file; check result.
Definition: ncx.c:15292
ncx_modcache_t * ncx_new_modcache(const xmlChar *modname, boolean hidemod)
New ncx_modcache_t record.
Definition: ncx.c:16446
status_t ncx_file_remove(const xmlChar *filespec, boolean do_warn)
Close a file; check result.
Definition: ncx.c:15258
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:15490
void ncx_socket_close_noerr(int fd)
Close a socket; check result; SUPPRESS ERROR MESSAGE.
Definition: ncx.c:15181
void ncx_file_close(FILE *fp)
Close a file; check result.
Definition: ncx.c:15231
void ncx_socket_close(int fd)
Close a socket; check result.
Definition: ncx.c:15206
status_t ncx_file_to_buffer(const char *filespec, xmlChar **outbuff)
Read a text file into a malloced buffer.
Definition: ncx.c:16277
status_t ncx_file_size(const char *filespec, uint32 *siz)
Get a file size.
Definition: ncx.c:16234
status_t ncx_buffer_to_file(const char *filespec, const xmlChar *inbuff)
Write a buffer to a text file.
Definition: ncx.c:16354
status_t ncx_file_copy(const xmlChar *src_filespec, const xmlChar *dst_filespec)
Copy a file; check result.
Definition: ncx.c:15385
void ncx_free_modcache(ncx_modcache_t *mc)
Free a ncx_modcache_t record.
Definition: ncx.c:16475
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:15332
status_t ncx_get_temp_filespec(xmlChar *buff, uint32 bufflen, const xmlChar *rootpart, const xmlChar *ext)
Generate a temporary filespec.
Definition: ncx.c:16500
ncx_sm_rootcb_t * ncx_get_cur_rootcb(void)
Gte the current root control block value.
Definition: ncx.c:17674
void ncx_redo_loadmod_all(void)
Set the redo_loadmod flag for all modules.
Definition: ncx.c:17903
void ncx_set_cur_rootcb(ncx_sm_rootcb_t *rootcb)
Set the current root control block.
Definition: ncx.c:17692
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:17539
boolean ncx_is_sm_mode(void)
Check if the Schema Mount mode is enabled.
Definition: ncx.c:17643
boolean ncx_protocol_is_netconf(ncx_protocol_t proto)
Check if the protocol is a NETCONF protocol.
Definition: ncx.c:12167
void ncx_set_handle_badreply(ncx_bad_reply_enum enumval)
Set the enum value for the Bad Reply handling option.
Definition: ncx.c:17476
void ncx_set_mod_augmented(ncx_module_t *mod)
Set the module as supported because it is being augmented.
Definition: ncx.c:18002
obj_template_t * ncx_get_cur_rootcb_obj(void)
Get the current root control block object.
Definition: ncx.c:17710
void ncx_set_disable_imported(void)
Allow the obj_is_enabled funtion to disable all import-only modules.
Definition: ncx.c:17941
boolean ncx_ok_for_inline_data(obj_template_t *obj)
Check if the object is OK for inline data.
Definition: ncx.c:16556
void ncx_set_sm_enabled(boolean val)
Set schema mount enabled flag.
Definition: ncx.c:17747
int32 ncx_compare_base_uris(const xmlChar *str1, const xmlChar *str2)
Compare the base part of 2 URI strings.
Definition: ncx.c:11650
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:16578
status_t ncx_get_version(xmlChar *buffer, uint32 buffsize)
Get the the Yuma version ID string.
Definition: ncx.c:10981
boolean ncx_use_return_status(void)
Check if the return_status should be returned.
Definition: ncx.c:17405
ncx_bad_reply_enum ncx_get_handle_badreply(void)
Get the enum for the Bad Reply Handling option.
Definition: ncx.c:17489
unsigned short ncx_get_tcp_connect_timeout(void)
Get the configured TCP connect timeout value.
Definition: ncx.c:17782
void ncx_set_sm_mode(boolean val)
Set the Schema Mount mode.
Definition: ncx.c:17659
ncx_etag_t ncx_txid2etag(ncx_transaction_id_t txid)
Cast ncx_txid_t to ncx_etag_t.
Definition: ncx.c:17523
boolean ncx_find_ydtrace(const xmlChar *fspec)
Find the filespec of a yangdump file being processed.
Definition: ncx.c:14208
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:9899
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:17970
const char * ncx_get_progname(void)
Get the progname buffer.
Definition: ncx.c:16116
boolean ncx_mod_parse_done(const ncx_module_t *mod)
Check if the module is completely parsed yet.
Definition: ncx.c:17923
void ncx_set_use_return_status(void)
Enable the return_status parameter.
Definition: ncx.c:17394
boolean ncx_disable_imported_ok(void)
Check if disable all import-only modules OK.
Definition: ncx.c:17954
boolean ncx_get_mod_stable(void)
Get the yangcli flag to indicate the module set loading modules from the server capabilities is in pr...
Definition: ncx.c:18149
status_t ncx_get_feature_code(xmlChar *buffer, uint32 buffsize)
Get the the Feature Code String.
Definition: ncx.c:10873
void ncx_set_tcp_connect_timeout(unsigned short timeout_sec)
Set the configured TCP connect timeout value.
Definition: ncx.c:17798
ncx_sm_rootcb_t * ncx_next_rootcb(ncx_sm_rootcb_t *rootcb)
Get the next Mount Point Entry in the rootcbQ.
Definition: ncx.c:17624
xmlChar * ncx_get_source(const xmlChar *fspec, status_t *res)
Expand a filespec into an absolute path.
Definition: ncx.c:9544
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:17985
boolean ncx_yang_cbor_enabled(void)
Get the YANG to CBOR Code enabled flag.
Definition: ncx.c:17763
status_t ncx_add_ydtrace(const xmlChar *fspec)
Add the filespec of a yangdump file being processed.
Definition: ncx.c:14182
status_t ncx_get_semver(xmlChar *buffer, uint32 buffsize)
Get the the Yuma SEMVER version ID string.
Definition: ncx.c:11089
ncx_sm_rootcb_t * ncx_first_rootcb(void)
Get the first Mount Point Control Block Entry in the rootcbQ.
Definition: ncx.c:17609
boolean ncx_library_mode_ok(const xmlChar *modname, const xmlChar *rpcname)
Check if RPC OK to use in library mode.
Definition: ncx.c:15124
status_t ncx_create_pidfile(const xmlChar *progname, boolean fileloc_fhs)
Create the pidfile for the specified program.
Definition: ncx.c:13574
void ncx_write_tracefile(const char *buff, uint32 count)
Write a byte to the tracefile.
Definition: ncx.c:12376
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:12002
uint16 ncx_get_chunk_size(void)
Get the default chunk size for session buffers.
Definition: ncx.c:18037
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:17818
xmlChar * ncx_get_source_ex(const xmlChar *fspec, boolean expand_cwd, status_t *res)
Expand a filespec into an absolute path.
Definition: ncx.c:9335
boolean ncx_conf_env_vars_enabled(void)
Get the Config Environment Variable Replacement flag.
Definition: ncx.c:17505
uint16 ncx_get_curQ_mod_count(void)
Get the total count of the currently fully loaded modules in the ncx_curQ.
Definition: ncx.c:17570
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:14286
boolean ncx_val_protocol_enabled(ncx_protocol_t proto, uint16 flags)
Check if the specified protocol version is enabled.
Definition: ncx.c:11883
boolean ncx_get_sm_enabled(void)
Get schema mount enabled flag.
Definition: ncx.c:17731
status_t ncx_set_chunk_size(uint16 chunksize)
Set the default chunk size for session buffers.
Definition: ncx.c:18020
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:17423
status_t ncx_get_full_version(xmlChar *buffer, uint32 buffsize)
Get the the Yuma version ID string and SEMVER added.
Definition: ncx.c:11128
const char * ncx_get_build_date(void)
Get the build date string encoded into this C file.
Definition: ncx.c:11167
const xmlChar * ncx_get_handle_badreply_string(ncx_bad_reply_enum badreply)
Get the string for the specified enum value.
Definition: ncx.c:17451
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:12045
dlq_hdr_t * ncx_get_rootQ(void)
Get the Root control block queue.
Definition: ncx.c:17596
const xmlChar * ncx_get_fake_notif_modname(const xmlChar *modname, const xmlChar *name)
check RESTCONF modname and convert to fake module name Used by JSON decoder.
Definition: ncx.c:18094
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:12475
void ncx_set_mod_stable(boolean state)
Set the yangcli flag to indicate the module set loading modules from the server capabilities is in pr...
Definition: ncx.c:18131
const xmlChar * ncx_get_real_notif_modname(const xmlChar *modname, const xmlChar *name)
check fake notification object and get RESTCONF modname if found.
Definition: ncx.c:18061
void ncx_free_binary(ncx_binary_t *binary)
Free all the memory in a ncx_binary_t struct.
Definition: ncx.c:6744
ncx_binary_t * ncx_new_binary(void)
Malloc and fill in a new ncx_binary_t struct.
Definition: ncx.c:6681
void ncx_init_binary(ncx_binary_t *binary)
Init the memory of a ncx_binary_t struct.
Definition: ncx.c:6702
void ncx_clean_binary(ncx_binary_t *binary)
Scrub the memory of a ncx_binary_t but do not delete it.
Definition: ncx.c:6722
void ncx_clean_bit(ncx_bit_t *bit)
Scrub the memory of a ncx_bit_t but do not delete it.
Definition: ncx.c:7574
void ncx_init_bit(ncx_bit_t *bit)
Init the memory of a ncx_bit_t.
Definition: ncx.c:7552
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:7599
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:8171
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:8320
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:8292
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:8149
void ncx_free_errmsg(ncx_errmsg_t *msg)
Clean and free an ncx_errmsg_t struct.
Definition: ncx.c:16695
ncx_errmsg_t * ncx_new_errmsg(status_t res, const xmlChar *str)
Malloc and init an ncx_errmsg_t struct.
Definition: ncx.c:16667
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:8416
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:4424
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:4853
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:11267
boolean ncx_check_any_object_nolock_get(const xmlChar *objname)
Check if the object name will match any config=true nodes.
Definition: ncx.c:16732
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:5050
void ncx_clean_save_deviationsQ(dlq_hdr_t *savedevQ)
Clean a Q of deviation save structs.
Definition: ncx.c:11238
void ncx_free_save_deviations(ncx_save_deviations_t *savedev)
Free a deviation save struct.
Definition: ncx.c:11218
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:8077
void ncx_inc_warnings(ncx_module_t *mod)
Increment the module warning count for mod.
Definition: ncx.c:11801
status_t ncx_add_to_modQ(ncx_module_t *mod, dlq_hdr_t *modQ)
Add module to the current module Q.
Definition: ncx.c:5137
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:8903
void ncx_free_module(ncx_module_t *mod)
Free a YANG module.
Definition: ncx.c:3856
ncx_save_deviations_t * ncx_new_save_deviations(ncx_module_t *devmod, boolean annotation)
Create a deviation save structure.
Definition: ncx.c:11187
status_t ncx_parse_name(const xmlChar *str, uint32 *len)
Check if the next N chars represent a valid NcxName.
Definition: ncx.c:8807
status_t ncx_setup_mounted_mod(ncx_module_t *mod)
Setup a module for yangcli in parsemode in SM mode.
Definition: ncx.c:5225
boolean ncx_need_modchecks(const xmlChar *modname)
Check if xpath_backptr and obj commit tests needed.
Definition: ncx.c:15544
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:8961
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:9061
void ncx_free_node(ncx_node_t nodetyp, void *node)
Delete a node based on its type.
Definition: ncx.c:8450
const xmlChar * ncx_get_name_segment(const xmlChar *str, xmlChar *buff, uint32 buffsize)
Get the name string between the dots.
Definition: ncx.c:7929
ncx_tclass_t ncx_get_tclass(ncx_btype_t btyp)
Get the token class.
Definition: ncx.c:8600
ncx_module_t * ncx_new_module(void)
Malloc and initialize the fields in a ncx_module_t.
Definition: ncx.c:3584
status_t ncx_init_user_types(void)
Initialize the user types after ietf-inet-types module loaded.
Definition: ncx.c:16715
status_t ncx_add_to_root_modQ(ncx_module_t *mod)
Add module to the current module Q.
Definition: ncx.c:5166
boolean ncx_errinfo_set(const ncx_errinfo_t *errinfo)
Check if error-app-tag or error-message set.
Definition: ncx.c:9239
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:9181
ncx_errinfo_t * ncx_new_errinfo(void)
Malloc and init a new ncx_errinfo_t.
Definition: ncx.c:9140
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:9264
void ncx_init_errinfo(ncx_errinfo_t *err)
Init the fields in an ncx_errinfo_t struct.
Definition: ncx.c:9160
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:9216
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:7338
ncx_filptr_t * ncx_new_filptr(void)
Get a new ncx_filptr_t struct.
Definition: ncx.c:7301
ncx_revhist_t * ncx_new_revhist(void)
Create a revision history entry.
Definition: ncx.c:7369
ncx_revhist_t * ncx_find_revhist(const ncx_module_t *mod, const xmlChar *ver)
Search the revhistQ for a specified revision.
Definition: ncx.c:7418
void ncx_free_revhist(ncx_revhist_t *revhist)
Free a revision history entry.
Definition: ncx.c:7389
void ncx_clean_typnameQ(dlq_hdr_t *que)
Delete all the Q entries, of typname mapping structs.
Definition: ncx.c:7734
void ncx_free_typname(ncx_typname_t *typnam)
Free a typname struct.
Definition: ncx.c:7649
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:7672
ncx_typname_t * ncx_new_typname(void)
Malloc and init a typname struct.
Definition: ncx.c:7629
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:7704
void ncx_save_deviation_module(ncx_module_t *mod)
Save the deviations for the YANG module.
Definition: ncx.c:14644
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:14668
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:14607
void ncx_init_enum(ncx_enum_t *enu)
Init the memory of a ncx_enum_t.
Definition: ncx.c:7450
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:7523
void ncx_clean_enum(ncx_enum_t *enu)
Scrub the memory of a ncx_enum_t but do not delete it.
Definition: ncx.c:7472
int32 ncx_compare_enums(const ncx_enum_t *enu1, const ncx_enum_t *enu2)
Compare 2 enum values.
Definition: ncx.c:7497
boolean ncx_valid_name(const xmlChar *str, uint32 len)
Check if an xmlChar string is a valid YANG identifier value.
Definition: ncx.c:8695
boolean ncx_valid_name2(const xmlChar *str)
Check if an xmlChar string is a valid NCX name.
Definition: ncx.c:8740
boolean ncx_valid_name_ch(uint32 ch)
Check if the character is a valid YANG identifier chara.
Definition: ncx.c:8648
boolean ncx_valid_fname_ch(uint32 ch)
Check if an xmlChar is a valid NCX name string first char.
Definition: ncx.c:8672
ncx_identity_base_t * ncx_next_identity_base(ncx_identity_base_t *idbase)
Get the next base record for an identity.
Definition: ncx.c:6849
void ncx_free_identity_base(ncx_identity_base_t *identity_base)
Free a malloced ncx_identity_base_t struct.
Definition: ncx.c:6811
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:7035
ncx_identity_base_t * ncx_new_identity_base(void)
Get a new ncx_identity_base_t struct.
Definition: ncx.c:6791
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:13381
xmlns_id_t ncx_get_identity_nsid(const ncx_identity_t *identity)
Get the namespace ID for an identity.
Definition: ncx.c:7261
void ncx_free_identity(ncx_identity_t *identity)
Free a malloced ncx_identity_t struct.
Definition: ncx.c:6886
ncx_identity_t * ncx_new_identity(void)
Get a new ncx_identity_t struct.
Definition: ncx.c:6765
ncx_identity_base_t * ncx_first_identity_base(ncx_identity_t *identity)
Get the first base record for an identity.
Definition: ncx.c:6830
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:7231
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:6941
boolean ncx_get_identity_conditional(const ncx_identity_t *identity)
Check if the identity is conditional on if-feature.
Definition: ncx.c:7280
ncx_import_t * ncx_new_import(void)
Malloc and initialize the fields in a ncx_import_t.
Definition: ncx.c:6276
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:6365
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:6566
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:6428
void ncx_free_import(ncx_import_t *import)
Free an ncx_import_t.
Definition: ncx.c:6300
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:6398
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:6512
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:6450
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:6343
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:6482
ncx_include_t * ncx_new_include(void)
Malloc and initialize the fields in a ncx_include_t.
Definition: ncx.c:6591
void ncx_free_include(ncx_include_t *inc)
Free a ncx_include_t.
Definition: ncx.c:6615
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:6652
void ncx_clear_unload_callback(ncx_unload_cbfn_t cbfn)
Clear the callback function for an unload-module event.
Definition: ncx.c:9769
status_t ncx_set_load_callback(ncx_load_cbfn_t cbfn)
Set the callback function for a load-module event.
Definition: ncx.c:9662
void ncx_register_get_owner_fn(ncx_get_owner_fn_t cbfn)
Register a callback to get the owner name.
Definition: ncx.c:14460
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:9868
status_t ncx_set_unload_callback(ncx_unload_cbfn_t cbfn)
Set the callback function for an unload-module event.
Definition: ncx.c:9731
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:9800
void ncx_clear_load_callback(ncx_load_cbfn_t cbfn)
Clear the callback function for a load-module event.
Definition: ncx.c:9700
void ncx_clear_yang_obj_callback(ncx_yang_obj_cbfn_t cbfn)
Clear the callback function for a parse-object event.
Definition: ncx.c:9839
const xmlChar * ncx_get_owner_name(ncx_owner_id_t owner_id)
Get the registered YANG library owner namefor owner_id.
Definition: ncx.c:14475
dlq_hdr_t * ncx_get_session_modQ(void)
Get the current session modQ.
Definition: ncx.c:9622
void ncx_set_cur_modQ(dlq_hdr_t *que)
Set the current module Q to an alternate (for yangdiff)
Definition: ncx.c:9561
void ncx_clear_temp_modQ(void)
Clear the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:11324
void ncx_clear_session_modQ(void)
Clear the current session modQ.
Definition: ncx.c:9642
dlq_hdr_t * ncx_get_temp_modQ(void)
Get the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:11310
void ncx_set_temp_modQ(dlq_hdr_t *modQ)
Set the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:11294
void ncx_reset_modQ(void)
Set the current module Q to the original ncx_modQ.
Definition: ncx.c:9580
void ncx_set_session_modQ(dlq_hdr_t *que)
Get the session module Q.
Definition: ncx.c:9603
status_t ncx_turn_up_warning(status_t res)
Add a warning elevation entry.
Definition: ncx.c:10717
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:10552
void ncx_set_warn_error(boolean val)
Set the warn_error flag.
Definition: ncx.c:10734
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:12398
void ncx_set_warn_idlen(uint32 warnlen)
Set the warning length for identifiers.
Definition: ncx.c:10480
uint32 ncx_get_warn_idlen(void)
Get the warning length for identifiers.
Definition: ncx.c:10496
void ncx_set_empty_npcon_presence(boolean val)
Set the empty_npcon_presence value.
Definition: ncx.c:15704
void ncx_set_module_setid(uint32 new_setid)
Update YANG-LIBRARY module set ID.
Definition: ncx.c:15573
boolean ncx_get_empty_npcon_presence(void)
Get the empty_npcon_presence value.
Definition: ncx.c:15686
void ncx_set_warn_linelen(uint32 warnlen)
Set the warning length for YANG file lines.
Definition: ncx.c:10513
void ncx_set_warn_off_yang(boolean val)
Set the warn_off_yang flag.
Definition: ncx.c:10751
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:10595
status_t ncx_turn_off_warning(status_t res)
Add a warning suppression entry.
Definition: ncx.c:10654
boolean ncx_get_empty_npcon_presence_ro(void)
Get the empty_npcon_presence value READ-ONLY check.
Definition: ncx.c:15723
boolean ncx_get_warn_off_yang(void)
Get the warn_off_yang flag.
Definition: ncx.c:10768
boolean ncx_get_top_mandatory_allowed(void)
Check if top-level mandatory objects are allowed or not.
Definition: ncx.c:12413
uint32 ncx_get_module_setid(void)
GET YANG-LIBRARY module set ID.
Definition: ncx.c:15591
uint32 ncx_get_warn_linelen(void)
Get the warning length for YANG file lines.
Definition: ncx.c:10530
status_t ncx_turn_on_warning(status_t res)
Remove a warning suppression entry if it exists.
Definition: ncx.c:10673
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:15614
void ncx_delete_all_obsolete_objects(void)
Go through all the modules and delete the obsolete nodes.
Definition: ncx.c:12203
boolean ncx_collapse_submodules_ok(void)
Check if it is OK to collapse submodule definitions into the main module.
Definition: ncx.c:12929
void ncx_set_empty_npcon_presence_ro(boolean val)
Set the empty_npcon_presence value READ-ONLY check.
Definition: ncx.c:15742
boolean ncx_warning_elevated(status_t res)
Check if a specific status_t code is elevated.
Definition: ncx.c:10834
boolean ncx_warning_enabled(status_t res)
Check if a specific status_t code is enabled.
Definition: ncx.c:10791
ncx_module_t * ncx_find_deviation_module(const xmlChar *modname)
Find a deviation module ncx_module_t in the deviation_moduleQ;.
Definition: ncx.c:15657
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:15835
ncx_module_t * ncx_get_first_module(void)
Get the first module in the ncx_modQ.
Definition: ncx.c:5311
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:4623
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:4534
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:3735
obj_template_t * ncx_find_first_rpc(const xmlChar *rpcname)
Find the specified RPC Method in any module.
Definition: ncx.c:4243
ncx_module_t * ncx_get_next_module(const ncx_module_t *mod)
Get the next module in the ncx_modQ.
Definition: ncx.c:5333
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:13674
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:3820
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:5393
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:4769
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:3702
ncx_module_t * ncx_get_first_session_module(void)
Get the first module in the ncx_sesmodQ.
Definition: ncx.c:5414
ncx_module_t * ncx_first_deviation_module(void)
Get the first deviation module.
Definition: ncx.c:16131
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:4333
ncx_module_t * ncx_next_deviation_module(ncx_module_t *curmod)
Get the next deviation module after curmod.
Definition: ncx.c:16150
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:3784
ncx_module_t * ncx_find_first_importer(const xmlChar *module)
Search all modules importQs for a specified module name.
Definition: ncx.c:13643
obj_template_t * ncx_find_any_object(const xmlChar *objname)
Find any top-level object in any YANG module.
Definition: ncx.c:4472
ncx_module_t * ncx_get_next_session_module(const ncx_module_t *mod)
Get the next module in the ncx_sesmodQ.
Definition: ncx.c:5434
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:15777
ncx_module_t * ncx_get_prev_module(const ncx_module_t *mod)
Get the previous module.
Definition: ncx.c:5361
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:3671
ncx_module_t * ncx_find_module(const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3637
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:11432
boolean ncx_any_mod_errors(void)
Check if any of the loaded modules are loaded with non-fatal errors.
Definition: ncx.c:3876
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:11396
void dump_modQ(dlq_hdr_t *modQ)
dump module Q contents [name, revision] for debugging
Definition: ncx.c:12560
boolean ncx_save_descr(void)
Get the value of the save description strings variable.
Definition: ncx.c:8133
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:11493
obj_template_t * ncx_get_last_object(ncx_module_t *mod, boolean augment_ok)
Find the last data node.
Definition: ncx.c:5695
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:4283
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:5787
obj_template_t * ncx_find_object(ncx_module_t *mod, const xmlChar *objname)
Find a top level module object.
Definition: ncx.c:4803
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:4720
grp_template_t * ncx_find_grouping(ncx_module_t *mod, const xmlChar *grpname, boolean useall)
Find the YANG grouping.
Definition: ncx.c:4083
obj_template_t * ncx_get_first_data_object(ncx_module_t *mod)
Get the first datastore object in the module.
Definition: ncx.c:5961
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:4391
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:4211
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:5876
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:6197
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:5617
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:3950
typ_template_t * ncx_find_type_que(const dlq_hdr_t *typeQ, const xmlChar *typname)
ncx_find_type_que
Definition: ncx.c:4050
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:6033
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:5769
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:4823
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:4180
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:5599
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:6115
const xmlChar * ncx_get_modversion(const ncx_module_t *mod)
Get the [sub]module version.
Definition: ncx.c:5499
const xmlChar * ncx_get_mod_source(const ncx_module_t *mod)
Get the module file source string for the specified module.
Definition: ncx.c:10159
ncx_module_t * ncx_get_mainmod(ncx_module_t *mod)
Get the main module.
Definition: ncx.c:5572
const xmlChar * ncx_get_mod_xmlprefix(const ncx_module_t *mod)
Get the module XML prefix for the specified module.
Definition: ncx.c:10131
boolean ncx_mod_unloadable(ncx_module_t *mod)
Check if this module can be unloaded.
Definition: ncx.c:13908
ncx_module_t * ncx_first_submodule(ncx_module_t *mod)
Get the first submodule in the specified main module.
Definition: ncx.c:14031
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:11571
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:16414
const xmlChar * ncx_get_mod_prefix(const ncx_module_t *mod)
Get the module prefix for the specified module.
Definition: ncx.c:10106
void ncx_set_mod_unloadable(ncx_module_t *mod)
Set this module so it can be unloaded.
Definition: ncx.c:13930
boolean ncx_modname_is_ocpattern(const xmlChar *modname)
Check if the module name is an openconfig file.
Definition: ncx.c:16007
const xmlChar * ncx_get_mod_ocversion(const ncx_module_t *mod)
Get the module openconfig-version string for the specified module.
Definition: ncx.c:10207
const xmlChar * ncx_get_modnamespace(const ncx_module_t *mod)
Get the module namespace URI.
Definition: ncx.c:5519
boolean ncx_get_ocpattern_mode(const ncx_module_t *mod)
Get the openconfig pattern mode.
Definition: ncx.c:15985
ncx_module_t * ncx_get_parent_mod(ncx_module_t *mod)
Find the correct module by checking mod->parent nodes.
Definition: ncx.c:11599
boolean ncx_is_yangmap_type(ncx_module_t *mod, boolean is_src)
Check the yangmap type flags.
Definition: ncx.c:16636
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:15874
status_t ncx_set_mod_ietfversion(ncx_module_t *mod, const xmlChar *version)
Set the module IETF Semver string for the specified module.
Definition: ncx.c:10287
xmlns_id_t ncx_get_mod_nsid(const ncx_module_t *mod)
Get the main module namespace ID.
Definition: ncx.c:5475
const xmlChar * ncx_get_mod_revision(const ncx_module_t *mod)
Get the module revision string for the specified module.
Definition: ncx.c:10184
boolean ncx_mod_has_rpcs(ncx_module_t *mod)
Check if the module has any RPC operation definitions.
Definition: ncx.c:12590
void ncx_set_ocpattern_mode(ncx_module_t *mod, boolean mode)
Set the openconfig pattern mode.
Definition: ncx.c:15933
boolean ncx_mod_has_submodules(const ncx_module_t *mod)
Check if this is a main module with submodules.
Definition: ncx.c:17377
void ncx_set_module_supported(ncx_module_t *mod, boolean supported)
Set the module supported field.
Definition: ncx.c:14350
const xmlChar * ncx_get_modsource(const ncx_module_t *mod)
Get the module filespec source string.
Definition: ncx.c:5552
boolean ncx_skip_child_node_warn(const xmlChar *modname)
Internal compiler check to suppress warnings.
Definition: ncx.c:16391
void ncx_force_ocpattern_mode(ncx_module_t *mod)
Force the openconfig pattern mode to TRUE.
Definition: ncx.c:15960
const xmlChar * ncx_get_mod_ietfversion(const ncx_module_t *mod)
Get the module IETF Semver string for the specified module.
Definition: ncx.c:10266
boolean ncx_mod_is_hidden(const ncx_module_t *mod)
Check if the module is forced no advertise (e.g.
Definition: ncx.c:15055
ncx_yang_version_t ncx_get_yang_version(const ncx_module_t *mod)
Get the yang-version used in the module.
Definition: ncx.c:14881
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:14065
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:10230
boolean ncx_is_duplicate(ncx_module_t *mod, const xmlChar *defname)
Check if a module definition name is a duplicate.
Definition: ncx.c:5285
status_t ncx_compare_semvers(const xmlChar *version1, const xmlChar *version2, int32 *ret)
Compare two IETF or OC Semver values.
Definition: ncx.c:10332
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:11543
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:12741
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:12637
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:3903
const xmlChar * ncx_get_modname(const ncx_module_t *mod)
Get the main module name.
Definition: ncx.c:5455
void ncx_number_all_objects(ncx_module_t *mod)
Number all objects for internal ordering comparisons.
Definition: ncx.c:14976
void ncx_set_yangmap_type(ncx_module_t *mod, boolean is_src)
Set the yangmap type flags.
Definition: ncx.c:16607
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:13776
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:13709
void ncx_collapse_submod_defs(ncx_module_t *mod)
Collapse submodule definitions into the main module.
Definition: ncx.c:12952
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:13847
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:12855
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:13049
void ncx_delete_mod_obsolete_objects(ncx_module_t *mod)
Delete all obsolete objects in mod.
Definition: ncx.c:12226
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:1511
NCX base64 string node for YANG 'binary' built-in type.
Definition: ncxtypes.h:845
one NCX_BT_BITS bit value
Definition: ncxtypes.h:798
one NCX_BT_ENUM enumeration value (user may enter 1 of 3 forms)
Definition: ncxtypes.h:790
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1347
error message replacement record
Definition: ncxtypes.h:1605
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:856
struct for holding r/o pointer to generic internal node for filtering purposes
Definition: ncxtypes.h:1041
YANG identity base.
Definition: ncxtypes.h:1075
YANG identity entry.
Definition: ncxtypes.h:1084
One 'import' clause in YANG.
Definition: ncxtypes.h:1279
One 'include' clause, YANG only.
Definition: ncxtypes.h:1309
server module info cache record for def_reg_add_mod
Definition: ncxtypes.h:1596
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1118
YANG revision entry.
Definition: ncxtypes.h:894
used with obj_deviation_t to defer object lookups
Definition: ncxtypes.h:1486
Schema Mount Root Control Block used in the object template.
Definition: ncxtypes.h:1874
keep track of the typenames used for local typedefs only used by ncxdump to generate XSDs OBSOLETE: D...
Definition: ncxtypes.h:1369
One YANG data-def-stmt.
Definition: obj.h:1284
Session Control Block.
Definition: ses.h:759
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:417
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.