yumapro  20.10-12
YumaPro SDK
val.h File Reference

Value Node Basic Support. More...

#include <xmlstring.h>
#include <time.h>
#include "dlq.h"
#include "ncxconst.h"
#include "ncxtypes.h"
#include "op.h"
#include "plock_cb.h"
#include "status.h"
#include "typ.h"
#include "xml_util.h"
#include "xmlns.h"
#include "log.h"
#include "ses.h"
Include dependency graph for val.h:

Go to the source code of this file.

Data Structures

struct  logfns_t_
 log functions control block used by manager code More...
 
struct  val_idref_t_
 one QName for the NCX_BT_IDREF value More...
 
struct  val_editvars_t_
 one set of edit-in-progress variables for one value node More...
 
struct  val_extra_t_
 extra information not used very often within a val_value_t More...
 
struct  val_value_t_
 one value to match one type More...
 
union  val_value_t_::v_
 union of all the NCX-specific sub-types note that the following invisible constructs should never show up in this struct: More...
 
struct  val_child_hdr_t_
 this struct is inserted in the val->v.child_hdrQ for container and list value nodes More...
 
struct  val_index_t_
 Struct marking the parsing of an instance identifier The position of this record in the val_value_t indexQ represents the order the identifers were parsed Since table and container data structures must always appear in the specified field order, this will be the same order for all well-formed entries. More...
 
struct  val_unique_t_
 one unique-stmt component test value node More...
 

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_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_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_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_is_wildcard_string(V)   (((V)->flags & VAL_FL_WILDCARD) ? TRUE : FALSE)
 Check if the value is a wildcard string. More...
 

Typedefs

typedef void(* dumpfn_t) (log_debug_t level, const char *fstr,...)
 Callback to do log dump function for dump_value. More...
 
typedef void(* errfn_t) (const char *fstr,...)
 Callback to do error log function for dump_value. More...
 
typedef void(* indentfn_t) (log_debug_t level, int32 indentcnt)
 Callback to do indent function for dump_value. More...
 
typedef boolean(* val_test_fn_t) (const val_value_t *val)
 test callback function to check if a value node should be cloned More...
 
typedef boolean(* val_walker_fn_t) (val_value_t *val, void *cookie1, void *cookie2)
 child or descendant node search walker function More...
 
typedef boolean(* val_walker2_fn_t) (val_child_hdr_t *valhdr, void *cookie1, void *cookie2)
 child or descendant node search walker function - GEN2 More...
 
typedef boolean(* val_hdr_test_fn_t) (val_child_hdr_t *hdr, void *cookie)
 get first or next child test function header test function More...
 
typedef boolean(* val_test2_fn_t) (val_value_t *val, void *cookie)
 get first or next child test function value test function More...
 

Enumerations

enum  val_insert_mode_t_ {
  VAL_INS_MODE_NONE,
  VAL_INS_MODE_KEY,
  VAL_INS_MODE_VALUE,
  VAL_INS_MODE_POINT
}
 type of protocol parameter used for insert operation More...
 
enum  val_dumpvalue_mode_t_ {
  DUMP_VAL_NONE,
  DUMP_VAL_STDOUT,
  DUMP_VAL_LOG,
  DUMP_VAL_ALT_LOG,
  DUMP_VAL_AUDIT_LOG
}
 dump value mode used in val_dump_value More...
 

Functions

val_value_t * val_new_value (void)
 Malloc and initialize the fields in a val_value_t. More...
 
void val_init_value (val_value_t *val)
 Initialize the generic fields in a val_value_t so it is ready for use. More...
 
void val_init_complex (val_value_t *val, ncx_btype_t btyp)
 Initialize the fields in a complex val_value_t this is deprecated and should only be called by val_init_from_template. More...
 
void val_init_virtual (val_value_t *val, void *cbfn, struct obj_template_t_ *obj)
 Special function to initialize a virtual value node. More...
 
void val_init_from_template (val_value_t *val, struct obj_template_t_ *obj)
 Initialize a value node from its object template. More...
 
void val_reinit_from_template (val_value_t *val, struct obj_template_t_ *obj)
 Re-Initialize a value node from its object template. More...
 
void val_free_value (val_value_t *val)
 Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct itself. More...
 
void val_set_name (val_value_t *val, const xmlChar *name, uint32 namelen)
 Set (or reset) the name of a value struct. More...
 
status_t val_force_dname (val_value_t *val)
 Set (or reset) the name of a value struct. More...
 
void val_set_qname (val_value_t *val, xmlns_id_t nsid, const xmlChar *name, uint32 namelen)
 Set (or reset) the name and namespace ID of a value struct. More...
 
status_t val_string_ok (typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval)
 Check a string to make sure the value is valid based on the restrictions in the specified typdef. More...
 
status_t val_string_ok_errinfo (typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo)
 retrieve the YANG custom error info if any More...
 
status_t val_binary_ok_errinfo (typ_def_t *typdef, const xmlChar *strval, val_value_t *val, ncx_errinfo_t **errinfo)
 retrieve the YANG custom error info for binary val, if any More...
 
status_t val_string_ok_ex (ses_cb_t *scb, typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo, boolean logerrors)
 retrieve the YANG custom error info if any (extended) More...
 
status_t val_string_ok_ex2 (ses_cb_t *scb, typ_def_t *typdef, ncx_btype_t btyp, const xmlChar *strval, ncx_errinfo_t **errinfo, boolean logerrors, boolean is_defval)
 retrieve the YANG custom error info if any More...
 
status_t val_list_ok (typ_def_t *typdef, ncx_btype_t btyp, ncx_list_t *list)
 Check a list to make sure the all the strings are valid based on the specified typdef. More...
 
status_t val_list_ok_errinfo (typ_def_t *typdef, ncx_btype_t btyp, ncx_list_t *list, ncx_errinfo_t **errinfo)
 Check a list to make sure the all the strings are valid based on the specified typdef. More...
 
status_t val_enum_ok (typ_def_t *typdef, const xmlChar *enumval, int32 *retval, const xmlChar **retstr)
 Check an enumerated integer string to make sure the value is valid based on the specified typdef. More...
 
status_t val_bit_ok (typ_def_t *typdef, const xmlChar *bitname, uint32 *position)
 Check a bit name is valid for the typedef. More...
 
status_t val_idref_ok (typ_def_t *typdef, const xmlChar *qname, xmlns_id_t nsid, const xmlChar **name, ncx_identity_t **id)
 Check if an identityref QName is valid for the typedef. More...
 
status_t val_idref_ok_ex (typ_def_t *typdef, const xmlChar *qname, xmlns_id_t nsid, boolean is_json, ncx_module_t *impmod, boolean or_self, const xmlChar **name, ncx_identity_t **id)
 Check if an identityref QName is valid for the typedef. More...
 
status_t val_parse_idref (ncx_module_t *mod, const xmlChar *qname, xmlns_id_t *nsid, const xmlChar **name, ncx_identity_t **id)
 Parse a CLI BASED identityref QName into its various parts. More...
 
status_t val_range_ok (typ_def_t *typdef, ncx_btype_t btyp, const ncx_num_t *num)
 Check a number to see if it is in range or not Could be a number or size range. More...
 
status_t val_range_ok_errinfo (typ_def_t *typdef, ncx_btype_t btyp, const ncx_num_t *num, ncx_errinfo_t **errinfo)
 Check a number to see if it is in range or not; get errinfo Could be a number or size range. More...
 
status_t val_pattern_ok (typ_def_t *typdef, const xmlChar *strval)
 Check a string against all the patterns in a big AND expression. More...
 
status_t val_pattern_ok_errinfo (typ_def_t *typdef, const xmlChar *strval, ncx_errinfo_t **errinfo)
 Check a string against all the patterns in a big AND expression Get errinfo if any. More...
 
status_t val_simval_ok (typ_def_t *typdef, const xmlChar *simval)
 check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More...
 
status_t val_simval_ok_errinfo (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo)
 check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More...
 
status_t val_simval_ok_ex (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod)
 check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More...
 
status_t val_simval_ok_max (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors)
 check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More...
 
status_t val_simval_ok_max2 (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors, boolean nocond)
 check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More...
 
status_t val_simval_ok_max3 (typ_def_t *typdef, const xmlChar *simval, ncx_errinfo_t **errinfo, ncx_module_t *mod, boolean logerrors, boolean nocond, boolean is_defval)
 check any simple type to see if it is valid, but do not retrieve the value; used to check the default parameter for example More...
 
status_t val_union_ok (typ_def_t *typdef, const xmlChar *strval, val_value_t *retval)
 Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format. More...
 
status_t val_union_ok_errinfo (typ_def_t *typdef, const xmlChar *strval, val_value_t *retval, ncx_errinfo_t **errinfo)
 Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format. More...
 
status_t val_union_ok_ex (typ_def_t *typdef, const xmlChar *strval, val_value_t *retval, ncx_errinfo_t **errinfo, ncx_module_t *mod, typ_def_t **match_typdef)
 Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format. More...
 
status_t val_union_ok_binary (typ_def_t *typdef, const xmlChar *binstr, uint32 binstrlen, val_value_t *retval, ncx_errinfo_t **errinfo, typ_def_t **match_typdef)
 Check a union to make sure the buffer is valid based on the specified typdef, and convert the buffer to an NCX internal format. More...
 
status_t val_union_ok_full (typ_def_t *typdef, const xmlChar *strval, val_value_t *contextval, val_value_t *rootval, val_value_t *retval, ncx_errinfo_t **errinfo)
 Check a union to make sure the string is valid based on the specified typdef, and convert the string to an NCX internal format. More...
 
dlq_hdr_t * val_get_metaQ (val_value_t *val)
 Get the meta Q header for the value. More...
 
val_value_t * val_get_first_meta (dlq_hdr_t *queue)
 Get the first metaQ entry from the specified Queue. More...
 
val_value_t * val_get_first_meta_val (val_value_t *val)
 Get the first metaQ entry from the specified Queue. More...
 
val_value_t * val_get_next_meta (val_value_t *curnode)
 Get the next metaQ entry from the specified entry. More...
 
boolean val_meta_empty (val_value_t *val)
 Check if the metaQ is empty for the value node. More...
 
val_value_t * val_find_meta (val_value_t *val, xmlns_id_t nsid, const xmlChar *name)
 Get the corresponding meta data node. More...
 
boolean val_meta_match (val_value_t *val, val_value_t *metaval)
 Return true if the corresponding attribute exists and has the same value. More...
 
uint32 val_metadata_inst_count (val_value_t *val, xmlns_id_t nsid, const xmlChar *name)
 Get the number of instances of the specified attribute. More...
 
void val_dump_value (val_value_t *val, int32 startindent, log_debug_t lvl)
 Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More...
 
void val_dump_value_ex (val_value_t *val, int32 startindent, ncx_display_mode_t display_mode, log_debug_t lvl)
 Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More...
 
void val_dump_alt_value (val_value_t *val, int32 startindent, log_debug_t lvl)
 Printf the specified val_value_t struct to the alternate logfile Uses conf file format (see ncx/conf.h) More...
 
void val_stdout_value (val_value_t *val, int32 startindent, log_debug_t lvl)
 Printf the specified val_value_t struct to stdout Uses conf file format (see ncx/conf.h) More...
 
void val_stdout_value_ex (val_value_t *val, int32 startindent, ncx_display_mode_t display_mode, log_debug_t lvl)
 Printf the specified val_value_t struct to stdout Uses conf file format (see ncx/conf.h) More...
 
void val_dump_value_max (val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, log_debug_t lvl)
 Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More...
 
void val_dump_value_full (val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, boolean conf_mode, boolean expand_varexpr, log_debug_t lvl, logfns_t *overrideOutput)
 Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More...
 
void val_dump_value_full2 (val_value_t *val, int32 startindent, int32 indent_amount, val_dumpvalue_mode_t dumpmode, ncx_display_mode_t display_mode, boolean with_meta, boolean configonly, boolean conf_mode, boolean expand_varexpr, boolean withdef, log_debug_t lvl, logfns_t *overrideOutput)
 Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (see ncx/conf.h) More...
 
status_t val_set_string (val_value_t *val, const xmlChar *valname, const xmlChar *valstr)
 set a generic string using the builtin string typdef Set an initialized val_value_t as a simple type namespace set to 0 !!! use after calling val_new_value More...
 
status_t val_set_string2 (val_value_t *val, const xmlChar *valname, typ_def_t *typdef, const xmlChar *valstr, uint32 valstrlen)
 set a string with any typdef Set an initialized val_value_t as a simple type namespace set to 0 !!! More...
 
status_t val_set_binary (const xmlChar *valstr, uint32 valstrlen, val_value_t *val)
 set and decode base64 value. More...
 
status_t val_reset_empty (val_value_t *val)
 Recast an already initialized value as an NCX_BT_EMPTY clean a value and set it to empty type used by yangcli to delete leafs. More...
 
status_t val_set_simval (val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr)
 set any simple value with any typdef Set an initialized val_value_t as a simple type More...
 
status_t val_set_simval_str (val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, uint32 valnamelen, const xmlChar *valstr)
 set any simple value with any typdef, and a counted string Set an initialized val_value_t as a simple type More...
 
status_t val_set_simval_binary (val_value_t *val, const xmlChar *binstr, uint32 binstrlen)
 set a binary type either in a type binary, or type within 1 or more unions More...
 
status_t val_set_simval_max (val_value_t *val, typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, uint32 valnamelen, const xmlChar *valstr, uint32 valstrlen)
 set any simple value with any typdef, and a counted string Set an initialized val_value_t as a simple type More...
 
val_value_t * val_make_simval (typ_def_t *typdef, xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr, status_t *res)
 Create and set a val_value_t as a simple type same as val_set_simval, but malloc the value first. More...
 
val_value_t * val_make_string (xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr)
 Malloc and set a val_value_t as a generic NCX_BT_STRING namespace set to 0 !!! More...
 
val_value_t * val_make_binary (xmlns_id_t nsid, const xmlChar *valname, const xmlChar *valstr, uint32 valstrlen)
 Malloc and set a val_value_t as a NCX_BT_BINARY type Uses the generic binary object from ncx_get_gen_binary. More...
 
status_t val_merge (const val_value_t *src, val_value_t *dest)
 Merge src val into dest val (! MUST be same type !) Any meta vars in src are also merged into dest. More...
 
val_value_t * val_clone (const val_value_t *val)
 Clone a specified val_value_t struct and sub-trees. More...
 
val_value_t * val_clone2 (const val_value_t *val)
 Clone a specified val_value_t struct and sub-trees but not the editvars. More...
 
val_value_t * val_clone_config_data (const val_value_t *val, status_t *res)
 Clone a specified val_value_t struct and sub-trees with config=true only. More...
 
val_value_t * val_clone_config_save (const val_value_t *val, status_t *res)
 Clone a specified val_value_t struct and sub-trees filter for config only for saving to NVRAM. More...
 
status_t val_replace (val_value_t *val, val_value_t *copy)
 Replace a specified val_value_t struct and sub-trees. More...
 
status_t val_replace_str (const xmlChar *str, uint32 stringlen, val_value_t *copy)
 Replace a specified val_value_t struct with a string type. More...
 
status_t val_fast_replace_string (const xmlChar *str, uint32 stringlen, val_value_t *copy)
 Replace a specified val_value_t struct with a string type Reuse everything – just set the val->v.str field. More...
 
void val_replace_stringval (val_value_t *val, const xmlChar *str)
 Replace the string value, not the entire value. More...
 
void val_add_child (val_value_t *child, val_value_t *parent)
 Add a child (deprecated: use val_child_add instead) More...
 
void val_add_child_sorted (val_value_t *child, val_value_t *parent)
 Add a child value node to a parent value node in the proper place (deprecated: use val_child_add instead) More...
 
void val_insert_child (val_value_t *child, val_value_t *current, val_value_t *parent)
 Insert a child value node to a parent value node. More...
 
void val_remove_child (val_value_t *child)
 Remove a child value node from its parent value node. More...
 
void val_swap_child (val_value_t *newchild, val_value_t *curchild)
 Swap a child value node with a current value node. More...
 
val_value_t * val_first_child_match (const val_value_t *parent, const val_value_t *child)
 Get the first instance of the corresponding child node. More...
 
val_value_t * val_first_child_match_fast (const val_value_t *parent, const val_value_t *child, val_value_t *lastmatch)
 Get the first instance of the corresponding child node Object pointers must be from the same tree!!! More...
 
val_value_t * val_next_child_match (val_value_t *parent, val_value_t *child, val_value_t *curmatch)
 Get the next instance of the corresponding child node. More...
 
val_value_t * val_next_child_same (val_value_t *curchild)
 Get the next instance of the corresponding child node. More...
 
val_value_t * val_get_first_child (const val_value_t *parent)
 Get the first child node. More...
 
val_value_t * val_get_next_child (const val_value_t *curchild)
 Get the next child node. More...
 
val_value_t * val_get_first_terminal_child (const val_value_t *parent)
 Get the child node only if obj_is_terminal(val->obj) is true. More...
 
val_value_t * val_get_next_terminal_child (const val_value_t *curchild)
 Get the next child node only if obj_is_terminal(val->obj) is true. More...
 
val_value_t * val_find_child (const val_value_t *parent, const xmlChar *modname, const xmlChar *childname)
 Find the first instance of the specified child node. More...
 
val_value_t * val_find_child_fast (const val_value_t *parent, xmlns_id_t nsid, const xmlChar *childname)
 Find the first instance of the specified child node. More...
 
val_value_t * val_find_child_obj (const val_value_t *parent, const struct obj_template_t_ *chobj)
 Find the first instance of the specified child node Use the object template pointer to match the object. More...
 
val_value_t * val_find_child_que (const dlq_hdr_t *childQ, xmlns_id_t nsid, const xmlChar *childname)
 Find the first instance of the specified child node in the specified child Q. More...
 
val_value_t * val_match_child (const val_value_t *parent, const xmlChar *modname, const xmlChar *childname)
 Match the first instance of the specified child node. More...
 
val_value_t * val_match_child_count (const val_value_t *parent, const xmlChar *modname, const xmlChar *childname, uint32 *matchcount)
 Match the first instance of the specified child node Return the total number of matches. More...
 
val_value_t * val_find_next_child (const val_value_t *parent, const xmlChar *modname, const xmlChar *childname, const val_value_t *curchild)
 Find the next instance of the specified child node. More...
 
val_value_t * val_find_next_child_fast (const val_value_t *parent, const val_value_t *curchild)
 Find the next instance of the specified child node. More...
 
val_value_t * val_first_child_name (val_value_t *parent, const xmlChar *name)
 Get the first corresponding child node instance, by name find first – really for resolve index function. More...
 
val_value_t * val_first_child_qname (val_value_t *parent, xmlns_id_t nsid, const xmlChar *name)
 Get the first corresponding child node instance, by QName. More...
 
val_value_t * val_next_child_qname (val_value_t *parent, xmlns_id_t nsid, const xmlChar *name, val_value_t *curchild)
 Get the next corresponding child node instance, by QName. More...
 
val_value_t * val_first_child_string (val_value_t *parent, const xmlChar *name, const xmlChar *strval)
 find first name value pair More...
 
uint32 val_child_cnt (val_value_t *parent)
 Get the number of child nodes present. More...
 
uint32 val_child_inst_cnt (const val_value_t *parent, const xmlChar *modname, const xmlChar *name)
 Get the corresponding child instance count by name get instance count – for instance qualifer checking. More...
 
uint32 val_get_child_inst_id (const val_value_t *parent, const val_value_t *child)
 Get the instance ID for this child node within the parent context. More...
 
uint32 val_liststr_count (const val_value_t *val)
 Get the number of strings in the list type. More...
 
boolean val_index_match (const val_value_t *val1, const val_value_t *val2)
 Check 2 val_value structs for the same instance ID. More...
 
int val_index_compare (const val_value_t *val1, const val_value_t *val2)
 Check 2 val_value structs for the same instance ID. More...
 
int32 val_compare_max (const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing)
 Compare 2 val_value_t struct value contents. More...
 
int32 val_compare_max_def (const val_value_t *val1, const val_value_t *val2, boolean configonly, boolean childonly, boolean editing, boolean ignore_defaults)
 Compare 2 val_value_t struct value contents. More...
 
int32 val_compare_ex (const val_value_t *val1, const val_value_t *val2, boolean configonly)
 Compare 2 val_value_t struct value contents Check all or config only. More...
 
int32 val_compare (const val_value_t *val1, const val_value_t *val2)
 Compare 2 val_value_t struct value contents. More...
 
int32 val_compare_to_string (const val_value_t *val1, const xmlChar *strval2, status_t *res)
 Compare a val_value_t struct value contents to a string. More...
 
int32 val_compare_to_string_len (const val_value_t *val1, const xmlChar *strval2, uint32 strval2len, status_t *res)
 Compare a val_value_t struct value contents to a string Provide a max-length to compare. More...
 
int32 val_compare_for_replace (const val_value_t *val1, const val_value_t *val2)
 Compare 2 val_value_t struct value contents for the nc:operation=replace procedures. More...
 
int32 val_compare_for_edit (const val_value_t *val1, const val_value_t *val2, boolean ismerge)
 Compare 2 val_value_t struct value contents from an editing POV; compare for merge or delete! More...
 
int32 val_compare_as_string (const val_value_t *val1, const val_value_t *val2, status_t *res)
 Compare 2 val_value_t structs Convert each value to a string and compare as strings Needed to compare a value if a UNION type is used. More...
 
status_t val_sprintf_simval_nc (xmlChar *buff, const val_value_t *val, uint32 *len)
 Sprintf the xmlChar string NETCONF representation of a simple value. More...
 
status_t val_sprintf_simval_nc_ex (xmlChar *buff, const val_value_t *val, boolean url_encode, uint32 *len)
 Sprintf the xmlChar string NETCONF representation of a simple value. More...
 
xmlChar * val_make_sprintf_string (const val_value_t *val)
 Malloc a buffer and then sprintf the xmlChar string NETCONF representation of a simple value. More...
 
status_t val_resolve_scoped_name (val_value_t *val, const xmlChar *name, val_value_t **chval)
 Find the scoped identifier in the specified complex value. More...
 
ncx_iqual_t val_get_iqualval (const val_value_t *val)
 Get the effective instance qualifier value for this value. More...
 
boolean val_duplicates_allowed (val_value_t *val)
 Determine if duplicates are allowed for the given val type The entire definition chain is checked to see if a 'no-duplicates'. More...
 
boolean val_has_content (const val_value_t *val)
 Determine if there is a value or any child nodes for this val. More...
 
boolean val_has_content_ex (const val_value_t *val)
 Determine if there is a value or any child nodes for this val. More...
 
boolean val_has_index (const val_value_t *val)
 Determine if this value has an index. More...
 
val_index_t * val_get_first_index (const val_value_t *val)
 Get the first index entry, if any for this value node. More...
 
val_index_t * val_get_next_index (const val_index_t *valindex)
 Get the next index entry, if any for this value node. More...
 
uint32 val_get_index_count (const val_value_t *val)
 Get the number of index nodes in this val. More...
 
status_t val_parse_meta (ses_cb_t *scb, typ_def_t *typdef, xml_attr_t *attr, val_value_t *retval)
 Parse the metadata descriptor against the typdef Check only that the value is ok, not instance count. More...
 
void val_set_extern (val_value_t *val, xmlChar *fname)
 Setup an NCX_BT_EXTERN value. More...
 
void val_set_intern (val_value_t *val, xmlChar *intbuff)
 Setup an NCX_BT_INTERN value. More...
 
boolean val_fit_oneline (const val_value_t *val, uint32 linesize, boolean isxml)
 Check if the XML encoding for the specified val_value_t should take one line or more than one line. More...
 
boolean val_create_allowed (const val_value_t *val)
 Check if the specified value is allowed to have a create edit-config operation attribute. More...
 
boolean val_delete_allowed (const val_value_t *val)
 Check if the specified value is allowed to have a delete edit-config operation attribute. More...
 
boolean val_is_config_data (const val_value_t *val)
 Check if the specified value is a config DB object instance. More...
 
boolean val_is_config_save (const val_value_t *val)
 Check if the specified value is a config DB object instance Check for config-save mode. More...
 
boolean val_is_virtual (const val_value_t *val)
 Check if the specified value is a virtual value such that a 'get' callback function is required to access the real value contents. More...
 
val_value_t * val_get_virtual_value (ses_cb_t *scb, val_value_t *val, status_t *res)
 Get the value of a virtual value node. More...
 
boolean val_is_default (val_value_t *val)
 Check if the specified value is set to the YANG default value. More...
 
boolean val_is_real (const val_value_t *val)
 Check if the specified value is a real value. More...
 
xmlns_id_t val_get_parent_nsid (const val_value_t *val)
 Try to get the parent namespace ID. More...
 
uint32 val_instance_count (val_value_t *val, const xmlChar *modname, const xmlChar *objname)
 Count the number of instances of the specified object name in the parent value struct. More...
 
uint32 val_instance_count_fast (val_value_t *val, xmlns_id_t nsid, const xmlChar *objname, val_value_t **firstval)
 Count the number of instances of the specified object name in the parent value struct. More...
 
uint32 val_instance_count_fast2 (val_value_t *val, val_value_t *startval)
 Count the number of instances of the specified object name in the parent value struct. More...
 
void val_set_extra_instance_errors (val_value_t *val, const xmlChar *modname, const xmlChar *objname, uint32 maxelems)
 mark ERR_NCX_EXTRA_VAL_INST errors for nodes > 'maxelems' More...
 
boolean val_need_quotes (const xmlChar *str)
 Check if a string needs to be quoted to be output within a conf file or ncxcli stdout output. More...
 
boolean val_all_whitespace (const xmlChar *str)
 Check if a string is all whitespace. More...
 
boolean val_any_whitespace (const xmlChar *str, uint32 len)
 Check if a string has any whitespace chars. More...
 
boolean val_match_metaval (const xml_attr_t *attr, xmlns_id_t nsid, const xmlChar *name)
 Match the specific attribute value and namespace ID. More...
 
boolean val_get_dirty_flag (const val_value_t *val)
 Get the dirty flag for this value node. More...
 
boolean val_get_subtree_dirty_flag (const val_value_t *val)
 Get the subtree dirty flag for this value node. More...
 
void val_set_subtree_dirty_up (val_value_t *val)
 Set the dirty flag for this value node. More...
 
void val_set_dirty_flag (val_value_t *val, boolean clear_def)
 Set the dirty flag for this value node. More...
 
void val_set_child_deleted_flag (val_value_t *val)
 Set the child_deleted flag for this value node. More...
 
boolean val_get_child_deleted_flag (val_value_t *val)
 Get the child_deleted flag for this value node. More...
 
void val_clear_dirty_flag (val_value_t *val, time_t *timestamp, ncx_transaction_id_t txid, boolean is_delete, boolean do_clear_default)
 Clear the dirty flag for this value node. More...
 
boolean val_dirty_subtree (const val_value_t *val)
 Check the dirty or subtree_dirty flag. More...
 
void val_clean_tree (val_value_t *val)
 Clear the dirty flag and the operation for all nodes within a value struct. More...
 
uint32 val_get_nest_level (val_value_t *val)
 Get the next level of the value. More...
 
val_value_t * val_get_first_leaf (val_value_t *val)
 Get the first leaf or leaflist node in the specified value tree. More...
 
const xmlChar * val_get_mod_name (const val_value_t *val)
 Get the module name associated with this value node. More...
 
const xmlChar * val_get_mod_prefix (const val_value_t *val)
 Get the module prefix associated with this value node. More...
 
xmlns_id_t val_get_nsid (const val_value_t *val)
 Get the namespace ID for the specified value node. More...
 
void val_change_nsid (val_value_t *val, xmlns_id_t nsid)
 Change the namespace ID for a value node and all its descendants. More...
 
void val_change_nsid2 (val_value_t *val, xmlns_id_t nsid)
 Change the namespace ID for the descendant nodes of the value node. More...
 
void val_change_nsid3 (val_value_t *val, xmlns_id_t nsid)
 Change the namespace ID for a value node only. More...
 
val_value_t * val_make_from_insertxpcb (val_value_t *sourceval, status_t *res)
 Make a val_value_t for a list, with the child nodes for key leafs, specified in the key attribute string given to the insert operation. More...
 
val_unique_t * val_new_unique (void)
 Malloc and initialize the fields in a val_unique_t. More...
 
void val_free_unique (val_unique_t *valuni)
 Clean and free a val_unique_t struct. More...
 
const typ_def_t * val_get_typdef (const val_value_t *val)
 Get the typdef field for a value struct. More...
 
boolean val_set_by_default (const val_value_t *val)
 Check if the value was set by val_add_defaults. More...
 
boolean val_has_withdef_default (const val_value_t *val)
 Check if the value contained the wd:default attribute. More...
 
void val_set_withdef_default (val_value_t *val)
 Set the value flags as having the wd:default attribute. More...
 
boolean val_is_metaval (const val_value_t *val)
 Check if the value is a meta-val (XML attribute) More...
 
void val_move_children (val_value_t *srcval, val_value_t *destval)
 Move all the child nodes from src to dest Source and dest must both be containers! More...
 
void val_move_nonconfig_children (val_value_t *srcval, val_value_t *destval)
 Move all the config=false child nodes from src to dest Source and dest must both be containers! More...
 
status_t val_cvt_generic (val_value_t *val)
 Convert all the database object pointers to generic object pointers. More...
 
status_t val_set_pcookie (val_value_t *val, void *pcookie)
 Set the SIL pointer cookie in the editvars for the specified value node. More...
 
status_t val_set_icookie (val_value_t *val, int icookie)
 Set the SIL integer cookie in the editvars for the specified value node. More...
 
void * val_get_pcookie (val_value_t *val)
 Get the SIL pointer cookie in the editvars for the specified value node. More...
 
int val_get_icookie (val_value_t *val)
 Get the SIL integer cookie in the editvars for the specified value node. More...
 
status_t val_delete_default_leaf (val_value_t *val)
 Do the internal work to setup a delete of a default leaf. More...
 
status_t val_delete_default_leaf_list (val_value_t *val)
 Do the internal work to convert a leaf-list to its YANG default value(s) More...
 
void val_force_empty (val_value_t *val)
 Convert a simple node to an empty type. More...
 
status_t val_delete_default_npcon (val_value_t *val)
 Do the internal work to convert an NP-container to its subtree of YANG default values. More...
 
void val_move_fields_for_xml (val_value_t *srcval, val_value_t *destval, boolean movemeta)
 Move or copy the internal fields from one val to another for xml_wr purposes. More...
 
void val_move_metadata (val_value_t *srcval, val_value_t *destval)
 Move the attribute fields from one val to another for xml_wr purposes. More...
 
val_index_t * val_get_first_key (val_value_t *val)
 Get the first key record if this is a list with a key-stmt. More...
 
val_index_t * val_get_last_key (val_value_t *val)
 Get the last key record if this is a list with a key-stmt. More...
 
val_index_t * val_get_next_key (val_index_t *curkey)
 Get the next key record if this is a list with a key-stmt. More...
 
val_index_t * val_get_prev_key (val_index_t *curkey)
 Get the previous key record if this is a list with a key-stmt. More...
 
void val_remove_key (val_value_t *keyval)
 Remove a key pointer because the key is invalid Free the key pointer. More...
 
val_value_t * val_new_deleted_value (void)
 Malloc and initialize the fields in a val_value_t to be used as a deleted node marker. More...
 
status_t val_new_editvars (val_value_t *val)
 Malloc and initialize the val->editvars field. More...
 
void val_free_editvars (val_value_t *val)
 Free the editing variables for the value node. More...
 
void val_free_solo_editvars (val_editvars_t *editvars)
 Free the editing variables removed from a val_value_t. More...
 
boolean val_all_np_containers (val_value_t *val)
 Check if the value tree is all NP containers and nothing else. More...
 
status_t val_sprintf_etag (val_value_t *val, xmlChar *buff, int32 buffsize)
 Write the Entity Tag for the value to the specified buffer. More...
 
time_t * val_get_last_modified (val_value_t *val)
 Get the last_modified field. More...
 
void val_force_default (val_value_t *val)
 Set a node created by the server as a default node. More...
 
void val_set_all_tags (val_value_t *val, time_t *timestamp, ncx_transaction_id_t txid)
 Set the etag and last_modified field for the node and all config sub-children. More...
 
const xmlChar * val_get_owner (val_value_t *val)
 Get the owner string for the specified value node. More...
 
ncx_owner_id_t val_get_owner_id (val_value_t *val)
 Get the owner ID for the specified value node. More...
 
boolean val_need_owner_string (val_value_t *val)
 Check if the owner string is needed when generating ywx:owner attrs. More...
 
void val_delete_children (val_value_t *val)
 Check if the value is a complex type and if so then delete all child nodes. More...
 
void val_clean_value (val_value_t *val)
 Clean a static val_value_t struct. More...
 
boolean val_find_bit (val_value_t *val, const xmlChar *bitname)
 Find the specified bit name in the NCX_BT_BITS value. More...
 
boolean val_has_children (const val_value_t *val)
 Determine if there are any child nodes for this val. More...
 
status_t val_add_test_valindex (val_value_t *parentval, val_value_t *keyval)
 Make a dummy val_index_t for the getcg acmtest. More...
 
const xmlChar * val_get_yang_typename (val_value_t *val)
 Get the YANG type name for this value node if there is one. More...
 
void val_set_force_config (val_value_t *val, boolean is_config)
 Set the force config flags for the object. More...
 
void val_clear_defvalset_flag (val_value_t *val)
 Clear the defvalset flag so the server will re-check this node the next time the client does a get request. More...
 
status_t val_clone_valQ (dlq_hdr_t *valQ, dlq_hdr_t *return_valQ)
 Clone all values in 1 valQ into the return_valQ. More...
 
void val_clean_valQ (dlq_hdr_t *valQ)
 Clean a queue of val_value_t. More...
 
boolean val_is_value_set (val_value_t *val)
 Check if a value has been set by a client It has to be initialized and not set by default to return true. More...
 
uint32 val_url_encode_string (const xmlChar *str, xmlChar *buff)
 Fill in a buffer with the URL-encoded string. More...
 
void val_convert_any_to_container (val_value_t *val)
 Convert the extern parameter to a container instead of extern. More...
 
void val_clean_index_chain (val_value_t *val)
 Clean out any indexQ entries. More...
 
boolean val_pattern_match (const xmlRegexpPtr pattern, const xmlChar *strval)
 Check the specified string against the specified pattern. More...
 
boolean val_ocpattern_match (const regex_t *ocpattern, const xmlChar *strval)
 Check the specified string against the specified pattern Use POSIX format for openconfig pattern. More...
 
boolean val_idref_derived_from (ncx_module_t *impmod, val_value_t *testval, const xmlChar *qname, boolean or_self)
 Check the specified valnode is derived from the specified identity. More...
 
status_t val_set_sil_priority (val_value_t *val, uint8 silprio)
 Set the secondary SIL priority. More...
 
uint8 val_get_sil_priority (val_value_t *val)
 Get the secondary SIL priority; zero if not found. More...
 
const xmlChar * val_find_bit_name (val_value_t *val, uint32 bitpos)
 Find the specified bit name in the NCX_BT_BITS value. More...
 
const xmlChar * val_find_enum_name (val_value_t *val, int32 enunum)
 Find the specified enum name for the value field that matches for NCX_BT_ENUM value. More...
 
const xmlChar * val_find_enum_name2 (ncx_btype_t btyp, typ_def_t *typdef, int32 enunum)
 Find the specified enum name for the value field that matches for NCX_BT_ENUM value Do not use val_value value. More...
 
void val_mark_deleted (val_value_t *val)
 mark the value node as deleted May have to really delete from val_tree More...
 
void val_mark_undeleted (val_value_t *val)
 mark the value node as un-deleted More...
 
boolean val_has_conditional_value (val_value_t *val)
 Check if the value is conditional. More...
 
val_value_t * val_convert_leafref (const val_value_t *val)
 Convert a value of type NCX_BT_LEAFREF to the value that the final leafref is pointing at. More...
 
int32 val_compare_for_topreplace (const val_value_t *val1, const val_value_t *val2)
 Compare 2 val_value_t struct value contents. More...
 
int32 val_compare_for_topreplace_simple (const val_value_t *val1, const val_value_t *val2)
 Compare 2 val_value_t struct value contents. More...
 
boolean val_has_complex_child (const val_value_t *val)
 Check if the value has complex children nodes. More...
 
status_t val_add_meta (val_value_t *metaval, val_value_t *val)
 Add a meta value to a value node. More...
 
val_value_t * val_find_root (val_value_t *val)
 Find the root value node or top-val if no ncx:root found. More...
 
status_t val_set_canonical (val_value_t *val)
 Invoke the canonical callback for the data type (if any) More...
 
typ_def_t * val_get_leafref_typdef (val_value_t *val)
 Return a base typedef of type NCX_BT_LEAFREF. More...
 
boolean val_ascendant_compare (val_value_t *val1, val_value_t *val2)
 Special compare function for edit compares. More...
 
const xmlChar * val_get_dname (const val_value_t *val)
 Get the dname field if set; NULL if not set. More...
 
status_t val_set_dname (val_value_t *val, const xmlChar *dname)
 Set the dname field. More...
 
status_t val_set_dname2 (val_value_t *val, const xmlChar *dname, uint32 dnamelen)
 Set the dname field. More...
 
status_t val_new_extra (val_value_t *val)
 Create the val_extra struct if it does not exist. More...
 
const xmlChar * val_get_varexpr (const val_value_t *val)
 Get the varexpr field if set; NULL if not set. More...
 
status_t val_set_varexpr (val_value_t *val, const xmlChar *varexpr)
 Set the varexpr field in the value node. More...
 
void val_clear_varexpr (val_value_t *val)
 Clear the varexpr field in the value node. More...
 
void val_set_wildcard_string (val_value_t *val)
 Set the value as a wildcard string. More...
 
status_t val_copy_editvars (const val_value_t *val, val_value_t *copy)
 Copy the editvars struct contents into the value node. More...
 
status_t val_set_skip_sil_partial (val_value_t *val)
 Set the skip_sil_partial flag for this value in an edit. More...
 
boolean val_get_skip_sil_partial (const val_value_t *val)
 Get the skip_sil_partial flag. More...
 

Detailed Description

Value Node Basic Support.