yumapro  23.10T-9
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 - 2024, 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
739extern void
740 dump_modQ (dlq_hdr_t *modQ);
741
742 // END ncxlib/yang/yanglib/yanglibstatus
744
745 // BEGIN ncxlib/yang/yanglib/yanglibfind
764
765
776extern ncx_module_t *
777 ncx_find_module (const xmlChar *modname,
778 const xmlChar *revision);
779
780
792extern ncx_module_t *
793 ncx_find_module_ex (const xmlChar *modname,
794 const xmlChar *revision);
795
796
807extern ncx_module_t *
808 ncx_find_module_by_prefix (const xmlChar *prefix);
809
810
820extern ncx_module_t *
821 ncx_find_module_que (dlq_hdr_t *modQ,
822 const xmlChar *modname,
823 const xmlChar *revision);
824
825
833extern ncx_module_t *
834 ncx_find_module_que_by_prefix (dlq_hdr_t *modQ,
835 const xmlChar *prefix);
836
837
847extern ncx_module_t *
848 ncx_find_module_que_nsid (dlq_hdr_t *modQ,
849 xmlns_id_t nsid);
850
851
861extern obj_template_t *
862 ncx_find_first_rpc (const xmlChar *rpcname);
863
864
877extern obj_template_t *
878 ncx_match_any_rpc (const xmlChar *module,
879 const xmlChar *rpcname,
880 uint32 *retcount);
881
882
892extern obj_template_t *
893 ncx_find_any_object (const xmlChar *objname);
894
895
913extern obj_template_t *
914 ncx_match_any_object (const xmlChar *objname,
915 ncx_name_match_t name_match,
916 boolean alt_names,
917 status_t *retres);
918
919
940extern obj_template_t *
941 ncx_match_any_object_ex (const xmlChar *modname,
942 const xmlChar *objname,
943 boolean dataonly,
944 ncx_name_match_t name_match,
945 boolean alt_names,
946 status_t *retres);
947
948
949
960extern obj_template_t *
961 ncx_find_any_object_que (dlq_hdr_t *modQ,
962 const xmlChar *objname);
963
964
971extern ncx_module_t *
973
974
983extern ncx_module_t *
985
986
993extern ncx_module_t *
995
996
1004extern ncx_module_t *
1005 ncx_get_next_module (const ncx_module_t *mod);
1006
1007
1017extern ncx_module_t *
1019
1020
1030extern ncx_module_t *
1032
1033
1040extern ncx_module_t *
1041 ncx_find_first_importer (const xmlChar *module);
1042
1043
1051extern ncx_module_t *
1052 ncx_find_next_importer (const xmlChar *module,
1053 ncx_module_t *curmod);
1054
1055
1062extern ncx_module_t *
1063 ncx_find_deviation_module (const xmlChar *modname);
1064
1065
1073extern obj_template_t *
1074 ncx_first_data_node (boolean cfgonly);
1075
1076
1084extern obj_template_t *
1086
1087
1093extern ncx_module_t *
1095
1096
1103extern ncx_module_t *
1105
1106 // END ncxlib/yang/yanglib/yanglibfind
1108
1109
1110
1129extern obj_template_t *
1131 const xmlChar *rpcname,
1132 uint32 *retcount);
1133
1134
1149extern typ_template_t *
1151 const xmlChar *typname,
1152 boolean useall);
1153
1154
1166extern typ_template_t *
1167 ncx_find_type_que (const dlq_hdr_t *typeQ,
1168 const xmlChar *typname);
1169
1170
1186extern grp_template_t *
1188 const xmlChar *grpname,
1189 boolean useall);
1190
1191
1200extern grp_template_t *
1201 ncx_find_grouping_que (const dlq_hdr_t *groupingQ,
1202 const xmlChar *grpname);
1203
1204
1212extern obj_template_t *
1213 ncx_find_rpc (const ncx_module_t *mod,
1214 const xmlChar *rpcname);
1215
1216
1226extern obj_template_t *
1228 const xmlChar *rpcname,
1229 uint32 *retcount);
1230
1231
1242extern obj_template_t *
1244
1245
1255extern obj_template_t *
1257 obj_template_t *obj);
1258
1259
1267extern obj_template_t *
1269 const xmlChar *objname);
1270
1278extern obj_template_t *
1280 const xmlChar *objname);
1281
1282
1292extern obj_template_t *
1294
1295
1305extern obj_template_t *
1307 boolean augment_ok);
1308
1309
1321extern obj_template_t *
1323 boolean augment_ok);
1324
1325
1336extern obj_template_t *
1338 obj_template_t *curobj);
1339
1340
1354extern obj_template_t *
1356 obj_template_t *curobj,
1357 boolean augment_ok);
1358
1359
1372extern obj_template_t *
1374 obj_template_t *curobj,
1375 boolean augment_ok);
1376
1377
1385extern obj_template_t *
1387 obj_template_t *curobj);
1388
1389
1398extern obj_template_t *
1400 boolean config);
1401
1402
1412extern obj_template_t *
1414 obj_template_t *curobj);
1415
1416 // END ncxlib/yang/yangmod/yangmodfind
1418
1419 // BEGIN ncxlib/yang/yangmod/yangmodprop
1427
1428
1436extern boolean
1438
1439
1450extern boolean
1452 const xmlChar *defname);
1453
1454
1461extern const xmlChar *
1462 ncx_get_modname (const ncx_module_t *mod);
1463
1464
1471extern xmlns_id_t
1472 ncx_get_mod_nsid (const ncx_module_t *mod);
1473
1474
1481extern const xmlChar *
1482 ncx_get_modversion (const ncx_module_t *mod);
1483
1484
1491extern const xmlChar *
1493
1494
1501extern const xmlChar *
1502 ncx_get_modsource (const ncx_module_t *mod);
1503
1504
1511extern ncx_module_t *
1513
1514
1515
1522extern const xmlChar *
1523 ncx_get_mod_prefix (const ncx_module_t *mod);
1524
1525
1537extern const xmlChar *
1539
1540
1547extern const xmlChar *
1548 ncx_get_mod_source (const ncx_module_t *mod);
1549
1550
1557extern const xmlChar *
1559
1560
1567extern const xmlChar *
1569
1570
1580extern status_t
1582 const xmlChar *ocversion);
1583
1584
1592extern dlq_hdr_t *
1594
1595
1603extern const dlq_hdr_t *
1605
1606
1614extern ncx_module_t *
1616
1617
1624extern boolean
1626
1627
1636extern boolean
1638 boolean check_config,
1639 boolean check_operational);
1640
1641
1651extern boolean
1653 boolean check_config,
1654 boolean check_operational);
1655
1656
1665extern boolean
1667
1668
1675extern void
1677
1678
1685extern ncx_module_t *
1687
1688
1689
1697extern ncx_module_t *
1699 ncx_module_t *submod);
1700
1701
1708extern void
1710 boolean supported);
1711
1712
1719extern ncx_yang_version_t
1721
1722
1728extern void
1730
1731
1743extern boolean
1744 ncx_mod_is_hidden (const ncx_module_t *mod);
1745
1746
1753extern void
1755
1756
1764extern status_t
1766 const xmlChar *idstr);
1767
1768
1775extern void
1777 boolean mode);
1778
1779
1785extern void
1787
1788
1795extern boolean
1797
1798
1805extern boolean
1806 ncx_modname_is_ocpattern (const xmlChar *modname);
1807
1808
1819extern boolean
1820 ncx_skip_child_node_warn (const xmlChar *modname);
1821
1822
1829extern void ncx_clr_enable_chk (ncx_module_t *mod);
1830
1831
1838extern void
1840 boolean is_src);
1841
1842
1850extern boolean
1852 boolean is_src);
1853
1854
1863extern boolean
1865
1866 // END ncxlib/yang/yangmod/yangmodprop
1868
1869
1870 // BEGIN ncxlib/yang/yangmod/yangmodutil
1878
1879
1889extern void
1891
1892
1903extern void
1905
1906
1923extern void
1925
1926
1927
1937extern status_t
1939
1940
1947extern void
1949
1950
1957extern void
1959
1960
1967extern void
1969
1970 // END ncxlib/yang/yangmod/yangmodutil
1972
1973
1974
1975
1976// Heading only for YANG Data Docs
1977
1978
2004extern ncx_import_t *
2005 ncx_new_import (void);
2006
2007
2018extern void
2019 ncx_free_import (ncx_import_t *import);
2020
2021
2029extern ncx_import_t *
2030 ncx_find_import (const ncx_module_t *mod,
2031 const xmlChar *module);
2032
2033
2041extern ncx_import_t *
2042 ncx_find_import_que (const dlq_hdr_t *importQ,
2043 const xmlChar *module);
2044
2045
2055extern ncx_import_t *
2057 const xmlChar *module);
2058
2059
2067extern ncx_import_t *
2069 const xmlChar *prefix);
2070
2071
2079extern ncx_import_t *
2080 ncx_find_pre_import_que (const dlq_hdr_t *importQ,
2081 const xmlChar *prefix);
2082
2083
2093extern ncx_import_t *
2095 const xmlChar *prefix);
2096
2097
2106extern boolean
2108 const xmlChar *module,
2109 const xmlChar *revision);
2110
2111
2131extern void *
2133 ncx_import_t *imp,
2134 const xmlChar *defname,
2135 ncx_node_t *deftyp);
2136 // END ncxlib/yang/yangdata/yangimport
2138
2139
2140
2156extern ncx_include_t *
2157 ncx_new_include (void);
2158
2159
2170extern void
2172
2173
2181extern ncx_include_t *
2182 ncx_find_include (const ncx_module_t *mod,
2183 const xmlChar *submodule);
2184
2185 // END ncxlib/yang/yangdata/yanginclude
2187
2188
2210extern ncx_binary_t *
2211 ncx_new_binary (void);
2212
2213
2218extern void
2219 ncx_init_binary (ncx_binary_t *binary);
2220
2221
2227extern void
2229
2230
2236extern void
2237 ncx_free_binary (ncx_binary_t *binary);
2238
2239 // END ncxlib/yang/yangdata/yangbindata
2241
2242 // BEGIN ncxlib/yang/yangdata/yangidentity
2250
2251
2257extern ncx_identity_t *
2258 ncx_new_identity (void);
2259
2260
2267extern ncx_identity_base_t *
2268 ncx_new_identity_base (void);
2269
2270
2276extern void
2278
2279
2286extern ncx_identity_base_t *
2288
2289
2296extern ncx_identity_base_t *
2298
2299
2305extern void
2307
2308
2319extern ncx_identity_t *
2321 const xmlChar *name,
2322 boolean useall);
2323
2324
2333extern void
2336 void *cookie);
2337
2338
2339/*
2340 * @brief Iterate all the YANG object definitions in the module
2341 *
2342 * @param mod module to search
2343 * @param cbfn The object_cbfn_t to invoke for each object found
2344 * @param cookie User cookie to pass to callback (may be NULL)
2345 */
2346extern void
2347 ncx_for_all_objects (ncx_module_t *mod,
2348 ncx_object_cbfn_t cbfn,
2349 void *cookie);
2350
2351
2359extern ncx_identity_t *
2360 ncx_find_identity_que (dlq_hdr_t *identityQ,
2361 const xmlChar *name);
2362
2363
2370extern xmlns_id_t
2371 ncx_get_identity_nsid (const ncx_identity_t *identity);
2372
2373
2380extern boolean
2382
2383
2396extern void
2399 void *cookie);
2400
2401
2402 // END ncxlib/yang/yangdata/yangidentity
2404
2405
2422extern ncx_filptr_t *
2423 ncx_new_filptr (void);
2424
2425
2431extern void
2432 ncx_free_filptr (ncx_filptr_t *filptr);
2433
2434
2440extern ncx_revhist_t *
2441 ncx_new_revhist (void);
2442
2443
2448extern void
2450
2451
2459extern ncx_revhist_t *
2460 ncx_find_revhist (const ncx_module_t *mod,
2461 const xmlChar *ver);
2462
2463 // END ncxlib/yang/yangdata/yangcompgen
2465
2466
2482extern void
2484
2485
2491extern void
2493
2494
2506extern int32
2507 ncx_compare_enums (const ncx_enum_t *enu1,
2508 const ncx_enum_t *enu2);
2509
2510
2522extern status_t
2523 ncx_set_enum (const xmlChar *enum_name,
2524 const int32 enum_val,
2525 ncx_enum_t *retenu);
2526
2527 // END ncxlib/yang/yangdata/yangenum
2529
2530
2545extern void
2546 ncx_init_bit (ncx_bit_t *bit);
2547
2548
2554extern void
2555 ncx_clean_bit (ncx_bit_t *bit);
2556
2557
2570extern int32
2571 ncx_compare_bits (const ncx_bit_t *bitone,
2572 const ncx_bit_t *bittwo);
2573
2574 // END ncxlib/yang/yangdata/yangbit
2576
2577
2578
2593extern ncx_typname_t *
2594 ncx_new_typname (void);
2595
2596
2603extern void
2605
2606
2614extern const xmlChar *
2615 ncx_find_typname (const typ_template_t *typ,
2616 const dlq_hdr_t *que);
2617
2618
2627extern const typ_template_t *
2628 ncx_find_typname_type (const dlq_hdr_t *que,
2629 const xmlChar *typname);
2630
2631
2637extern void
2638 ncx_clean_typnameQ (dlq_hdr_t *que);
2639
2640 // END ncxlib/yang/yangdata/yangtypname
2642
2643
2659extern ncx_errinfo_t *
2660 ncx_new_errinfo (void);
2661
2662
2668extern void
2670
2671
2678extern void
2680
2681
2688extern void
2690
2691
2702extern boolean
2703 ncx_errinfo_set (const ncx_errinfo_t *errinfo);
2704
2705
2714extern status_t
2715 ncx_copy_errinfo (const ncx_errinfo_t *src,
2716 ncx_errinfo_t *dest);
2717
2718
2719 // END ncxlib/yang/yangdata/yangdataerrinfo
2721
2722
2723
2724
2725
2726
2727
2728 // BEGIN ncxlib/ncxglobals/ncxgenobj
2738
2739
2745extern obj_template_t *
2746 ncx_get_gen_anyxml (void);
2747
2748
2754extern obj_template_t *
2755 ncx_get_gen_container (void);
2756
2757
2763extern obj_template_t *
2764 ncx_get_gen_string (void);
2765
2766
2772extern obj_template_t *
2773 ncx_get_gen_empty (void);
2774
2775
2781extern obj_template_t *
2782 ncx_get_gen_root (void);
2783
2784
2790extern obj_template_t *
2791 ncx_get_gen_binary (void);
2792
2798extern obj_template_t *
2799 ncx_get_gen_leaflist (void);
2800
2801
2807extern obj_template_t *
2808 ncx_get_yang_insert (void);
2809
2810
2816extern obj_template_t *
2817 ncx_get_yang_key (void);
2818
2819
2825extern obj_template_t *
2826 ncx_get_yang_value (void);
2827
2828
2835extern obj_template_t *
2836 ncx_get_nc_operation (void);
2837
2838
2845extern obj_template_t *
2846 ncx_get_datapath_obj (void);
2847
2848
2855extern obj_template_t *
2857
2858
2865extern obj_template_t *
2866 ncx_get_btype_obj (void);
2867
2868
2874extern boolean
2876
2877 // END ncxlib/ncxglobals/ncxgenobj
2879
2880
2881 // BEGIN ncxlib/ncxglobals/ncxgenvar
2892
2893
2899extern ncx_display_mode_t
2900 ncx_get_display_mode (void);
2901
2902
2908extern uint32
2910
2911
2919extern boolean
2920 ncx_get_useprefix (void);
2921
2922
2930extern void
2931 ncx_set_useprefix (boolean val);
2932
2933
2941extern boolean
2942 ncx_get_system_sorted (void);
2943
2944
2952extern void
2953 ncx_set_system_sorted (boolean val);
2954
2955
2964extern ncx_sort_type_t
2966
2967
2974extern void
2976
2977
2987extern boolean
2988 ncx_get_cwd_subdirs (void);
2989
2990
2998extern boolean
3000
3001
3008extern void
3010
3011
3017extern void
3019
3020
3028extern void
3029 ncx_set_use_deadmodQ (void);
3030
3031
3041extern int8
3043
3044
3051extern void
3052 ncx_set_message_indent (int8 msg_indent);
3053
3054
3061extern boolean
3063
3064
3071extern status_t
3073
3074
3080extern boolean
3081 ncx_fastpath_enabled (void);
3082
3083
3089extern boolean
3090 ncx_netconfd_running (void);
3091
3092
3098extern void
3099 ncx_use_data_templates (boolean enabled);
3100
3101
3107extern boolean
3108 ncx_data_templates_ok (void);
3109
3110
3116extern void
3117 ncx_ignore_missing_vars (boolean enabled);
3118
3119
3125extern boolean
3126 ncx_missing_vars_ok (void);
3127
3128
3132extern void
3134
3135
3139extern void
3141
3147extern boolean
3149
3150
3157extern status_t
3158 ncx_set_subsys_id (const xmlChar *id);
3159
3165extern const xmlChar *
3166 ncx_get_subsys_id (void);
3167
3168
3173extern void
3174 ncx_set_use_objptrs (void);
3175
3183extern boolean
3184 ncx_use_objptrs (void);
3185
3186
3192extern ncx_backptr_t *
3193 ncx_first_objptr (void);
3194
3195
3202extern ncx_backptr_t *
3204
3205
3206#ifdef DEBUG
3211extern void
3212 ncx_dump_objptrQ (void);
3213#endif // DEBUG
3214
3215
3223extern void
3224 ncx_set_getbulk_max (uint32 max_entries);
3225
3226
3234extern uint32
3235 ncx_get_getbulk_max (void);
3236
3237
3243extern void
3245
3246
3252extern boolean
3254
3255
3265extern void
3267
3268
3275extern boolean
3277
3278
3286extern boolean
3287 ncx_base_schema_set (void);
3288
3289
3295extern void
3296 ncx_set_base_schema (void);
3297
3298
3307extern boolean
3308 ncx_need_get2_xpath (void);
3309
3310
3317extern void
3318 ncx_set_with_ocpattern (boolean mode);
3319
3320
3326extern boolean
3328
3329
3335extern void
3337
3338
3346extern boolean
3347 ncx_is_with_snmp (void);
3348
3349
3357extern void
3358 ncx_set_with_snmp (boolean val);
3359
3360
3366extern void
3367 ncx_enable_bestmatch (void);
3368
3369
3378extern status_t
3379 ncx_set_bestmatch (void);
3380
3381
3387extern void
3389
3390
3397extern boolean
3399
3400
3406extern boolean
3408
3409
3416extern void
3417 ncx_set_sethook_registered (boolean val);
3418
3419
3425extern void
3426 ncx_set_binary_display_maxlen (uint32 val);
3427
3428
3434extern uint32
3436
3437
3443extern boolean
3444 ncx_is_with_dblock (void);
3445
3446
3452extern void
3453 ncx_set_with_dblock (boolean val);
3454
3455
3462extern boolean
3464
3465
3471extern void
3472 ncx_set_db_lock_init_done (boolean val);
3473
3474
3480extern void
3481 ncx_set_max_strlen (int32 num);
3482
3483
3489extern int32
3490 ncx_get_max_strlen (void);
3491
3492
3497extern void
3499
3500
3506extern boolean
3508
3509
3514extern void
3516
3517
3523extern boolean
3525
3526
3536extern void
3537 ncx_set_trim_whitespace (boolean val);
3538
3539
3546extern boolean
3548
3549
3558extern void
3559 ncx_set_startup_prune (boolean val);
3560
3561
3570extern boolean
3571 ncx_get_startup_prune (void);
3572
3573
3583extern boolean
3585
3586
3594extern void
3596
3597
3603extern ncx_config_state_t
3604 ncx_get_config_state (void);
3605
3606
3614extern void
3615 ncx_set_xmlorder (boolean val);
3616
3617
3624extern boolean
3625 ncx_get_xmlorder (void);
3626
3627
3635extern void
3636 ncx_set_list_deleteall_ok (boolean val);
3637
3638
3646extern boolean
3648
3649
3657extern void
3658 ncx_set_leaflist_deleteall_ok (boolean val);
3659
3660
3668extern boolean
3670
3671
3679extern boolean
3681
3682
3689extern void
3690 ncx_set_with_canonical (boolean val);
3691
3692
3699extern boolean
3701
3702
3712extern void
3713 ncx_set_save_owners (boolean val);
3714
3715
3722extern boolean
3723 ncx_get_save_owners (void);
3724
3725 // END ncxlib/ncxglobals/ncxgenvar
3727
3728
3729// heading only
3730 // BEGIN ncxlib/ncxstrenum
3748
3749
3758extern const xmlChar *
3759 ncx_get_layer (ncx_layer_t layer);
3760
3761
3768extern ncx_cvttyp_t
3769 ncx_get_cvttyp_enum (const char *str);
3770
3771
3778extern ncx_status_t
3779 ncx_get_status_enum (const xmlChar *str);
3780
3781
3788extern const xmlChar *
3790
3791
3798extern ncx_data_class_t
3799 ncx_get_data_class_enum (const xmlChar *str);
3800
3801
3808extern const xmlChar *
3810
3811
3818extern const xmlChar *
3819 ncx_get_access_str (ncx_access_t max_access);
3820
3821
3828extern ncx_access_t
3829 ncx_get_access_enum (const xmlChar *str);
3830
3831
3840extern boolean
3841 ncx_is_true (const xmlChar *str);
3842
3843
3851extern boolean
3852 ncx_is_false (const xmlChar *str);
3853
3854
3861extern ncx_bad_data_t
3862 ncx_get_baddata_enum (const xmlChar *valstr);
3863
3864
3871extern const xmlChar *
3873
3874
3881extern const xmlChar *
3883
3884
3891extern ncx_withdefaults_t
3892 ncx_get_withdefaults_enum (const xmlChar *withdefstr);
3893
3894
3901extern int32
3902 ncx_get_withdefaults_value (const xmlChar *withdefstr);
3903
3904
3912extern ncx_display_mode_t
3913 ncx_get_display_mode_enum (const xmlChar *dmstr);
3914
3915
3922extern const xmlChar *
3924
3925
3932extern const xmlChar *
3934
3935
3944extern const xmlChar *
3945 ncx_get_protocols_enabled (uint16 flags);
3946
3947
3954extern const xmlChar *
3956
3957
3964extern ncx_name_match_t
3965 ncx_get_name_match_enum (const xmlChar *str);
3966
3967
3974extern const xmlChar *
3976
3977
3984extern int32
3986
3987
3996extern status_t
3997 ncx_str2txid (const xmlChar *str,
3998 ncx_transaction_id_t *txid);
3999
4000
4009extern status_t
4011 xmlChar **retbuff);
4012
4013
4020extern const xmlChar *
4022
4023
4030extern const xmlChar *
4032
4033
4040extern ncx_msg_encoding_t
4041 ncx_cvt_encoding_str (const xmlChar *msg_encoding);
4042
4043
4049extern const xmlChar *
4051
4052
4059extern const xmlChar *
4061
4062 // END ncxlib/ncxutil/ncxstrenum
4064
4065
4066
4086extern void
4088 ncx_module_t *mod,
4089 status_t res);
4090
4091
4105extern void
4107 ncx_module_t *mod,
4108 status_t res,
4109 const char *filename,
4110 uint32 linenum,
4111 boolean fineoln);
4112
4113
4121extern void
4123 status_t result,
4124 const char *expstr);
4125
4126
4135extern void
4137 ncx_module_t *mod,
4138 status_t result,
4139 const char *expstr);
4140
4141
4151extern void
4153 ncx_module_t *mod,
4154 const char *stmtstr,
4155 const char *expstr);
4156
4157
4168extern ncx_errmsg_t *
4170 const xmlChar *str);
4171
4172
4178extern void
4180
4181
4182 // END ncxlib/yang/yangcomp/yangcomperr
4184
4185
4186 // BEGIN ncxlib/yang/yangcomp/yangcompidentifier
4196
4197
4204extern boolean
4205 ncx_valid_name_ch (uint32 ch);
4206
4207
4214extern boolean
4215 ncx_valid_fname_ch (uint32 ch);
4216
4217
4225extern boolean
4226 ncx_valid_name (const xmlChar *str,
4227 uint32 len);
4228
4229
4243extern boolean
4244 ncx_valid_num_name (const xmlChar *str);
4245
4246
4255extern boolean
4256 ncx_valid_name2 (const xmlChar *str);
4257
4258 // END ncxlib/yang/yangcomp/yangcompidentifier
4260
4261
4262 // BEGIN ncxlib/ncxutil/ncxutilgen
4270
4293extern xmlChar *
4294 ncx_get_source_ex (const xmlChar *fspec,
4295 boolean expand_cwd,
4296 status_t *res);
4297
4298
4321extern xmlChar *
4322 ncx_get_source (const xmlChar *fspec,
4323 status_t *res);
4324
4325
4335extern boolean
4336 ncx_prefix_different (const xmlChar *prefix1,
4337 const xmlChar *prefix2,
4338 const xmlChar *modprefix);
4339
4340
4350extern status_t
4351 ncx_get_version (xmlChar *buffer,
4352 uint32 buffsize);
4353
4354
4364extern status_t
4365 ncx_get_semver (xmlChar *buffer,
4366 uint32 buffsize);
4367
4368
4378extern status_t
4379 ncx_get_full_version (xmlChar *buffer,
4380 uint32 buffsize);
4381
4382
4383
4391extern const char *
4392 ncx_get_build_date (void);
4393
4394
4395
4403extern status_t
4404 ncx_get_feature_code (xmlChar *buffer,
4405 uint32 buffsize);
4406
4415extern int32
4416 ncx_compare_base_uris (const xmlChar *str1,
4417 const xmlChar *str2);
4418
4419
4428extern boolean
4430 uint16 flags);
4431
4432
4433
4443extern void
4445 uint16 *flags);
4446
4447
4456extern void
4458 uint16 *flags);
4459
4460
4467extern boolean
4469
4470
4479extern void
4480 ncx_write_tracefile (const char *buff, uint32 count);
4481
4482
4493extern status_t
4494 ncx_decode_url_string (const xmlChar *urlstr,
4495 uint32 urlstrlen,
4496 xmlChar *buffer,
4497 uint32 *cnt);
4498
4499
4500
4511extern status_t
4512 ncx_create_pidfile (const xmlChar *progname,
4513 boolean fileloc_fhs);
4514
4515
4522extern status_t
4523 ncx_add_ydtrace (const xmlChar *fspec);
4524
4525
4532extern boolean
4533 ncx_find_ydtrace (const xmlChar *fspec);
4534
4535
4544 ncx_get_file_result_format (const xmlChar *filespec);
4545
4546
4559extern boolean
4560 ncx_library_mode_ok (const xmlChar *modname,
4561 const xmlChar *rpcname);
4562
4563
4569extern const char *
4570 ncx_get_progname (void);
4571
4572
4579extern boolean
4581
4582
4590extern boolean
4591 ncx_check_inline_data_state (const xmlChar *line,
4592 boolean curstate);
4593
4594 // END ncxlib/ncxutil/ncxutilgen
4596
4597
4598
4599// Heading Only
4624extern void
4625 ncx_set_cur_modQ (dlq_hdr_t *que);
4626
4627
4631extern void
4632 ncx_reset_modQ (void);
4633
4634
4649extern void
4650 ncx_set_session_modQ (dlq_hdr_t *que);
4651
4652
4658extern dlq_hdr_t *
4659 ncx_get_session_modQ (void);
4660
4661
4674extern void
4676
4677
4683extern void
4684 ncx_set_temp_modQ (dlq_hdr_t *modQ);
4685
4686
4692extern dlq_hdr_t *
4693 ncx_get_temp_modQ (void);
4694
4695
4700extern void
4701 ncx_clear_temp_modQ (void);
4702
4703
4704 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfq
4706
4707
4724extern status_t
4726
4727
4733extern void
4735
4736
4743extern status_t
4745
4746
4752extern void
4754
4755
4762extern status_t
4764
4765
4771extern void
4773
4774
4781extern void
4783 obj_template_t *obj);
4784
4785
4791extern void
4793
4794
4801extern const xmlChar *
4803
4804 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfcb
4806
4823extern void
4824 ncx_set_warn_idlen (uint32 warnlen);
4825
4826
4832extern uint32
4833 ncx_get_warn_idlen (void);
4834
4835
4841extern void
4842 ncx_set_warn_linelen (uint32 warnlen);
4843
4844
4850extern uint32
4851 ncx_get_warn_linelen (void);
4852
4853
4863extern void
4865 ncx_module_t *mod,
4866 const xmlChar *id);
4867
4868
4878extern void
4880 ncx_module_t *mod,
4881 const xmlChar *line);
4882
4883
4890extern status_t
4892
4893
4900extern status_t
4902
4903
4910extern status_t
4912
4913
4919extern void
4920 ncx_set_warn_error (boolean val);
4921
4922
4930extern boolean
4932
4933
4941extern boolean
4943
4944
4951extern void
4953
4954
4970extern void
4971 ncx_set_top_mandatory_allowed (boolean allowed);
4972
4973
4980extern boolean
4982
4983
4993extern boolean
4995
4996
5002extern void
5003 ncx_set_module_setid (uint32 new_setid);
5004
5005
5011extern uint32
5012 ncx_get_module_setid (void);
5013
5014
5024extern status_t
5025 ncx_sprintf_module_setid (uint32 id,
5026 xmlChar *buff,
5027 int32 buffsize);
5028
5029
5036extern boolean
5038
5039
5046extern void
5047 ncx_set_empty_npcon_presence (boolean val);
5048
5049
5059extern boolean
5061
5062
5073extern void
5074 ncx_set_empty_npcon_presence_ro (boolean val);
5075
5076
5077
5078
5079 // END ncxlib/yang/yanglib/yanglibconf/yanglibconfset
5081
5082
5083
5084
5085 // BEGIN ncxlib/ncxutil/ncxbackptr
5100
5101
5108extern ncx_backptr_t *
5109 ncx_new_backptr (void *node);
5110
5111
5118extern void
5120
5121
5132extern void
5134
5135
5141extern void
5142 ncx_clean_backptrQ (dlq_hdr_t *backptrQ);
5143
5144
5151extern void
5152 ncx_clean_mbackptrQ (dlq_hdr_t *backptrQ);
5153
5154
5161extern ncx_backptr_t *
5162 ncx_first_backptr (dlq_hdr_t *que);
5163
5164
5171extern const ncx_backptr_t *
5172 ncx_first_const_backptr (const dlq_hdr_t *que);
5173
5174
5181extern ncx_backptr_t *
5182 ncx_last_backptr (dlq_hdr_t *que);
5183
5184
5191extern ncx_backptr_t *
5193
5200extern const ncx_backptr_t *
5201 ncx_next_const_backptr (const ncx_backptr_t *curptr);
5202
5203
5210extern ncx_backptr_t *
5212
5213
5220extern void *
5222
5223
5230extern const void *
5232
5233
5239extern void
5241
5242
5250extern ncx_backptr_t *
5251 ncx_find_backptr (const dlq_hdr_t *que,
5252 void *node);
5253
5254
5255
5256 // END ncxlib/ncxutil/ncxbackptr
5258
5259
5281extern ncx_save_deviations_t *
5282 ncx_find_save_deviations (const xmlChar *deviname,
5283 dlq_hdr_t *deviationQ);
5284
5285
5291extern void
5293
5294
5303extern boolean
5304 ncx_ok_skip_deviation_module (const xmlChar *modname,
5305 dlq_hdr_t *save_deviationsQ);
5306
5307
5308 // END ncxlib/yang/yangdata/yangdeviation
5310
5311
5312
5313 // BEGIN ncxlib/ncxutil/ncxutilfile
5321
5322
5328extern void
5329 ncx_socket_close (int fd);
5330
5341extern void
5342 ncx_socket_close_noerr (int fd);
5343
5344
5350extern void
5351 ncx_file_close (FILE *fp);
5352
5353
5361extern status_t
5362 ncx_file_remove (const xmlChar *filespec,
5363 boolean do_warn);
5364
5365
5374extern status_t
5375 ncx_file_rename (const xmlChar *old_filespec,
5376 const xmlChar *new_filespec,
5377 boolean do_warn);
5378
5386extern status_t
5387 ncx_file_copy (const xmlChar *src_filespec,
5388 const xmlChar *dst_filespec);
5389
5390
5399extern status_t
5400 ncx_file_buffcopy (const xmlChar *src_buff,
5401 uint32 src_bufflen,
5402 const xmlChar *dst_filespec);
5403
5404
5413extern status_t
5414 ncx_file_size (const char *filespec,
5415 uint32 *siz);
5416
5417
5427extern status_t
5428 ncx_file_to_buffer (const char *filespec,
5429 xmlChar **outbuff);
5430
5438extern status_t
5439 ncx_buffer_to_file (const char *filespec,
5440 const xmlChar *inbuff);
5441
5442
5452extern status_t
5453 ncx_get_temp_filespec (xmlChar *buff,
5454 uint32 bufflen,
5455 const xmlChar *rootpart,
5456 const xmlChar *ext);
5457
5458
5468extern ncx_modcache_t *
5469 ncx_new_modcache (const xmlChar *modname,
5470 boolean hidemod);
5471
5472
5478extern void
5480
5481
5482 // END ncxlib/ncxutil/ncxutilfile
5484
5485
5486
5498extern void ncx_set_use_return_status (void);
5499
5500
5501
5507extern boolean ncx_use_return_status (void);
5508
5509
5516extern ncx_bad_reply_enum
5517 ncx_get_handle_badreply_enum (const xmlChar *valstr);
5518
5519
5526extern const xmlChar *
5528
5529
5535extern void
5537
5538
5544extern ncx_bad_reply_enum
5546
5547
5556extern boolean
5558
5559
5560
5570extern ncx_etag_t
5572
5573
5580extern const xmlChar *
5582
5583
5590extern uint16
5592
5593
5599extern dlq_hdr_t *
5600 ncx_get_rootQ (void);
5601
5602
5608extern ncx_sm_rootcb_t *
5609 ncx_first_rootcb (void);
5610
5611
5619extern ncx_sm_rootcb_t *
5621
5622
5633extern boolean
5634 ncx_is_sm_mode (void);
5635
5636
5647extern void
5648 ncx_set_sm_mode (boolean val);
5649
5650
5658extern ncx_sm_rootcb_t *
5659 ncx_get_cur_rootcb (void);
5660
5661
5669extern void
5671
5672
5680extern obj_template_t *
5682
5683
5684
5695extern boolean
5696 ncx_get_sm_enabled (void);
5697
5698
5704extern void
5705 ncx_set_sm_enabled (boolean val);
5706
5712extern boolean
5713 ncx_yang_cbor_enabled (void);
5714
5720extern unsigned short
5722
5723
5729extern void
5730 ncx_set_tcp_connect_timeout (unsigned short timeout_sec);
5731
5732
5741extern ncx_module_t *
5742 ncx_find_module_que_all (dlq_hdr_t *modQ,
5743 const xmlChar *modname,
5744 const xmlChar *revision);
5753extern void
5755
5764extern void
5765 ncx_redo_loadmod_all (void);
5766
5767
5773extern void
5774 ncx_set_global_edit_enabled (boolean val);
5775
5776
5782extern boolean
5784
5785
5793extern void
5795
5796
5804extern getcb_fn2_t
5806
5807
5813extern void
5814 ncx_set_global_get_enabled (boolean val);
5815
5816
5822extern boolean
5824
5825
5831extern void
5832 ncx_set_global_rpc_enabled (boolean val);
5833
5834
5840extern boolean
5842
5843
5849extern void
5850 ncx_set_global_action_enabled (boolean val);
5851
5852
5858extern boolean
5860
5861
5862
5869extern void ncx_set_disable_imported (void);
5870
5871
5877extern boolean ncx_disable_imported_ok (void);
5878
5885extern void ncx_set_mod_augmented (ncx_module_t *mod);
5886
5887 // END ncxlib/ncxutil/ncxutilfile
5889
5890#ifdef __cplusplus
5891} /* end extern 'C' */
5892#endif
5893
5894#endif /* _H_ncx */
dlq provides general double-linked list and queue support:
GET1 and GET2 Callback Support.
status_t(* getcb_fn2_t)(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 PRODUCER FUNCTION.
Definition: getcb.h:668
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:345
status_t
global error return code
Definition: status_enum.h:210
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:12756
void ncx_free_mbackptr(ncx_backptr_t *ptr)
Free an ncx_backptr_t struct; Free the 'node' pointer first.
Definition: ncx.c:12675
void ncx_clean_backptrQ(dlq_hdr_t *backptrQ)
Clean an entire Q of ncx_backptr_t structs.
Definition: ncx.c:12694
ncx_backptr_t * ncx_first_backptr(dlq_hdr_t *que)
Get first back pointer struct.
Definition: ncx.c:12737
ncx_backptr_t * ncx_new_backptr(void *node)
Malloc and initialize a new ncx_backptr_t struct.
Definition: ncx.c:12636
ncx_backptr_t * ncx_next_backptr(ncx_backptr_t *curptr)
Get next back pointer struct.
Definition: ncx.c:12794
ncx_backptr_t * ncx_last_backptr(dlq_hdr_t *que)
Get last back pointer struct.
Definition: ncx.c:12775
ncx_backptr_t * ncx_find_backptr(const dlq_hdr_t *que, void *node)
Find the specified back pointer struct.
Definition: ncx.c:12908
void * ncx_get_backptr_node(ncx_backptr_t *backptr)
Get the back pointer node pointer.
Definition: ncx.c:12851
void ncx_free_backptr(ncx_backptr_t *ptr)
Free an ncx_backptr_t struct.
Definition: ncx.c:12657
ncx_backptr_t * ncx_prev_backptr(ncx_backptr_t *curptr)
Get previous back pointer struct.
Definition: ncx.c:12832
const void * ncx_get_const_backptr_node(const ncx_backptr_t *backptr)
Get the back pointer node pointer CONST.
Definition: ncx.c:12870
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:12716
const ncx_backptr_t * ncx_next_const_backptr(const ncx_backptr_t *curptr)
Get next back pointer struct CONST.
Definition: ncx.c:12813
void ncx_remove_backptr(ncx_backptr_t *ptr)
Remove the specified backptr for deletion.
Definition: ncx.c:12888
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:14439
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:13062
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:12962
obj_template_t * ncx_get_yang_insert(void)
Get the object template for the YANG insert attribute.
Definition: ncx.c:7644
obj_template_t * ncx_get_yang_value(void)
Get the object template for the YANG value attribute.
Definition: ncx.c:7670
obj_template_t * ncx_get_gen_root(void)
Get the object template for the NCX generic root container.
Definition: ncx.c:7601
obj_template_t * ncx_get_gen_empty(void)
Get the object template for the NCX generic empty leaf.
Definition: ncx.c:7587
obj_template_t * ncx_get_gen_container(void)
Get the object template for the NCX generic container.
Definition: ncx.c:7559
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:13029
obj_template_t * ncx_get_yang_key(void)
Get the object template for the YANG key attribute.
Definition: ncx.c:7657
obj_template_t * ncx_get_gen_leaflist(void)
Get the object template for the NCX generic leaf-list string.
Definition: ncx.c:7631
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:12996
obj_template_t * ncx_get_gen_anyxml(void)
Get the object template for the NCX generic anyxml container.
Definition: ncx.c:7545
obj_template_t * ncx_get_gen_binary(void)
Get the object template for the NCX generic binary leaf.
Definition: ncx.c:7616
obj_template_t * ncx_get_gen_string(void)
Get the object template for the NCX generic string leaf.
Definition: ncx.c:7573
boolean ncx_get_pidfile_cleaned(void)
Get the PID file cleaned flag.
Definition: ncx.c:16424
const xmlChar * ncx_get_subsys_id(void)
Get the subsys_id value; NULL if not set.
Definition: ncx.c:13993
boolean ncx_get_startup_prune(void)
Get the startup_prune flag.
Definition: ncx.c:16513
boolean ncx_need_get2_xpath(void)
Check if GET2 callback support needed in XPath.
Definition: ncx.c:15182
boolean ncx_is_with_snmp(void)
Get the with_snmp value.
Definition: ncx.c:15502
boolean ncx_get_search_modQ_ok(void)
Get the search_modQ_ok flag.
Definition: ncx.c:13959
void ncx_set_sil_priority_used(void)
Flag that an object set a non-default SIL priority.
Definition: ncx.c:14378
ncx_backptr_t * ncx_first_objptr(void)
Get the first object pointer.
Definition: ncx.c:14070
boolean ncx_netconfd_running(void)
Check if netconfd running.
Definition: ncx.c:13110
boolean ncx_data_templates_ok(void)
Get the use-data-templates flag.
Definition: ncx.c:13797
uint32 ncx_get_binary_display_maxlen(void)
Get the binary_display_maxlen parameter.
Definition: ncx.c:16262
void ncx_set_binary_display_maxlen(uint32 val)
Set the binary_display_maxlen parameter.
Definition: ncx.c:16246
boolean ncx_get_leaflist_deleteall_ok(void)
Get the leaflist_deleteall_ok flag.
Definition: ncx.c:16674
void ncx_set_base_schema(void)
Set the base_schema_set flag to true.
Definition: ncx.c:14583
boolean ncx_get_sethook_registered(void)
Check if the Set-Hook callbacks were registered.
Definition: ncx.c:16211
uint32 ncx_get_vtimeout_value(void)
Get the virtual node cache timeout value.
Definition: ncx.c:11186
void ncx_set_max_strlen(int32 num)
Set the –max-strlen parameter.
Definition: ncx.c:16348
void ncx_set_protocol_disabled(ncx_protocol_t proto)
Set the specified protocol version to be disabled.
Definition: ncx.c:11518
status_t ncx_set_all_obj_xpath_backptrs(void)
Add Xpath back pointers to the data-db objects in the database.
Definition: ncx.c:12575
void ncx_set_save_owners(boolean val)
Set the save_owners flag.
Definition: ncx.c:16745
void ncx_set_trim_whitespace(boolean val)
Set the trim_whitespace flag.
Definition: ncx.c:16465
boolean ncx_get_secondary_sil_priority_used(void)
Get the secondary_sil_priority_used flag.
Definition: ncx.c:14426
boolean ncx_protocol_enabled(ncx_protocol_t proto)
Check if the specified protocol version is enabled.
Definition: ncx.c:11398
ncx_sort_type_t ncx_get_system_sort_type(void)
Get the system_sort_type value.
Definition: ncx.c:11324
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:16693
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:11382
boolean ncx_get_with_canonical(void)
Get the with_canonical flag.
Definition: ncx.c:16731
void ncx_set_ypwatcher_running(void)
Set the ypwatcher running flag.
Definition: ncx.c:16378
void ncx_set_db_lock_init_done(boolean val)
Set if the <db-lock-init> message was processed by the server.
Definition: ncx.c:16332
boolean ncx_use_objptrs(void)
Get the use_objptrs flag.
Definition: ncx.c:14055
ncx_display_mode_t ncx_get_display_mode(void)
Get the current default display mode.
Definition: ncx.c:10952
boolean ncx_get_system_sorted(void)
Get the system_sorted value.
Definition: ncx.c:11289
void ncx_set_config_state(ncx_config_state_t val)
Set the config_state flag.
Definition: ncx.c:16527
boolean ncx_get_save_owners(void)
Get the save_owners flag.
Definition: ncx.c:16762
boolean ncx_is_add_toplevel_default_mode(void)
Get the add_toplevel_default_mode value.
Definition: ncx.c:15470
void ncx_set_leaflist_deleteall_ok(boolean val)
Set the leaflist_deleteall_ok flag.
Definition: ncx.c:16657
boolean ncx_use_xpath_backptrs(void)
Check if it is OK to use XPath back pointers or not.
Definition: ncx.c:12559
void ncx_ignore_missing_vars(boolean enabled)
Set the ignore-missing-vars flag.
Definition: ncx.c:13810
void ncx_set_getbulk_max(uint32 max_entries)
Set the max_entries parameter for GET2 callbacks.
Definition: ncx.c:14310
void ncx_set_list_deleteall_ok(boolean val)
Set the list_deleteall_ok flag.
Definition: ncx.c:16626
void ncx_set_system_sorted(boolean val)
Set the system_sorted value.
Definition: ncx.c:11308
status_t ncx_set_bestmatch(void)
Setup the bestmatch module versions, if enabled.
Definition: ncx.c:15604
void ncx_set_with_dblock(boolean val)
Set the is_with_dblock value.
Definition: ncx.c:16296
void ncx_set_search_modQ_ok(void)
Set the search_modQ_ok flag to TRUE.
Definition: ncx.c:13947
void ncx_set_add_toplevel_default_mode(boolean val)
Set the add_toplevel_default_mode value.
Definition: ncx.c:15486
status_t ncx_set_subsys_id(const xmlChar *id)
Set the subsys_id parameter for this subsystem.
Definition: ncx.c:13970
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:16179
void ncx_set_startup_prune(boolean val)
Set the startup_prune flag.
Definition: ncx.c:16496
int8 ncx_get_message_indent(void)
Get the protoco9l output indent amount.
Definition: ncx.c:11984
ncx_config_state_t ncx_get_config_state(void)
Get the config_state flag.
Definition: ncx.c:16544
void ncx_enable_bestmatch(void)
Enable the bestmatch import processing feature.
Definition: ncx.c:15589
boolean ncx_is_db_lock_init_done(void)
Check if the <db-lock-init> message was processed by the server.
Definition: ncx.c:16315
boolean ncx_base_schema_set(void)
Check if the base schema features have been set yet.
Definition: ncx.c:14571
boolean ncx_get_ypwatcher_running(void)
Get the ypwatcher running flag.
Definition: ncx.c:16394
int32 ncx_get_max_strlen(void)
Get the –max-strlen parameter.
Definition: ncx.c:16364
void ncx_set_useprefix(boolean val)
Set the use_prefix value.
Definition: ncx.c:11272
boolean ncx_get_xmlorder(void)
Get the xmlorder flag.
Definition: ncx.c:16612
void ncx_set_protocol_enabled(ncx_protocol_t proto)
Set the specified protocol version to be enabled.
Definition: ncx.c:11481
boolean ncx_is_with_dblock(void)
Get the is_with_dblock value.
Definition: ncx.c:16279
void ncx_set_ycontrol_running(void)
Set the ycontrol_running flag to TRUE.
Definition: ncx.c:13935
void ncx_set_pidfile_cleaned(void)
Set the pidfile cleaned flag.
Definition: ncx.c:16408
void ncx_set_with_snmp(boolean val)
Set the with_snmp value.
Definition: ncx.c:15519
void ncx_set_with_ocpattern(boolean mode)
Set the openconfig pattern mode for the entire system.
Definition: ncx.c:15455
void ncx_set_xmlorder(boolean val)
Set the xmlorder flag.
Definition: ncx.c:16595
void ncx_set_system_sort_type(ncx_sort_type_t val)
Set the system_sort_type value.
Definition: ncx.c:11343
boolean ncx_missing_vars_ok(void)
Get the ignore-missing-vars flag.
Definition: ncx.c:13823
boolean ncx_get_useprefix(void)
Get the use_prefix value.
Definition: ncx.c:11254
boolean ncx_get_sil_priority_used(void)
Get the sil_priority_used flag.
Definition: ncx.c:14391
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:16194
void ncx_set_use_deadmodQ(void)
Set the usedeadmodQ flag.
Definition: ncx.c:11745
void ncx_set_message_indent(int8 msg_indent)
Set the protocol output message indent amount.
Definition: ncx.c:12000
boolean ncx_get_list_deleteall_ok(void)
Get the list_deleteall_ok flag.
Definition: ncx.c:16643
void ncx_use_data_templates(boolean enabled)
Set the use-data-templates flag.
Definition: ncx.c:13784
boolean ncx_get_trim_whitespace(void)
Get the trim_whitespace flag.
Definition: ncx.c:16482
boolean ncx_fastpath_enabled(void)
Check if fast path value tree comparisons enabled.
Definition: ncx.c:13094
void ncx_set_with_canonical(boolean val)
Set the with_canonical flag.
Definition: ncx.c:16714
ncx_backptr_t * ncx_next_objptr(ncx_backptr_t *curptr)
Get the next object pointer.
Definition: ncx.c:14089
void ncx_set_sethook_registered(boolean val)
Set the sethook_registered value.
Definition: ncx.c:16229
uint32 ncx_get_getbulk_max(void)
Get the max_entries parameter for GET2 callbacks.
Definition: ncx.c:14322
void ncx_set_secondary_sil_priority_used(void)
Flag that a value node set a non-default secondary SIL priority.
Definition: ncx.c:14410
boolean ncx_check_startup_prune(ses_cb_t *scb)
Check if the namespace error can be skipped.
Definition: ncx.c:16565
void ncx_set_use_objptrs(void)
Set the use_objptrs flag.
Definition: ncx.c:14039
void ncx_cleanup(void)
Cleanup the NCX library.
Definition: ncx.c:3267
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:2805
const xmlChar * ncx_get_display_mode_str(ncx_display_mode_t dmode)
Get the string for the specified enum value.
Definition: ncx.c:10097
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:11896
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:14251
const xmlChar * ncx_get_yang_version_str(ncx_yang_version_t langver)
Get the yang-version string value for the enum.
Definition: ncx.c:14334
const xmlChar * ncx_get_btyp_string(ncx_btype_t btyp)
Get the enumeration string to the base type enum.
Definition: ncx.c:13659
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:8359
const xmlChar * ncx_get_protocols_enabled(uint16 flags)
Get the string for the NETCONF protocols enabled in the flags.
Definition: ncx.c:11646
status_t ncx_str2txid(const xmlChar *str, ncx_transaction_id_t *txid)
Convert a string to a ncx_transaction_id_t.
Definition: ncx.c:13514
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:14282
const xmlChar * ncx_get_baddata_string(ncx_bad_data_t baddata)
Get the string for the specified enum value.
Definition: ncx.c:9757
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:11819
ncx_withdefaults_t ncx_get_withdefaults_enum(const xmlChar *withdefstr)
Get the enum for the specified string value.
Definition: ncx.c:9825
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:8311
const xmlChar * ncx_get_protocol_name(ncx_protocol_t proto)
Get the name string for the protocol.
Definition: ncx.c:11686
const xmlChar * ncx_get_withdefaults_string(ncx_withdefaults_t withdef)
Get the string for the specified enum value.
Definition: ncx.c:9791
status_t ncx_txid2str(ncx_transaction_id_t *txid, xmlChar **retbuff)
Convert a transaction ID to a string.
Definition: ncx.c:13551
const xmlChar * ncx_get_access_str(ncx_access_t max_access)
Get the string name of a ncx_access_t enum.
Definition: ncx.c:8337
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:11858
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:7808
const xmlChar * ncx_get_confirm_event_str(ncx_confirm_event_t event)
Get the string for the specified enum value.
Definition: ncx.c:10972
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:7837
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:8286
boolean ncx_is_false(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:8657
const xmlChar * ncx_get_ses_event_str(ncx_ses_event_t ses_event)
Get the session event string for the enum.
Definition: ncx.c:16440
const xmlChar * ncx_get_layer(ncx_layer_t layer)
Translate ncx_layer_t enum to a string.
Definition: ncx.c:7687
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:9721
boolean ncx_is_true(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:8631
int32 ncx_get_withdefaults_value(const xmlChar *withdefstr)
Get the YANG integer value for the enum for the specified string value.
Definition: ncx.c:9860
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:7752
ncx_display_mode_t ncx_get_display_mode_enum(const xmlChar *dmstr)
Get the enum for the specified string value.
Definition: ncx.c:10053
ncx_node_t
NCX Internal Node Types.
Definition: ncxtypes.h:437
ncx_status_t
enumeration for different YANG data-def status values
Definition: ncxtypes.h:583
uint32 ncx_etag_t
The ETag used in RESTCONF messages is the lower 32 bits of a ncx_transaction_id_t.
Definition: ncxtypes.h:767
ncx_ses_event_t
internal enumerations for session event types
Definition: ncxtypes.h:1699
ncx_confirm_event_t
type of confirmEvent in the sysConfirmedCommit notification Used in confirmed-commit standard as well
Definition: ncxtypes.h:1511
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:1438
ncx_sort_type_t
the sort type enumeration used for system-ordered list aand leaf-list objects
Definition: ncxtypes.h:1797
ncx_cvttyp_t
enumeration for different NCX module conversion output types
Definition: ncxtypes.h:1251
ncx_yang_version_t
enumeration for different YANG language versions
Definition: ncxtypes.h:1009
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:724
ncx_msg_encoding_t
enumeration for message encoding formats
Definition: ncxtypes.h:647
ncx_protocol_t
NCX session protocol versions supported.
Definition: ncxtypes.h:997
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:1418
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:1546
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:1754
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:1550
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:1561
ncx_opt_t
enum for REQUIRED vs.
Definition: ncxtypes.h:1346
ncx_bad_data_t
enumeration for CLI handling of bad input data used by yangcli, all others use NCX_BAD_DATA_ERROR
Definition: ncxtypes.h:594
ncx_name_match_t
Node name match modes.
Definition: ncxtypes.h:695
ncx_layer_t
Enumeration of NETCONF protocol layers.
Definition: ncxtypes.h:507
ncx_result_format_t
specify the requested result format type Used by yangcli-pro assign statement
Definition: ncxtypes.h:715
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:1459
ncx_xpath_type_t
enumeration for different XPath back pointer types
Definition: ncxtypes.h:1283
ncx_config_state_t
server config state Root Check
Definition: ncxtypes.h:1707
ncx_display_mode_t
enumeration of val_dump_value display modes Some RESTCONF code uses this field incorrectly for messag...
Definition: ncxtypes.h:617
ncx_withdefaults_t
enum for with-defaults enum values
Definition: ncxtypes.h:1274
void(* ncx_load_cbfn_t)(ncx_module_t *mod)
user function callback template when a module is loaded into the system
Definition: ncxtypes.h:1404
status_t ncx_file_rename(const xmlChar *old_filespec, const xmlChar *new_filespec, boolean do_warn)
Rename a file; check result.
Definition: ncx.c:14771
ncx_modcache_t * ncx_new_modcache(const xmlChar *modname, boolean hidemod)
New ncx_modcache_t record.
Definition: ncx.c:15849
status_t ncx_file_remove(const xmlChar *filespec, boolean do_warn)
Close a file; check result.
Definition: ncx.c:14737
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:14911
void ncx_socket_close_noerr(int fd)
Close a socket; check result; SUPPRESS ERROR MESSAGE.
Definition: ncx.c:14660
void ncx_file_close(FILE *fp)
Close a file; check result.
Definition: ncx.c:14710
void ncx_socket_close(int fd)
Close a socket; check result.
Definition: ncx.c:14685
status_t ncx_file_to_buffer(const char *filespec, xmlChar **outbuff)
Read a text file into a malloced buffer.
Definition: ncx.c:15680
status_t ncx_file_size(const char *filespec, uint32 *siz)
Get a file size.
Definition: ncx.c:15639
status_t ncx_buffer_to_file(const char *filespec, const xmlChar *inbuff)
Write a buffer to a text file.
Definition: ncx.c:15757
status_t ncx_file_copy(const xmlChar *src_filespec, const xmlChar *dst_filespec)
Copy a file; check result.
Definition: ncx.c:14806
void ncx_free_modcache(ncx_modcache_t *mc)
Free a ncx_modcache_t record.
Definition: ncx.c:15878
status_t ncx_get_temp_filespec(xmlChar *buff, uint32 bufflen, const xmlChar *rootpart, const xmlChar *ext)
Generate a temporary filespec.
Definition: ncx.c:15903
ncx_sm_rootcb_t * ncx_get_cur_rootcb(void)
Gte the current root control block value.
Definition: ncx.c:17077
void ncx_redo_loadmod_all(void)
Set the redo_loadmod flag for all modules.
Definition: ncx.c:17306
void ncx_set_cur_rootcb(ncx_sm_rootcb_t *rootcb)
Set the current root control block.
Definition: ncx.c:17095
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:16942
boolean ncx_is_sm_mode(void)
Check if the Schema Mount mode is enabled.
Definition: ncx.c:17046
boolean ncx_global_get_enabled(void)
Get the Global EDIT callbacks enabled flag.
Definition: ncx.c:17401
boolean ncx_protocol_is_netconf(ncx_protocol_t proto)
Check if the protocol is a NETCONF protocol.
Definition: ncx.c:11723
void ncx_set_handle_badreply(ncx_bad_reply_enum enumval)
Set the enum value for the Bad Reply handling option.
Definition: ncx.c:16879
void ncx_set_mod_augmented(ncx_module_t *mod)
Set the module as supported because it is being augmented.
Definition: ncx.c:17502
obj_template_t * ncx_get_cur_rootcb_obj(void)
Get the current root control block object.
Definition: ncx.c:17113
void ncx_set_disable_imported(void)
Allow the obj_is_enabled funtion to disable all import-only modules.
Definition: ncx.c:17475
void ncx_set_global_edit_enabled(boolean val)
Set the Global EDIT callbacks enabled flag.
Definition: ncx.c:17326
void ncx_set_global_rpc_enabled(boolean val)
Set the Global RPC callbacks enabled flag.
Definition: ncx.c:17416
boolean ncx_ok_for_inline_data(obj_template_t *obj)
Check if the object is OK for inline data.
Definition: ncx.c:15959
void ncx_set_sm_enabled(boolean val)
Set schema mount enabled flag.
Definition: ncx.c:17150
int32 ncx_compare_base_uris(const xmlChar *str1, const xmlChar *str2)
Compare the base part of 2 URI strings.
Definition: ncx.c:11208
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:15981
status_t ncx_get_version(xmlChar *buffer, uint32 buffsize)
Get the the Yuma version ID string.
Definition: ncx.c:10602
boolean ncx_use_return_status(void)
Check if the return_status should be returned.
Definition: ncx.c:16808
ncx_bad_reply_enum ncx_get_handle_badreply(void)
Get the enum for the Bad Reply Handling option.
Definition: ncx.c:16892
unsigned short ncx_get_tcp_connect_timeout(void)
Get the configured TCP connect timeout value.
Definition: ncx.c:17185
void ncx_set_sm_mode(boolean val)
Set the Schema Mount mode.
Definition: ncx.c:17062
ncx_etag_t ncx_txid2etag(ncx_transaction_id_t txid)
Cast ncx_txid_t to ncx_etag_t.
Definition: ncx.c:16926
boolean ncx_find_ydtrace(const xmlChar *fspec)
Find the filespec of a yangdump file being processed.
Definition: ncx.c:13765
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:9687
const char * ncx_get_progname(void)
Get the progname buffer.
Definition: ncx.c:15537
void ncx_set_use_return_status(void)
Enable the return_status parameter.
Definition: ncx.c:16797
boolean ncx_disable_imported_ok(void)
Check if disable all import-only modules OK.
Definition: ncx.c:17487
status_t ncx_get_feature_code(xmlChar *buffer, uint32 buffsize)
Get the the Feature Code String.
Definition: ncx.c:10494
void ncx_set_tcp_connect_timeout(unsigned short timeout_sec)
Set the configured TCP connect timeout value.
Definition: ncx.c:17201
boolean ncx_global_action_enabled(void)
Get the Global Action callbacks enabled flag.
Definition: ncx.c:17461
ncx_sm_rootcb_t * ncx_next_rootcb(ncx_sm_rootcb_t *rootcb)
Get the next Mount Point Entry in the rootcbQ.
Definition: ncx.c:17027
xmlChar * ncx_get_source(const xmlChar *fspec, status_t *res)
Expand a filespec into an absolute path.
Definition: ncx.c:9332
void ncx_set_global_get2_cb(getcb_fn2_t get2_cbfn)
Set the current Global GET2 callback function.
Definition: ncx.c:17356
boolean ncx_yang_cbor_enabled(void)
Get the YANG to CBOR Code enabled flag.
Definition: ncx.c:17166
status_t ncx_add_ydtrace(const xmlChar *fspec)
Add the filespec of a yangdump file being processed.
Definition: ncx.c:13739
status_t ncx_get_semver(xmlChar *buffer, uint32 buffsize)
Get the the Yuma SEMVER version ID string.
Definition: ncx.c:10698
ncx_sm_rootcb_t * ncx_first_rootcb(void)
Get the first Mount Point Control Block Entry in the rootcbQ.
Definition: ncx.c:17012
boolean ncx_library_mode_ok(const xmlChar *modname, const xmlChar *rpcname)
Check if RPC OK to use in library mode.
Definition: ncx.c:14603
status_t ncx_create_pidfile(const xmlChar *progname, boolean fileloc_fhs)
Create the pidfile for the specified program.
Definition: ncx.c:13131
void ncx_set_global_get_enabled(boolean val)
Set the Global EDIT callbacks enabled flag.
Definition: ncx.c:17386
void ncx_write_tracefile(const char *buff, uint32 count)
Write a byte to the tracefile.
Definition: ncx.c:11932
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:11560
boolean ncx_global_rpc_enabled(void)
Get the Global RPC callbacks enabled flag.
Definition: ncx.c:17431
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:17221
xmlChar * ncx_get_source_ex(const xmlChar *fspec, boolean expand_cwd, status_t *res)
Expand a filespec into an absolute path.
Definition: ncx.c:9123
boolean ncx_conf_env_vars_enabled(void)
Get the Config Environment Variable Replacement flag.
Definition: ncx.c:16908
uint16 ncx_get_curQ_mod_count(void)
Get the total count of the currently fully loaded modules in the ncx_curQ.
Definition: ncx.c:16973
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:13843
void ncx_invoke_load_callbacks(ncx_module_t *mod)
ncx_invoke_load_callbacks
Definition: ncx.c:17283
boolean ncx_val_protocol_enabled(ncx_protocol_t proto, uint16 flags)
Check if the specified protocol version is enabled.
Definition: ncx.c:11441
void ncx_set_global_action_enabled(boolean val)
Set the Global Action callbacks enabled flag.
Definition: ncx.c:17446
boolean ncx_get_sm_enabled(void)
Get schema mount enabled flag.
Definition: ncx.c:17134
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:16826
status_t ncx_get_full_version(xmlChar *buffer, uint32 buffsize)
Get the the Yuma version ID string and SEMVER added.
Definition: ncx.c:10737
const char * ncx_get_build_date(void)
Get the build date string encoded into this C file.
Definition: ncx.c:10776
const xmlChar * ncx_get_handle_badreply_string(ncx_bad_reply_enum badreply)
Get the string for the specified enum value.
Definition: ncx.c:16854
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:11603
dlq_hdr_t * ncx_get_rootQ(void)
Get the Root control block queue.
Definition: ncx.c:16999
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:12031
boolean ncx_global_edit_enabled(void)
Get the Global EDIT callbacks enabled flag.
Definition: ncx.c:17341
getcb_fn2_t ncx_get_global_get2_cb(void)
Get the current Global GET2 callback function.
Definition: ncx.c:17371
void ncx_free_binary(ncx_binary_t *binary)
Free all the memory in a ncx_binary_t struct.
Definition: ncx.c:6608
ncx_binary_t * ncx_new_binary(void)
Malloc and fill in a new ncx_binary_t struct.
Definition: ncx.c:6545
void ncx_init_binary(ncx_binary_t *binary)
Init the memory of a ncx_binary_t struct.
Definition: ncx.c:6566
void ncx_clean_binary(ncx_binary_t *binary)
Scrub the memory of a ncx_binary_t but do not delete it.
Definition: ncx.c:6586
void ncx_clean_bit(ncx_bit_t *bit)
Scrub the memory of a ncx_bit_t but do not delete it.
Definition: ncx.c:7362
void ncx_init_bit(ncx_bit_t *bit)
Init the memory of a ncx_bit_t.
Definition: ncx.c:7340
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:7387
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:7959
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:8108
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:8080
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:7937
void ncx_free_errmsg(ncx_errmsg_t *msg)
Clean and free an ncx_errmsg_t struct.
Definition: ncx.c:16098
ncx_errmsg_t * ncx_new_errmsg(status_t res, const xmlChar *str)
Malloc and init an ncx_errmsg_t struct.
Definition: ncx.c:16070
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:8204
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:4288
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:4717
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:10879
boolean ncx_check_any_object_nolock_get(const xmlChar *objname)
Check if the object name will match any config=true nodes.
Definition: ncx.c:16135
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:4914
void ncx_clean_save_deviationsQ(dlq_hdr_t *savedevQ)
Clean a Q of deviation save structs.
Definition: ncx.c:10850
void ncx_free_save_deviations(ncx_save_deviations_t *savedev)
Free a deviation save struct.
Definition: ncx.c:10830
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:7865
void ncx_inc_warnings(ncx_module_t *mod)
Increment the module warning count for mod.
Definition: ncx.c:11359
status_t ncx_add_to_modQ(ncx_module_t *mod, dlq_hdr_t *modQ)
Add module to the current module Q.
Definition: ncx.c:5001
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:8691
void ncx_free_module(ncx_module_t *mod)
Free a YANG module.
Definition: ncx.c:3720
ncx_save_deviations_t * ncx_new_save_deviations(ncx_module_t *devmod, boolean annotation)
Create a deviation save structure.
Definition: ncx.c:10799
status_t ncx_parse_name(const xmlChar *str, uint32 *len)
Check if the next N chars represent a valid NcxName.
Definition: ncx.c:8595
status_t ncx_setup_mounted_mod(ncx_module_t *mod)
Setup a module for yangcli in parsemode in SM mode.
Definition: ncx.c:5089
boolean ncx_need_modchecks(const xmlChar *modname)
Check if xpath_backptr and obj commit tests needed.
Definition: ncx.c:14965
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:8749
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:8849
void ncx_free_node(ncx_node_t nodetyp, void *node)
Delete a node based on its type.
Definition: ncx.c:8238
const xmlChar * ncx_get_name_segment(const xmlChar *str, xmlChar *buff, uint32 buffsize)
Get the name string between the dots.
Definition: ncx.c:7717
ncx_tclass_t ncx_get_tclass(ncx_btype_t btyp)
Get the token class.
Definition: ncx.c:8388
ncx_module_t * ncx_new_module(void)
Malloc and initialize the fields in a ncx_module_t.
Definition: ncx.c:3448
status_t ncx_init_user_types(void)
Initialize the user types after ietf-inet-types module loaded.
Definition: ncx.c:16118
status_t ncx_add_to_root_modQ(ncx_module_t *mod)
Add module to the current module Q.
Definition: ncx.c:5030
boolean ncx_errinfo_set(const ncx_errinfo_t *errinfo)
Check if error-app-tag or error-message set.
Definition: ncx.c:9027
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:8969
ncx_errinfo_t * ncx_new_errinfo(void)
Malloc and init a new ncx_errinfo_t.
Definition: ncx.c:8928
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:9052
void ncx_init_errinfo(ncx_errinfo_t *err)
Init the fields in an ncx_errinfo_t struct.
Definition: ncx.c:8948
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:9004
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:7126
ncx_filptr_t * ncx_new_filptr(void)
Get a new ncx_filptr_t struct.
Definition: ncx.c:7089
ncx_revhist_t * ncx_new_revhist(void)
Create a revision history entry.
Definition: ncx.c:7157
ncx_revhist_t * ncx_find_revhist(const ncx_module_t *mod, const xmlChar *ver)
Search the revhistQ for a specified revision.
Definition: ncx.c:7206
void ncx_free_revhist(ncx_revhist_t *revhist)
Free a revision history entry.
Definition: ncx.c:7177
void ncx_clean_typnameQ(dlq_hdr_t *que)
Delete all the Q entries, of typname mapping structs.
Definition: ncx.c:7522
void ncx_free_typname(ncx_typname_t *typnam)
Free a typname struct.
Definition: ncx.c:7437
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:7460
ncx_typname_t * ncx_new_typname(void)
Malloc and init a typname struct.
Definition: ncx.c:7417
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:7492
void ncx_save_deviation_module(ncx_module_t *mod)
Save the deviations for the YANG module.
Definition: ncx.c:14192
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:14216
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:14155
void ncx_init_enum(ncx_enum_t *enu)
Init the memory of a ncx_enum_t.
Definition: ncx.c:7238
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:7311
void ncx_clean_enum(ncx_enum_t *enu)
Scrub the memory of a ncx_enum_t but do not delete it.
Definition: ncx.c:7260
int32 ncx_compare_enums(const ncx_enum_t *enu1, const ncx_enum_t *enu2)
Compare 2 enum values.
Definition: ncx.c:7285
boolean ncx_valid_name(const xmlChar *str, uint32 len)
Check if an xmlChar string is a valid YANG identifier value.
Definition: ncx.c:8483
boolean ncx_valid_name2(const xmlChar *str)
Check if an xmlChar string is a valid NCX name.
Definition: ncx.c:8528
boolean ncx_valid_name_ch(uint32 ch)
Check if the character is a valid YANG identifier chara.
Definition: ncx.c:8436
boolean ncx_valid_fname_ch(uint32 ch)
Check if an xmlChar is a valid NCX name string first char.
Definition: ncx.c:8460
ncx_identity_base_t * ncx_next_identity_base(ncx_identity_base_t *idbase)
Get the next base record for an identity.
Definition: ncx.c:6713
void ncx_free_identity_base(ncx_identity_base_t *identity_base)
Free a malloced ncx_identity_base_t struct.
Definition: ncx.c:6675
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:6880
ncx_identity_base_t * ncx_new_identity_base(void)
Get a new ncx_identity_base_t struct.
Definition: ncx.c:6655
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:12938
xmlns_id_t ncx_get_identity_nsid(const ncx_identity_t *identity)
Get the namespace ID for an identity.
Definition: ncx.c:7049
void ncx_free_identity(ncx_identity_t *identity)
Free a malloced ncx_identity_t struct.
Definition: ncx.c:6731
ncx_identity_t * ncx_new_identity(void)
Get a new ncx_identity_t struct.
Definition: ncx.c:6629
ncx_identity_base_t * ncx_first_identity_base(ncx_identity_t *identity)
Get the first base record for an identity.
Definition: ncx.c:6694
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:7019
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:6786
boolean ncx_get_identity_conditional(const ncx_identity_t *identity)
Check if the identity is conditional on if-feature.
Definition: ncx.c:7068
ncx_import_t * ncx_new_import(void)
Malloc and initialize the fields in a ncx_import_t.
Definition: ncx.c:6140
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:6229
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:6430
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:6292
void ncx_free_import(ncx_import_t *import)
Free an ncx_import_t.
Definition: ncx.c:6164
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:6262
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:6376
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:6314
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:6207
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:6346
ncx_include_t * ncx_new_include(void)
Malloc and initialize the fields in a ncx_include_t.
Definition: ncx.c:6455
void ncx_free_include(ncx_include_t *inc)
Free a ncx_include_t.
Definition: ncx.c:6479
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:6516
void ncx_clear_unload_callback(ncx_unload_cbfn_t cbfn)
Clear the callback function for an unload-module event.
Definition: ncx.c:9557
status_t ncx_set_load_callback(ncx_load_cbfn_t cbfn)
Set the callback function for a load-module event.
Definition: ncx.c:9450
void ncx_register_get_owner_fn(ncx_get_owner_fn_t cbfn)
Register a callback to get the owner name.
Definition: ncx.c:14008
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:9656
status_t ncx_set_unload_callback(ncx_unload_cbfn_t cbfn)
Set the callback function for an unload-module event.
Definition: ncx.c:9519
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:9588
void ncx_clear_load_callback(ncx_load_cbfn_t cbfn)
Clear the callback function for a load-module event.
Definition: ncx.c:9488
void ncx_clear_yang_obj_callback(ncx_yang_obj_cbfn_t cbfn)
Clear the callback function for a parse-object event.
Definition: ncx.c:9627
const xmlChar * ncx_get_owner_name(ncx_owner_id_t owner_id)
Get the registered YANG library owner namefor owner_id.
Definition: ncx.c:14023
dlq_hdr_t * ncx_get_session_modQ(void)
Get the current session modQ.
Definition: ncx.c:9410
void ncx_set_cur_modQ(dlq_hdr_t *que)
Set the current module Q to an alternate (for yangdiff)
Definition: ncx.c:9349
void ncx_clear_temp_modQ(void)
Clear the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:10936
void ncx_clear_session_modQ(void)
Clear the current session modQ.
Definition: ncx.c:9430
dlq_hdr_t * ncx_get_temp_modQ(void)
Get the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:10922
void ncx_set_temp_modQ(dlq_hdr_t *modQ)
Set the temp_modQ for yangcli session-specific module list.
Definition: ncx.c:10906
void ncx_reset_modQ(void)
Set the current module Q to the original ncx_modQ.
Definition: ncx.c:9368
void ncx_set_session_modQ(dlq_hdr_t *que)
Get the session module Q.
Definition: ncx.c:9391
status_t ncx_turn_up_warning(status_t res)
Add a warning elevation entry.
Definition: ncx.c:10373
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:10208
void ncx_set_warn_error(boolean val)
Set the warn_error flag.
Definition: ncx.c:10390
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:11954
void ncx_set_warn_idlen(uint32 warnlen)
Set the warning length for identifiers.
Definition: ncx.c:10136
uint32 ncx_get_warn_idlen(void)
Get the warning length for identifiers.
Definition: ncx.c:10152
void ncx_set_empty_npcon_presence(boolean val)
Set the empty_npcon_presence value.
Definition: ncx.c:15125
void ncx_set_module_setid(uint32 new_setid)
Update YANG-LIBRARY module set ID.
Definition: ncx.c:14994
boolean ncx_get_empty_npcon_presence(void)
Get the empty_npcon_presence value.
Definition: ncx.c:15107
void ncx_set_warn_linelen(uint32 warnlen)
Set the warning length for YANG file lines.
Definition: ncx.c:10169
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:10251
status_t ncx_turn_off_warning(status_t res)
Add a warning suppression entry.
Definition: ncx.c:10310
boolean ncx_get_empty_npcon_presence_ro(void)
Get the empty_npcon_presence value READ-ONLY check.
Definition: ncx.c:15144
boolean ncx_get_top_mandatory_allowed(void)
Check if top-level mandatory objects are allowed or not.
Definition: ncx.c:11969
uint32 ncx_get_module_setid(void)
GET YANG-LIBRARY module set ID.
Definition: ncx.c:15012
uint32 ncx_get_warn_linelen(void)
Get the warning length for YANG file lines.
Definition: ncx.c:10186
status_t ncx_turn_on_warning(status_t res)
Remove a warning suppression entry if it exists.
Definition: ncx.c:10329
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:15035
void ncx_delete_all_obsolete_objects(void)
Go through all the modules and delete the obsolete nodes.
Definition: ncx.c:11759
boolean ncx_collapse_submodules_ok(void)
Check if it is OK to collapse submodule definitions into the main module.
Definition: ncx.c:12485
void ncx_set_empty_npcon_presence_ro(boolean val)
Set the empty_npcon_presence value READ-ONLY check.
Definition: ncx.c:15163
boolean ncx_warning_elevated(status_t res)
Check if a specific status_t code is elevated.
Definition: ncx.c:10455
boolean ncx_warning_enabled(status_t res)
Check if a specific status_t code is enabled.
Definition: ncx.c:10410
ncx_module_t * ncx_find_deviation_module(const xmlChar *modname)
Find a deviation module ncx_module_t in the deviation_moduleQ;.
Definition: ncx.c:15078
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:15256
ncx_module_t * ncx_get_first_module(void)
Get the first module in the ncx_modQ.
Definition: ncx.c:5175
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:4487
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:4398
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:3599
obj_template_t * ncx_find_first_rpc(const xmlChar *rpcname)
Find the specified RPC Method in any module.
Definition: ncx.c:4107
ncx_module_t * ncx_get_next_module(const ncx_module_t *mod)
Get the next module in the ncx_modQ.
Definition: ncx.c:5197
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:13231
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:3684
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:5257
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:4633
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:3566
ncx_module_t * ncx_get_first_session_module(void)
Get the first module in the ncx_sesmodQ.
Definition: ncx.c:5278
ncx_module_t * ncx_first_deviation_module(void)
Get the first deviation module.
Definition: ncx.c:15552
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:4197
ncx_module_t * ncx_next_deviation_module(ncx_module_t *curmod)
Get the next deviation module after curmod.
Definition: ncx.c:15571
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:3648
ncx_module_t * ncx_find_first_importer(const xmlChar *module)
Search all modules importQs for a specified module name.
Definition: ncx.c:13200
obj_template_t * ncx_find_any_object(const xmlChar *objname)
Find any top-level object in any YANG module.
Definition: ncx.c:4336
ncx_module_t * ncx_get_next_session_module(const ncx_module_t *mod)
Get the next module in the ncx_sesmodQ.
Definition: ncx.c:5298
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:15198
ncx_module_t * ncx_get_prev_module(const ncx_module_t *mod)
Get the previous module.
Definition: ncx.c:5225
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:3535
ncx_module_t * ncx_find_module(const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3501
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:11044
boolean ncx_any_mod_errors(void)
Check if any of the loaded modules are loaded with non-fatal errors.
Definition: ncx.c:3740
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:11008
void dump_modQ(dlq_hdr_t *modQ)
dump module Q contents [name, revision] for debugging
Definition: ncx.c:12116
boolean ncx_save_descr(void)
Get the value of the save description strings variable.
Definition: ncx.c:7921
obj_template_t * ncx_get_last_object(ncx_module_t *mod, boolean augment_ok)
Find the last data node.
Definition: ncx.c:5559
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:4147
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:5651
obj_template_t * ncx_find_object(ncx_module_t *mod, const xmlChar *objname)
Find a top level module object.
Definition: ncx.c:4667
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:4584
grp_template_t * ncx_find_grouping(ncx_module_t *mod, const xmlChar *grpname, boolean useall)
Find the YANG grouping.
Definition: ncx.c:3947
obj_template_t * ncx_get_first_data_object(ncx_module_t *mod)
Get the first datastore object in the module.
Definition: ncx.c:5825
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:4255
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:4075
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:5740
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:6061
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:5481
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:3814
typ_template_t * ncx_find_type_que(const dlq_hdr_t *typeQ, const xmlChar *typname)
ncx_find_type_que
Definition: ncx.c:3914
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:5897
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:5633
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:4687
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:4044
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:5463
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:5979
const xmlChar * ncx_get_modversion(const ncx_module_t *mod)
Get the [sub]module version.
Definition: ncx.c:5363
const xmlChar * ncx_get_mod_source(const ncx_module_t *mod)
Get the module file source string for the specified module.
Definition: ncx.c:9947
ncx_module_t * ncx_get_mainmod(ncx_module_t *mod)
Get the main module.
Definition: ncx.c:5436
const xmlChar * ncx_get_mod_xmlprefix(const ncx_module_t *mod)
Get the module XML prefix for the specified module.
Definition: ncx.c:9919
boolean ncx_mod_unloadable(ncx_module_t *mod)
Check if this module can be unloaded.
Definition: ncx.c:13465
ncx_module_t * ncx_first_submodule(ncx_module_t *mod)
Get the first submodule in the specified main module.
Definition: ncx.c:13588
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:11129
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:15817
const xmlChar * ncx_get_mod_prefix(const ncx_module_t *mod)
Get the module prefix for the specified module.
Definition: ncx.c:9894
void ncx_set_mod_unloadable(ncx_module_t *mod)
Set this module so it can be unloaded.
Definition: ncx.c:13487
boolean ncx_modname_is_ocpattern(const xmlChar *modname)
Check if the module name is an openconfig file.
Definition: ncx.c:15428
const xmlChar * ncx_get_mod_ocversion(const ncx_module_t *mod)
Get the module openconfig-version string for the specified module.
Definition: ncx.c:9995
const xmlChar * ncx_get_modnamespace(const ncx_module_t *mod)
Get the module namespace URI.
Definition: ncx.c:5383
boolean ncx_get_ocpattern_mode(const ncx_module_t *mod)
Get the openconfig pattern mode.
Definition: ncx.c:15406
ncx_module_t * ncx_get_parent_mod(ncx_module_t *mod)
Find the correct module by checking mod->parent nodes.
Definition: ncx.c:11157
boolean ncx_is_yangmap_type(ncx_module_t *mod, boolean is_src)
Check the yangmap type flags.
Definition: ncx.c:16039
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:15295
void ncx_set_mod_hidden(ncx_module_t *mod)
Force the module to be hidden from advertisement.
Definition: ncx.c:14551
xmlns_id_t ncx_get_mod_nsid(const ncx_module_t *mod)
Get the main module namespace ID.
Definition: ncx.c:5339
const xmlChar * ncx_get_mod_revision(const ncx_module_t *mod)
Get the module revision string for the specified module.
Definition: ncx.c:9972
boolean ncx_mod_has_rpcs(ncx_module_t *mod)
Check if the module has any RPC operation definitions.
Definition: ncx.c:12146
void ncx_set_ocpattern_mode(ncx_module_t *mod, boolean mode)
Set the openconfig pattern mode.
Definition: ncx.c:15354
boolean ncx_mod_has_submodules(const ncx_module_t *mod)
Check if this is a main module with submodules.
Definition: ncx.c:16780
void ncx_set_module_supported(ncx_module_t *mod, boolean supported)
Set the module supported field.
Definition: ncx.c:13907
const xmlChar * ncx_get_modsource(const ncx_module_t *mod)
Get the module filespec source string.
Definition: ncx.c:5416
boolean ncx_skip_child_node_warn(const xmlChar *modname)
Internal compiler check to suppress warnings.
Definition: ncx.c:15794
void ncx_force_ocpattern_mode(ncx_module_t *mod)
Force the openconfig pattern mode to TRUE.
Definition: ncx.c:15381
boolean ncx_mod_is_hidden(const ncx_module_t *mod)
Check if the module is forced no advertise (e.g.
Definition: ncx.c:14534
ncx_yang_version_t ncx_get_yang_version(const ncx_module_t *mod)
Get the yang-version used in the module.
Definition: ncx.c:14360
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:13622
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:10016
boolean ncx_is_duplicate(ncx_module_t *mod, const xmlChar *defname)
Check if a module definition name is a duplicate.
Definition: ncx.c:5149
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:11101
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:12297
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:12193
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:3767
const xmlChar * ncx_get_modname(const ncx_module_t *mod)
Get the main module name.
Definition: ncx.c:5319
void ncx_number_all_objects(ncx_module_t *mod)
Number all objects for internal ordering comparisons.
Definition: ncx.c:14455
void ncx_set_yangmap_type(ncx_module_t *mod, boolean is_src)
Set the yangmap type flags.
Definition: ncx.c:16010
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:13333
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:13266
void ncx_collapse_submod_defs(ncx_module_t *mod)
Collapse submodule definitions into the main module.
Definition: ncx.c:12508
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:13404
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:12411
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:12605
void ncx_delete_mod_obsolete_objects(ncx_module_t *mod)
Delete all obsolete objects in mod.
Definition: ncx.c:11782
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:1526
NCX base64 string node for YANG 'binary' built-in type.
Definition: ncxtypes.h:862
one NCX_BT_BITS bit value
Definition: ncxtypes.h:815
one NCX_BT_ENUM enumeration value (user may enter 1 of 3 forms)
Definition: ncxtypes.h:807
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1362
error message replacement record
Definition: ncxtypes.h:1620
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:873
struct for holding r/o pointer to generic internal node for filtering purposes
Definition: ncxtypes.h:1057
YANG identity base.
Definition: ncxtypes.h:1091
YANG identity entry.
Definition: ncxtypes.h:1100
One 'import' clause in YANG.
Definition: ncxtypes.h:1294
One 'include' clause, YANG only.
Definition: ncxtypes.h:1324
server module info cache record for def_reg_add_mod
Definition: ncxtypes.h:1611
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1134
YANG revision entry.
Definition: ncxtypes.h:911
used with obj_deviation_t to defer object lookups
Definition: ncxtypes.h:1501
Schema Mount Root Control Block used in the object template.
Definition: ncxtypes.h:1889
keep track of the typenames used for local typedefs only used by ncxdump to generate XSDs OBSOLETE: D...
Definition: ncxtypes.h:1384
One YANG data-def-stmt.
Definition: obj.h:1220
Session Control Block.
Definition: ses.h:573
token parsing chain (main parser control block)
Definition: tk.h:415
One YANG 'typedef' definition – top-level type template.
Definition: typ.h:477
Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR parsing as well!...
Definition: xml_msg.h:397
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.