yumapro  22.10T-4
YumaPro SDK
Loading...
Searching...
No Matches
obj.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2022, 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_obj
13#define _H_obj
14
15/* FILE: 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----------------------------------------------------------------------
3509-dec-07 abb Begun
3621jul08 abb start obj-based rewrite
37
38*/
39
40#include <xmlstring.h>
41#include <xmlregexp.h>
42
43#include "log.h"
44#include "grp.h"
45#include "ncxconst.h"
46#include "ncxtypes.h"
47#include "status.h"
48#include "tk.h"
49#include "rpc.h"
50#include "typ.h"
51#include "xmlns.h"
52#include "xml_util.h"
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
58/********************************************************************
59* *
60* C O N S T A N T S *
61* *
62*********************************************************************/
63
64/* object pointer inside obj_key_t struct */
65#define OBJ_KEYOBJ(KO) (KO)->keyobj
66
67/* default vaule for config statement */
68#define OBJ_DEF_CONFIG TRUE
69
70/* default vaule for mandatory statement */
71#define OBJ_DEF_MANDATORY FALSE
72
73/* number of static xpath backptrs to have in each object node */
74/*** CHANGED FROM 4 to 2 23oct19 ***/
75#define OBJ_NUM_XPATH_BACKPTRS 2
76
77/* each object can have a SIL callback priority 1..255 */
78#define OBJ_DEF_SIL_PRIORITY 255
79#define OBJ_MIN_SIL_PRIORITY 1
80#define OBJ_MAX_SIL_PRIORITY 255
81
82
83/********* flags field in obj_template_t *************/
84
85/* object is cloned from a grouping, for a uses statement */
86#define OBJ_FL_CLONE bit0
87
88/* def is a CLI text block */
89#define OBJ_FL_CLI_TEXT_BLOCK bit1
90
91/* clone source
92 * == 0 : cloned object from uses
93 * == 1 : cloned object from augment
94 */
95#define OBJ_FL_AUGCLONE bit2
96
97/* object is marked for deletion -- dynamic flag */
98#define OBJ_FL_DELETED bit3
99
100/* object is dirty in the candidate datastore; used by server only */
101#define OBJ_FL_CDIRTY bit4
102
103/* object is a top-level definition within a module or submodule */
104#define OBJ_FL_TOP bit5
105
106/* object was entered with a 'kw name;' format and is
107 * considered empty by the yangdump program
108 */
109#define OBJ_FL_EMPTY bit6
110
111/* object has been visited by the yangdiff program */
112#define OBJ_FL_SEEN bit7
113
114/* bit7 is reused in the server since the 'seen' bit only
115 * applies to the yangdiff-pro program
116 * object is dirty in the running datastore; used by server only
117 */
118#define OBJ_FL_RDIRTY bit7
119
120/* object marked as changed by the yangdiff program */
121#define OBJ_FL_DIFF bit8
122
123/* object is marked as ncx:hidden */
124#define OBJ_FL_HIDDEN bit9
125
126/* object is marked as ncx:root */
127#define OBJ_FL_ROOT bit10
128
129/* object is marked as a password */
130#define OBJ_FL_PASSWD bit11
131
132/* object is marked as a CLI-only node */
133#define OBJ_FL_CLI bit12
134
135/* object is marked as an XSD list data type */
136#define OBJ_FL_XSDLIST bit13
137
138/* OBJ_TYP_LEAF object is being uses as a key */
139#define OBJ_FL_KEY bit14
140
141/* object is marked as abstract: not CLI or config data */
142#define OBJ_FL_ABSTRACT bit15
143
144/* object is marked as config set so OBJ_FL_CONFIG is valid */
145#define OBJ_FL_CONFSET bit16
146
147/* object config value */
148#define OBJ_FL_CONFIG bit17
149
150/* object is marked as mandatory set so OBJ_FL_MANDATORY is valid */
151#define OBJ_FL_MANDSET bit18
152
153/* object mandatory value */
154#define OBJ_FL_MANDATORY bit19
155
156/* object used in a unique-stmt within a list */
157#define OBJ_FL_UNIQUE bit20
158
159/* object data type is an XPath string */
160#define OBJ_FL_XPATH bit21
161
162/* object data type is a QName string */
163#define OBJ_FL_QNAME bit22
164
165/* object data type is a schema-instance string */
166#define OBJ_FL_SCHEMAINST bit23
167
168/* object is tagged ncx:secure */
169#define OBJ_FL_SECURE bit24
170
171/* object is tagged ncx:very-secure */
172#define OBJ_FL_VERY_SECURE bit25
173
174/* object is tagged ncx:default-parm-equals-ok */
175#define OBJ_FL_CLI_EQUALS_OK bit26
176
177/* object is tagged ncx:sil-delete-children-first */
178#define OBJ_FL_SIL_DELETE_CHILDREN_FIRST bit27
179
180/* object is tagged as ncx:user-write with no create access */
181#define OBJ_FL_BLOCK_CREATE bit28
182
183/* object is tagged as ncx:user-write with no update access */
184#define OBJ_FL_BLOCK_UPDATE bit29
185
186/* object is tagged as ncx:user-write with no delete access */
187#define OBJ_FL_BLOCK_DELETE bit30
188
189/* object is tagged as ywx:rpc-root operation container */
190#define OBJ_FL_RPC_ROOT bit31
191
192
193/********* xflags field in obj_template_t *************/
194
195/* object is a default NP-container */
196#define OBJ_FL_DEF_NPCON bit0
197
198/* object has been checked for enabled;
199 * this flag needs to be cleared if dynamic
200 * features are used and the feature becomes disabled!!!
201 */
202#define OBJ_FL_ENABLED_CHK bit1
203
204/* indicates that the object is enabled, which just means
205 * any if-features statements for this object are true
206 */
207#define OBJ_FL_ENABLED bit2
208
209/* indicates that this visible object has a visible sibling
210 * object with the same local-name but from another module
211 */
212#define OBJ_FL_DUP_LOCAL bit3
213
214/* indicates that this object is an RPC operation that is
215 * not allowed to be called concurrently by multiple sessions
216 * at once
217 */
218#define OBJ_FL_EXCLUSIVE_RPC bit4
219
220/* indicates that this object is has the sil-force-replay
221 * flag set
222 */
223#define OBJ_FL_SIL_FORCE_REPLAY bit5
224
225/* indicates that this object is has the sil-force-replay
226 * flag set for a replace operation
227 */
228#define OBJ_FL_SIL_FORCE_REPLACE_REPLAY bit6
229
230/* indicates that this object is an anyxml object that is
231 * really a ywx:datapath node. The object path-expr will
232 * be sent in XML instances of the object.
233 * (Like object Location header)
234 */
235#define OBJ_FL_DATAPATH bit7
236
237/* indicates that is object has get2 callbacks registered
238 * either for 1 or more submodules. This flag is
239 * set and cleared dynamically so do not cache the value
240 */
241#define OBJ_FL_REMOTE_GET2 bit8
242
243/* indicates the 'units' field has been replaced with
244 * a malloced string via deviations, could be a clone
245*/
246#define OBJ_FL_FREE_UNITS bit9
247
248/* indicates the 'typdef' field has been replaced with
249 * a malloced struct via deviations, could be a clone
250*/
251#define OBJ_FL_FREE_TYPDEF bit10
252
253
254/* indicates the object uses the edit2 callback mode */
255#define OBJ_FL_EDIT2_MODE bit11
256
257/* indicates that leafref validation has been disabled for the
258 * object. The leafref will be treated as if it had a
259 * require-instance false; sub-statement
260 */
261#define OBJ_FL_SKIP_LEAFREF bit12
262
263/* indicates that the object yang_hash field contains
264 * the YANG HASH value for the node; hash can be zero
265 * so set this flag to make sure obj->yang_hash field is set
266 */
267#define OBJ_FL_YANG_HASH bit13
268
269/* indicates that the object yang_hash field contains
270 * the rehashed value for the node because of a clash
271 */
272#define OBJ_FL_YANG_REHASH bit14
273
274/* indicates that the cbset (callback set) is malloced
275 * and a simple m__free(cbset) is needed to clean up
276 */
277#define OBJ_FL_CBSET_MALLOCED bit15
278
279/* indicates the object is 1 of the ncx generic templates */
280#define OBJ_FL_GENERIC bit16
281
282/* indicates the object has defaults has been checked */
283/* NOT USED */
284#define OBJ_FL_DEF_DONE bit17
285
286/* indicates the object has defaults (valid if bit17 set) */
287/* NOT USED */
288#define OBJ_FL_DEF bit18
289
290/* indicates the object is an RPC that is OK for library mode */
291#define OBJ_FL_LIBMODE bit19
292
293/* indicates the object contains a smiv2 object identifier */
294#define OBJ_FL_SMIV2_OID bit20
295
296/* indicates object is tagged ywx:no-nvstore */
297#define OBJ_FL_NO_NVSTORE bit21
298
299/* object is tagged ncx:no-sil-delete-children-first */
300#define OBJ_FL_NO_SIL_DELETE_CHILDREN_FIRST bit22
301
302/* object is tagged as a source node in a yangmap nodemap */
303#define OBJ_FL_YANGMAP_SOURCE bit23
304
305/* object is tagged as a target node in a yangmap nodemap */
306#define OBJ_FL_YANGMAP_TARGET bit24
307
308/* object is tagged as a child node in a yangmap nodemap */
309#define OBJ_FL_YANGMAP_CHILD bit25
310
311/* object is tagged as a keymap node in a yangmap nodemap */
312#define OBJ_FL_YANGMAP_KEY bit26
313
314/* indicates that DUP_LOCAL test has been done */
315#define OBJ_FL_DUP_LOCAL_DONE bit27
316
317/* This bit is set in the agt_val_silcall to indicate that the
318 * Transaction Hook is already setup for the object and that
319 * any consecutive attempts to assign the hook to this object
320 * should be skipped
321 */
322#define OBJ_FL_TRANS_HOOK_SET bit29
323
324/* This bit is set to indicate that the sil-test-get-when
325 * override flag is set for the object which is expected
326 * to be an operational data node
327 */
328#define OBJ_FL_GET_WHEN_SET bit30
329
330/* This bit is set to indicate the value of the
331 * override flag and is only used if OBJ_FL_GET_WHEN_SET
332 * bit is set to 1
333 */
334#define OBJ_FL_GET_WHEN bit31
335
336
337/********* xflags2 field in obj_template_t *************/
338 /* xflags2 is a continuation of xflags bits */
339
340/* This bit is set to indicate that the sil-aio-get2
341 * All in One extension flag is set for the object.
342 */
343#define OBJ_FL_AIO_GET2 bit0
344
345/* This flag indicates that this object has All in One children
346 * But itself it does not have this extension setup.
347 * Will be set only if the current object is GET2 object with
348 * GET2 flags setup.
349 *
350 * GET2 object but not All in One object, but a parent of AIO
351 */
352#define OBJ_FL_AIO_PARENT bit1
353
354/* This bit is set to indicate that the sil-aio-get2
355 * All in One extension flag is set for the object and has XML
356 * parameter setup.
357 */
358#define OBJ_FL_AIO_GET2_XML bit2
359
360/* This bit is set to indicate that the sil-aio-get2
361 * All in One extension flag is set for the object and has JSON
362 * parameter setup.
363 */
364#define OBJ_FL_AIO_GET2_JSON bit3
365
366/* This bit is set to check whether the object has Set Default
367 * Hook callback and should invoke it in order to set custom
368 * system default value BUT only if there is no any YANG defaults.
369 */
370#define OBJ_FL_DEF_HOOK bit4
371
372/* This bit indicates that the leaf or leaf-list is really
373 * an openconfig-hashed-value string not a plain string
374 * and not an ncx:password
375 */
376#define OBJ_FL_OC_HASHED_VALUE bit5
377
378/* This bit is set to indicate that the object is NOT OK for nolock-get
379 * Use on config=false nodes that it is not safe to GET in the
380 * PTHREADS build without a rdlock on running
381 */
382#define OBJ_FL_BAN_NOLOCK_GET bit6
383
384/* This bit is set to indicate that the object has Mount Point
385 * TBD: Why is this needed since the rootcb will be set only
386 * if the object is a mount point?
387 */
388#define OBJ_FL_MOUNT_POINT bit7
389
390/* This bit is set if there is a descendant that is a mount point
391 * This is needed so delete or replace operations on the MP or
392 * its ancestor will force SIL and SIL-SA callbacks to be invoked
393 * instead of skipping them.
394 */
395#define OBJ_FL_DESC_MOUNT_POINT bit8
396
397
398/********* uflags field in obj_template_t *************/
399
400/* This field represents the user flags and no system bits
401 * are defined for this field. It is used by yang_obj_cb
402 * callback functions to set user-specific flags
403 */
404
405/********* silflags field in obj_template_t *************/
406
407/* This bit is set in agt_rpc to indicate the RPC is
408 * currently being invoked; If another session attempts
409 * to invoke the RPC while busy, and the obj_is_exclusive_rpc
410 * the RPC request will be rejected by the server
411 */
412#define OBJ_FL_SIL_BUSY bit0
413
414#define OBJ_TYPE(OBJ) (OBJ)->objtype
415
416#define OBJ_INDEX(OBJ) (OBJ)->index
417
418/* mark the object as a top object since the yang_obj does
419 * not catch top-level uses from a grouping as a top object
420 */
421#define OBJ_SET_TOP(OBJ) (OBJ)->flags |= OBJ_FL_TOP
422
423#define OBJ_SET_SIL_BUSY(OBJ) (OBJ)->silflags |= OBJ_FL_SIL_BUSY
424
425#define OBJ_CLEAR_SIL_BUSY(OBJ) (OBJ)->silflags &= ~OBJ_FL_SIL_BUSY
426
427#define OBJ_IS_SIL_BUSY(OBJ) ((OBJ)->silflags & OBJ_FL_SIL_BUSY)
428
429#define OBJ_GET_CBSET(OBJ) (OBJ)->cbset
430
431
432/* Get2 support */
433#define OBJ_SET_REMOTE_GET2(OBJ) (OBJ)->xflags |= OBJ_FL_REMOTE_GET2
434
435#define OBJ_CLEAR_REMOTE_GET2(OBJ) (OBJ)->xflags &= ~OBJ_FL_REMOTE_GET2
436
437#define OBJ_HAS_REMOTE_GET2(OBJ) ((OBJ)->xflags & OBJ_FL_REMOTE_GET2)
438
439#define OBJ_SET_GET2CB(OBJ, CB) (OBJ)->get2cb = CB
440
441#define OBJ_GET_GET2CB(OBJ) (getcb_fn2_t)(OBJ)->get2cb
442
443#define OBJ_SET_EDIT2_MODE(OBJ) (OBJ)->xflags |= OBJ_FL_EDIT2_MODE
444
445#define OBJ_IS_EDIT2_MODE(OBJ) ((OBJ)->xflags & OBJ_FL_EDIT2_MODE)
446
447
448/* XPath tuning */
449#define OBJ_SET_SKIP_LEAFREF(OBJ) (OBJ)->xflags |= OBJ_FL_SKIP_LEAFREF
450
451#define OBJ_IS_SKIP_LEAFREF(OBJ) ((OBJ)->xflags & OBJ_FL_SKIP_LEAFREF)
452
453
454
455/* Object YANG Hash */
456#define OBJ_SET_YANG_HASH(OBJ) (OBJ)->xflags |= OBJ_FL_YANG_HASH
457
458#define OBJ_IS_YANG_HASH(OBJ) ((OBJ)->xflags & OBJ_FL_YANG_HASH)
459
460
461/* Object Rehash */
462#define OBJ_SET_YANG_REHASH(OBJ) (OBJ)->xflags |= OBJ_FL_YANG_REHASH
463
464#define OBJ_IS_YANG_REHASH(OBJ) ((OBJ)->xflags & OBJ_FL_YANG_REHASH)
465
466
467/* CBSET Malloced */
468#define OBJ_SET_CBSET_MALLOCED(OBJ) (OBJ)->xflags |= OBJ_FL_CBSET_MALLOCED
469
470#define OBJ_IS_CBSET_MALLOCED(OBJ) ((OBJ)->xflags & OBJ_FL_CBSET_MALLOCED)
471
472#define OBJ_CLEAR_CBSET_MALLOCED(OBJ) (OBJ)->xflags &= ~OBJ_FL_CBSET_MALLOCED
473
474/* Object is generic */
475#define OBJ_SET_GENERIC(OBJ) (OBJ)->xflags |= OBJ_FL_GENERIC
476
477#define OBJ_IS_GENERIC(OBJ) ((OBJ)->xflags & OBJ_FL_GENERIC)
478
479
480/* Object or children have a default value */
481/* NOT USED */
482#define OBJ_SET_DEF_DONE(OBJ) (OBJ)->xflags |= OBJ_FL_DEF_DONE
483
484/* NOT USED */
485#define OBJ_IS_DEF_DONE(OBJ) ((OBJ)->xflags & OBJ_FL_DEF_DONE)
486
487/* NOT USED */
488#define OBJ_SET_DEF(OBJ) (OBJ)->xflags |= OBJ_FL_DEF
489
490/* NOT USED */
491#define OBJ_IS_DEF(OBJ) ((OBJ)->xflags & OBJ_FL_DEF)
492
493/* Object is an RPC that is allowed in library mode */
494#define OBJ_SET_LIBMODE(OBJ) (OBJ)->xflags |= OBJ_FL_LIBMODE
495
496#define OBJ_IS_LIBMODE(OBJ) ((OBJ)->xflags & OBJ_FL_LIBMODE)
497
498#define OBJ_USER_FLAGS(OBJ) (OBJ)->uflags
499
500/* get the object pointer in an obj_key_t */
501#define OBJ_KEY_OBJ(K) (K)->keyobj
502
503/* get the current edit transaction id;
504 * -- changed on each transaction this object is tested
505 */
506#define OBJ_EDIT_TXID(OBJ) (OBJ)->edit_txid
507
508#define OBJ_EXTR_MUST_TXID(OBJ) (OBJ)->must_txid
509#define OBJ_EXTR_WHEN_TXID(OBJ) (OBJ)->when_txid
510#define OBJ_EXTR_LEAFREF_TXID(OBJ) (OBJ)->leafref_txid
511
512
513/* Object is flagged no-nvstore */
514#define OBJ_SET_NO_NVSTORE(OBJ) (OBJ)->xflags |= OBJ_FL_NO_NVSTORE
515
516#define OBJ_IS_NO_NVSTORE(OBJ) ((OBJ)->xflags & OBJ_FL_NO_NVSTORE)
517
518
519/* Object is flagged yangmap-source */
520#define OBJ_SET_YANGMAP_SOURCE(OBJ) \
521 (OBJ)->xflags |= OBJ_FL_YANGMAP_SOURCE
522
523#define OBJ_IS_YANGMAP_SOURCE(OBJ) \
524 ((OBJ)->xflags & OBJ_FL_YANGMAP_SOURCE)
525
526
527/* Object is flagged yangmap-target */
528#define OBJ_SET_YANGMAP_TARGET(OBJ) \
529 (OBJ)->xflags |= OBJ_FL_YANGMAP_TARGET
530
531#define OBJ_IS_YANGMAP_TARGET(OBJ) \
532 ((OBJ)->xflags & OBJ_FL_YANGMAP_TARGET)
533
534/* Object is flagged yangmap-childmap */
535#define OBJ_SET_YANGMAP_CHILD(OBJ) \
536 (OBJ)->xflags |= OBJ_FL_YANGMAP_CHILD
537
538#define OBJ_IS_YANGMAP_CHILD(OBJ) \
539 ((OBJ)->xflags & OBJ_FL_YANGMAP_CHILD)
540
541/* Object is flagged yangmap-keymap */
542#define OBJ_SET_YANGMAP_KEY(OBJ) \
543 (OBJ)->xflags |= OBJ_FL_YANGMAP_KEY
544
545#define OBJ_IS_YANGMAP_KEY(OBJ) \
546 ((OBJ)->xflags & OBJ_FL_YANGMAP_KEY)
547
548/* if OBJ_IS_YANGMAP_SOURCE : yangmap_cb == nodemap_t
549 * if OBJ_IS_YANGMAP_TARGET : yangmap_cb == nodemap_t
550 * if OBJ_IS_YANGMAP_CHILD : yangmap_cb == childmap_t
551 * if OBJ_IS_YANGMAP_KEY : yangmap_cb == keymap_t
552 */
553#define OBJ_YANGMAP_CB(OBJ) (OBJ)->yangmap_cb
554
555/* Object DUP_LOCAL test has been done */
556#define OBJ_SET_DUP_LOCAL_DONE(OBJ) \
557 (OBJ)->xflags |= OBJ_FL_DUP_LOCAL_DONE
558
559#define OBJ_IS_DUP_LOCAL_DONE(OBJ) \
560 ((OBJ)->xflags & OBJ_FL_DUP_LOCAL_DONE)
561
562
563#define OBJ_RPC_SUPPORTED(OBJ) (OBJ)->def.rpc->supported
564
565
566/* Trans Hook assignment bits */
567#define OBJ_SET_TRANS_HOOK_SET(OBJ) (OBJ)->xflags |= OBJ_FL_TRANS_HOOK_SET
568#define OBJ_IS_TRANS_HOOK_SET(OBJ) ((OBJ)->xflags & OBJ_FL_TRANS_HOOK_SET)
569#define OBJ_CLEAR_TRANS_HOOK_SET(OBJ) (OBJ)->xflags &= ~OBJ_FL_TRANS_HOOK_SET
570
571
572/* All in One assignment bits */
573#define OBJ_SET_AIO_GET2(OBJ) (OBJ)->xflags2 |= OBJ_FL_AIO_GET2
574#define OBJ_IS_AIO_GET2(OBJ) ((OBJ)->xflags2 & OBJ_FL_AIO_GET2)
575#define OBJ_CLEAR_AIO_GET2(OBJ) (OBJ)->xflags2 &= ~ OBJ_FL_AIO_GET2
576
577/* GET2 object but not All in One object, but a parent of AIO */
578#define OBJ_SET_AIO_PARENT(OBJ) (OBJ)->xflags2 |= OBJ_FL_AIO_PARENT
579#define OBJ_IS_AIO_PARENT(OBJ) ((OBJ)->xflags2 & OBJ_FL_AIO_PARENT)
580#define OBJ_CLEAR_AIO_PARENT(OBJ) (OBJ)->xflags2 &= ~ OBJ_FL_AIO_PARENT
581
582/* AIO with XML/JSON support flags*/
583#define OBJ_SET_AIO_GET2_XML(OBJ) (OBJ)->xflags2 |= OBJ_FL_AIO_GET2_XML
584#define OBJ_IS_AIO_GET2_XML(OBJ) ((OBJ)->xflags2 & OBJ_FL_AIO_GET2_XML)
585
586#define OBJ_SET_AIO_GET2_JSON(OBJ) (OBJ)->xflags2 |= OBJ_FL_AIO_GET2_JSON
587#define OBJ_IS_AIO_GET2_JSON(OBJ) ((OBJ)->xflags2 & OBJ_FL_AIO_GET2_JSON)
588
589/* Dynamic Default Hook assignment bits */
590#define OBJ_SET_DEF_HOOK(OBJ) (OBJ)->xflags2 |= OBJ_FL_DEF_HOOK
591#define OBJ_IS_DEF_HOOK(OBJ) ((OBJ)->xflags2 & OBJ_FL_DEF_HOOK)
592#define OBJ_CLEAR_DEF_HOOK(OBJ) (OBJ)->xflags2 &= ~OBJ_FL_DEF_HOOK
593#define OBJ_GET_DEF_HOOK_CB(OBJ) (ncx_def_hook_cbfn_t)(OBJ)->def_hook_cb
594
595/* openconfig-hashed-value bit */
596#define OBJ_SET_OC_HASHED_VALUE(OBJ) (OBJ)->xflags2 |= OBJ_FL_OC_HASHED_VALUE
597#define OBJ_IS_OC_HASHED_VALUE(OBJ) ((OBJ)->xflags2 & OBJ_FL_OC_HASHED_VALUE)
598
599/* Static Ban Nock GET assignment bits */
600#define OBJ_SET_BAN_NOLOCK_GET(OBJ) (OBJ)->xflags2 |= OBJ_FL_BAN_NOLOCK_GET
601#define OBJ_IS_BAN_NOLOCK_GET(OBJ) ((OBJ)->xflags2 & OBJ_FL_BAN_NOLOCK_GET)
602
603
604/* Mount Point bit */
605#define OBJ_SET_MOUNT_POINT(OBJ) (OBJ)->xflags2 |= OBJ_FL_MOUNT_POINT
606#define OBJ_IS_MOUNT_POINT(OBJ) ((OBJ)->xflags2 & OBJ_FL_MOUNT_POINT)
607
608/* Mount Point Support Utility functions */
609#define OBJ_SET_ROOTCB(OBJ, ROOTCB) (OBJ)->rootcb = ROOTCB
610#define OBJ_GET_ROOTCB(OBJ) (OBJ)->rootcb
611
612/* Mount Point Descendant bit */
613#define OBJ_SET_DESC_MOUNT_POINT(OBJ) (OBJ)->xflags2 |= OBJ_FL_DESC_MOUNT_POINT
614#define OBJ_IS_DESC_MOUNT_POINT(OBJ) ((OBJ)->xflags2 & OBJ_FL_DESC_MOUNT_POINT)
615
616
617/********************************************************************
618* *
619* T Y P E S *
620* *
621*********************************************************************/
622
623// Header Only
646typedef enum obj_type_t_ {
651
657
660
663
666
672
688
696
707
716
717
733
736
744
745
746#define OBJ_TYP_LAST OBJ_TYP_ACTION
747
753typedef uint16 obj_index_t;
754
755
757typedef enum obj_augtype_t_ {
764
765
767typedef struct obj_key_t_ {
768 dlq_hdr_t qhdr;
769 struct obj_template_t_ *keyobj;
770 boolean seen;
771} YPACK obj_key_t;
772
773
775typedef struct obj_defval_tk_t_ {
776 dlq_hdr_t qhdr;
777 xmlChar *def;
779} YPACK obj_defval_tk_t;
780
781
783typedef struct obj_unique_comp_t_ {
784 dlq_hdr_t qhdr;
785 struct obj_template_t_ *unobj;
786 xmlChar *xpath;
787 boolean isduplicate;
788} YPACK obj_unique_comp_t;
789
790
792typedef struct obj_unique_t_ {
793 dlq_hdr_t qhdr;
794 xmlChar *xpath;
795 dlq_hdr_t compQ;
796 boolean seen;
797 boolean isconfig;
799} YPACK obj_unique_t;
800
801
803typedef struct obj_container_t_ {
805 xmlChar *name;
806
808 xmlChar *descr;
809
811 xmlChar *ref;
812
814 xmlChar *presence;
815 dlq_hdr_t *typedefQ;
816 dlq_hdr_t *groupingQ;
817 dlq_hdr_t *datadefQ;
819 dlq_hdr_t mustQ;
820 struct obj_template_t_ *defaultparm;
821 obj_index_t last_index;
822} YPACK obj_container_t;
823
824
826typedef struct obj_leaf_t_ {
828 xmlChar *name;
829
831 xmlChar *units;
832
834 xmlChar *defval;
835
837 xmlChar *descr;
838
840 xmlChar *ref;
841
844
847
849 uint16 keynum;
850
851 dlq_hdr_t mustQ;
854 dlq_hdr_t leafrefQ;
857 struct obj_template_t_ *leafrefobj;
858} YPACK obj_leaf_t;
859
860
862typedef struct obj_leaflist_t_ {
864 xmlChar *name;
865
867 xmlChar *units;
868
870 xmlChar *descr;
871
873 xmlChar *ref;
874
877
879 boolean defset;
880 boolean ordersys;
881 boolean minset;
882 uint32 minelems;
883 boolean maxset;
884 uint32 maxelems;
886 dlq_hdr_t mustQ;
887 dlq_hdr_t leafrefQ;
888 dlq_hdr_t defvalQ;
891 struct obj_template_t_ *leafrefobj;
892} YPACK obj_leaflist_t;
893
894
896typedef struct obj_list_t_ {
898 xmlChar *name;
899
901 xmlChar *keystr;
902
904 xmlChar *descr;
905
907 xmlChar *ref;
908 dlq_hdr_t *typedefQ;
909 dlq_hdr_t *groupingQ;
910 dlq_hdr_t *datadefQ;
911 dlq_hdr_t keyQ;
912 dlq_hdr_t uniqueQ;
913 boolean ordersys;
914 boolean minset;
915 uint32 minelems;
916 boolean maxset;
917 uint32 maxelems;
919 dlq_hdr_t mustQ;
923
926} YPACK obj_list_t;
927
928
930typedef struct obj_choice_t_ {
931 xmlChar *name;
932 xmlChar *defval;
935 xmlChar *descr;
936
938 xmlChar *ref;
939 dlq_hdr_t *caseQ;
940 boolean caseQclone;
942} YPACK obj_choice_t;
943
944
946typedef struct obj_case_t_ {
947 xmlChar *name;
950 xmlChar *descr;
951
953 xmlChar *ref;
954
955 dlq_hdr_t *datadefQ;
959 boolean nameclone;
961} YPACK obj_case_t;
962
963
965typedef struct obj_uses_t_ {
966 xmlChar *prefix;
967 xmlChar *name;
970 xmlChar *descr;
971
973 xmlChar *ref;
975 dlq_hdr_t *datadefQ;
977 boolean expand_done;
978} YPACK obj_uses_t;
979
980
982typedef struct obj_refine_t_ {
984 xmlChar *target;
985
987 struct obj_template_t_ *targobj;
988
990 xmlChar *descr;
991
999
1001 xmlChar *ref;
1002
1005
1007 xmlChar *presence;
1008
1011
1012 dlq_hdr_t defval_tkQ;
1016
1019 uint32 minelems;
1021 uint32 maxelems;
1023 dlq_hdr_t mustQ;
1024} YPACK obj_refine_t;
1025
1026
1028typedef struct obj_rpcio_t_ {
1029 xmlChar *name;
1030 dlq_hdr_t *typedefQ;
1031 dlq_hdr_t *groupingQ;
1032 dlq_hdr_t datadefQ;
1033 dlq_hdr_t mustQ;
1038 boolean is_input;
1039
1043 struct obj_template_t_ *defaultparm;
1044} YPACK obj_rpcio_t;
1045
1046
1048typedef struct obj_rpc_t_ {
1050 xmlChar *name;
1051
1053 xmlChar *descr;
1054
1056 xmlChar *ref;
1057
1059 dlq_hdr_t *typedefQ;
1060 dlq_hdr_t *groupingQ;
1061 dlq_hdr_t datadefQ;
1062 boolean is_action;
1066 boolean supported;
1067} YPACK obj_rpc_t;
1068
1069
1071typedef struct obj_augment_t_ {
1073 xmlChar *target;
1074
1076 xmlChar *descr;
1077
1079 xmlChar *ref;
1080
1082 struct obj_template_t_ *targobj;
1083
1087 dlq_hdr_t datadefQ;
1088 uint16 depth;
1089} YPACK obj_augment_t;
1090
1091
1093typedef struct obj_notif_t_ {
1095 xmlChar *name;
1096
1098 xmlChar *descr;
1099
1101 xmlChar *ref;
1103 dlq_hdr_t *typedefQ;
1104 dlq_hdr_t *groupingQ;
1105 dlq_hdr_t datadefQ;
1106 dlq_hdr_t mustQ;
1109 boolean in_data;
1110} YPACK obj_notif_t;
1111
1112
1114typedef struct obj_iffeature_ptr_t_ {
1115 dlq_hdr_t qhdr;
1117} YPACK obj_iffeature_ptr_t;
1118
1119
1121typedef struct obj_errmsg_filter_t_ {
1122 dlq_hdr_t qhdr;
1123 xmlChar *matchstr;
1124 boolean is_errortag;
1125} YPACK obj_errmsg_filter_t;
1126
1127
1129typedef struct obj_errmsg_parm_t_ {
1130 dlq_hdr_t qhdr;
1131 xmlChar *path;
1134 uint32 len;
1135
1137 xmlChar *valstr;
1138} YPACK obj_errmsg_parm_t;
1139
1140
1142typedef struct obj_errmsg_t_ {
1143 dlq_hdr_t qhdr;
1144 xmlChar *basestr;
1145 xmlChar *langstr;
1146 dlq_hdr_t parmQ;
1147 dlq_hdr_t filterQ;
1148} YPACK obj_errmsg_t;
1149
1150
1152typedef unsigned long oid_t;
1153
1160typedef struct obj_oid_t_ {
1161 uint8 cnt;
1163} YPACK obj_oid_t;
1164
1165
1167typedef uint8 obj_testflags_t;
1168
1169
1174typedef struct obj_template_t_ {
1175 dlq_hdr_t qhdr;
1178 uint32 yang_hash;
1180 uint32 flags;
1181 uint32 xflags;
1182 uint32 xflags2;
1184 uint32 uflags;
1185 uint8 silflags;
1197 struct obj_template_t_ *parent;
1198 struct obj_template_t_ *usesobj;
1199 struct obj_template_t_ *augobj;
1201 struct xpath_pcb_t_ *when;
1202 dlq_hdr_t metadataQ;
1203 dlq_hdr_t appinfoQ;
1204 dlq_hdr_t iffeatureQ;
1210
1212 dlq_hdr_t *dataruleQ;
1213
1221 void *cbset;
1222
1224 void *get2cb;
1225
1233 struct ncx_module_t_ *mod;
1234
1237
1239 struct xpath_pcb_t_ *xpath_backptr[OBJ_NUM_XPATH_BACKPTRS];
1240
1242 dlq_hdr_t xpath_backptrQ; // backptr to xpath_pcb_t
1243
1249
1251 dlq_hdr_t *errmsgQ; // Q of obj_errmsg_t
1252
1258
1261
1264
1267
1270
1272 union def_ {
1273 obj_container_t *container;
1274 obj_leaf_t *leaf;
1275 obj_leaflist_t *leaflist;
1276 obj_list_t *list;
1277 obj_choice_t *choic;
1278 obj_case_t *cas;
1279 obj_uses_t *uses;
1280 obj_refine_t *refine;
1281 obj_augment_t *augment;
1282 obj_rpc_t *rpc;
1283 obj_rpcio_t *rpcio;
1284 obj_notif_t *notif;
1285 } def;
1286
1291
1294
1300
1303
1304} YPACK obj_template_t;
1305
1306
1308typedef struct obj_metadata_t_ {
1309 dlq_hdr_t qhdr;
1310 struct obj_template_t_ *parent;
1311 xmlChar *name;
1315 boolean typdef_copy;
1316} YPACK obj_metadata_t;
1317
1318
1320typedef enum obj_deviate_arg_t_ {
1327
1328
1330typedef struct obj_deviate_t_ {
1331 dlq_hdr_t qhdr;
1340
1342 boolean empty;
1343
1346
1349
1352
1355
1357 xmlChar *units;
1358
1361
1363 dlq_hdr_t defval_tkQ;
1364
1366 boolean config;
1367
1370
1372 boolean mandatory;
1373
1376
1378 uint32 minelems;
1382 uint32 maxelems;
1384 dlq_hdr_t mustQ;
1385 dlq_hdr_t uniqueQ;
1386 dlq_hdr_t appinfoQ;
1387} YPACK obj_deviate_t;
1388
1389
1391typedef struct obj_deviation_t_ {
1392 dlq_hdr_t qhdr;
1393 xmlChar *target;
1394 xmlChar *targmodname;
1398 xmlChar *descr;
1399
1401 xmlChar *ref;
1402
1405 xmlChar *devmodname;
1406 boolean empty;
1407 boolean annotation;
1409 dlq_hdr_t deviateQ;
1410 dlq_hdr_t appinfoQ;
1411} YPACK obj_deviation_t;
1412
1413
1424typedef boolean
1426 void *cookie1,
1427 void *cookie2,
1428 boolean nonconfig_warn);
1429
1430
1431#define OBJ_SET_TESTFLAGS(OBJ, FL) (OBJ)->testflags = FL
1432
1433#define OBJ_GET_TESTFLAGS(OBJ) (OBJ)->testflags
1434
1435#define OBJ_SET_DESC_TESTFLAGS(OBJ, FL) (OBJ)->desc_testflags = FL
1436
1437#define OBJ_GET_DESC_TESTFLAGS(OBJ) (OBJ)->desc_testflags
1438
1439#define OBJ_UPDATE_DESC_TESTFLAGS(OBJ, FL) (OBJ)->desc_testflags |= FL
1440
1443/********************************************************************
1444* *
1445* F U N C T I O N S *
1446* *
1447*********************************************************************/
1448
1465extern obj_template_t *
1466 obj_new_template (obj_type_t objtype);
1467
1468
1478extern void
1480
1481
1494extern obj_template_t *
1495 obj_find_template (dlq_hdr_t *que,
1496 const xmlChar *modname,
1497 const xmlChar *objname);
1498
1499
1511extern obj_template_t *
1512 obj_find_schema_template ( dlq_hdr_t *que,
1513 const xmlChar *modname,
1514 const xmlChar *objname );
1515
1516
1528extern const obj_template_t *
1529 obj_find_template_con (dlq_hdr_t *que,
1530 const xmlChar *modname,
1531 const xmlChar *objname);
1532
1533
1545extern obj_template_t *
1546 obj_find_template_test (dlq_hdr_t *que,
1547 const xmlChar *modname,
1548 const xmlChar *objname);
1549
1550
1564extern obj_template_t *
1566 const xmlChar *modname,
1567 const xmlChar *objname);
1568
1569
1585extern obj_template_t *
1587 const xmlChar *modname,
1588 const xmlChar *objname);
1589
1590
1612extern obj_template_t *
1614 const xmlChar *modname,
1615 const xmlChar *objname,
1616 ncx_name_match_t match_names,
1617 boolean alt_names,
1618 boolean dataonly,
1619 status_t *retres);
1620
1621
1635extern obj_template_t *
1637 const xmlChar *modname,
1638 const xmlChar *objname);
1639
1640
1657extern obj_template_t *
1659 const xmlChar *modname,
1660 const xmlChar *objname);
1661
1662
1679extern obj_template_t *
1681 const xmlChar *modname,
1682 const xmlChar *objname);
1683
1684
1701extern obj_template_t *
1703 const xmlChar *modname,
1704 const xmlChar *objname);
1705
1706
1721extern obj_template_t *
1723 xmlns_id_t nsid,
1724 const xmlChar *objname);
1725
1726
1751extern obj_template_t *
1753 const xmlChar *modname,
1754 const xmlChar *objname,
1755 ncx_name_match_t match_names,
1756 boolean alt_names,
1757 boolean dataonly,
1758 status_t *retres);
1759
1760
1771extern obj_template_t *
1773 const xmlChar *modname,
1774 const xmlChar *objname,
1775 uint32 objnamelen);
1776
1777
1799extern obj_template_t *
1801 const xmlChar *modname,
1802 const xmlChar *objname,
1803 uint32 objnamelen,
1804 uint32 *matchcount);
1805
1806
1817extern obj_template_t *
1819
1820
1831extern obj_template_t *
1833
1834
1845extern obj_template_t *
1847
1848
1859extern obj_template_t *
1861
1862
1873extern obj_template_t *
1875
1876
1887extern obj_template_t *
1889
1890
1901extern obj_template_t *
1903
1904
1915extern obj_template_t *
1917
1918
1929extern obj_template_t *
1931
1932
1943extern obj_template_t *
1945
1946
1958extern obj_template_t *
1960
1961
1973extern obj_template_t *
1975
1976
1993extern obj_template_t *
1995 boolean stopnext);
1996
1997
2033extern boolean
2035 obj_walker_fn_t walkerfn,
2036 void *cookie1,
2037 void *cookie2,
2038 obj_template_t *startnode,
2039 const xmlChar *modname,
2040 const xmlChar *childname,
2041 boolean configonly,
2042 boolean textmode,
2043 boolean useroot);
2044
2045
2085extern boolean
2087 obj_walker_fn_t walkerfn,
2088 void *cookie1,
2089 void *cookie2,
2090 obj_template_t *startnode,
2091 const xmlChar *modname,
2092 const xmlChar *name,
2093 boolean configonly,
2094 boolean textmode,
2095 boolean useroot,
2096 boolean orself,
2097 boolean *fncalled);
2098
2099
2139extern boolean
2141 obj_walker_fn_t walkerfn,
2142 void *cookie1,
2143 void *cookie2,
2144 obj_template_t *startnode,
2145 const xmlChar *modname,
2146 const xmlChar *name,
2147 boolean configonly,
2148 boolean textmode,
2149 boolean useroot,
2150 boolean orself,
2151 boolean *fncalled);
2152
2153
2196extern boolean
2198 obj_walker_fn_t walkerfn,
2199 void *cookie1,
2200 void *cookie2,
2201 obj_template_t *startnode,
2202 const xmlChar *modname,
2203 const xmlChar *name,
2204 boolean configonly,
2205 boolean dblslash,
2206 boolean textmode,
2207 boolean useroot,
2208 ncx_xpath_axis_t axis,
2209 boolean *fncalled);
2210
2211
2220extern obj_case_t *
2222 const xmlChar *modname,
2223 const xmlChar *casname);
2224
2225
2226
2237extern obj_template_t *
2239 const xmlChar *name);
2240
2241
2247extern void
2248 obj_clean_datadefQ (dlq_hdr_t *que);
2249
2250
2258extern typ_template_t *
2260 const xmlChar *typname);
2261
2262
2269extern typ_template_t *
2271
2272
2280extern grp_template_t *
2282 const xmlChar *grpname);
2283
2290extern grp_template_t *
2292
2293
2309extern status_t
2310 obj_set_named_type (void *pcb, // yang_pcb_t
2311 tk_chain_t *tkc,
2312 ncx_module_t *mod,
2313 const xmlChar *typname,
2314 typ_def_t *typdef,
2315 obj_template_t *parent,
2316 grp_template_t *grp);
2317
2318
2341extern obj_template_t *
2343 obj_template_t *srcobj,
2344 dlq_hdr_t *mobjQ);
2345
2346
2371extern obj_template_t *
2373 obj_template_t *srcobj,
2374 dlq_hdr_t *mobjQ,
2375 boolean sm_clone);
2376
2377
2402extern obj_template_t *
2404 obj_template_t *srcobj,
2405 dlq_hdr_t *mobjQ);
2406
2407
2408/******************** obj_unique_t ********************/
2409
2410
2416extern obj_unique_t *
2417 obj_new_unique (void);
2418
2419
2425extern void
2427
2428
2434extern void
2436
2437
2443extern void
2445
2446
2452extern obj_unique_comp_t *
2453 obj_new_unique_comp (void);
2454
2455
2461extern void
2463
2464
2473extern obj_unique_t *
2474 obj_find_unique (dlq_hdr_t *que,
2475 const xmlChar *xpath);
2476
2477
2484extern obj_unique_t *
2486
2487
2494extern obj_unique_t *
2496
2497
2504extern obj_unique_comp_t *
2506
2507
2514extern obj_unique_comp_t *
2516
2517
2523extern obj_key_t *
2524 obj_new_key (void);
2525
2526
2532extern void
2533 obj_free_key (obj_key_t *key);
2534
2535
2543extern obj_key_t *
2544 obj_find_key (dlq_hdr_t *que,
2545 const xmlChar *keycompname);
2546
2547
2556extern obj_key_t *
2557 obj_find_key2 (dlq_hdr_t *que,
2558 obj_template_t *keyobj);
2559
2560
2567extern obj_key_t *
2569
2570
2577extern obj_key_t *
2579
2580
2587extern const obj_key_t *
2588 obj_first_ckey (const obj_template_t *obj);
2589
2590
2597extern obj_key_t *
2598 obj_next_key (obj_key_t *objkey);
2599
2600
2607extern obj_key_t *
2608 obj_prev_key (obj_key_t *objkey);
2609
2610
2617extern const obj_key_t *
2618 obj_next_ckey (const obj_key_t *objkey);
2619
2620
2627extern uint32
2628 obj_key_count (const obj_template_t *obj);
2629
2630
2638extern uint32
2640
2641
2655extern void
2657 void *cookie1,
2658 void *cookie2,
2659 obj_walker_fn_t walkerfn);
2660
2661
2668extern boolean
2669 obj_any_rpcs (const dlq_hdr_t *datadefQ);
2670
2671
2678extern boolean
2679 obj_any_notifs (const dlq_hdr_t *datadefQ);
2680
2681
2687extern obj_deviate_t *
2688 obj_new_deviate (void);
2689
2690
2696extern void
2698
2699
2706extern const xmlChar *
2708
2709
2715extern obj_deviation_t *
2716 obj_new_deviation (void);
2717
2718
2724extern void
2726
2727
2733extern void
2734 obj_clean_deviationQ (dlq_hdr_t *deviationQ);
2735
2736
2745extern status_t
2747 xmlChar **buff);
2748
2749
2759extern status_t
2760 obj_gen_object_id_prefix (const obj_template_t *obj, xmlChar **buff);
2761
2762
2763
2774extern status_t
2776 xmlChar **buff);
2777
2778
2789extern status_t
2791 const obj_template_t *obj,
2792 xmlChar **buff);
2793
2794
2807extern status_t
2809 xmlChar **buff);
2810
2811
2821 xmlChar **buff);
2822
2823
2834 const obj_template_t *stopobj,
2835 xmlChar **buff);
2836
2837
2850extern status_t
2852 const obj_template_t *obj,
2853 xmlChar **buff);
2854
2855
2871extern status_t
2873 xmlChar *buff,
2874 uint32 bufflen,
2875 uint32 *reallen);
2876
2877
2891extern status_t
2893 xmlChar *buff,
2894 uint32 bufflen,
2895 uint32 *reallen);
2896
2897
2898
2899
2909extern status_t
2911 xmlChar **buff);
2912
2913
2924extern status_t
2926 xmlChar **buff);
2927
2928
2935extern const xmlChar *
2936 obj_get_name (const obj_template_t *obj);
2937
2938
2946extern status_t
2948 const xmlChar *objname);
2949
2950
2963extern boolean
2964 obj_has_name (const obj_template_t *obj);
2965
2966
2975extern boolean
2977
2978
2985extern ncx_status_t
2986 obj_get_status (const obj_template_t *obj);
2987
2988
2995extern const xmlChar *
2997
2998
3008extern const xmlChar *
3010
3011
3019extern const xmlChar *
3021
3022
3030extern const xmlChar *
3032
3033
3040extern const void *
3042
3043
3050extern const xmlChar *
3051 obj_get_reference (const obj_template_t *obj);
3052
3053
3061extern const void *
3063
3064
3065#define obj_is_config obj_get_config_flag_deep
3066
3067
3077extern boolean
3079
3080
3094extern boolean
3096 boolean *setflag);
3097
3098
3106extern ncx_access_t
3108
3109
3116extern dlq_hdr_t *
3118
3119
3126extern dlq_hdr_t *
3127 obj_get_mustQ (const obj_template_t *obj);
3128
3129
3136extern dlq_hdr_t *
3137 obj_get_leafrefQ (const obj_template_t *obj);
3138
3139
3149extern const xmlChar *
3150 obj_get_typestr (const obj_template_t *obj);
3151
3152
3159extern dlq_hdr_t *
3161
3162
3169extern const dlq_hdr_t *
3170 obj_get_cdatadefQ (const obj_template_t *obj);
3171
3172
3183extern const xmlChar *
3184 obj_get_default (const obj_template_t *obj);
3185
3186
3195extern const xmlChar *
3197 ncx_backptr_t **thisdef);
3198
3199
3212extern const xmlChar *
3214 ncx_backptr_t *lastdef,
3215 ncx_backptr_t **thisdef);
3216
3217
3224extern obj_template_t *
3226
3227
3237extern boolean
3239
3240
3250extern boolean
3252
3253
3262extern uint32
3263 obj_get_level (const obj_template_t *obj);
3264
3265
3281extern uint32
3282 obj_get_level_mp (const obj_template_t *obj);
3283
3284
3294extern uint32
3296
3297
3307extern boolean
3308 obj_has_typedefs (const obj_template_t *obj);
3309
3310
3318extern typ_def_t *
3320
3321
3329extern typ_def_t *
3331
3332
3340extern const typ_def_t *
3341 obj_get_ctypdef (const obj_template_t *obj);
3342
3343
3350extern ncx_btype_t
3351 obj_get_basetype (const obj_template_t *obj);
3352
3353
3360extern const xmlChar *
3362
3363
3370extern const xmlChar *
3372
3373
3380extern const xmlChar *
3381 obj_get_mod_name (const obj_template_t *obj);
3382
3383
3390extern ncx_module_t *
3392
3393
3400extern boolean
3402
3403
3411extern ncx_module_t *
3413
3414
3421extern const xmlChar *
3423
3424
3431extern const xmlChar *
3432 obj_get_type_name (const obj_template_t *obj);
3433
3434
3441extern xmlns_id_t
3442 obj_get_nsid (const obj_template_t *obj);
3443
3444
3451extern ncx_sid_t
3452 obj_get_yang_sid (const obj_template_t *obj);
3453
3454
3461extern uint32
3463
3470extern ncx_iqual_t
3472
3473
3481extern ncx_iqual_t
3483 boolean required);
3484
3485
3494extern boolean
3496 uint32 *minelems);
3497
3498
3507extern boolean
3509 uint32 *maxelems);
3510
3511
3518extern const xmlChar *
3520
3521
3528extern obj_template_t *
3530
3531
3539extern const obj_template_t *
3540 obj_get_cparent (const obj_template_t *obj);
3541
3542
3550extern obj_template_t *
3552
3553
3563extern const obj_template_t *
3565
3566
3573extern const xmlChar *
3575
3576
3584extern void *
3586
3587
3614extern status_t
3616 obj_template_t *chobj,
3617 const xml_node_t *curnode,
3618 boolean xmlorder,
3619 dlq_hdr_t *force_modQ,
3620 obj_template_t **rettop,
3621 obj_template_t **retobj);
3622
3623
3630extern uint32
3632
3633
3641extern obj_template_t *
3643
3644
3659extern boolean
3661
3662
3677extern boolean
3679 boolean *ingrp);
3680
3681
3689extern uint8
3691
3692
3700extern const ncx_iffeature_t *
3702
3703
3711extern const ncx_iffeature_t *
3712 obj_get_next_iffeature (const ncx_iffeature_t *iffeature);
3713
3714
3721extern boolean
3722 obj_is_anyxml (const obj_template_t *obj);
3723
3724
3731extern boolean
3732 obj_is_anydata (const obj_template_t *obj);
3733
3734
3742extern boolean
3743 obj_is_any (const obj_template_t *obj);
3744
3745
3752extern boolean
3753 obj_is_leaf (const obj_template_t *obj);
3754
3755
3762extern boolean
3763 obj_is_leaf_list (const obj_template_t *obj);
3764
3765
3772extern boolean
3773 obj_is_list (const obj_template_t *obj);
3774
3775
3782extern boolean obj_in_list (const obj_template_t *obj);
3783
3784
3791extern boolean
3792 obj_is_container (const obj_template_t *obj);
3793
3794
3801extern boolean
3802 obj_is_choice (const obj_template_t *obj);
3803
3804
3811extern boolean
3812 obj_is_case (const obj_template_t *obj);
3813
3814
3821extern boolean
3822 obj_is_uses (const obj_template_t *obj);
3823
3824
3831extern boolean
3832 obj_is_leafy (const obj_template_t *obj);
3833
3834
3841extern boolean obj_is_terminal (const obj_template_t *obj);
3842
3843
3851extern boolean
3853
3854
3865extern boolean
3867 boolean config_only);
3868
3869
3878extern boolean
3880
3881
3890extern boolean
3891 obj_is_cloned (const obj_template_t *obj);
3892
3893
3902extern boolean
3903 obj_is_augclone (const obj_template_t *obj);
3904
3905
3913extern boolean
3914 obj_is_augment (const obj_template_t *obj);
3915
3916
3924extern boolean obj_in_augment (const obj_template_t *obj);
3925
3926
3934extern boolean
3935 obj_is_refine (const obj_template_t *obj);
3936
3937
3946extern boolean
3947 obj_is_data (const obj_template_t *obj);
3948
3949
3959extern boolean
3960 obj_is_data_db (const obj_template_t *obj);
3961
3962
3970extern boolean
3971 obj_is_data_node (const obj_template_t *obj);
3972
3973
3981extern boolean
3982 obj_in_rpc (const obj_template_t *obj);
3983
3984
3991extern boolean
3992 obj_in_rpc_reply (const obj_template_t *obj);
3993
3994
4001extern boolean
4002 obj_in_notif (const obj_template_t *obj);
4003
4004
4011extern boolean
4012 obj_is_rpc (const obj_template_t *obj);
4013
4014
4021extern boolean
4022 obj_is_sm_rpc (const obj_template_t *obj);
4023
4024
4031extern boolean obj_is_rpcio (const obj_template_t *obj);
4032
4033
4040extern boolean obj_is_rpcio_input (const obj_template_t *obj);
4041
4042
4049extern boolean
4050 obj_is_action (const obj_template_t *obj);
4051
4052
4059extern boolean obj_in_action (const obj_template_t *obj);
4060
4061
4068extern boolean
4069 obj_is_notif (const obj_template_t *obj);
4070
4071
4078extern boolean
4079 obj_is_sm_notif (const obj_template_t *obj);
4080
4081
4094extern boolean
4095 obj_is_empty (const obj_template_t *obj);
4096
4097
4105extern boolean
4106 obj_is_match (const obj_template_t *obj1,
4107 const obj_template_t *obj2);
4108
4109
4116extern boolean
4117 obj_is_hidden (const obj_template_t *obj);
4118
4119
4126extern boolean
4127 obj_is_root (const obj_template_t *obj);
4128
4129
4135extern void
4137
4138
4145extern boolean
4146 obj_is_rpc_root (const obj_template_t *obj);
4147
4148
4155extern boolean
4156 obj_is_password (const obj_template_t *obj);
4157
4158
4165extern boolean
4166 obj_is_xsdlist (const obj_template_t *obj);
4167
4168
4175extern boolean
4176 obj_is_cli (const obj_template_t *obj);
4177
4178
4187extern boolean obj_is_dirty (const obj_template_t *obj,
4188 ncx_cfg_t cfgid);
4189
4190
4197extern boolean
4198 obj_is_key (const obj_template_t *obj);
4199
4200
4207extern boolean
4208 obj_is_abstract (const obj_template_t *obj);
4209
4210
4218extern boolean obj_in_abstract (const obj_template_t *obj);
4219
4220
4227extern boolean
4228 obj_is_deleted (const obj_template_t *obj);
4229
4230
4239extern boolean
4240 obj_is_deleted_ex (const obj_template_t *obj);
4241
4242
4249extern boolean
4251
4252
4260extern boolean
4262
4263
4270extern boolean
4271 obj_is_secure (const obj_template_t *obj);
4272
4273
4281extern boolean
4283
4284
4292extern boolean
4294
4295
4303extern boolean
4305
4306
4314extern boolean
4316
4317
4326extern boolean
4328
4329
4336extern boolean
4338
4339
4349extern boolean
4351
4352
4360extern boolean
4362
4363
4372extern boolean
4373 obj_is_top (const obj_template_t *obj);
4374
4375
4382extern boolean
4383 obj_is_datapath (const obj_template_t *obj);
4384
4385
4397extern boolean
4399
4400
4408extern boolean
4410
4411
4420extern boolean
4422
4423
4431extern boolean obj_has_ro_descendants (obj_template_t *obj);
4432
4433
4441extern boolean obj_has_rw_children (obj_template_t *obj);
4442
4443
4453extern boolean obj_has_rw_children_ex (obj_template_t *obj,
4454 boolean term_only);
4455
4456
4463extern boolean
4465
4466
4473extern boolean
4475
4476
4485extern boolean
4487
4488
4494extern obj_metadata_t *
4495 obj_new_metadata (void);
4496
4497
4507extern void
4509
4510
4518extern status_t
4520 obj_template_t *obj);
4521
4522
4530extern obj_metadata_t *
4532 const xmlChar *name);
4533
4534
4541extern obj_metadata_t *
4543
4544
4551extern obj_metadata_t *
4552 obj_next_metadata (const obj_metadata_t *meta);
4553
4554
4565extern void
4567
4568
4575extern void
4577
4578
4586extern uint32
4588
4589
4599extern void
4601 dlq_hdr_t *datadefQ,
4602 uint32 startindent,
4603 uint32 indent);
4604
4605
4612extern const xmlChar *
4614
4615
4621extern void
4622 obj_delete_obsolete (dlq_hdr_t *objQ);
4623
4624
4631extern const xmlChar *
4632 obj_get_altname (const obj_template_t *obj);
4633
4634
4642extern obj_template_t *
4644
4645
4653extern obj_template_t *
4655
4656
4664extern const xmlChar *
4666
4667
4674extern boolean
4676
4677
4684extern boolean
4686
4687
4695extern boolean
4697
4698
4706extern boolean
4708
4709
4717extern boolean
4719
4720
4729extern boolean
4731
4732
4739extern void
4741
4742
4751extern boolean
4753
4754
4763extern boolean
4765
4766
4775extern boolean
4777
4778
4785extern obj_iffeature_ptr_t *
4787
4788
4794extern void obj_free_iffeature_ptr (obj_iffeature_ptr_t *iffptr);
4795
4796
4803extern obj_iffeature_ptr_t *
4805
4806
4813extern obj_iffeature_ptr_t *
4815
4816
4823extern ncx_backptr_t *
4825
4826
4833extern ncx_backptr_t *
4835
4836
4844extern boolean
4846 struct xpath_pcb_t_ *xpath);
4847
4848
4856extern struct xpath_pcb_t_ *
4858 struct xpath_pcb_t_ *xpath);
4859
4860
4867extern struct xpath_pcb_t_ *
4869
4870
4871
4882extern status_t
4884 struct xpath_pcb_t_ *xpath);
4885
4886
4896extern void
4898 struct xpath_pcb_t_ *xpath);
4899
4900
4909extern status_t
4911
4912
4921extern void
4923 ncx_cfg_t cfg_id,
4924 boolean flag);
4925
4926
4942extern boolean
4944
4945
4966extern boolean
4968
4969
4977extern boolean
4979
4980
4993extern void
4995 ncx_module_t *mod);
4996
4997
5004extern void
5006
5007
5016extern boolean
5018
5019
5026extern void
5028 uint16 keynum);
5029
5030
5037extern uint16
5039
5040
5048extern boolean
5050
5051
5058extern boolean
5060
5061
5068extern boolean
5070
5071
5078extern void
5080
5081
5088extern boolean obj_notif_enabled (const obj_template_t *obj);
5089
5090
5097extern boolean obj_notif_log_drops (const obj_template_t *obj);
5098
5099
5106extern void obj_set_notif_enabled (obj_template_t *obj,
5107 boolean enabled);
5108
5109
5116extern void obj_set_notif_log_drops (const obj_template_t *obj,
5117 boolean enabled);
5118
5119
5127extern boolean
5128 obj_unload_active (const obj_template_t *obj);
5129
5130
5137extern boolean
5138 obj_is_obsolete (const obj_template_t *obj);
5139
5140
5148extern boolean
5150
5151
5158extern void
5160 uint8 prio);
5161
5162
5169extern uint8
5171
5172
5180extern boolean
5182
5183
5192
5193
5201extern boolean
5203
5204
5211extern boolean
5212 obj_is_crypt_hash (const obj_template_t *obj);
5213
5214
5225extern void
5227
5228
5234extern obj_defval_tk_t *
5235 obj_new_defval_tk (void);
5236
5237
5243extern void
5245
5246
5253extern dlq_hdr_t *
5255
5256
5263extern obj_defval_tk_t *
5264 obj_first_defval_tk (const obj_refine_t *ref);
5265
5266
5273extern obj_defval_tk_t *
5274 obj_next_defval_tk (const obj_defval_tk_t *defval_tk);
5275
5276#define obj_next_dev_defval_tk(D) obj_next_defval_tk(D)
5277
5278
5285extern obj_defval_tk_t *
5287
5288
5295extern boolean
5297
5298
5305extern void
5307 const xmlChar *defval);
5308
5309
5317extern boolean
5319 const xmlChar *find_defval);
5320
5321
5328extern void
5330
5331
5336extern void
5337 obj_enter_xpath_mode (void);
5338
5339
5344extern void
5345 obj_exit_xpath_mode (void);
5346
5347
5355extern obj_key_t *
5357 const xmlChar *keyname);
5358
5359
5366extern ncx_yang_version_t
5368
5369
5379extern boolean
5381
5382
5388extern void
5390
5391
5400extern boolean
5402
5403
5409extern void
5411
5412
5413
5414#if defined(WITH_SNMP) && defined(WITH_RESTCONF)
5421extern const xmlChar *
5423
5424
5435extern obj_oid_t *
5437 boolean *malloced);
5438
5439#endif // WITH_SNMP and WITH_RESTCONF
5440
5441
5450 dlq_hdr_t *keystackQ);
5451
5452
5458extern void obj_dump_keystackQ (dlq_hdr_t *keystackQ);
5459
5460
5467extern void obj_clr_enable_chk (obj_template_t *obj);
5468
5469
5477extern status_t
5479 void *rule);
5480
5481
5488extern void
5490 const void *rule);
5491
5492
5500extern boolean
5502 void *rule);
5503
5504
5514extern status_t
5516 const xmlChar *basestr,
5517 obj_errmsg_t **ret_errmsg);
5518
5519
5527extern status_t
5529 const xmlChar *parmstr);
5530
5531
5540extern status_t
5542 const xmlChar *parmstr,
5543 boolean is_errortag);
5544
5545
5561extern boolean
5563
5564
5572extern boolean
5573 obj_is_singular (const obj_template_t *obj);
5574
5575
5585extern boolean
5587
5588
5595extern boolean
5596 obj_ok_for_nolock (const obj_template_t *obj);
5597
5598
5605extern boolean
5607
5608
5615extern boolean
5617
5618
5625extern boolean obj_get_xpath_oper_ok (const obj_template_t *obj);
5626
5627
5633extern void obj_set_xpath_oper_ok (obj_template_t *obj);
5634
5635
5643extern boolean
5645
5646
5657extern boolean
5659
5660
5667extern obj_template_t *
5669
5670
5677extern boolean
5679
5680
5687extern ncx_module_t *
5689
5690
5698extern obj_template_t *
5700
5701
5712extern boolean
5713 obj_is_ancestor (const obj_template_t *ancestor,
5714 const obj_template_t *obj);
5715
5716
5722extern void
5724
5725
5736extern boolean
5738
5739
5746extern obj_template_t *
5748
5749
5750
5761extern boolean
5763
5764
5776extern boolean
5778
5779
5780
5788extern ncx_sm_rootcb_t *
5790
5791
5792
5799extern status_t
5801
5802
5803/*
5804* @brief Object Compare
5805*
5806* @param obj1 object to check
5807* @param obj2 object to check
5808*
5809* @return TRUE if objects match
5810*/
5811extern boolean
5812 obj_match_sm_objs (obj_template_t *obj1,
5813 obj_template_t *obj2);
5814
5823extern boolean
5825
5829#ifdef __cplusplus
5830} /* end extern 'C' */
5831#endif
5832
5833#endif /* _H_obj */
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:386
status_t
global error return code
Definition: status_enum.h:187
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
ncx_leafref_class_t
Classification for the types of leafref path statements wrt/ how they can be cached.
Definition: ncxtypes.h:1552
ncx_status_t
enumeration for different YANG data-def status values
Definition: ncxtypes.h:583
ncx_yang_version_t
enumeration for different YANG language versions
Definition: ncxtypes.h:1000
ncx_cfg_t
hardwire the 3 standard configs
Definition: ncxtypes.h:548
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:724
ncx_iqual_t
The instance qualifier types are borrowed from ABNF and RelaxNG.
Definition: ncxtypes.h:460
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
ncx_name_match_t
Node name match modes.
Definition: ncxtypes.h:695
uint64 ncx_sid_t
Standard YANG SID is a 63-bit integer defined as uint64.
Definition: ncxtypes.h:744
ncx_xpath_axis_t
XPath expression axis types.
Definition: ncxtypes.h:662
obj_metadata_t * obj_find_metadata(const obj_template_t *obj, const xmlChar *name)
Find the object metadata definition in the object.
Definition: obj.c:15934
uint32 obj_get_child_count(const obj_template_t *obj)
Get the number of child nodes the object has.
Definition: obj.c:13688
void obj_set_abstract(obj_template_t *obj)
Set the abstract flag for the yang-data node.
Definition: obj.c:18557
obj_key_t * obj_last_key(obj_template_t *obj)
Get the last key record.
Definition: obj.c:9999
const dlq_hdr_t * obj_get_cdatadefQ(const obj_template_t *obj)
Get a const pointer to the datadefQ (or caseQ) if this object has one.
Definition: obj.c:12184
boolean obj_is_notif(const obj_template_t *obj)
Check if the object is a notification.
Definition: obj.c:14876
boolean obj_is_external_augment(obj_template_t *obj)
Check if an object is an external augment.
Definition: obj.c:16771
boolean obj_has_rw_children(obj_template_t *obj)
Check if there are any accessible read-write child nodes within the object.
Definition: obj.c:15721
const xmlChar * obj_get_description(const obj_template_t *obj)
Get the description field for this obj.
Definition: obj.c:11464
boolean obj_has_name(const obj_template_t *obj)
Check if the specified object type has a name.
Definition: obj.c:11319
obj_template_t * obj_clone_template_case(ncx_module_t *mod, obj_template_t *srcobj, dlq_hdr_t *mobjQ)
Clone an obj_template_t but make sure it is wrapped in a OBJ_TYP_CASE layer.
Definition: obj.c:9482
const xmlChar * obj_get_next_default(const obj_template_t *obj, ncx_backptr_t *lastdef, ncx_backptr_t **thisdef)
Get the next default value for the specified object.
Definition: obj.c:12359
obj_key_t * obj_new_key(void)
Alloc and Init a obj_key_t struct.
Definition: obj.c:9848
boolean obj_is_top(const obj_template_t *obj)
Check if the object is top-level object within the YANG module that defines it.
Definition: obj.c:15560
boolean obj_is_case(const obj_template_t *obj)
Check if object is a YANG case.
Definition: obj.c:14219
boolean obj_is_hidden(const obj_template_t *obj)
Check if object is marked as a hidden object.
Definition: obj.c:14951
boolean obj_get_max_elements(obj_template_t *obj, uint32 *maxelems)
Get the max-elements clause for this object, if any.
Definition: obj.c:13364
obj_template_t * obj_find_template_test(dlq_hdr_t *que, const xmlChar *modname, const xmlChar *objname)
Find an object with the specified name Test version; do not set 'used' flag.
Definition: obj.c:5934
uint32 obj_get_yang_sid_tree(const obj_template_t *obj)
Get the YANG SID Tree ID for this object.
Definition: obj.c:13179
boolean obj_is_cli(const obj_template_t *obj)
Check if object is marked as a CLI object.
Definition: obj.c:15034
obj_template_t * obj_clone_template_sm(ncx_module_t *mod, obj_template_t *srcobj, dlq_hdr_t *mobjQ, boolean sm_clone)
Clone an obj_template_t Copy the pointers from the srcobj into the new obj.
boolean obj_is_match(const obj_template_t *obj1, const obj_template_t *obj2)
Check if one object is a match in identity with another one.
Definition: obj.c:14926
obj_template_t * obj_find_child_choice_case(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6423
boolean obj_is_rpcio(const obj_template_t *obj)
Check if the object is an RPC IO node.
Definition: obj.c:14789
boolean obj_get_leaf_list_defset(const obj_template_t *obj)
Get the defset flag for a leaf-list.
Definition: obj.c:18350
obj_unique_t * obj_first_unique(obj_template_t *listobj)
Get the first unique-stmt for a list.
Definition: obj.c:9740
boolean obj_get_config_flag_check(const obj_template_t *obj, boolean *ingrp)
get config flag during YANG module checking
Definition: obj.c:13875
const void * obj_get_reference_addr(const obj_template_t *obj)
Get the reference field for this obj.
Definition: obj.c:11763
status_t obj_gen_object_id_code(ncx_module_t *mod, const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node for C code usage.
Definition: obj.c:10889
boolean obj_in_augment(const obj_template_t *obj)
Check if object is an augment or inside an augment CHECK ENTIRE TREE UP TO ROOT.
Definition: obj.c:14490
ncx_module_t * obj_get_mod(obj_template_t *obj)
Get the module pointer for this object.
Definition: obj.c:12959
void obj_delete_all_defvals(obj_template_t *obj)
Delete all the original defaults for a leaf-list default for deviate replace default foo.
Definition: obj.c:18432
boolean obj_npcon_has_defaults_slow(obj_template_t *obj)
Check if the specified NP container has defaults within it Must be a config object!...
Definition: obj.c:12473
obj_iffeature_ptr_t * obj_new_iffeature_ptr(ncx_iffeature_t *iff)
Malloc and initialize a new obj_iffeature_ptr_t struct.
Definition: obj.c:16967
ncx_backptr_t * obj_first_inherit_when_ptr(obj_template_t *obj)
Get first xpath pointer struct.
Definition: obj.c:17039
const xmlChar * obj_get_oid_string(obj_template_t *obj)
Get object OID sting value.
Definition: obj.c:18579
typ_def_t * obj_get_typdef(obj_template_t *obj)
Get the typdef for the leaf or leaf-list.
Definition: obj.c:12732
grp_template_t * obj_first_grouping(obj_template_t *obj)
Get the first local grouping if any.
Definition: obj.c:8923
void obj_delete_obsolete(dlq_hdr_t *objQ)
Delete any obsolete child nodes within the specified object subtree.
Definition: obj.c:16643
boolean obj_is_password(const obj_template_t *obj)
Check if object is marked as a password object.
Definition: obj.c:15007
boolean obj_get_top_config_flag(const obj_template_t *obj)
Get the config flag for the top-level object.
Definition: obj.c:19019
obj_case_t * obj_find_case(obj_choice_t *choic, const xmlChar *modname, const xmlChar *casname)
Find a specified case arm by name.
Definition: obj.c:8551
void obj_free_defval_tk(obj_defval_tk_t *def)
Delete an object default tk record;.
Definition: obj.c:18256
boolean obj_find_defval(obj_template_t *obj, const xmlChar *find_defval)
Find a default.
Definition: obj.c:18401
const xmlChar * obj_get_deviate_arg(obj_deviate_arg_t devarg)
Get the deviate-arg string from its enumeration.
Definition: obj.c:10381
boolean obj_unload_active(const obj_template_t *obj)
Check if the module commit tests are disabled because a module unload is in progress.
Definition: obj.c:17928
void * obj_get_presence_string_field(const obj_template_t *obj)
Get the address ot the presence-stmt value, if any.
Definition: obj.c:13614
boolean obj_is_container(const obj_template_t *obj)
Check if object is a YANG container.
Definition: obj.c:14179
obj_key_t * obj_find_key(dlq_hdr_t *que, const xmlChar *keycompname)
Find a specific key component by key leaf identifier name.
Definition: obj.c:9896
ncx_sm_rootcb_t * obj_find_ancestor_rootcb(obj_template_t *obj)
Find an ancestor node or self that has a rootcb.
Definition: obj.c:19641
boolean obj_is_top_aio_get2(obj_template_t *obj)
Check if this object is a really top level holder of extension sil-aio-get2.
Definition: obj.c:19203
obj_unique_comp_t * obj_new_unique_comp(void)
Alloc and Init a obj_unique_comp_t struct.
Definition: obj.c:9653
boolean obj_is_list(const obj_template_t *obj)
Check if object is a YANG list.
Definition: obj.c:14123
const xmlChar * obj_get_augment_target(obj_template_t *obj)
Get the target path string for an augments object.
Definition: obj.c:16753
boolean obj_is_in_aio_get2(obj_template_t *obj)
Check if this object is a child of a node with sil-aio-get2 extension setup or if this object itself ...
Definition: obj.c:19159
boolean obj_is_anydata(const obj_template_t *obj)
Check if object is an anydata.
Definition: obj.c:14058
const xmlChar * obj_get_altname(const obj_template_t *obj)
Get the alt-name for this object, if any.
Definition: obj.c:16688
uint32 obj_key_count_to_root(obj_template_t *obj)
Check ancestor-or-self nodes until root reached Find all lists; Count the number of keys.
Definition: obj.c:10165
obj_template_t * obj_next_child_deep(obj_template_t *obj)
Get the next child object if the specified object has any children.
Definition: obj.c:7605
const xmlChar * obj_get_default(const obj_template_t *obj)
Get the default value for the specified object.
Definition: obj.c:12267
status_t obj_set_mp_flags(obj_template_t *obj)
set the Schema Mount flags and create a rootcb if needed
Definition: obj.c:19675
boolean obj_is_p_container(const obj_template_t *obj)
Check if the object is an Presence-container.
Definition: obj.c:15319
status_t obj_add_errmsg_filter(obj_errmsg_t *errmsg, const xmlChar *parmstr, boolean is_errortag)
Add an errmsg filter for the object.
boolean obj_is_mandatory_when_ex(obj_template_t *obj, boolean config_only)
Figure out if the obj is YANG mandatory or not Check the when-stmts, not just mandatory-stmt.
Definition: obj.c:14358
void obj_free_metadata(obj_metadata_t *meta)
Scrub the memory in a obj_metadata_t by freeing all the sub-fields and then freeing the entire struct...
Definition: obj.c:15867
obj_template_t * obj_first_terminal_child_nokey(obj_template_t *obj)
Get the first child object if the specified object has any children; MUST BE A TERMINAL NODE!...
Definition: obj.c:7165
status_t obj_copy_object_id_mod(const obj_template_t *obj, xmlChar *buff, uint32 bufflen, uint32 *reallen)
Generate the object ID for an object node and copy to the buffer copy an object ID to a buffer; Use m...
Definition: obj.c:10989
status_t obj_assign_xpath_backptr(obj_template_t *obj, struct xpath_pcb_t_ *xpath)
Set an xpath-expr backptr.
Definition: obj.c:17187
dlq_hdr_t * obj_get_defvalQ(obj_template_t *obj)
Get the leaf-list default Q.
Definition: obj.c:18274
const xmlChar * obj_get_type_name(const obj_template_t *obj)
Get the typename for an object.
Definition: obj.c:13101
void obj_ban_nolock_get(obj_template_t *obj)
Ban nolock-get for the object.
Definition: obj.c:19494
void obj_free_key(obj_key_t *key)
Free a obj_key_t struct.
Definition: obj.c:9871
const xmlChar * obj_get_first_default(const obj_template_t *obj, ncx_backptr_t **thisdef)
Get the first default value for the specified object.
Definition: obj.c:12310
status_t obj_gen_object_id_error(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node for errors.
Definition: obj.c:10768
boolean obj_is_enabled(obj_template_t *obj)
Check any if-feature statement that may cause the specified object to be invisible.
Definition: obj.c:15339
const void * obj_get_description_addr(const obj_template_t *obj)
Get the address of the description field for this obj.
Definition: obj.c:11645
obj_template_t * obj_first_child(obj_template_t *obj)
Get the first child object if the specified object has any children.
Definition: obj.c:7068
status_t obj_gen_object_id_prefix(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node Use the prefix in every node.
Definition: obj.c:10532
obj_template_t * obj_find_template(dlq_hdr_t *que, const xmlChar *modname, const xmlChar *objname)
Find an object with the specified name.
Definition: obj.c:5828
const obj_template_t * obj_get_cparent(const obj_template_t *obj)
Get the parent of the current object CONST POINTER VERSION.
Definition: obj.c:13480
const ncx_iffeature_t * obj_get_first_iffeature(const obj_template_t *obj)
Get the first if-feature clause (if any) for the specified object.
Definition: obj.c:13995
void obj_init_unique(obj_unique_t *un)
Init a obj_unique_t struct.
Definition: obj.c:9576
boolean obj_is_supported(obj_template_t *obj)
Check an RPC node to check if it is supported or not It could be disabled at run-time without removin...
Definition: obj.c:17616
status_t obj_gen_aughook_id(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the augment hook element name for the specified object.
Definition: obj.c:11098
void obj_dump_child_list(log_debug_t lvl, dlq_hdr_t *datadefQ, uint32 startindent, uint32 indent)
Dump the object names in a datadefQ – just child level uses log_write_level() for writing ....
Definition: obj.c:16540
obj_template_t * obj_get_real_parent_aug(obj_template_t *obj)
Get the parent of the current object; skip OBJ_TYP_AUGMENT and return the actual parent.
Definition: obj.c:19427
status_t obj_add_errmsg_parm(obj_errmsg_t *errmsg, const xmlChar *parmstr)
Add an errmsg parameter for the object.
void obj_traverse_keys(obj_template_t *obj, void *cookie1, void *cookie2, obj_walker_fn_t walkerfn)
Traverse the list keys with a callback function.
Definition: obj.c:10204
obj_template_t * obj_find_child_fast(obj_template_t *obj, xmlns_id_t nsid, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6497
boolean obj_is_data(const obj_template_t *obj)
Check if the object is defined within data or within a notification or RPC instead.
Definition: obj.c:14529
obj_key_t * obj_next_key(obj_key_t *objkey)
Get the next key record.
Definition: obj.c:10057
boolean obj_is_sil_delete_children_first(const obj_template_t *obj)
Check if object is marked as ncx:sil-delete-children-first.
Definition: obj.c:16842
void obj_clean_datadefQ(dlq_hdr_t *que)
Clean and free all the obj_template_t structs in the specified Q.
Definition: obj.c:8629
typ_def_t * obj_get_base_typdef(obj_template_t *obj)
Get the base typdef for the leaf or leaf-list.
Definition: obj.c:12761
boolean obj_is_xsdlist(const obj_template_t *obj)
Check if object is marked as an XSD list.
Definition: obj.c:15022
void obj_clean_unique(obj_unique_t *un)
Clean a obj_unique_t struct.
Definition: obj.c:9620
obj_key_t * obj_prev_key(obj_key_t *objkey)
Get the previous key record.
Definition: obj.c:10083
boolean obj_in_action(const obj_template_t *obj)
Check if the object is within or is an action method.
Definition: obj.c:14834
void obj_dump_keystackQ(dlq_hdr_t *keystackQ)
Dump a keystackQ with backptrs to obj_template_t for key leafs.
Definition: obj.c:18795
boolean obj_is_single_instance(obj_template_t *obj)
Check if the object is a single instance of if it allows multiple instances; check all of the ancesto...
Definition: obj.c:15481
boolean obj_is_no_sil_delete_children_first(const obj_template_t *obj)
Check if object is marked as ypx:no-sil-delete-children-first OR AN ANCESTOR IS MARKED.
Definition: obj.c:16856
boolean obj_ok_for_nolock(const obj_template_t *obj)
check an object OK for nolock
Definition: obj.c:19048
boolean obj_has_typedefs(const obj_template_t *obj)
Check if the object has any nested typedefs in it.
Definition: obj.c:12649
void obj_add_child(obj_template_t *child, obj_template_t *parent)
Add a child object to the specified complex node.
Definition: obj.c:16879
void obj_set_sil_force_replace_replay(obj_template_t *obj)
Set the object OBJ_FL_SIL_FORCE_REPLAY bit Set the object OBJ_FL_SIL_FORCE_REPLACE_REPLAY bit.
Definition: obj.c:17835
boolean obj_in_rpc(const obj_template_t *obj)
Check if the object is in an rpc/input section.
Definition: obj.c:14650
boolean obj_has_ro_children(obj_template_t *obj)
Check if there are any accessible read-only child nodes within the object.
Definition: obj.c:15662
boolean obj_is_dirty(const obj_template_t *obj, ncx_cfg_t cfgid)
Check if object is marked as dirty (edited) for datastore validation purposes.
Definition: obj.c:15055
boolean obj_is_block_user_delete(const obj_template_t *obj)
Check if object is marked as ncx:user-write with delete access disabled.
Definition: obj.c:16949
boolean obj_is_ancestor(const obj_template_t *ancestor, const obj_template_t *obj)
Check if an object is the ancestor of another.
Definition: obj.c:19460
boolean obj_is_rpcio_input(const obj_template_t *obj)
Check if the object is an RPC IO node.
Definition: obj.c:14802
const xmlChar * obj_get_alt_description(const obj_template_t *obj)
obj_get_alt_description (DEPRECATED)
Definition: obj.c:11525
status_t obj_gen_object_id_datapath(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node Use the prefix in every node.
Definition: obj.c:10579
obj_template_t * obj_next_child_augok(obj_template_t *obj)
Get the next child object if the specified object has any children; return augment,...
Definition: obj.c:7428
void obj_set_xpath_oper_ok(obj_template_t *obj)
Set the object XPath oper OK flag.
Definition: obj.c:19381
obj_template_t * obj_first_child_deep(obj_template_t *obj)
Get the first child object if the specified object has any children.
Definition: obj.c:7532
boolean obj_find_all_pfaxis(ncx_module_t *exprmod, obj_walker_fn_t walkerfn, void *cookie1, void *cookie2, obj_template_t *startnode, const xmlChar *modname, const xmlChar *name, boolean configonly, boolean dblslash, boolean textmode, boolean useroot, ncx_xpath_axis_t axis, boolean *fncalled)
Find all occurances of the specified preceding or following node(s).
Definition: obj.c:8363
boolean obj_is_datapath(const obj_template_t *obj)
Check if object is marked as a ywx:datapath object.
Definition: obj.c:15573
obj_defval_tk_t * obj_new_defval_tk(void)
Create a new object default tk record;.
Definition: obj.c:18239
boolean obj_has_when_stmts(obj_template_t *obj)
Check if any when-stmts apply to this object Does not check if they are true, just any when-stmts pre...
Definition: obj.c:15795
void obj_free_unique_comp(obj_unique_comp_t *unc)
Free a obj_unique_comp_t struct.
Definition: obj.c:9676
void obj_delete_mod_children(obj_template_t *obj, ncx_module_t *mod)
Check the childQ for the specified object and remove all the objects from the specified module.
Definition: obj.c:17643
boolean obj_is_crypt_hash(const obj_template_t *obj)
Check if the object is a leaf of type crypt-hash.
Definition: obj.c:18185
boolean obj_rpc_has_input(obj_template_t *obj)
Check if the RPC object has any real input children.
Definition: obj.c:15771
boolean obj_is_refine(const obj_template_t *obj)
Figure out if the obj is a refinement object, within a uses-stmt.
Definition: obj.c:14516
boolean obj_is_abstract(const obj_template_t *obj)
Check if object is being used as an object identifier or error-info.
Definition: obj.c:15103
boolean obj_has_get2cb(obj_template_t *obj)
Check if current object has GET2 callback registered.
Definition: obj.c:18953
boolean obj_match_datarule(obj_template_t *obj, void *rule)
Check if the data-rule back-ptr applies to this node.
Definition: obj.c:18896
const xmlChar * obj_get_mod_prefix(const obj_template_t *obj)
Get the module prefix for this object.
Definition: obj.c:12866
ncx_iqual_t obj_get_iqualval(obj_template_t *obj)
Get the instance qualifier for this object.
Definition: obj.c:13201
obj_iffeature_ptr_t * obj_first_iffeature_ptr(obj_template_t *obj)
Get first if-feature pointer.
Definition: obj.c:17003
boolean obj_in_submodule(obj_template_t *obj)
Check if the object is defined in a submodule.
Definition: obj.c:13000
boolean obj_is_deleted_ex(const obj_template_t *obj)
Check if object has been deleted by a deviate not-supported Or if its parent was deleted by deviation...
Definition: obj.c:15173
boolean obj_is_external_data_augment(obj_template_t *obj)
Check if an object is an external augment of a data node.
Definition: obj.c:16793
obj_template_t * obj_first_child_augok(obj_template_t *obj)
Get the first child object if the specified object has any children.
Definition: obj.c:7375
uint32 obj_get_real_level(const obj_template_t *obj)
Get the nest level for the specified object Top-level is '1' Does not count groupings as a level Does...
Definition: obj.c:12612
boolean obj_get_min_elements(obj_template_t *obj, uint32 *minelems)
Get the min-elements clause for this object, if any.
Definition: obj.c:13319
boolean obj_is_rpc_root(const obj_template_t *obj)
Check if object is marked as an RPC root object.
Definition: obj.c:14994
obj_template_t * obj_clone_template(ncx_module_t *mod, obj_template_t *srcobj, dlq_hdr_t *mobjQ)
Clone an obj_template_t Copy the pointers from the srcobj into the new obj.
Definition: obj.c:9144
status_t obj_set_named_type(void *pcb, tk_chain_t *tkc, ncx_module_t *mod, const xmlChar *typname, typ_def_t *typdef, obj_template_t *parent, grp_template_t *grp)
Resolve type test Called during phase 2 of module parsing.
Definition: obj.c:8998
obj_template_t * obj_match_child_str(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname, uint32 objnamelen, uint32 *matchcount)
Match a child object with the specified Qname Find first command that matches all N chars of objname.
Definition: obj.c:6971
boolean obj_any_notifs(const dlq_hdr_t *datadefQ)
Check if there are any notifications in the datadefQ.
Definition: obj.c:10293
boolean obj_rpc_has_output(obj_template_t *obj)
Check if the RPC object has any real output children.
Definition: obj.c:15782
status_t obj_add_metadata(obj_metadata_t *meta, obj_template_t *obj)
Add the filled out object metadata definition to the object.
Definition: obj.c:15897
void obj_free_deviate(obj_deviate_t *deviate)
Clean and free an object deviate statement.
Definition: obj.c:10350
status_t obj_add_errmsg(obj_template_t *obj, const xmlChar *basestr, obj_errmsg_t **ret_errmsg)
Create a new obj_errmsg struct for the object.
const xmlChar * obj_get_mod_xmlprefix(const obj_template_t *obj)
Get the module prefix for this object.
Definition: obj.c:12897
boolean obj_is_augclone(const obj_template_t *obj)
Figure out if the obj is a cloned object, inserted via an augment statement.
Definition: obj.c:14457
const xmlChar * obj_get_info_description(const obj_template_t *obj)
Get the info description field for this obj Check if a 'info' appinfo node is present.
Definition: obj.c:11610
obj_unique_comp_t * obj_next_unique_comp(obj_unique_comp_t *uncomp)
Get the next unique-stmt component for a list.
Definition: obj.c:9825
xmlns_id_t obj_get_nsid(const obj_template_t *obj)
Get the namespace ID for this object.
Definition: obj.c:13136
obj_key_t * obj_first_key(obj_template_t *obj)
Get the first key record.
Definition: obj.c:9970
ncx_access_t obj_get_max_access(const obj_template_t *obj)
Get the NCX max-access enum for an obj_template_t Return the explicit value or the inherited value.
Definition: obj.c:11892
status_t obj_gen_object_id_unique(const obj_template_t *obj, const obj_template_t *stopobj, xmlChar **buff)
Malloc and Generate the object ID for a unique-stmt test.
Definition: obj.c:10830
obj_template_t * obj_get_leafref_targobj(obj_template_t *obj)
Get the target object for a leafref leaf or leaf-list.
Definition: obj.c:16713
obj_metadata_t * obj_new_metadata(void)
Malloc and initialize the fields in a an obj_metadata_t.
Definition: obj.c:15836
boolean obj_find_all_children(ncx_module_t *exprmod, obj_walker_fn_t walkerfn, void *cookie1, void *cookie2, obj_template_t *startnode, const xmlChar *modname, const xmlChar *childname, boolean configonly, boolean textmode, boolean useroot)
Find all occurances of the specified node(s) within the children of the current node.
Definition: obj.c:7766
typ_template_t * obj_find_type(obj_template_t *obj, const xmlChar *typname)
Check if a typ_template_t in the obj typedefQ hierarchy.
Definition: obj.c:8655
boolean obj_is_rpc(const obj_template_t *obj)
Check if the object is an RPC method.
Definition: obj.c:14757
void obj_flag_xpath_backptrs_dirty(obj_template_t *obj, ncx_cfg_t cfg_id, boolean flag)
Check all the xpath backptr records for this object and set them to dirty or clean,...
Definition: obj.c:17393
boolean obj_is_xpath_string(const obj_template_t *obj)
Check if object is an XPath string.
Definition: obj.c:15206
obj_unique_t * obj_find_unique(dlq_hdr_t *que, const xmlChar *xpath)
Find a specific unique-stmt.
Definition: obj.c:9704
void obj_force_disabled(obj_template_t *obj)
Force an object to be disabled.
Definition: obj.c:18714
obj_template_t * obj_next_child(obj_template_t *obj)
Get the next child object if the specified object has any children.
Definition: obj.c:7258
boolean obj_is_block_user_update(const obj_template_t *obj)
Check if object is marked as ncx:user-write with update access disabled.
Definition: obj.c:16928
obj_key_t * obj_get_key_by_name(obj_template_t *obj, const xmlChar *keyname)
Check the specified list to see if the string is a list key.
Definition: obj.c:18481
boolean obj_is_anyxml(const obj_template_t *obj)
Check if object is an anyxml.
Definition: obj.c:14045
boolean obj_is_terminal(const obj_template_t *obj)
Check if object is a proper leaf or leaflist or anyxml.
Definition: obj.c:14267
void obj_force_root(obj_template_t *obj)
Set the object as an anydata type of root.
Definition: obj.c:14980
status_t obj_gen_object_id_sid(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node for SID path usage.
Definition: obj.c:11024
typ_template_t * obj_first_typedef(obj_template_t *obj)
Get the first local typedef for this object, if any.
Definition: obj.c:8756
obj_template_t * obj_new_rpcio(obj_template_t *rpcobj, const xmlChar *name)
Malloc and initialize the fields in a an obj_rpcio_t.
Definition: obj.c:8598
void obj_set_notif_enabled(obj_template_t *obj, boolean enabled)
Set the notification object enabled flag.
Definition: obj.c:17881
uint8 obj_get_sil_priority(obj_template_t *obj)
Get the SIL priority field.
Definition: obj.c:18048
boolean obj_is_sil_force_replace_replay(const obj_template_t *obj)
Check if this object has the OBJ_FL_SIL_FORCE_REPLACE_REPLAY bit set.
Definition: obj.c:17817
status_t obj_set_name(obj_template_t *obj, const xmlChar *objname)
Set the name field for this obj.
Definition: obj.c:11226
const xmlChar * obj_get_presence_string(const obj_template_t *obj)
Get the present-stmt value, if any.
Definition: obj.c:13583
void obj_clean_deviationQ(dlq_hdr_t *deviationQ)
Clean and free an Q of object deviation statements.
Definition: obj.c:10463
obj_template_t * obj_find_template_top_lrcheck(ncx_module_t *mod, const xmlChar *modname, const xmlChar *objname)
Check if an obj_template_t in the mod->datadefQ or any of the include files visible to this module (L...
Definition: obj.c:6148
obj_key_t * obj_find_key2(dlq_hdr_t *que, obj_template_t *keyobj)
Find a specific key component, check for a specific node in case deep keys are supported,...
Definition: obj.c:9934
boolean obj_ok_for_cli(obj_template_t *obj)
Figure out if the obj is OK for current CLI implementation.
Definition: obj.c:15588
boolean obj_in_list(const obj_template_t *obj)
Check if object is nested within a list.
Definition: obj.c:14136
obj_template_t * obj_get_default_case(obj_template_t *obj)
Get the default case for the specified OBJ_TYP_CHOICE object.
Definition: obj.c:12400
boolean obj_find_all_ancestors(ncx_module_t *exprmod, obj_walker_fn_t walkerfn, void *cookie1, void *cookie2, obj_template_t *startnode, const xmlChar *modname, const xmlChar *name, boolean configonly, boolean textmode, boolean useroot, boolean orself, boolean *fncalled)
Find all occurances of the specified node(s) within the ancestors of the current node.
Definition: obj.c:7988
ncx_iqual_t obj_get_iqualval_ex(obj_template_t *obj, boolean required)
Get the instance qualifier for this object.
Definition: obj.c:13231
boolean obj_get_config_flag(const obj_template_t *obj)
Get the config flag for an obj_template_t Return the explicit value or the inherited value Also retur...
Definition: obj.c:11826
boolean obj_is_obsolete(const obj_template_t *obj)
Check if the object has obsolete status.
Definition: obj.c:17948
status_t obj_get_child_node(obj_template_t *obj, obj_template_t *chobj, const xml_node_t *curnode, boolean xmlorder, dlq_hdr_t *force_modQ, obj_template_t **rettop, obj_template_t **retobj)
Get the correct child node for the specified parent and current XML node.
Definition: obj.c:13649
void obj_number_data_object(obj_template_t *obj)
Number the object tree; initial setup.
Definition: obj.c:18220
boolean obj_is_key(const obj_template_t *obj)
Check if object is being used as a key leaf within a list.
Definition: obj.c:15090
void obj_clear_xpath_backptr(obj_template_t *obj, struct xpath_pcb_t_ *xpath)
Clear an xpath-expr backptr.
Definition: obj.c:17272
boolean obj_get_config_flag_deep(const obj_template_t *obj)
get config flag during augment expand
Definition: obj.c:13784
const xmlChar * obj_get_mod_version(const obj_template_t *obj)
Get the module version for this object.
Definition: obj.c:13075
boolean obj_has_xpath_stmts(obj_template_t *obj)
Check if any must or when stmts in node or all children.
Definition: obj.c:19849
uint32 obj_get_level(const obj_template_t *obj)
Get the nest level for the specified object Top-level is '1' Does not count groupings as a level.
Definition: obj.c:12530
obj_template_t * obj_first_terminal_child(obj_template_t *obj)
Get the first child object if the specified object has any children; MUST BE A TERMINAL NODE!...
Definition: obj.c:7125
boolean obj_is_system_ordered(const obj_template_t *obj)
Check if the object is system or user-ordered.
Definition: obj.c:15276
ncx_yang_version_t obj_get_langver(obj_template_t *obj)
Get the YANG version for this object.
Definition: obj.c:18509
boolean obj_is_cli_text_block(const obj_template_t *obj)
Check if object is marked as ywx:cli-text-block.
Definition: obj.c:16829
boolean obj_is_sm_rpc(const obj_template_t *obj)
Check if the object is a schema mounted RPC method.
Definition: obj.c:14770
obj_oid_t * obj_get_oid_struct(obj_template_t *obj, boolean *malloced)
Get malloced object OID structure that contains OID string and OID count.
Definition: obj.c:18637
status_t obj_copy_object_id(const obj_template_t *obj, xmlChar *buff, uint32 bufflen, uint32 *reallen)
Generate the object ID for an object node and copy to the buffer copy an object ID to a buffer.
Definition: obj.c:10951
void obj_set_notif_log_drops(const obj_template_t *obj, boolean enabled)
Set the event drops enabled flag for the notification object.
Definition: obj.c:17904
obj_template_t * obj_get_parent_choice(obj_template_t *obj)
Get the choice parent of the current object;.
Definition: obj.c:19507
ncx_backptr_t * obj_next_inherit_when_ptr(ncx_backptr_t *ptr)
Get the next xpath pointer struct.
Definition: obj.c:17057
boolean obj_is_data_node(const obj_template_t *obj)
Check if the object is a real node type.
Definition: obj.c:14604
boolean obj_is_mp_parent(obj_template_t *child)
Check if the parent of this object is a Mount Pount object.
Definition: obj.c:19582
obj_template_t * obj_find_child_str(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname, uint32 objnamelen)
Find a child object with the specified Qname.
Definition: obj.c:6862
boolean obj_is_sm_notif(const obj_template_t *obj)
Check if the object is a schema-mounted notification.
Definition: obj.c:14889
boolean obj_is_data_db(const obj_template_t *obj)
Check if the object is some sort of data Constrained to only check the config DB objects,...
Definition: obj.c:14562
boolean obj_is_short_case(obj_template_t *obj)
Check if the object is a short case statement.
Definition: obj.c:15510
obj_template_t * obj_find_template_all(ncx_module_t *mod, const xmlChar *modname, const xmlChar *objname)
Check if an obj_template_t in the mod->datadefQ or any of the include files used within the entire ma...
Definition: obj.c:6191
boolean obj_is_mounted(obj_template_t *child)
Check if mounted object.
Definition: obj.c:19537
boolean obj_is_abstract_ex(const obj_template_t *obj)
DUPLICATE FUNCTION OF obj_in_abstract()
Definition: obj.c:18538
boolean obj_any_rpcs(const dlq_hdr_t *datadefQ)
Check if there are any RPC methods in the datadefQ.
Definition: obj.c:10258
obj_template_t * obj_find_template_top_ex(ncx_module_t *mod, const xmlChar *modname, const xmlChar *objname, ncx_name_match_t match_names, boolean alt_names, boolean dataonly, status_t *retres)
Check if an obj_template_t in the mod->datadefQ or any of the include files visible to this module.
Definition: obj.c:6020
boolean obj_maybe_target_template(obj_template_t *obj)
Check a data node and its descendants match the template for NETCONF configuration sources Allow extr...
Definition: obj.c:17557
ncx_status_t obj_get_status(const obj_template_t *obj)
Get the status field for this obj.
Definition: obj.c:11404
boolean obj_is_leaf_list(const obj_template_t *obj)
Check if object is a proper leaf-list.
Definition: obj.c:14110
obj_template_t * obj_get_augment_targobj(obj_template_t *obj)
Get the target object for an augments object.
Definition: obj.c:16734
obj_template_t * obj_find_child_ex(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname, ncx_name_match_t match_names, boolean alt_names, boolean dataonly, status_t *retres)
Find a child object with the specified Qname extended match modes.
Definition: obj.c:6585
obj_template_t * obj_get_default_parm(obj_template_t *obj)
Get the ncx:default-parm object for this object Only supported for OBJ_TYP_CONTAINER and OBJ_TYP_RPCI...
Definition: obj.c:13715
obj_iffeature_ptr_t * obj_next_iffeature_ptr(obj_iffeature_ptr_t *iffptr)
Get the next if-feature pointer.
Definition: obj.c:17021
obj_metadata_t * obj_next_metadata(const obj_metadata_t *meta)
Get the next object metadata definition in the object.
Definition: obj.c:16002
status_t obj_fill_keystackQ(obj_template_t *obj, dlq_hdr_t *keystackQ)
Fill a keystackQ with backptrs to obj_template_t for key leafs.
Definition: obj.c:18755
struct xpath_pcb_t_ * obj_next_xpath_backptr(obj_template_t *obj, struct xpath_pcb_t_ *xpath)
Get the next XPath backptr.
Definition: obj.c:17130
ncx_leafref_class_t obj_get_leafref_class(obj_template_t *obj)
Get the leafref class for a leafref object.
Definition: obj.c:18147
obj_defval_tk_t * obj_first_defval_tk(const obj_refine_t *ref)
Get the first defval_tk entry.
Definition: obj.c:18293
void obj_set_sil_priority(obj_template_t *obj, uint8 prio)
Set the SIL priority field.
Definition: obj.c:18023
void obj_clear_datarule(obj_template_t *obj, const void *rule)
Clear the datarule back-ptr for this node.
Definition: obj.c:18862
uint32 obj_get_level_mp(const obj_template_t *obj)
Get the nest level for the specified object Top-level is '1' Does not count groupings as a level.
Definition: obj.c:12574
obj_template_t * obj_find_child_lrcheck(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname LeafRef Check VERSION.
Definition: obj.c:6342
obj_template_t * obj_new_template(obj_type_t objtype)
Malloc and initialize the fields in a an object template.
Definition: obj.c:5538
boolean obj_is_any(const obj_template_t *obj)
Get the config flag for the top-level object Check the specified object all the way to root.
Definition: obj.c:14078
boolean obj_in_notif(const obj_template_t *obj)
Check if the object is in a notification.
Definition: obj.c:14726
boolean obj_find_xpath_backptr(obj_template_t *obj, struct xpath_pcb_t_ *xpath)
Find an xpath-expr backptr.
Definition: obj.c:17078
void obj_enter_xpath_mode(void)
Enter xpath mode and start ignoring obj_is_enabled.
Definition: obj.c:18453
void obj_free_template(obj_template_t *obj)
Scrub the memory in a obj_template_t by freeing all the sub-fields and then freeing the entire struct...
Definition: obj.c:5676
status_t obj_gen_object_id_oid(ncx_module_t *mod, const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node Used for canonical ID string comparison to gener...
Definition: obj.c:10662
boolean obj_is_mandatory(obj_template_t *obj)
Figure out if the obj is YANG mandatory or not.
Definition: obj.c:14284
boolean obj_has_children(obj_template_t *obj)
Check if there are any accessible nodes within the object.
Definition: obj.c:15643
boolean obj_is_schema_instance_string(const obj_template_t *obj)
Check if object is a schema-instance string.
Definition: obj.c:15232
ncx_sid_t obj_get_yang_sid(const obj_template_t *obj)
Get the YANG SID for this object.
Definition: obj.c:13163
obj_deviation_t * obj_new_deviation(void)
Malloc and initialize the fields in a an object deviation statement.
Definition: obj.c:10411
uint16 obj_get_key_num(obj_template_t *obj)
Get the key number for the object.
Definition: obj.c:17749
boolean obj_in_abstract(const obj_template_t *obj)
Check if object is being used as an object identifier or error-info CHECK ENTIRE TREE UP TO ROOT.
Definition: obj.c:15117
void obj_free_iffeature_ptr(obj_iffeature_ptr_t *iffptr)
Free an obj_iffeature_ptr_t struct.
Definition: obj.c:16987
const xmlChar * obj_get_reference(const obj_template_t *obj)
Get the reference field for this obj.
Definition: obj.c:11704
boolean obj_delete_all_supported(obj_template_t *obj)
Check if the object supports a direct delete-all or remove-all operation.
Definition: obj.c:18170
obj_unique_comp_t * obj_first_unique_comp(obj_unique_t *un)
Get the first identifier in a unique-stmt for a list.
Definition: obj.c:9798
void obj_set_key_leaf(obj_template_t *obj, uint16 keynum)
Set the key data for the object.
Definition: obj.c:17726
boolean obj_is_deleted(const obj_template_t *obj)
Check if object has been deleted by a deviate not-supported.
Definition: obj.c:15151
obj_template_t * obj_find_child(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6266
uint8 obj_get_fraction_digits(const obj_template_t *obj)
Get the fraction-digits field from the object typdef.
Definition: obj.c:13961
status_t obj_gen_object_id_xpath(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node.
Definition: obj.c:10720
obj_defval_tk_t * obj_first_dev_defval_tk(const obj_deviate_t *dev)
Get the first defval_tk entry.
Definition: obj.c:18331
obj_unique_t * obj_new_unique(void)
Alloc and Init a obj_unique_t struct.
Definition: obj.c:9553
dlq_hdr_t * obj_get_leafrefQ(const obj_template_t *obj)
Get the leafrefQ for this obj.
Definition: obj.c:12010
void obj_find_delete_defval(obj_template_t *obj, const xmlChar *defval)
Find and delete a leaf-list default for deviate delete default foo.
Definition: obj.c:18369
boolean obj_has_iffeature(obj_template_t *obj)
Check any if-feature statements exist for the specified object.
Definition: obj.c:15435
void obj_clr_enable_chk(obj_template_t *obj)
Force an object to re-evaluate the enable check Will call for all children.
Definition: obj.c:18729
const xmlChar * obj_get_units(obj_template_t *obj)
Get the units clause for this object, if any.
Definition: obj.c:13405
boolean obj_is_empty(const obj_template_t *obj)
Check if object was entered in empty fashion:
Definition: obj.c:14911
boolean obj_in_edit2_mode(obj_template_t *obj)
Check if the object is an edit2 container or list or terminal node child in an edit2 container or lis...
Definition: obj.c:18114
boolean obj_in_rpc_reply(const obj_template_t *obj)
Check if the object is in an rpc-reply/output section.
Definition: obj.c:14692
boolean obj_is_action(const obj_template_t *obj)
Check if the object is a YANG 1.1 action.
Definition: obj.c:14821
boolean obj_is_uses(const obj_template_t *obj)
Check if object is a YANG uses-stmt.
Definition: obj.c:14239
obj_template_t * obj_previous_child(obj_template_t *obj)
Get the previous child object if the specified object has any children.
Definition: obj.c:7478
const xmlChar * obj_get_keystr(obj_template_t *obj)
Get the key string for this list object.
Definition: obj.c:16615
boolean obj_has_text_content(const obj_template_t *obj)
Check if the specified object type has a text content for XPath purposes.
Definition: obj.c:11371
boolean obj_get_config_flag2(const obj_template_t *obj, boolean *setflag)
Get the config flag for an obj_template_t Return the explicit value or the inherited value Also retur...
Definition: obj.c:11865
boolean obj_is_leafy(const obj_template_t *obj)
Check if object is a proper leaf or leaflist.
Definition: obj.c:14252
void obj_exit_xpath_mode(void)
Exit xpath mode and stop ignoring obj_is_enabled.
Definition: obj.c:18462
obj_template_t * obj_next_terminal_child_nokey(obj_template_t *obj)
Get the next child object if the specified object has any children; MUST BE TERMINAL NODE!...
Definition: obj.c:7342
const typ_def_t * obj_get_ctypdef(const obj_template_t *obj)
Get the typdef for the leaf or leaf-list : Const version.
Definition: obj.c:12790
boolean obj_has_aio_list(obj_template_t *obj)
Check is AIO object is a list or if its parent is a list object.
Definition: obj.c:19312
boolean obj_is_dup_local(obj_template_t *obj)
Check if this object is one that has a duplicate sibling with the same local-name and different modul...
Definition: obj.c:17708
const ncx_iffeature_t * obj_get_next_iffeature(const ncx_iffeature_t *iffeature)
Get the next if-feature clause (if any)
Definition: obj.c:14024
boolean obj_is_mp_with_rootcb(const obj_template_t *obj)
Check if current object is Mount Point object.
Definition: obj.c:19615
boolean obj_is_target_template(obj_template_t *obj)
Check a data node and its descendants match the template for NETCONF configuration sources.
Definition: obj.c:17500
boolean obj_notif_enabled(const obj_template_t *obj)
Check if the notification object is enabled.
Definition: obj.c:17849
obj_metadata_t * obj_first_metadata(const obj_template_t *obj)
Get the first object metadata definition in the object.
Definition: obj.c:15974
obj_template_t * obj_last_child(obj_template_t *obj)
Get the last child object if the specified object has any children.
Definition: obj.c:7203
const obj_template_t * obj_get_real_cparent(const obj_template_t *obj)
Get the parent of the current object; skip OBJ_TYP_CHOICE and OBJ_TYP_CASE.
Definition: obj.c:13546
boolean obj_is_mandatory_when(obj_template_t *obj)
Figure out if the obj is YANG mandatory or not Check the when-stmts, not just mandatory-stmt.
Definition: obj.c:14430
obj_template_t * obj_next_terminal_child(obj_template_t *obj)
Get the next child object if the specified object has any children; MUST BE TERMINAL NODE!...
Definition: obj.c:7310
dlq_hdr_t * obj_get_mustQ(const obj_template_t *obj)
Get the mustQ for this obj.
Definition: obj.c:11964
dlq_hdr_t * obj_get_datadefQ(obj_template_t *obj)
Get the datadefQ (or caseQ) if this object has one.
Definition: obj.c:12104
const xmlChar * obj_get_mod_name(const obj_template_t *obj)
Get the module name for this object.
Definition: obj.c:12917
boolean obj_notif_log_drops(const obj_template_t *obj)
Check if the event drops for the notification object is enabled.
Definition: obj.c:17865
void obj_set_ncx_flags(obj_template_t *obj)
Check the NCX appinfo extensions and set flags as needed.
Definition: obj.c:16113
boolean obj_use_get_when_check(const obj_template_t *obj)
check an object needs to use a when-check for GET processing
Definition: obj.c:19097
obj_template_t * obj_find_schema_template(dlq_hdr_t *que, const xmlChar *modname, const xmlChar *objname)
Find an object with the specified name For YANG schema-nodeid so NEVER lookdeep.
Definition: obj.c:5867
obj_unique_t * obj_next_unique(obj_unique_t *un)
Get the next unique-stmt for a list.
Definition: obj.c:9772
boolean obj_is_secure(const obj_template_t *obj)
Check if object is tagged ncx:secure.
Definition: obj.c:15250
boolean obj_get_xpath_oper_ok(const obj_template_t *obj)
Get the object XPath oper OK flag.
Definition: obj.c:19359
obj_template_t * obj_next_child_deep_ex(obj_template_t *obj, boolean stopnext)
Get the next child object if the specified object has any children.
Definition: obj.c:7634
boolean obj_is_cloned(const obj_template_t *obj)
Figure out if the obj is a cloned object, inserted via uses or augment statements.
Definition: obj.c:14443
boolean obj_is_final(obj_template_t *obj)
Check if the object template represents a fully expanded template or if it is inside a grouping.
Definition: obj.c:18691
ncx_module_t * obj_get_real_mod(obj_template_t *obj)
Get the module struct for the submodule or main module with this object.
Definition: obj.c:19403
uint32 obj_key_count(const obj_template_t *obj)
Get the number of keys for this object.
Definition: obj.c:10135
ncx_btype_t obj_get_basetype(const obj_template_t *obj)
Get the NCX base type enum for the object type.
Definition: obj.c:12818
const xmlChar * obj_get_typestr(const obj_template_t *obj)
Get the name of the object type.
Definition: obj.c:12044
boolean obj_is_sil_force_replay(const obj_template_t *obj)
Check if this object has the OBJ_FL_SIL_FORCE_REPLAY bit set.
Definition: obj.c:17798
boolean obj_is_choice(const obj_template_t *obj)
Check if object is a YANG choice.
Definition: obj.c:14199
status_t obj_cache_datarule(obj_template_t *obj, void *rule)
Set the data-rule back-ptr for this node.
Definition: obj.c:18827
obj_template_t * obj_get_real_parent(obj_template_t *obj)
Get the parent of the current object; skip OBJ_TYP_CHOICE and OBJ_TYP_CASE.
Definition: obj.c:13507
boolean obj_is_block_user_create(const obj_template_t *obj)
Check if object is marked as ncx:user-write with create access disabled.
Definition: obj.c:16907
struct xpath_pcb_t_ * obj_first_xpath_backptr(obj_template_t *obj)
Get the first xpath backptr.
Definition: obj.c:17110
dlq_hdr_t * obj_get_appinfoQ(obj_template_t *obj)
Get the appinfoQ for this obj.
Definition: obj.c:11938
obj_template_t * obj_get_parent(obj_template_t *obj)
Get the parent of the current object.
Definition: obj.c:13453
grp_template_t * obj_find_grouping(obj_template_t *obj, const xmlChar *grpname)
Check if a grp_template_t in the obj groupingQ hierarchy.
Definition: obj.c:8824
boolean obj_is_cli_equals_ok(const obj_template_t *obj)
Check if object is marked as ncx:default-parm-equals-ok.
Definition: obj.c:16816
obj_defval_tk_t * obj_next_defval_tk(const obj_defval_tk_t *defval_tk)
Get the next defval_tk entry.
Definition: obj.c:18312
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:11163
boolean obj_has_rw_children_ex(obj_template_t *obj, boolean term_only)
Check if there are any accessible read-write child nodes within the object.
Definition: obj.c:15739
void obj_free_unique(obj_unique_t *un)
Free a obj_unique_t struct.
Definition: obj.c:9599
boolean obj_has_ro_descendants(obj_template_t *obj)
Check if there are any accessible read-only descendant nodes within the object.
Definition: obj.c:15688
obj_template_t * obj_find_template_top(ncx_module_t *mod, const xmlChar *modname, const xmlChar *objname)
Check if an obj_template_t in the mod->datadefQ or any of the include files visible to this module.
Definition: obj.c:5976
const obj_key_t * obj_next_ckey(const obj_key_t *objkey)
Get the next key record: Const version.
Definition: obj.c:10109
boolean obj_is_np_container(const obj_template_t *obj)
Check if the object is an Non-Presence-container.
Definition: obj.c:15299
void obj_free_deviation(obj_deviation_t *deviation)
Clean and free an object deviation statement.
Definition: obj.c:10435
void obj_sort_children(obj_template_t *obj)
Check all the child nodes of the specified object and rearrange them into alphabetical order,...
Definition: obj.c:16031
boolean obj_is_augment(const obj_template_t *obj)
Check if the obj is an augment statement.
Definition: obj.c:14477
const obj_key_t * obj_first_ckey(const obj_template_t *obj)
Get the first key record: Const version.
Definition: obj.c:10028
status_t obj_gen_object_id(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node.
Definition: obj.c:10485
boolean obj_is_leaf(const obj_template_t *obj)
Check if object is a proper leaf.
Definition: obj.c:14097
const xmlChar * obj_get_help_description(const obj_template_t *obj)
Get the help description field for this obj Check if a 'help' appinfo node is present.
Definition: obj.c:11574
boolean obj_is_exclusive_rpc(const obj_template_t *obj)
Check if this object has the OBJ_FL_EXCLUSIVE_WRITE bit set.
Definition: obj.c:17779
boolean obj_is_root(const obj_template_t *obj)
Check if object is marked as a root object.
Definition: obj.c:14964
boolean obj_is_singular(const obj_template_t *obj)
Check if the object can have only one instance or not.
Definition: obj.c:18983
obj_template_t * obj_get_top_aio_get2(obj_template_t *child)
Find the top AIO object.
Definition: obj.c:19269
status_t obj_set_xpath_backptrs(obj_template_t *obj)
Check a top-level data node and all its descendants to see if they have any XPath expressions that ne...
Definition: obj.c:17345
const obj_template_t * obj_find_template_con(dlq_hdr_t *que, const xmlChar *modname, const xmlChar *objname)
Find an object with the specified name Return a const pointer; used by yangdump.
Definition: obj.c:5896
obj_deviate_t * obj_new_deviate(void)
Malloc and initialize the fields in a an object deviate statement.
Definition: obj.c:10325
boolean obj_find_all_descendants(ncx_module_t *exprmod, obj_walker_fn_t walkerfn, void *cookie1, void *cookie2, obj_template_t *startnode, const xmlChar *modname, const xmlChar *name, boolean configonly, boolean textmode, boolean useroot, boolean orself, boolean *fncalled)
Find all occurances of the specified node(s) within the descendants of the current node.
Definition: obj.c:8181
void obj_set_dup_local(obj_template_t *obj)
Flag the object as one that has a duplicate sibling with the same local-name and different module nam...
Definition: obj.c:17687
boolean obj_is_very_secure(const obj_template_t *obj)
Check if object is tagged ncx:very-secure.
Definition: obj.c:15263
uint32 obj_enabled_child_count(obj_template_t *obj)
Get the count of the number of enabled child nodes for the object template.
Definition: obj.c:16492
ncx_module_t * obj_get_mod_for_dump(obj_template_t *obj)
Get the module pointer for this object Use for sub-module !!! Used by yangdump-pro!...
Definition: obj.c:13038
boolean obj_parent_same_module(const obj_template_t *obj)
Check if the object parent object is the same.
Definition: obj.c:17979
boolean obj_npcon_has_defaults(obj_template_t *obj)
Check if the specified NP container has defaults within it Must be a config object!...
Definition: obj.c:12449
boolean obj_has_mandatory_children(obj_template_t *obj)
Check if there are any mandatory children.
Definition: obj.c:19128
uint16 obj_index_t
object index only applies to child nodes; this is assigned at runtime and any augments loaded at run-...
Definition: obj.h:753
obj_augtype_t
enumeration for different YANG augment statement types
Definition: obj.h:757
unsigned long oid_t
data type used in SNMP
Definition: obj.h:1152
uint8 obj_testflags_t
object test flags
Definition: obj.h:1167
obj_deviate_arg_t
type of deviation for each deviate entry
Definition: obj.h:1320
obj_type_t
enumeration for different YANG data def statement types the enum order is significant!...
Definition: obj.h:646
boolean(* obj_walker_fn_t)(obj_template_t *obj, void *cookie1, void *cookie2, boolean nonconfig_warn)
child or descendant node search walker function
Definition: obj.h:1425
@ OBJ_AUGTYP_RPCOUT
rpc output
Definition: obj.h:760
@ OBJ_AUGTYP_NONE
not set
Definition: obj.h:758
@ OBJ_AUGTYP_DATA
within data
Definition: obj.h:762
@ OBJ_AUGTYP_RPCIN
rpc input
Definition: obj.h:759
@ OBJ_AUGTYP_CASE
case
Definition: obj.h:761
@ OBJ_DARG_NONE
not set
Definition: obj.h:1321
@ OBJ_DARG_NOT_SUPPORTED
deviate not-supported
Definition: obj.h:1325
@ OBJ_DARG_DELETE
deviate delete
Definition: obj.h:1323
@ OBJ_DARG_ADD
deviate add
Definition: obj.h:1322
@ OBJ_DARG_REPLACE
deviate replace
Definition: obj.h:1324
@ OBJ_TYP_CASE
This object represents a YANG case schema node.
Definition: obj.h:676
@ OBJ_TYP_ANYXML
This object represents a YANG 1.1 anydata data node.
Definition: obj.h:650
@ OBJ_TYP_CHOICE
This object represents a YANG choice schema node.
Definition: obj.h:671
@ OBJ_TYP_ACTION
This object represents a YANG 1.1 action schema node.
Definition: obj.h:742
@ OBJ_TYP_REFINE
This object represents a YANG refine statement.
Definition: obj.h:695
@ OBJ_TYP_USES
This object represents a YANG uses schema node.
Definition: obj.h:687
@ OBJ_TYP_NOTIF
This object represents a YANG notification statement.
Definition: obj.h:732
@ OBJ_TYP_LEAF_LIST
This object represents a YANG leaf-list data node.
Definition: obj.h:662
@ OBJ_TYP_LEAF
This object represents a YANG leaf data node.
Definition: obj.h:659
@ OBJ_TYP_ANYDATA
This object represents a YANG 1.1 anydata data node.
Definition: obj.h:735
@ OBJ_TYP_NONE
not set
Definition: obj.h:647
@ OBJ_TYP_RPCIO
This object represents a YANG input or output statement.
Definition: obj.h:723
@ OBJ_TYP_RPC
This object represents a YANG rpc statement.
Definition: obj.h:715
@ OBJ_TYP_CONTAINER
This object represents a YANG presence or non-presence container.
Definition: obj.h:656
@ OBJ_TYP_LIST
This object represents a YANG list data node.
Definition: obj.h:665
@ OBJ_TYP_AUGMENT
This object represents a YANG augment statement.
Definition: obj.h:706
YANG Grouping Statement Handler.
NCX System Logging Manager.
Contains NCX constants.
YANG module data structures Many internal representations of YANG module constructs.
NETCONF protocol remote procedure call common definitions.
Global error messages for status code enumerations.
One YANG 'grouping' definition – sibling set template.
Definition: grp.h:87
used with various structs to cache back-ptrs the 'node' pointer may or may not be malloced!...
Definition: ncxtypes.h:1511
struct to remember error info tkc->cur_err will be checked before tkc->cur for error information
Definition: ncxtypes.h:864
YANG if-feature entry.
Definition: ncxtypes.h:940
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1125
Schema Mount Root Control Block used in the object template.
Definition: ncxtypes.h:1860
One YANG augment statement struct (top-level or in case-stmt.
Definition: obj.h:1071
dlq_hdr_t datadefQ
Q of obj_template_t.
Definition: obj.h:1087
ncx_status_t status
status-stmt
Definition: obj.h:1086
xmlChar * target
Xpath schema-node target to augment.
Definition: obj.h:1073
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:1079
obj_augtype_t augtype
internal augment type enum
Definition: obj.h:1085
uint16 depth
internal nest depth of augment
Definition: obj.h:1088
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:1076
struct obj_template_t_ * targobj
resolved backptr to augmented object
Definition: obj.h:1082
One YANG 'case' definition.
Definition: obj.h:946
xmlChar * name
case name
Definition: obj.h:947
ncx_status_t status
status-stmt
Definition: obj.h:960
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:953
boolean nameclone
the nameclone flag is set even though the clone bit is also set; this can probably be removed
Definition: obj.h:959
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:950
dlq_hdr_t * datadefQ
Q of obj_template_t.
Definition: obj.h:955
One YANG 'choice' definition.
Definition: obj.h:930
dlq_hdr_t * caseQ
Q of obj_template_t.
Definition: obj.h:939
xmlChar * name
choice name
Definition: obj.h:931
ncx_status_t status
status-stmt
Definition: obj.h:941
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:938
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:935
xmlChar * defval
default case
Definition: obj.h:932
boolean caseQclone
flag caseQ is cloned
Definition: obj.h:940
One YANG 'container' definition.
Definition: obj.h:803
xmlChar * name
name of container
Definition: obj.h:805
ncx_status_t status
status-stmt
Definition: obj.h:818
xmlChar * ref
reference-stmt (not saved by server)
Definition: obj.h:811
dlq_hdr_t mustQ
Q of xpath_pcb_t.
Definition: obj.h:819
xmlChar * presence
presence-stmt
Definition: obj.h:814
xmlChar * descr
description-stmt (not saved by server)
Definition: obj.h:808
struct obj_template_t_ * defaultparm
default parm for yangcli
Definition: obj.h:820
dlq_hdr_t * typedefQ
Q of typ_template_t.
Definition: obj.h:815
dlq_hdr_t * datadefQ
Q of obj_template_t.
Definition: obj.h:817
dlq_hdr_t * groupingQ
Q of grp_template_t.
Definition: obj.h:816
One YANG 1.1 default stored in a Q for refine and deviate.
Definition: obj.h:775
xmlChar * def
default value string
Definition: obj.h:777
dlq_hdr_t qhdr
queue header
Definition: obj.h:776
ncx_error_t def_tkerr
file and line info for compiler
Definition: obj.h:778
YANG deviate statement struct.
Definition: obj.h:1330
dlq_hdr_t defval_tkQ
Q of obj_defval_tk_t (leaf-list can have multiple default-stmt)
Definition: obj.h:1363
dlq_hdr_t uniqueQ
Q of obj_unique_t.
Definition: obj.h:1385
ncx_error_t tkerr
the error info for each sub-clause is saved because when the deviation-stmt is parsed,...
Definition: obj.h:1339
dlq_hdr_t appinfoQ
Q of ncx_appinfo_t.
Definition: obj.h:1386
ncx_error_t arg_tkerr
same comment as tkerr
Definition: obj.h:1348
dlq_hdr_t mustQ
Q of xpath_pcb_t.
Definition: obj.h:1384
boolean config
deviating config-stmt
Definition: obj.h:1366
dlq_hdr_t qhdr
queue header
Definition: obj.h:1331
typ_def_t * typdef
typedef if deviating the type
Definition: obj.h:1351
ncx_error_t type_tkerr
same comment as tkerr
Definition: obj.h:1354
uint32 maxelems
deviating max-elements
Definition: obj.h:1382
ncx_error_t config_tkerr
same comment as tkerr
Definition: obj.h:1369
uint32 minelems
deviating min-elements
Definition: obj.h:1378
ncx_error_t minelems_tkerr
also minset
Definition: obj.h:1379
xmlChar * units
units if deviating the units
Definition: obj.h:1357
boolean empty
deviate-stmt is empty
Definition: obj.h:1342
ncx_error_t units_tkerr
same comment as tkerr
Definition: obj.h:1360
ncx_error_t maxelems_tkerr
also maxset
Definition: obj.h:1383
ncx_error_t mandatory_tkerr
same comment as tkerr
Definition: obj.h:1375
obj_deviate_arg_t arg
deviate argument enum
Definition: obj.h:1345
boolean mandatory
deviating mandatory-stmt
Definition: obj.h:1372
YANG deviation statement struct.
Definition: obj.h:1391
ncx_error_t tkerr
file and line info for compiler
Definition: obj.h:1404
dlq_hdr_t appinfoQ
Q of ncx_appinfo_t.
Definition: obj.h:1410
xmlChar * target
schema-node target to deviate
Definition: obj.h:1393
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:1401
xmlChar * devmodname
set if not the targmod
Definition: obj.h:1405
dlq_hdr_t qhdr
queue header
Definition: obj.h:1392
obj_template_t * targobj
target object when resolved
Definition: obj.h:1395
dlq_hdr_t deviateQ
Q of obj_deviate_t.
Definition: obj.h:1409
status_t res
parse status
Definition: obj.h:1408
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:1398
boolean empty
for display in yangdump
Definition: obj.h:1406
boolean annotation
set from annotation
Definition: obj.h:1407
xmlChar * targmodname
target module name
Definition: obj.h:1394
custom error message filter control block
Definition: obj.h:1121
dlq_hdr_t qhdr
queue header
Definition: obj.h:1122
boolean is_errortag
error-tag flag
Definition: obj.h:1124
xmlChar * matchstr
message string to match
Definition: obj.h:1123
custom error message parameter control block
Definition: obj.h:1129
dlq_hdr_t qhdr
queue header
Definition: obj.h:1130
uint32 len
state : length
Definition: obj.h:1134
xmlChar * path
path of replacement data
Definition: obj.h:1131
xmlChar * valstr
state: value string
Definition: obj.h:1137
custom error message control block
Definition: obj.h:1142
xmlChar * langstr
language string
Definition: obj.h:1145
dlq_hdr_t qhdr
queue header
Definition: obj.h:1143
dlq_hdr_t parmQ
Q of obj_errmsg_parm_t.
Definition: obj.h:1146
xmlChar * basestr
base string
Definition: obj.h:1144
dlq_hdr_t filterQ
Q of obj_errmsg_filter_t.
Definition: obj.h:1147
back-pointer to inherited if-feature statements
Definition: obj.h:1114
dlq_hdr_t qhdr
queue heaader
Definition: obj.h:1115
ncx_iffeature_t * iffeature
if-feature back-ptr
Definition: obj.h:1116
One YANG list key component.
Definition: obj.h:767
struct obj_template_t_ * keyobj
backptr to key object
Definition: obj.h:769
dlq_hdr_t qhdr
queue header
Definition: obj.h:768
boolean seen
used by yangdiff
Definition: obj.h:770
One YANG 'leaf' or 'anyxml' or 'anydata' definition.
Definition: obj.h:826
struct obj_template_t_ * leafrefobj
leafref obj backptr only if btyp == NCX_BT_LEAFREF
Definition: obj.h:857
xmlChar * name
name of leaf or anyxml/anydata
Definition: obj.h:828
ncx_status_t status
status-stmt
Definition: obj.h:846
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:840
dlq_hdr_t mustQ
Q of xpath_pcb_t.
Definition: obj.h:851
typ_def_t * typdef
typedef for the data type (leaf only)
Definition: obj.h:843
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:837
xmlChar * units
units-stmt only in a leaf
Definition: obj.h:831
dlq_hdr_t leafrefQ
used for quick validation on server
Definition: obj.h:854
xmlChar * defval
default-stmt only in a leaf
Definition: obj.h:834
uint16 keynum
internal key number only for keay leafs
Definition: obj.h:849
One YANG 'leaf-list' definition.
Definition: obj.h:862
struct obj_template_t_ * leafrefobj
leafref obj backptr only if btyp == NCX_BT_LEAFREF
Definition: obj.h:891
xmlChar * name
leaf-list name
Definition: obj.h:864
ncx_status_t status
status-stmt
Definition: obj.h:885
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:873
boolean minset
min-elements set
Definition: obj.h:881
boolean maxset
max-elements set
Definition: obj.h:883
dlq_hdr_t mustQ
Q of xpath_pcb_t.
Definition: obj.h:886
typ_def_t * typdef
typedef for the data type
Definition: obj.h:876
uint32 maxelems
max-elements value
Definition: obj.h:884
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:870
uint32 minelems
min-elements value
Definition: obj.h:882
xmlChar * units
units-stmt
Definition: obj.h:867
dlq_hdr_t leafrefQ
Q of ncx_backptr_t to obj_template_t.
Definition: obj.h:887
dlq_hdr_t defvalQ
YANG 1.1, Q of malloced ncx_backptr_t.
Definition: obj.h:888
boolean ordersys
ordered-by system or user
Definition: obj.h:880
boolean defset
T if any defaults specified for this leaf-list.
Definition: obj.h:879
One YANG 'list' definition.
Definition: obj.h:896
dlq_hdr_t uniqueQ
Q of obj_unique_t.
Definition: obj.h:912
xmlChar * name
list name
Definition: obj.h:898
ncx_status_t status
status-stmt
Definition: obj.h:918
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:907
ncx_error_t keytkerr
saved error info for key-stmt errors
Definition: obj.h:922
boolean minset
min-elements set
Definition: obj.h:914
boolean maxset
max-elements set
Definition: obj.h:916
dlq_hdr_t mustQ
Q of xpath_pcb_t.
Definition: obj.h:919
xmlChar * keystr
key-stmt (not required if config=false)
Definition: obj.h:901
uint32 maxelems
max-elements value
Definition: obj.h:917
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:904
uint32 minelems
min-elements value
Definition: obj.h:915
obj_index_t last_index
internal numbering data for val_child ordering
Definition: obj.h:925
dlq_hdr_t keyQ
Q of obj_key_t.
Definition: obj.h:911
boolean ordersys
ordered-by system or user
Definition: obj.h:913
dlq_hdr_t * typedefQ
Q of typ_template_t.
Definition: obj.h:908
dlq_hdr_t * datadefQ
Q of obj_template_t.
Definition: obj.h:910
dlq_hdr_t * groupingQ
Q of grp_template_t.
Definition: obj.h:909
One YANG metadata (XML attribute) node.
Definition: obj.h:1308
ncx_error_t tkerr
file and line info for compiler
Definition: obj.h:1314
xmlChar * name
metadata name
Definition: obj.h:1311
dlq_hdr_t qhdr
queue header
Definition: obj.h:1309
typ_def_t * typdef
typedef for metadata
Definition: obj.h:1312
struct obj_template_t_ * parent
obj containing metadata
Definition: obj.h:1310
xmlns_id_t nsid
in case parent == NULL
Definition: obj.h:1313
One YANG 'notification' clause definition.
Definition: obj.h:1093
boolean in_data
defined in data, YANG 1.1 only
Definition: obj.h:1109
boolean notif_enabled
enabled or disabled in server
Definition: obj.h:1107
dlq_hdr_t datadefQ
Q of obj_template_t.
Definition: obj.h:1105
xmlChar * name
notification name
Definition: obj.h:1095
ncx_status_t status
status-stmt
Definition: obj.h:1102
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:1101
dlq_hdr_t mustQ
Q of xpath_pcb_t.
Definition: obj.h:1106
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:1098
boolean notif_log_drops
log drops for this event type
Definition: obj.h:1108
dlq_hdr_t * typedefQ
Q of typ_template_t.
Definition: obj.h:1103
dlq_hdr_t * groupingQ
Q of gtp_template_t.
Definition: obj.h:1104
defines the snmp oid value, stored as an array of integers for easier comparision when performing AVL...
Definition: obj.h:1160
oid_t * oidc
OID component.
Definition: obj.h:1162
uint8 cnt
amount of Sub-Ids (max 128)
Definition: obj.h:1161
One YANG refine statement struct.
Definition: obj.h:982
dlq_hdr_t defval_tkQ
Q of obj_defval_tk_t.
Definition: obj.h:1012
xmlChar * target
relative-path of the object to refine
Definition: obj.h:984
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:1001
dlq_hdr_t mustQ
Q of xpath_pcb_t.
Definition: obj.h:1023
xmlChar * presence
refining the presence-stmt
Definition: obj.h:1007
uint32 maxelems
max-elements value
Definition: obj.h:1021
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:990
ncx_error_t ref_tkerr
same comment as descr_tkerr applies here
Definition: obj.h:1004
ncx_error_t config_tkerr
config and confset are in the object flags
Definition: obj.h:1015
uint32 minelems
min-elements value
Definition: obj.h:1019
struct obj_template_t_ * targobj
resolved target object to refine
Definition: obj.h:987
ncx_error_t minelems_tkerr
also minset
Definition: obj.h:1020
ncx_error_t descr_tkerr
the token for each sub-clause is saved because when the refine-stmt is parsed, the target is not know...
Definition: obj.h:998
ncx_error_t maxelems_tkerr
also maxset
Definition: obj.h:1022
ncx_error_t presence_tkerr
same comment as descr_tkerr applies here
Definition: obj.h:1010
ncx_error_t mandatory_tkerr
mandatory and mandset are in the object flags
Definition: obj.h:1018
One YANG rpc-stmt struct.
Definition: obj.h:1048
dlq_hdr_t datadefQ
Q of obj_template_t.
Definition: obj.h:1061
xmlChar * name
rpc method name
Definition: obj.h:1050
ncx_status_t status
status-stmt
Definition: obj.h:1058
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:1056
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:1053
boolean supported
mod loaded, not implemented
Definition: obj.h:1066
dlq_hdr_t * typedefQ
Q of typ_template_t.
Definition: obj.h:1059
dlq_hdr_t * groupingQ
Q of gtp_template_t.
Definition: obj.h:1060
xmlns_id_t nsid
internal fields for manager and agent
Definition: obj.h:1065
boolean is_action
YANG 1.1 only.
Definition: obj.h:1062
One YANG input-stmt or output-stmt struct.
Definition: obj.h:1028
dlq_hdr_t datadefQ
Q of obj_template_t.
Definition: obj.h:1032
xmlChar * name
input or output
Definition: obj.h:1029
dlq_hdr_t mustQ
Q of xpath_pcb_t.
Definition: obj.h:1033
boolean is_input
YPW-1406: the name can be changed temporarily in XPath validation so need a flag to tell if input or ...
Definition: obj.h:1038
struct obj_template_t_ * defaultparm
the defaultparm is only used by yangcli-pro to allow 1 parameter in a command to be entered without a...
Definition: obj.h:1043
dlq_hdr_t * typedefQ
Q of typ_template_t.
Definition: obj.h:1030
dlq_hdr_t * groupingQ
Q of gtp_template_t.
Definition: obj.h:1031
One YANG data-def-stmt.
Definition: obj.h:1174
ncx_error_t tkerr
file and line info for compiler
Definition: obj.h:1189
ncx_sid_t yang_sid
Each object specific variant has a YANG SID assigned for CBOR encoding.
Definition: obj.h:1299
obj_oid_t * oid
SNMP OID for this object (set if needed)
Definition: obj.h:1193
ncx_transaction_id_t leafref_txid
current edit transaction ID for intermediate leafref processing
Definition: obj.h:1269
uint32 yang_hash
experimental: not used
Definition: obj.h:1178
obj_testflags_t desc_testflags
see AGT_TEST_FL_* definitions
Definition: obj.h:1188
dlq_hdr_t appinfoQ
Q of ncx_appinfo_t.
Definition: obj.h:1203
dlq_hdr_t iffeatureQ
Q of ncx_iffeature_t.
Definition: obj.h:1204
dlq_hdr_t * errmsgQ
custom error message used if this is the server running
Definition: obj.h:1251
dlq_hdr_t xpath_backptrQ
Q of ncx_back_ptr_t with node == xpath_pcb_t.
Definition: obj.h:1242
void * def_hook_cb
def_hook_cb is ncx_def_hook_cbfn_t callback function for Dynamic Default Hook callback.
Definition: obj.h:1290
uint8 silflags
see OBJ_FL_* definitions
Definition: obj.h:1185
dlq_hdr_t inherited_whenQ
Q of ncx_backptr_t with node == xpath_pcb_t.
Definition: obj.h:1209
struct obj_template_t_ * usesobj
backptr to uses-obj if grouping expand
Definition: obj.h:1198
uint8 sil_priority
picks SIL callback order
Definition: obj.h:1186
ncx_transaction_id_t edit_txid
current edit transaction ID for commit test pruning
Definition: obj.h:1260
ncx_transaction_id_t must_txid
current edit transaction ID for MUST test default nodes pruning
Definition: obj.h:1263
boolean set_snmp_flags
need SNMP flags
Definition: obj.h:1194
ncx_transaction_id_t when_txid
current edit transaction ID for WHEN test default nodes pruning
Definition: obj.h:1266
dlq_hdr_t metadataQ
Q of obj_metadata_t.
Definition: obj.h:1202
void * yangmap_cb
if set, backptr to the nodemap in a YANG model mapping OBJ_IS_YANGMAP_SOURCE() indicates this is the ...
Definition: obj.h:1257
dlq_hdr_t qhdr
queue header
Definition: obj.h:1175
grp_template_t * grp
non-NULL == in a grp.datadefQ
Definition: obj.h:1190
boolean xpath_oper_ok
object OK for referencing oper-data in XPath
Definition: obj.h:1195
dlq_hdr_t inherited_iffeatureQ
Q of obj_iffeature_ptr_t.
Definition: obj.h:1206
uint32 yang_sid_tree
SID tree assignment if yang_sid is used.
Definition: obj.h:1302
struct xpath_pcb_t_ * when
optional when clause
Definition: obj.h:1201
uint32 flags
see OBJ_FL_* definitions
Definition: obj.h:1180
ncx_sm_rootcb_t * rootcb
Schema Mount Control Block.
Definition: obj.h:1293
uint32 xflags
see OBJ_FL_* definitions
Definition: obj.h:1181
uint32 xflags2
see OBJ_FL_* definitions
Definition: obj.h:1182
obj_index_t index
object index for val_child ordering
Definition: obj.h:1191
struct obj_template_t_ * parent
backptr to parent
Definition: obj.h:1197
obj_type_t objtype
object type (def)
Definition: obj.h:1176
void * commit_test_cb
backptr to the commit_test record for this object which will only exist if this object has 'must' or ...
Definition: obj.h:1248
uint32 uflags
see OBJ_FL_* definitions
Definition: obj.h:1184
obj_testflags_t testflags
see AGT_TEST_FL_* definitions
Definition: obj.h:1187
void * get2cb
get2fn is getcb_fn2_t for local GET2
Definition: obj.h:1224
dlq_hdr_t * dataruleQ
Q obj NACM data-rule backptrs.
Definition: obj.h:1212
void * cbset
cbset is different based on the object type:
Definition: obj.h:1221
struct ncx_module_t_ * mod
object module and namespace ID assigned at runtime this can be changed over and over as a uses statem...
Definition: obj.h:1233
xmlns_id_t nsid
namespace ID assigned to the object at run-time
Definition: obj.h:1236
struct obj_template_t_ * augobj
backptr to augment-obj if augment expand
Definition: obj.h:1199
One component in a YANG list unique target.
Definition: obj.h:783
boolean isduplicate
T: will be ignored by server.
Definition: obj.h:787
dlq_hdr_t qhdr
queue header
Definition: obj.h:784
xmlChar * xpath
saved unique str for this obj
Definition: obj.h:786
struct obj_template_t_ * unobj
unique object target
Definition: obj.h:785
One component in a YANG list unique target.
Definition: obj.h:792
ncx_error_t tkerr
file and line info for compiler
Definition: obj.h:798
dlq_hdr_t compQ
Q of obj_unique_comp_t.
Definition: obj.h:795
dlq_hdr_t qhdr
queue header
Definition: obj.h:793
xmlChar * xpath
complete saved unique str
Definition: obj.h:794
boolean isconfig
T:constraint is on config.
Definition: obj.h:797
boolean seen
needed by yangdiff
Definition: obj.h:796
One YANG uses statement struct.
Definition: obj.h:965
boolean expand_done
expand done flag
Definition: obj.h:977
xmlChar * name
name of grouping to use
Definition: obj.h:967
ncx_status_t status
status-stmt
Definition: obj.h:976
xmlChar * ref
reference-stmt (not saved on server)
Definition: obj.h:973
grp_template_t * grp
const back-ptr to grouping
Definition: obj.h:974
xmlChar * descr
description-stmt (not saved on server)
Definition: obj.h:970
xmlChar * prefix
prefix present in uses-stmt
Definition: obj.h:966
dlq_hdr_t * datadefQ
Q of obj_template_t.
Definition: obj.h:975
token parsing chain (main parser control block)
Definition: tk.h:415
Discriminated union for all data typedefs.
Definition: typ.h:458
One YANG 'typedef' definition – top-level type template.
Definition: typ.h:477
gather node data into a simple struct.
Definition: xml_util.h:205
NCX Syntax Token Handler.
Parameter Type Handler.
object specific variants
Definition: obj.h:1272
XML Utilities.
XML namespace support.