yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches

Constants and macros used to manage YANG data nodes. More...

Collaboration diagram for Value Node Macros:

Macros

#define VAL_MAX_PLOCKS   1
 max number of concurrent partial locks by the same session
 
#define VAL_MAX_DATARULES   1
 max number of NACM data rules that can refer to the same value node
 
#define VAL_MAX_NUMLEN   NCX_MAX_NUMLEN
 maximum number of bytes in a number string
 
#define VAL_BINDEX_CH   '['
 constants used in generating C and Xpath instance ID strings More...
 
#define VAL_EINDEX_CH   ']'
 end index
 
#define VAL_PASSWORD_STRING   (const xmlChar *)"****"
 display instead of readl password contents
 
#define VAL_FL_DUPDONE   bit0
 starting val_value_t flags field if set the duplicates-ok test has been done
 
#define VAL_FL_DUPOK   bit1
 if set the duplicates-ok test was OK
 
#define VAL_FL_DEFSET   bit2
 if set, this value was added by val_add_defaults
 
#define VAL_FL_META   bit3
 if set, value is actually for an XML attribute
 
#define VAL_FL_DIRTY   bit4
 if set, value has been edited or added, or child deleted
 
#define VAL_FL_UNIDONE   bit5
 if set, value is a list which has unique-stmt already failed
 
#define VAL_FL_DEFVALSET   bit6
 if set, value has been checked to see if it is the default value
 
#define VAL_FL_DEFVAL   bit7
 if set, value is set to the YANG default value; only use if VAL_FL_DEFVALSET is 1
 
#define VAL_FL_WITHDEF   bit8
 if set, PDU value had the with-defaults wd:attribute set to true
 
#define VAL_FL_DELETED   bit9
 if set, value has been deleted or moved and awaiting commit or rollback
 
#define VAL_FL_SUBTREE_DIRTY   bit10
 if set, there was an edit operation in a descendant node; Used by agt_val_root_check to prune trees for faster processing
 
#define VAL_FL_CHILD_DELETED   bit11
 if set then the VAL_FL_DIRTY flag should also be set; this flags indicates the parent node is dirty because a child was deleted; Otherwise the delete will be interpreted as a 'replace' when the commit from candidate to running is done
 
#define VAL_FL_IS_VAREXPR   bit12
 if set then the value string parsed is really a complex XPath expression that needs to be evaluated before the actual value and btype is set THIS BIT IS NOT IMPLEMENTED SET. More...
 
#define VAL_FL_FIXED_VALUE   bit13
 if set then the value is considered a fixed-value for get2 callback purposes; used for content-match expressions
 
#define VAL_FL_EDIT2_MERGE   bit14
 if set then the value was an edit2 merge value; make sure it does not get treated as a 'replace' operation
 
#define VAL_FL_EXTERNAL   bit15
 if set then the value came from external XML or DB-API
 
#define VAL_FL_FORCE_CONFIG   bit16
 if set then the value is forced as config=true or config=false Do not use the val->obj pointer to figure out config-stmt if this bit is set
 
#define VAL_FL_FORCE_CONFIG_VALUE   bit17
 if set then the forced config value is true if not set, then the forced config value is false Ignored unless VAL_FL_FORCE_CONFIG
 
#define VAL_FL_VALUE_SET   bit18
 set if the value has been set by client; not 100% reliable since the VAL_FOO(V) macros can access fields directly and set them to a zero value
 
#define VAL_FL_TEMP_XPATH   bit19
 set if value is a union that has a constrained leafref or i-i that has not been checked yet if a corresponding instance exists in the proper datastore
 
#define VAL_FL_UNCMTD_DELETE   bit20
 set if value was deleted, even if the node is default NP-Cont. More...
 
#define VAL_FL_RECREATED   bit21
 set if value was deleted and then is getting created again RE-create on the same node operation.
 
#define VAL_FL_SUBTREE_RECREATED   bit22
 if set, there was a re-create operation in a descendant node or there is an uncommitted deleted node in a descendant node; Used to clean recreated and uncommited delete flags for faster processing
 
#define VAL_FL_FROM_TEMPLATE   bit23
 set if a val_value_t node was created because it was added from a config template (see yumaworks-templates.yang, agt_tempaltes.c)
 
#define VAL_FL_CANONICAL   bit24
 set if a val_value_t node was set to canonical format already
 
#define VAL_FL_IS_INDEX   bit25
 set if this val_value_t represents a key leaf replaces val->index backptr
 
#define VAL_FL_WILDCARD   bit26
 set if this is a node in a yangcli test-suite template that is really a WILDCARD_STRING match; the real value will be ignored when comparing data replies in test steps
 
#define VAL_FL_ANYXML_KEY   bit27
 set if anyxml tracking is done and this node is identified as a key leaf
 
#define VAL_FL_ANYXML_CONFIG   bit28
 set if anyxml tracking is done and this node is identified as a config data node
 
#define VAL_FL_ANYXML_UNKNOWN   bit29
 set if anyxml tracking is done and this node is identified as an unknown node in a known namespace (could be disabled) could also be a nested notification or action that is will not match any nodes in a subtree filter
 
#define VAL_FL_DEFCON_DELETED   bit30
 set when default NP container is deleted
 
#define VAL_FL_ADDEDIT_DELETED   bit31
 YPW-1749: Set Hook add_edit API problem if it API called twice for the same deletion. More...
 
#define VAL_FL_GENERIC   bit0
 Begin val_child_hdr->flags fields. More...
 
#define VAL_FL_ROOT   bit1
 the value represents an ncx:root node
 
#define VAL_FL_USE_QUE   bit2
 the child_hdr->que is being used for multi-nodes
 
#define VAL_FL_USE_TREE   bit3
 the child_hdr->tree is being used
 
#define VAL_FL_HDR_DIRTY   bit4
 one of the instances is dirty
 
#define VAL_FL_HDR_SUBTREE_DIRTY   bit5
 one of the descendant instances is dirty
 
#define VAL_FL_HDR_RECREATED   bit6
 one of the descendant instances was marked as re-created or was set as uncommitted delete
 
#define VAL_FL_HDR_NOT_INSERTED   bit7
 the insertion into the AVL Tree failed due to sanity check error or due to some other reason.
 
#define VAL_VIRTUAL_CACHE_TIME   3
 set the virtualval lifetime to 3 seconds
 
#define VAL_OBJ(V)   (V)->obj
 Access the object template.
 
#define VAL_OBJTYPE(V)   (V)->obj->objtype
 Access the object type.
 
#define VAL_TYPE(V)   (V)->btyp
 Access the base type : same as VAL_BTYPE.
 
#define VAL_HDR(V)   (V)->hdr
 Access the header backptr.
 
#define VAL_TYPDEF(V)   (V)->typdef
 Access the typedef (simple types only)
 
#define VAL_NSID(V)   (V)->nsid
 Access the namespace ID.
 
#define VAL_NAME(V)   (V)->name
 Access the value name.
 
#define VAL_RES(V)   (V)->res
 Access the value status enum.
 
#define VAL_BOOL(V)   (V)->v.boo
 Access the value as a boolean ONLY IF btyp == NCX_BT_BOOLEAN.
 
#define VAL_EMPTY(V)   (V)->v.boo
 Access the value as an empty ONLY IF btyp == NCX_BT_EMPTY.
 
#define VAL_DOUBLE(V)   (V)->v.num.d
 Access the value as a double : internal for XPath only NCX_BT_DOUBLE.
 
#define VAL_STRING(V)   (V)->v.str
 Access the value as a string ONLY if typ_is_string(typdef) is true.
 
#define VAL_BINARY(V)   (V)->v.binary.ustr
 Access the value binary : NOT A Z-TERMINATED STRING DO NOT USE THIS MACRO IN SIL CODE This is a binary string.
 
#define VAL_BINARY_LEN(V)   (V)->v.binary.ustrlen
 Access the value binary string length ONLY IF NCX_BT_BINARY.
 
#define VAL_ENU(V)   (&(V)->v.enu)
 Access the enum struct in the value ONLY if BCX_NT_ENUM.
 
#define VAL_ENUM(V)   (V)->v.enu.val
 Access the enum value in the value ONLY if BCX_NT_ENUM.
 
#define VAL_ENUM_NAME(V)   (V)->v.enu.name
 Access the enum name in the value ONLY if BCX_NT_ENUM This is the macro used to check values in SIL code.
 
#define VAL_FLAG(V)   (V)->v.boo
 Access the value as a flag (internal DO NOT USE)
 
#define VAL_NUMPTR(V)   (&(V)->v.num)
 Access the address of the number struct.
 
#define VAL_NUM(V)   (V)->v.num
 Access the number struct.
 
#define VAL_LONG(V)   (V)->v.num.l
 Access the value as a long int ONLY if NCX_BT_INT64.
 
#define VAL_INT(V)   (V)->v.num.i
 Access the value as an int ONLY if NCX_BT_INT8, 16, 32.
 
#define VAL_INT8(V)   ((int8)((V)->v.num.i))
 Access the value as an int8 ONLY if NCX_BT_INT8.
 
#define VAL_L_INT8(V)   (V)->v.num.i
 Access the left-hand-side value as an int8 ONLY if NCX_BT_INT8.
 
#define VAL_INT16(V)   ((int16)((V)->v.num.i))
 Access the value as an int16 ONLY if NCX_BT_INT16.
 
#define VAL_L_INT16(V)   (V)->v.num.i
 Access the left-hand-side value as an int16 ONLY if NCX_BT_INT16.
 
#define VAL_INT32(V)   (V)->v.num.i
 Access the value as an int32 ONLY if NCX_BT_INT32.
 
#define VAL_INT64(V)   (V)->v.num.l
 Access the value as an int64 ONLY if NCX_BT_INT64.
 
#define VAL_STR(V)   (V)->v.str
 Access the value as a string ONLY if typ_is_string() is true.
 
#define VAL_INSTANCE_ID(V)   (V)->v.str
 Access the value as an instance-identifier ONLY if NCX_BT_INSTANCE_ID.
 
#define VAL_IDREF(V)   (&(V)->v.idref)
 Access the value as an identityref ONLY if NCX_BT_IDREF.
 
#define VAL_IDREF_NSID(V)   (V)->v.idref.nsid
 Access the namespace ID value as an identityref ONLY if NCX_BT_IDREF.
 
#define VAL_IDREF_NAME(V)   (V)->v.idref.name
 Access the name string value as an identityref ONLY if NCX_BT_IDREF.
 
#define VAL_IDREF_IDENTITY(V)   (V)->v.idref.identity
 Access the found identity for an identityref ONLY if NCX_BT_IDREF.
 
#define VAL_UINT(V)   (V)->v.num.u
 Access the value as an uint32 ONLY if NCX_BT_UINT8, 16, 32.
 
#define VAL_UINT8(V)   ((uint8)((V)->v.num.u))
 Access the value as an uint8 ONLY if NCX_BT_UINT8.
 
#define VAL_L_UINT8(V)   (V)->v.num.u
 Access the left-hand-side value as an uint8 ONLY if NCX_BT_UINT8.
 
#define VAL_UINT16(V)   ((uint16)((V)->v.num.u))
 Access the value as an uint16 ONLY if NCX_BT_UINT16.
 
#define VAL_L_UINT16(V)   (V)->v.num.u
 Access the left-hand-side value as an uint16 ONLY if NCX_BT_UINT16.
 
#define VAL_UINT32(V)   (V)->v.num.u
 Access the value as an uint32 ONLY if NCX_BT_UINT32.
 
#define VAL_L_UINT32(V)   (V)->v.num.u
 Access the left-hand-side value as an uint32 ONLY if NCX_BT_UINT32.
 
#define VAL_UINT64(V)   (V)->v.num.ul
 Access the value as an uint64 ONLY if NCX_BT_UINT64.
 
#define VAL_ULONG(V)   (V)->v.num.ul
 Access the value as an uint64 ONLY if NCX_BT_UINT64.
 
#define VAL_DEC64(V)   (V)->v.num.dec.val
 Access the internal value as an decimal64 ONLY if NCX_BT_DEC64 Do not use, must use ncx_num access functions.
 
#define VAL_DEC64_DIGITS(V)   (V)->v.num.dec.digits
 Access the internal digits value as an decimal64 ONLY if NCX_BT_DEC64 Do not use, must use ncx_num access functions.
 
#define VAL_DEC64_ZEROES(V)   (V)->v.num.dec.zeroes
 Access the internal zeroes value as an decimal64 ONLY if NCX_BT_DEC64 Do not use, must use ncx_num access functions.
 
#define VAL_LIST(V)   (V)->v.list
 Access the value as an xsdlist ONLY if NCX_BT_SLIST.
 
#define VAL_BITS   VAL_LIST
 Access the value as a bits value ONLY if NCX_BT_BITS.
 
#define VAL_INTERN(V)   (V)->v.intbuff
 Access the internal buffer ONLY if NCX_BT_INTERN.
 
#define VAL_EXTERN(V)   (V)->v.fname
 Access the external filename ONLY if NCX_BT_EXTERN.
 
#define VAL_IS_DELETED(V)   ((V)->flags & VAL_FL_DELETED)
 Access the deleted flag.
 
#define VAL_CLR_DELETED(V)   (V)->flags &= ~VAL_FL_DELETED
 Clear the value as a deleted.
 
#define VAL_MARK_DELETED(V)   val_mark_deleted(V)
 Mark the value node as deleted.
 
#define VAL_UNMARK_DELETED(V)   val_mark_undeleted(V)
 Unmark the value node as deleted.
 
#define VAL_LAST_MODIFIED(V)   (V)->last_modified
 Access the last-modified field.
 
#define VAL_ETAG(V)   (V)->etag
 Access the ETag field.
 
#define VAL_BTYPE(V)   (V)->btyp
 Access the base type : same as VAL_TYPE.
 
#define VAL_SET_VAREXPR(V)   (V)->flags |= VAL_FL_IS_VAREXPR
 Set the value as a var expression.
 
#define VAL_CLR_VAREXPR(V)   (V)->flags &= ~VAL_FL_IS_VAREXPR
 Clear the value as a var expression.
 
#define VAL_IS_VAREXPR(V)   ((V)->flags & VAL_FL_IS_VAREXPR)
 Check if the value is a var expression.
 
#define VAL_VAREXPR(V)   val_get_varexpr(V)
 get the value var expression
 
#define VAL_SET_META(V)   (V)->flags |= VAL_FL_META
 Flag the value as metadeata which is stored within another val_value_t->metaQ.
 
#define VAL_REMOVE_META(M)   dlq_remove(M)
 Remove a metadata value node.
 
#define VAL_SET_FIXED_VALUE(V)   (V)->flags |= VAL_FL_FIXED_VALUE
 flag the value as a fixed key value for GETNEXT processing
 
#define VAL_CLR_FIXED_VALUE(V)   (V)->flags &= ~VAL_FL_FIXED_VALUE
 clear the flag for the value as a fixed key value for GETNEXT processing
 
#define VAL_IS_FIXED_VALUE(V)   ((V)->flags & VAL_FL_FIXED_VALUE)
 check if the flag is as a fixed key value for GETNEXT processing
 
#define VAL_SET_EDIT2_MERGE(V)   (V)->flags |= VAL_FL_EDIT2_MERGE
 flag the value as an EDIT2 merge in progress
 
#define VAL_CLR_EDIT2_MERGE(V)   (V)->flags &= ~VAL_FL_EDIT2_MERGE
 clear the value as an EDIT2 merge in progress
 
#define VAL_IS_EDIT2_MERGE(V)   ((V)->flags & VAL_FL_EDIT2_MERGE)
 check if the value is an EDIT2 merge in progress
 
#define VAL_SET_EXTERNAL(V)   (V)->flags |= VAL_FL_EXTERNAL
 flag the value as an external value Not sure why this is different than NCX_BT_EXTERN
 
#define VAL_CLR_EXTERNAL(V)   (V)->flags &= ~VAL_FL_EXTERNAL
 clear the value as an external value
 
#define VAL_IS_EXTERNAL(V)   ((V)->flags & VAL_FL_EXTERNAL)
 check if the value is an external value
 
#define VAL_SET_VALUE_SET(V)   (V)->flags |= VAL_FL_VALUE_SET
 flag the value as a value has been set
 
#define VAL_CLR_VALUE_SET(V)   (V)->flags &= ~VAL_FL_VALUE_SET
 clear the value as a value has been set
 
#define VAL_IS_VALUE_SET(V)   ((V)->flags & VAL_FL_VALUE_SET)
 check if the value is a value has been set
 
#define VAL_SET_TEMP_XPATH(V)   (V)->flags |= VAL_FL_TEMP_XPATH
 flag the value as a temporary XPath in use
 
#define VAL_CLR_TEMP_XPATH(V)   (V)->flags &= ~VAL_FL_TEMP_XPATH
 clear the value as a temporary XPath in use
 
#define VAL_IS_TEMP_XPATH(V)   ((V)->flags & VAL_FL_TEMP_XPATH)
 check if the value is a temporary XPath in use
 
#define VAL_SET_UNCOMMITTED_DELETE(V)   (V)->flags |= VAL_FL_UNCMTD_DELETE
 flag the value as an uncommited delete
 
#define VAL_CLR_UNCOMMITTED_DELETE(V)   (V)->flags &= ~VAL_FL_UNCMTD_DELETE
 clear the value as an uncommited delete
 
#define VAL_IS_UNCOMMITTED_DELETE(V)   ((V)->flags & VAL_FL_UNCMTD_DELETE)
 check if the value is an uncommited delete
 
#define VAL_SET_RECREATED(V)   (V)->flags |= VAL_FL_RECREATED
 flag the value as a recreated node (delete + add in candidate)
 
#define VAL_CLR_RECREATED(V)   (V)->flags &= ~VAL_FL_RECREATED
 clear the value as a recreated node (delete + add in candidate)
 
#define VAL_IS_RECREATED(V)   ((V)->flags & VAL_FL_RECREATED)
 check if the value is a recreated node (delete + add in candidate)
 
#define VAL_SET_FROM_TEMPLATE(V)   (V)->flags |= VAL_FL_FROM_TEMPLATE
 flag the value as set from a template
 
#define VAL_CLR_FROM_TEMPLATE(V)   (V)->flags &= ~VAL_FL_FROM_TEMPLATE
 clear the value as set from a template
 
#define VAL_IS_FROM_TEMPLATE(V)   ((V)->flags & VAL_FL_FROM_TEMPLATE)
 check if the value is set from a template
 
#define VAL_XPATHPCB(V)   val_get_xpathpcb(V)
 Access the Xpath parser control block.
 
#define VAL_SET_CANONICAL(V)   (V)->flags |= VAL_FL_CANONICAL
 flag the value as set by canonical
 
#define VAL_CLR_CANONICAL(V)   (V)->flags &= ~VAL_FL_CANONICAL
 clear the value as set by canonical
 
#define VAL_IS_CANONICAL(V)   ((V)->flags & VAL_FL_CANONICAL)
 check if the value is set by canonical
 
#define VAL_NMDA_ORIGIN(V)   (V)->nmda_origin
 Access the NMDA origin property.
 
#define VAL_IS_INDEX(V)   ((V)->flags & VAL_FL_IS_INDEX)
 Check if the value is a key leaf.
 
#define VAL_SET_IS_INDEX(V)   (V)->flags |= VAL_FL_IS_INDEX
 Flag the value as a key leaf.
 
#define VAL_CHILD_HDR_OBJ(H)   (H)->obj
 Access the object field in a child header.
 
#define VAL_CHILD_HDR_COUNT(H)   (H)->count
 Access the instance count field in a child header.
 
#define VAL_SET_DEFCON_DELETED(V)   (V)->flags |= VAL_FL_DEFCON_DELETED
 Flag the value as a deleted default NP-container.
 
#define VAL_CLR_DEFCON_DELETED(V)   (V)->flags &= ~VAL_FL_DEFCON_DELETED
 Clear the value as a deleted default NP-container.
 
#define VAL_IS_DEFCON_DELETED(V)   ((V)->flags & VAL_FL_DEFCON_DELETED)
 Check if the value is a deleted default NP-container.
 
#define VAL_SET_ADDEDIT_DELETED(V)   (V)->flags |= VAL_FL_ADDEDIT_DELETED
 YPW-1749: Set Hook add_edit API problem if it API called twice for the same deletion. More...
 
#define VAL_IS_ADDEDIT_DELETED(V)   ((V)->flags & VAL_FL_ADDEDIT_DELETED)
 Check if the value is add_edit API already done.
 
#define VAL_EDITOP(V)   (V)->editop
 access the editop field: used in cli_parse_raw and cli_parse to identify CLI parameters loaded from the command line by setting the editop to OP_EDITOP_LOAD.
 
#define VAL_SET_DEFSET(V)   (V)->flags |= VAL_FL_DEFSET
 Set the flag to indicate the value is set-by default This is for val_set_by_default NOT val_is_default.
 
#define VAL_CLR_DEFSET(V)   (V)->flags &= ~VAL_FL_DEFSET
 Clear the flag to indicate the value is set-by default This is for val_set_by_default NOT val_is_default.
 

Detailed Description

Constants and macros used to manage YANG data nodes.

Some VAL_FOO access macros are not safe to use unless the base type is exactly as expected. Use with caution.

Macro Definition Documentation

◆ VAL_BINDEX_CH

#define VAL_BINDEX_CH   '['

constants used in generating C and Xpath instance ID strings

begin index

◆ VAL_FL_ADDEDIT_DELETED

#define VAL_FL_ADDEDIT_DELETED   bit31

YPW-1749: Set Hook add_edit API problem if it API called twice for the same deletion.

Set if the node was deleted by Set Hook Add_edit API to ensure that any other add_edit cannot delete the same node again.

◆ VAL_FL_GENERIC

#define VAL_FL_GENERIC   bit0

Begin val_child_hdr->flags fields.

the value represents a generic object so the val->obj field cannot be used to insert it into the child_hdrQ correctly The val->name and val->nsid fields will be used instead

◆ VAL_FL_IS_VAREXPR

#define VAL_FL_IS_VAREXPR   bit12

if set then the value string parsed is really a complex XPath expression that needs to be evaluated before the actual value and btype is set THIS BIT IS NOT IMPLEMENTED SET.

IT IS SET AND CLEARED BUT NO XPATH PROCESSING DONE AT ALL; JUST SIMPLE VARS

◆ VAL_FL_UNCMTD_DELETE

#define VAL_FL_UNCMTD_DELETE   bit20

set if value was deleted, even if the node is default NP-Cont.

VAL_FL_DELETED flag will not be set for those nodes.

◆ VAL_SET_ADDEDIT_DELETED

#define VAL_SET_ADDEDIT_DELETED (   V)    (V)->flags |= VAL_FL_ADDEDIT_DELETED

YPW-1749: Set Hook add_edit API problem if it API called twice for the same deletion.

Flag the value as add_edit API already done