yumapro  23.10T-9
YumaPro SDK
Loading...
Searching...
No Matches
yang_obj.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2021, 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_yang_obj
13#define _H_yang_obj
14
15/* FILE: yang_obj.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
27/*********************************************************************
28* *
29* C H A N G E H I S T O R Y *
30* *
31*********************************************************************
32
33date init comment
34----------------------------------------------------------------------
3511-def-07 abb Begun; start from yang_parse.c
36
37*/
38
39#ifndef _H_dlq
40#include "dlq.h"
41#endif
42
43#ifndef _H_grp
44#include "grp.h"
45#endif
46
47#ifndef _H_ncxtypes
48#include "ncxtypes.h"
49#endif
50
51#ifndef _H_obj
52#include "obj.h"
53#endif
54
55#ifndef _H_status
56#include "status.h"
57#endif
58
59#ifndef _H_tk
60#include "tk.h"
61#endif
62
63#ifndef _H_yang
64#include "yang.h"
65#endif
66
67#ifdef __cplusplus
68extern "C" {
69#endif
70
71/* Group definied in obj.h */
72
186/********************************************************************
187* *
188* T Y P E S *
189* *
190*********************************************************************/
191
192
193/********************************************************************
194* *
195* F U N C T I O N S *
196* *
197*********************************************************************/
198
199
220extern status_t
222 tk_chain_t *tkc,
223 ncx_module_t *mod,
224 dlq_hdr_t *que,
225 obj_template_t *parent);
226
227
249extern status_t
251 tk_chain_t *tkc,
252 ncx_module_t *mod,
253 dlq_hdr_t *que,
254 obj_template_t *parent,
255 grp_template_t *grp);
256
257
277extern status_t
279 tk_chain_t *tkc,
280 ncx_module_t *mod);
281
282
300extern status_t
302 tk_chain_t *tkc,
303 ncx_module_t *mod);
304
322extern status_t
324 tk_chain_t *tkc,
325 ncx_module_t *mod);
326
327
346extern status_t
348 tk_chain_t *tkc,
349 ncx_module_t *mod);
350
351
370extern status_t
372 tk_chain_t *tkc,
373 ncx_module_t *mod,
374 dlq_hdr_t *datadefQ);
375
376
398extern status_t
400 tk_chain_t *tkc,
401 ncx_module_t *mod,
402 dlq_hdr_t *datadefQ);
403
404
422extern status_t
424 tk_chain_t *tkc,
425 ncx_module_t *mod,
426 dlq_hdr_t *datadefQ);
427
428
447extern status_t
449 tk_chain_t *tkc,
450 ncx_module_t *mod,
451 dlq_hdr_t *datadefQ);
452
453
468extern status_t
470 tk_chain_t *tkc,
471 ncx_module_t *mod);
472
473
496extern status_t
498 tk_chain_t *tkc,
499 ncx_module_t *mod,
500 dlq_hdr_t *datadefQ,
501 boolean ingrouping,
502 boolean is_top);
503
504
522extern status_t
524 tk_chain_t *tkc,
525 ncx_module_t *mod,
526 dlq_hdr_t *datadefQ);
527
528
551extern status_t
553 tk_chain_t *tkc,
554 ncx_module_t *mod,
555 dlq_hdr_t *datadefQ);
556
557
573extern status_t
575 tk_chain_t *tkc,
576 ncx_module_t *mod,
577 dlq_hdr_t *datadefQ);
578
579
592extern status_t
594 ncx_module_t *mod,
595 dlq_hdr_t *datadefQ);
596
597
607extern status_t
609 tk_chain_t *tkc,
610 ncx_module_t *mod,
611 dlq_hdr_t *datadefQ);
612
613
623extern status_t
625 ncx_module_t *mod,
626 ncx_error_t *err,
627 status_t res);
628
643extern status_t
645 ncx_module_t *mod,
646 dlq_hdr_t *que,
647 obj_template_t *obj);
648
649
650
651
667extern status_t
669 tk_chain_t *tkc,
670 ncx_module_t *mod,
671 dlq_hdr_t *que);
672
673
678#ifdef __cplusplus
679} /* end extern 'C' */
680#endif
681
682
683#endif /* _H_yang_obj */
dlq provides general double-linked list and queue support:
status_t
global error return code
Definition: status_enum.h:210
status_t yang_obj_resolve_augments_final(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Resolve augmnet statements (final pass)
Definition: yang_obj.c:12038
status_t yang_obj_consume_datadef(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *que, obj_template_t *parent)
Parse the next N tokens as a data-def-stmt.
Definition: yang_obj.c:11431
status_t yang_obj_add_object(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *que, obj_template_t *obj)
Check if an object already exists, and add it if not.
Definition: yang_obj.c:12896
status_t yang_obj_consume_rpc(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod)
Parse the next N tokens as a rpc-stmt.
Definition: yang_obj.c:11519
status_t yang_obj_resolve_uses(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Resolves uses-stmts.
Definition: yang_obj.c:11855
status_t yang_obj_resolve_augments(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Resolve augment statements.
Definition: yang_obj.c:12002
status_t yang_obj_resolve_datadefs(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Resolve data-def-stmts.
Definition: yang_obj.c:11813
status_t yang_obj_resolve_xpath(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Resolve XPath statements.
Definition: yang_obj.c:12597
status_t yang_obj_top_resolve_final(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Resolve top-level objects (final pass)
Definition: yang_obj.c:12527
status_t set_tkc_error(tk_chain_t *tkc, ncx_module_t *mod, ncx_error_t *err, status_t res)
utility function for setting and reporting tkc errors.
Definition: yang_obj.c:12863
status_t yang_obj_consume_structure(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *que)
Parse the next N tokens as a structure as defined in RFC 8791.
Definition: yang_obj.c:12931
status_t yang_obj_consume_datadef_grp(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *que, obj_template_t *parent, grp_template_t *grp)
Parse the next N tokens as a data-def-stmt (in a grouping)
Definition: yang_obj.c:11475
status_t yang_obj_consume_deviation(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod)
Parse the next N tokens as a top-level deviation-stmt.
Definition: yang_obj.c:11648
status_t yang_obj_resolve_xpath_final(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Resolve XPath statements (final pass)
Definition: yang_obj.c:12631
status_t yang_obj_resolve_deviations(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod)
Resolve deviation-stmts.
Definition: yang_obj.c:12088
status_t yang_obj_resolve_final(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ, boolean ingrouping, boolean is_top)
Resolve objects (final pass)
Definition: yang_obj.c:12265
status_t yang_obj_consume_augment(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod)
Parse the next N tokens as a top-level augment-stmt.
Definition: yang_obj.c:11608
status_t yang_obj_remove_deleted_nodes(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Find any nodes marked for deletion and remove them.
Definition: yang_obj.c:12776
status_t yang_obj_consume_notification(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod)
Parse the next N tokens as a notification-stmt.
Definition: yang_obj.c:11563
status_t yang_obj_check_leafref_loops(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *datadefQ)
Check all leafref objects for hard-wired object loops Must be done after yang_obj_resolve_xpath.
Definition: yang_obj.c:12663
YANG Grouping Statement Handler.
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
Global error messages for status code enumerations.
One YANG 'grouping' definition – sibling set template.
Definition: grp.h:87
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:873
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1134
One YANG data-def-stmt.
Definition: obj.h:1220
token parsing chain (main parser control block)
Definition: tk.h:415
YANG parser control block.
Definition: yang.h:204
NCX Syntax Token Handler.
YANG Module parser utilities.