yumapro  20.10-12
YumaPro SDK
ycontrol_val_parse.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_ycontrol_val_parse
13 #define _H_ycontrol_val_parse
14 
15 /* FILE: ycontrol_val_parse.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
28 /*********************************************************************
29 * *
30 * C H A N G E H I S T O R Y *
31 * *
32 *********************************************************************
33 
34 date init comment
35 ----------------------------------------------------------------------
36 13-aprb-14 abb Begun; start from mgr_val_parse.c
37 
38 */
39 
40 #ifndef _H_obj
41 #include "obj.h"
42 #endif
43 
44 #ifndef _H_ses
45 #include "ses.h"
46 #endif
47 
48 #ifndef _H_status
49 #include "status.h"
50 #endif
51 
52 #ifndef _H_val
53 #include "val.h"
54 #endif
55 
56 #ifndef _H_xml_util
57 #include "xml_util.h"
58 #endif
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 /********************************************************************
65 * *
66 * F U N C T I O N S *
67 * *
68 *********************************************************************/
69 
70 
107 extern status_t
108  ycontrol_val_parse (ses_cb_t *scb,
109  obj_template_t *obj,
110  xml_node_t *startnode,
111  val_value_t *retval);
112 
113 
117 #ifdef __cplusplus
118 } /* end extern 'C' */
119 #endif
120 
121 #endif /* _H_ycontrol_val_parse */
ncx_str.h
NCX Module Library String Utility Functions.
obj_first_child
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:6687
typ_get_basetype
ncx_btype_t typ_get_basetype(const typ_def_t *typdef)
Get the final base type of the specified typ_def_t.
Definition: typ.c:1764
ses.h
NETCONF Session Common definitions module.
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
obj_first_metadata
obj_metadata_t * obj_first_metadata(const obj_template_t *obj)
Get the first object metadata definition in the object.
Definition: obj.c:15159
val_child_add_last
status_t val_child_add_last(val_value_t *child, val_value_t *parent)
Add a child value node as last node to a parent value node.
Definition: val_child.c:1583
NCX_NF_OCTAL
@ NCX_NF_OCTAL
YANG octal format.
Definition: ncxtypes.h:334
cfg.h
NCX_BT_INT32
@ NCX_BT_INT32
int32
Definition: ncxtypes.h:209
xpath_free_pcb
void xpath_free_pcb(xpath_pcb_t *pcb)
Free a malloced XPath parser control block.
Definition: xpath.c:2963
NCX_BT_BINARY
@ NCX_BT_BINARY
binary (base64)
Definition: ncxtypes.h:218
ncx_convert_dec64
status_t ncx_convert_dec64(const xmlChar *numstr, ncx_numfmt_t numfmt, uint8 digits, ncx_num_t *val)
Convert a number string to a decimal64 number.
Definition: ncx_num.c:1039
obj_get_typdef
typ_def_t * obj_get_typdef(obj_template_t *obj)
Get the typdef for the leaf or leaf-list.
Definition: obj.c:11991
OP_EDITOP_NONE
@ OP_EDITOP_NONE
not set
Definition: op.h:123
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
val_set_name
void val_set_name(val_value_t *val, const xmlChar *name, uint32 namelen)
Set (or reset) the name of a value struct.
Definition: val.c:2875
val_find_meta
val_value_t * val_find_meta(val_value_t *val, xmlns_id_t nsid, const xmlChar *name)
Get the corresponding meta data node.
Definition: val.c:5532
ERR_NCX_EXTRA_ATTR
@ ERR_NCX_EXTRA_ATTR
308
Definition: status_enum.h:351
xml_clean_node
void xml_clean_node(xml_node_t *node)
Clean an xml_node_t struct.
Definition: xml_util.c:266
NCX_IQUAL_ONE
@ NCX_IQUAL_ONE
no iqual == 1
Definition: ncxtypes.h:297
val_new_child_val
val_value_t * val_new_child_val(xmlns_id_t nsid, const xmlChar *name, boolean copyname, val_value_t *parent, op_editop_t editop, obj_template_t *obj)
Internal function used by server to create a new child value.
Definition: val_util.c:3368
val_change_nsid
void val_change_nsid(val_value_t *val, xmlns_id_t nsid)
Change the namespace ID for a value node and all its descendants.
Definition: val.c:12303
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
val_union_ok_ex
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 ...
Definition: val.c:4943
NCX_BT_BOOLEAN
@ NCX_BT_BOOLEAN
boolean
Definition: ncxtypes.h:206
val.h
Value Node Basic Support.
NCX_BT_INSTANCE_ID
@ NCX_BT_INSTANCE_ID
instance-identifier
Definition: ncxtypes.h:219
xml_util.h
XML Utilities.
NCX_BT_IDREF
@ NCX_BT_IDREF
identityref
Definition: ncxtypes.h:222
obj_next_key
obj_key_t * obj_next_key(obj_key_t *objkey)
Get the next key record.
Definition: obj.c:9559
xpath_new_pcb
xpath_pcb_t * xpath_new_pcb(const xmlChar *xpathstr, xpath_getvar_fn_t getvar_fn)
malloc a new XPath parser control block
Definition: xpath.c:2739
op_insertop_id
op_insertop_t op_insertop_id(const xmlChar *opstr)
Get the ID for the insert operation from its keyword.
Definition: op.c:234
obj_first_key
obj_key_t * obj_first_key(obj_template_t *obj)
Get the first key record.
Definition: obj.c:9472
val_idref_ok
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.
Definition: val.c:3717
ncx_data_templates_ok
boolean ncx_data_templates_ok(void)
Get the use-data-templates flag.
Definition: ncx.c:12393
NCX_BT_LEAFREF
@ NCX_BT_LEAFREF
leafref (needs special processing)
Definition: ncxtypes.h:221
xmlns_register_temp_ns
status_t xmlns_register_temp_ns(const xmlChar *ns, const xmlChar *pfix, xmlns_id_t *ns_id)
Register the specified temporary namespace.
Definition: xmlns.c:561
tk.h
NCX Syntax Token Handler.
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
ncx_num.h
NCX Module Library Number Utility Functions.
XML_NT_END
@ XML_NT_END
end-tag of an element
Definition: xml_util.h:193
val_list_ok_errinfo
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.
Definition: val.c:3384
val_set_withdef_default
void val_set_withdef_default(val_value_t *val)
Set the value flags as having the wd:default attribute.
Definition: val.c:12610
xml_isspace_str
boolean xml_isspace_str(const xmlChar *str)
Check if an xmlChar string is all whitespace chars.
Definition: xml_util.c:1923
NCX_BT_ANYDATA
@ NCX_BT_ANYDATA
YANG 1.1 anydata.
Definition: ncxtypes.h:229
typ_userdef_canonical
status_t typ_userdef_canonical(val_value_t *val)
Invoke the canonical callback function for a user defined type if it exists.
Definition: typ_userdef.c:245
VAL_SET_EXTERNAL
#define VAL_SET_EXTERNAL(V)
flag the value as an external value Not sure why this is different than NCX_BT_EXTERN
Definition: val.h:597
typ_userdef.h
User Defined Types.
obj_get_child_node
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:12875
ncxconst.h
Contains NCX constants.
obj_get_mod_prefix
const xmlChar * obj_get_mod_prefix(const obj_template_t *obj)
Get the module prefix for this object.
Definition: obj.c:12125
var_string_is_var_expr
boolean var_string_is_var_expr(const xmlChar *varstring, uint32 varlen, boolean *plainvar)
Check if the string is a variable reference.
Definition: var.c:2950
NCX_NF_DEC
@ NCX_NF_DEC
YANG deciaml format.
Definition: ncxtypes.h:335
NCX_BT_UINT8
@ NCX_BT_UINT8
uint8
Definition: ncxtypes.h:211
VAL_CLR_VAREXPR
#define VAL_CLR_VAREXPR(V)
Clear the value as a var expression.
Definition: val.h:554
val_set_xpathpcb
status_t val_set_xpathpcb(val_value_t *val, xpath_pcb_t *xpathpcb)
Set the xpathpcb field with passed field;.
Definition: val_util.c:4324
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
xmlns_id_t
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
xmlns_yang_id
xmlns_id_t xmlns_yang_id(void)
Get the ID for the YANG namespace or 0 if it doesn't exist.
Definition: xmlns.c:1017
NCX_NF_NONE
@ NCX_NF_NONE
not set
Definition: ncxtypes.h:333
log_debug2
void void void void void void void void void log_debug2(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG2 log entry.
typ_get_basetype_typdef
typ_def_t * typ_get_basetype_typdef(ncx_btype_t btyp)
Get the default typdef for the specified base type.
Definition: typ.c:2039
xpath1.h
XPath 1.0 expression support.
VAL_SET_FIXED_VALUE
#define VAL_SET_FIXED_VALUE(V)
flag the value as a fixed key value for GETNEXT processing
Definition: val.h:573
def_reg.h
Definition Registry module.
xmlns_ywattrs_id
xmlns_id_t xmlns_ywattrs_id(void)
Get the ID for the YumaWorks attributes namespace or 0 if it doesn't exist.
Definition: xmlns.c:1090
NCX_BT_ENUM
@ NCX_BT_ENUM
enumeration
Definition: ncxtypes.h:204
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xpath.h
Schema and data model Xpath search support.
NCX_BT_LIST
@ NCX_BT_LIST
internal, YANG list
Definition: ncxtypes.h:228
ncx_get_gen_anyxml
obj_template_t * ncx_get_gen_anyxml(void)
Get the object template for the NCX generic anyxml container.
Definition: ncx.c:6664
NCX_BT_UINT64
@ NCX_BT_UINT64
uint64
Definition: ncxtypes.h:214
NCX_NF_REAL
@ NCX_NF_REAL
internal format for XPath
Definition: ncxtypes.h:337
ycontrol_xml_consume_node
status_t ycontrol_xml_consume_node(xmlTextReaderPtr reader, xml_node_t *node)
Consume an XML node from the XmlTextReader.
Definition: ycontrol_xml.c:130
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
XML_NT_STRING
@ XML_NT_STRING
string content node
Definition: xml_util.h:194
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
ERR_NCX_WRONG_NODETYP_SIM
@ ERR_NCX_WRONG_NODETYP_SIM
283
Definition: status_enum.h:326
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
xpath_free_result
void xpath_free_result(xpath_result_t *result)
Free a malloced XPath result struct.
Definition: xpath.c:3107
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
xmlns_wda_id
xmlns_id_t xmlns_wda_id(void)
Get the ID for the wd:default XML attribute namespace or 0 if it doesn't exist.
Definition: xmlns.c:1071
val_set_varexpr
status_t val_set_varexpr(val_value_t *val, const xmlChar *varexpr)
Set the varexpr field in the value node.
Definition: val.c:15509
val_child_add
status_t val_child_add(val_value_t *child, val_value_t *parent)
Add a child value node to a parent value node.
Definition: val_child.c:1542
val_util.h
Value Node Utilities.
ycontrol_xml.h
YControl XML parser APIs.
ncx_get_gen_container
obj_template_t * ncx_get_gen_container(void)
Get the object template for the NCX generic container.
Definition: ncx.c:6678
NCX_BT_INT64
@ NCX_BT_INT64
int64
Definition: ncxtypes.h:210
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
ncx_is_true
boolean ncx_is_true(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:7691
ncx_finish_list
status_t ncx_finish_list(typ_def_t *typdef, ncx_list_t *list)
2nd pass of parsing a ncx_list_t Finish converting the list members to the proper format
Definition: ncx_list.c:862
obj_next_child
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:6860
NCX_BT_EMPTY
@ NCX_BT_EMPTY
empty
Definition: ncxtypes.h:205
NCX_BT_UINT16
@ NCX_BT_UINT16
uint16
Definition: ncxtypes.h:212
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
xml_strncmp
int xml_strncmp(const xmlChar *s1, const xmlChar *s2, uint32 maxlen)
String compare for xmlChar for at most 'maxlen' xmlChars.
Definition: xml_util.c:1824
val_match_metaval
boolean val_match_metaval(const xml_attr_t *attr, xmlns_id_t nsid, const xmlChar *name)
Match the specific attribute value and namespace ID.
Definition: val.c:11790
XML_NT_NONE
@ XML_NT_NONE
not set
Definition: xml_util.h:190
val_child.h
Value Node Child Access Support.
ycontrol_val_parse
status_t ycontrol_val_parse(ses_cb_t *scb, obj_template_t *obj, xml_node_t *startnode, val_value_t *retval)
parse a value for a YANG type from a NETCONF PDU XML stream
Definition: ycontrol_val_parse.c:2289
OP_INSOP_NONE
@ OP_INSOP_NONE
not set
Definition: op.h:138
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
b64.h
Base64 Utilities.
ncx_obj_is_generic
boolean ncx_obj_is_generic(const obj_template_t *obj)
Check if the object is 1 of the gen_foo object templates.
Definition: ncx.c:13013
NCX_BT_CONTAINER
@ NCX_BT_CONTAINER
internal container
Definition: ncxtypes.h:225
log_debug
void void void void void void void log_debug(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG log entry.
typ_get_listtyp
typ_template_t * typ_get_listtyp(typ_def_t *typdef)
Return the typ_template for the list type, if the supplied.
Definition: typ.c:3803
typ.h
Parameter Type Handler.
xml_next_attr
xml_attr_t * xml_next_attr(xml_attr_t *attr)
get the next attribute in the list
Definition: xml_util.c:1218
tk_get_btype_sym
const char * tk_get_btype_sym(ncx_btype_t btyp)
Get the symbolic token symbol for one of the base types.
Definition: tk.c:3324
val_all_whitespace
boolean val_all_whitespace(const xmlChar *str)
Check if a string is all whitespace.
Definition: val.c:11719
val_gen_index_comp
status_t val_gen_index_comp(const obj_key_t *in, val_value_t *val)
Create an index component.
Definition: val_util.c:2490
yangconst.h
Contains YANG constants separated to prevent H file include loops.
ncx_get_numfmt
ncx_numfmt_t ncx_get_numfmt(const xmlChar *numstr)
Get the number format of the specified string.
Definition: ncx_num.c:2164
ncx_set_list
status_t ncx_set_list(ncx_btype_t btyp, const xmlChar *strval, ncx_list_t *list)
consume a generic string list with base type checking Parse the XML input as an NCX_BT_SLIST
Definition: ncx_list.c:751
val_add_meta
status_t val_add_meta(val_value_t *metaval, val_value_t *val)
Add a meta value to a value node.
Definition: val.c:15157
val_set_binary
status_t val_set_binary(const xmlChar *valstr, uint32 valstrlen, val_value_t *val)
set and decode base64 value.
Definition: val.c:6758
ERR_NCX_INVALID_XPATH_EXPR
@ ERR_NCX_INVALID_XPATH_EXPR
348
Definition: status_enum.h:391
obj_get_fraction_digits
uint8 obj_get_fraction_digits(const obj_template_t *obj)
Get the fraction-digits field from the object typdef.
Definition: obj.c:13187
val_new_editvars
status_t val_new_editvars(val_value_t *val)
Malloc and initialize the val->editvars field.
Definition: val.c:13350
NCX_BT_UNION
@ NCX_BT_UNION
union (needs special processing)
Definition: ncxtypes.h:220
xpath_yang.h
YANG-specific Xpath support.
xmlns_xml_id
xmlns_id_t xmlns_xml_id(void)
Get the ID for the 1998 XML namespace or 0 if it doesn't exist.
Definition: xmlns.c:981
xpath_yang_validate_xmlpath
status_t xpath_yang_validate_xmlpath(xmlTextReaderPtr reader, xpath_pcb_t *pcb, obj_template_t *pathobj, boolean logerrors, obj_template_t **targobj)
Validate an instance-identifier expression (XML path) within an XML PDU context.
Definition: xpath_yang.c:2651
val_parse_meta
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.
obj_get_mod_name
const xmlChar * obj_get_mod_name(const obj_template_t *obj)
Get the module name for this object.
Definition: obj.c:12176
typ_is_simple
boolean typ_is_simple(ncx_btype_t btyp)
Check if this is a simple data type.
Definition: typ.c:3107
NCX_BT_ANY
@ NCX_BT_ANY
anyxml
Definition: ncxtypes.h:202
NCX_BT_SLIST
@ NCX_BT_SLIST
ncx:xsdlist extension (internal, deprecated)
Definition: ncxtypes.h:223
val_enum_ok
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.
Definition: val.c:3455
EMPTY_STRING
#define EMPTY_STRING
empty string used to get const xmlChar * cast
Definition: ncxconst.h:289
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
ERR_NCX_WRONG_NUMTYP
@ ERR_NCX_WRONG_NUMTYP
289
Definition: status_enum.h:332
val_range_ok_errinfo
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.
Definition: val.c:4216
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
log.h
NCX System Logging Manager.
xmlns_nc_id
xmlns_id_t xmlns_nc_id(void)
Get the ID for the NETCONF namespace or 0 if it doesn't exist.
Definition: xmlns.c:880
NC_OPERATION_ATTR_NAME
#define NC_OPERATION_ATTR_NAME
NETCONF edit-config operation attribute name.
Definition: ncxconst.h:118
ycontrol_val_parse.h
XML Parameter Value Parser Module.
ERR_NCX_UNKNOWN_NS
@ ERR_NCX_UNKNOWN_NS
229
Definition: status_enum.h:268
ncx_get_gen_empty
obj_template_t * ncx_get_gen_empty(void)
Get the object template for the NCX generic empty leaf.
Definition: ncx.c:6706
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
XML_NT_START
@ XML_NT_START
start-tag of an element
Definition: xml_util.h:192
obj_is_schema_instance_string
boolean obj_is_schema_instance_string(const obj_template_t *obj)
Check if object is a schema-instance string.
Definition: obj.c:14420
typ_userdef_validate
status_t typ_userdef_validate(val_value_t *val)
Invoke the validate callback function for a user defined type if it exists.
Definition: typ_userdef.c:202
NCX_BT_BITS
@ NCX_BT_BITS
bits
Definition: ncxtypes.h:203
ncx_list.h
NCX Module Library List Utility Functions.
NCX_BT_FLOAT64
@ NCX_BT_FLOAT64
hidden: just for XPath
Definition: ncxtypes.h:216
NCX_BT_UINT32
@ NCX_BT_UINT32
uint32
Definition: ncxtypes.h:213
obj_find_metadata
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:15119
ncx_get_gen_string
obj_template_t * ncx_get_gen_string(void)
Get the object template for the NCX generic string leaf.
Definition: ncx.c:6692
VAL_TYPE
#define VAL_TYPE(V)
Access the base type : same as VAL_BTYPE.
Definition: val.h:387
obj_get_basetype
ncx_btype_t obj_get_basetype(const obj_template_t *obj)
Get the NCX base type enum for the object type.
Definition: obj.c:12077
NCX_IQUAL_OPT
@ NCX_IQUAL_OPT
'?' == 0 or 1
Definition: ncxtypes.h:298
ERR_XML_READER_EOF
@ ERR_XML_READER_EOF
221
Definition: status_enum.h:260
val_new_value
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
val_string_ok_errinfo
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
Definition: val.c:3038
ncx.h
YANG module utility functions.
obj.h
Data Object Support.
ncx_is_false
boolean ncx_is_false(const xmlChar *str)
Check if an xmlChar string is a string OK for XSD boolean.
Definition: ncx.c:7714
obj_next_metadata
obj_metadata_t * obj_next_metadata(const obj_metadata_t *meta)
Get the next object metadata definition in the object.
Definition: obj.c:15187
xml_find_ro_attr
const xml_attr_t * xml_find_ro_attr(const xml_node_t *node, xmlns_id_t nsid, const xmlChar *attrname)
Find a read-only attribute.
Definition: xml_util.c:1367
xml_get_first_attr
xml_attr_t * xml_get_first_attr(const xml_node_t *node)
get the first attribute in the attrs list, from an xml_node_t param
Definition: xml_util.c:1192
VAL_SET_VAREXPR
#define VAL_SET_VAREXPR(V)
Set the value as a var expression.
Definition: val.h:551
val_metadata_inst_count
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.
Definition: val.c:5639
xpath1_eval_xmlexpr
xpath_result_t * xpath1_eval_xmlexpr(xmlTextReaderPtr reader, xpath_pcb_t *pcb, val_value_t *val, val_value_t *docroot, boolean logerrors, boolean configonly, status_t *res)
Evaluate an XML document expression.
Definition: xpath1.c:5643
val_init_from_template
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
val_binary_ok_errinfo
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
Definition: val.c:3070
xpath_find_schema_target_int
status_t xpath_find_schema_target_int(const xmlChar *target, obj_template_t **targobj)
@
Definition: xpath.c:2475
ncx_convert_num
status_t ncx_convert_num(const xmlChar *numstr, ncx_numfmt_t numfmt, ncx_btype_t btyp, ncx_num_t *val)
Convert a number string to a numeric type.
Definition: ncx_num.c:717
xmlns_inv_id
xmlns_id_t xmlns_inv_id(void)
Get the INVALID namespace ID.
Definition: xmlns.c:931
VAL_STR
#define VAL_STR(V)
Access the value as a string ONLY if typ_is_string() is true.
Definition: val.h:464
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
XML_NT_EMPTY
@ XML_NT_EMPTY
standalone empty node
Definition: xml_util.h:191
xml_init_node
void xml_init_node(xml_node_t *node)
Init an xml_node_t struct.
Definition: xml_util.c:229
NEED_EXIT
#define NEED_EXIT(res)
used in parser routines to decide if processing can continue does not return, just evaluates to TRUE ...
Definition: yangconst.h:234
xmlns_ncx_id
xmlns_id_t xmlns_ncx_id(void)
Get the ID for the NETCONF Extensions namespace or 0 if it doesn't exist.
Definition: xmlns.c:897
NCX_BT_DECIMAL64
@ NCX_BT_DECIMAL64
decimal64
Definition: ncxtypes.h:215
obj_is_xpath_string
boolean obj_is_xpath_string(const obj_template_t *obj)
Check if object is an XPath string.
Definition: obj.c:14394
ERR_NCX_WRONG_NODETYP_CPX
@ ERR_NCX_WRONG_NODETYP_CPX
284
Definition: status_enum.h:327
NCX_BT_STRING
@ NCX_BT_STRING
string
Definition: ncxtypes.h:217
val_set_simval
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
Definition: val.c:6836
ycontrol_xml_consume_node_nons
status_t ycontrol_xml_consume_node_nons(xmlTextReaderPtr reader, xml_node_t *node)
consume node but do not generate namespace errors if seen.
Definition: ycontrol_xml.c:139
NCX_BT_INT8
@ NCX_BT_INT8
int8
Definition: ncxtypes.h:207
xml_endnode_match
status_t xml_endnode_match(const xml_node_t *startnode, const xml_node_t *endnode)
check if a specific node is the proper endnode match for a given startnode
Definition: xml_util.c:592
xmlns.h
XML namespace support.
val_free_value
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 it...
Definition: val.c:2842
obj_get_iqualval
ncx_iqual_t obj_get_iqualval(obj_template_t *obj)
Get the instance qualifier for this object.
Definition: obj.c:12427
status.h
Global error messages for status code enumerations.
NCX_BT_NONE
@ NCX_BT_NONE
base type not set
Definition: ncxtypes.h:201
xml_dump_node
void xml_dump_node(const xml_node_t *node, log_debug_t lvl)
Debug function to printf xml_node_t contents.
Definition: xml_util.c:661
obj_get_nsid
xmlns_id_t obj_get_nsid(const obj_template_t *obj)
Get the namespace ID for this object.
Definition: obj.c:12395
dlq.h
dlq provides general double-linked list and queue support:
op_editop_id
op_editop_t op_editop_id(const xmlChar *opstr)
Get the ID for the editop from its keyword.
Definition: op.c:146
xml_node_match
status_t xml_node_match(const xml_node_t *node, xmlns_id_t nsid, const xmlChar *elname, xml_nodetyp_t nodetyp)
check if a specific node is the proper owner, name, and type
Definition: xml_util.c:545
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
ycontrol_xml_skip_subtree
status_t ycontrol_xml_skip_subtree(xmlTextReaderPtr reader, const xml_node_t *startnode)
Skip the current subtree (due to parse or schema error)
Definition: ycontrol_xml.c:176
NCX_BT_INT16
@ NCX_BT_INT16
int16
Definition: ncxtypes.h:208