yumapro  20.10-12
YumaPro SDK
json_parse.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2019, YumaWorks, Inc., All Rights Reserved.
3  *
4  * Unless required by applicable law or agreed to in writing,
5  * software distributed under the License is distributed on an
6  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
7  * KIND, either express or implied. See the License for the
8  * specific language governing permissions and limitations
9  * under the License.
10  */
11 #ifndef _H_json_parse
12 #define _H_json_parse
13 
14 /* FILE: json_parse.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
26 /*********************************************************************
27 * *
28 * C H A N G E H I S T O R Y *
29 * *
30 *********************************************************************
31 
32 date init comment
33 ----------------------------------------------------------------------
34 17-oct-15 abb Begun, split out from agt_json_parse.c
35 */
36 
37 #ifndef _H_obj
38 #include "obj.h"
39 #endif
40 
41 #ifndef _H_ses
42 #include "ses.h"
43 #endif
44 
45 #ifndef _H_status
46 #include "status.h"
47 #endif
48 
49 #ifndef _H_xml_msg
50 #include "xml_msg.h"
51 #endif
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 /********************************************************************
58 * *
59 * F U N C T I O N S *
60 * *
61 *********************************************************************/
62 
92 extern status_t
93  json_parse_top_identifier (ses_cb_t *scb,
94  xml_msg_hdr_t *msg,
95  obj_template_t *obj,
96  const xmlChar **modname,
97  const xmlChar **name,
98  xmlChar **tempbuff);
99 
100 
134 extern status_t
135  json_parse_text (ses_cb_t *scb,
136  xml_msg_hdr_t *msg,
137  obj_template_t *obj,
138  dlq_hdr_t *returnQ);
139 
140 
162 extern status_t
163  json_parse_buffer (xmlChar *buff,
164  obj_template_t *obj,
165  dlq_hdr_t *returnQ);
166 
167 
171 #ifdef __cplusplus
172 } /* end extern 'C' */
173 #endif
174 
175 #endif /* _H_json_parse */
ncx_str.h
NCX Module Library String Utility Functions.
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.
TK_TT_RBRACK
@ TK_TT_RBRACK
right bracket ']'
Definition: tk.h:292
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
TK_TT_TSTRING
@ TK_TT_TSTRING
token string
Definition: tk.h:319
tk_next_typ
tk_type_t tk_next_typ(tk_chain_t *tkc)
Get the token type of the next token.
Definition: tk.c:3349
TK_TT_DNUM
@ TK_TT_DNUM
decimal number
Definition: tk.h:331
NCX_NF_OCTAL
@ NCX_NF_OCTAL
YANG octal format.
Definition: ncxtypes.h:334
ERR_NCX_EXTRA_NODE
@ ERR_NCX_EXTRA_NODE
281
Definition: status_enum.h:324
cfg.h
xpath_free_pcb
void xpath_free_pcb(xpath_pcb_t *pcb)
Free a malloced XPath parser control block.
Definition: xpath.c:2963
xml_msg_clean_hdr
void xml_msg_clean_hdr(xml_msg_hdr_t *msg)
Clean all the memory used by the specified xml_msg_hdr_t but do not free the struct itself.
Definition: xml_msg.c:438
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
tk_get_token_name
const char * tk_get_token_name(tk_type_t ttyp)
Get the symbolic token name.
Definition: tk.c:3280
tk_new_chain
tk_chain_t * tk_new_chain(void)
Allocatate a new token parse chain.
Definition: tk.c:2919
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
val_gen_key_entry
status_t val_gen_key_entry(val_value_t *keyval)
Create a key record within an index comp.
Definition: val_util.c:2561
ses_new_dummy_scb
ses_cb_t * ses_new_dummy_scb(void)
Create a new dummy session control block.
Definition: ses.c:2100
VAL_NSID
#define VAL_NSID(V)
Access the namespace ID.
Definition: val.h:396
TK_TT_COMMA
@ TK_TT_COMMA
comma ','
Definition: tk.h:293
obj_is_rpc
boolean obj_is_rpc(const obj_template_t *obj)
Check if the object is an RPC method.
Definition: obj.c:13983
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
tk_next_val
const xmlChar * tk_next_val(tk_chain_t *tkc)
Get the token type of the next token.
Definition: tk.c:3464
xml_util.h
XML Utilities.
NCX_BT_IDREF
@ NCX_BT_IDREF
identityref
Definition: ncxtypes.h:222
typ_is_number
boolean typ_is_number(ncx_btype_t btyp)
Check if the base type is numeric.
Definition: typ.c:4063
NCX_BT_LEAFREF
@ NCX_BT_LEAFREF
leafref (needs special processing)
Definition: ncxtypes.h:221
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.
tk_dump_chain
void tk_dump_chain(const tk_chain_t *tkc)
Debug printf the token chain !!! Very verbose !!!
Definition: tk.c:3532
ncx_num.h
NCX Module Library Number Utility Functions.
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
TK_TT_RNUM
@ TK_TT_RNUM
real number
Definition: tk.h:333
obj_is_key
boolean obj_is_key(const obj_template_t *obj)
Check if object is being used as a key leaf within a list.
Definition: obj.c:14278
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.
ncxconst.h
Contains NCX constants.
ERR_NCX_WRONG_VAL
@ ERR_NCX_WRONG_VAL
232
Definition: status_enum.h:271
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
TK_ADV
#define TK_ADV(T)
advance the current token pointer
Definition: tk.h:107
TK_CUR_VAL
#define TK_CUR_VAL(T)
return the current token value
Definition: tk.h:128
NCX_NF_DEC
@ NCX_NF_DEC
YANG deciaml format.
Definition: ncxtypes.h:335
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
xmlns_id_t
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
TK_TT_COLON
@ TK_TT_COLON
colon char ':'
Definition: tk.h:299
obj_is_notif
boolean obj_is_notif(const obj_template_t *obj)
Check if the object is a notification.
Definition: obj.c:14083
xpath1.h
XPath 1.0 expression support.
def_reg.h
Definition Registry module.
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
TK_TT_RBRACE
@ TK_TT_RBRACE
right brace '}'
Definition: tk.h:287
xml_val.h
Utility functions for creating value structs.
ERR_NCX_WRONG_TKTYPE
@ ERR_NCX_WRONG_TKTYPE
245
Definition: status_enum.h:284
NCX_NF_REAL
@ NCX_NF_REAL
internal format for XPath
Definition: ncxtypes.h:337
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
ncx_find_object
obj_template_t * ncx_find_object(ncx_module_t *mod, const xmlChar *objname)
Find a top level module object.
Definition: ncx.c:4345
xpath_free_result
void xpath_free_result(xpath_result_t *result)
Free a malloced XPath result struct.
Definition: xpath.c:3107
xmlns_find_ns_by_module
xmlns_id_t xmlns_find_ns_by_module(const xmlChar *modname)
Find the NS ID from its module name that registered it.
Definition: xmlns.c:712
ncx_valid_name
boolean ncx_valid_name(const xmlChar *str, uint32 len)
Check if an xmlChar string is a valid YANG identifier value.
Definition: ncx.c:7596
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.
ncx_get_identity_nsid
xmlns_id_t ncx_get_identity_nsid(const ncx_identity_t *identity)
Get the namespace ID for an identity.
Definition: ncx.c:6202
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
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
NCX_BT_EMPTY
@ NCX_BT_EMPTY
empty
Definition: ncxtypes.h:205
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
json_parse_buffer
status_t json_parse_buffer(xmlChar *buff, obj_template_t *obj, dlq_hdr_t *returnQ)
Parse buffer of JSON into val_value_t structs.
Definition: json_parse.c:2639
val_child.h
Value Node Child Access Support.
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
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.
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
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_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
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
tk_reset_chain
void tk_reset_chain(tk_chain_t *tkc)
Reset the token chain current pointer to the start.
Definition: tk.c:4042
TK_TT_LBRACK
@ TK_TT_LBRACK
left bracket '['
Definition: tk.h:291
tk_next_is_null
boolean tk_next_is_null(tk_chain_t *tkc)
Get the special sequence [null] is next.
Definition: tk.c:3411
xml_msg_hdr_t_
Common Encoding Message Header No longer XML specific!! Used by JSON parsing as well!...
Definition: xml_msg.h:345
NCX_BT_UNION
@ NCX_BT_UNION
union (needs special processing)
Definition: ncxtypes.h:220
xml_msg_val_errinfo_fn_t
void(* xml_msg_val_errinfo_fn_t)(ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, val_value_t *errnode, const xmlChar *badval, const ncx_errinfo_t *errinfo)
Record an rpc-error for YANG-API/RESTCONF response translation Add errinfo struct if present.
Definition: xml_msg.h:565
xpath_yang.h
YANG-specific Xpath support.
xml_val_new_flag2
val_value_t * xml_val_new_flag2(const xmlChar *name, xmlns_id_t nsid)
Set up a new flag; malloc name!
Definition: xml_val.c:587
xml_msg_init_hdr
void xml_msg_init_hdr(xml_msg_hdr_t *msg)
Initialize a new xml_msg_hdr_t struct.
Definition: xml_msg.c:393
xml_msg.h
XML and JSON Message send and receive support.
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
ERR_NCX_UNKNOWN_OBJECT
@ ERR_NCX_UNKNOWN_OBJECT
293
Definition: status_enum.h:336
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
obj_find_child
obj_template_t * obj_find_child(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6116
ncx_find_any_object
obj_template_t * ncx_find_any_object(const xmlChar *objname)
Find any top-level object in any YANG module.
Definition: ncx.c:4025
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
TK_TT_STRING
@ TK_TT_STRING
unquoted string
Definition: tk.h:316
VAL_BOOL
#define VAL_BOOL(V)
Access the value as a boolean ONLY IF btyp == NCX_BT_BOOLEAN.
Definition: val.h:405
xml_msg_val_error_fn_t
void(* xml_msg_val_error_fn_t)(ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, val_value_t *errnode, const xmlChar *badval)
Record an rpc-error for YANG-API/RESTCONF response translation.
Definition: xml_msg.h:544
ERR_NCX_WRONG_NUMTYP
@ ERR_NCX_WRONG_NUMTYP
289
Definition: status_enum.h:332
TK_TT_LBRACE
@ TK_TT_LBRACE
left brace '{'
Definition: tk.h:286
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
log.h
NCX System Logging Manager.
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
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
xml_msg_obj_error_fn_t
void(* xml_msg_obj_error_fn_t)(ses_cb_t *scb, xml_msg_hdr_t *mhdr, status_t res, struct obj_template_t_ *errobj, const xmlChar *badval)
Record an rpc-error for YANG-API/RESTCONF response translation.
Definition: xml_msg.h:585
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.
tk_tokenize_input
status_t tk_tokenize_input(tk_chain_t *tkc, ncx_module_t *mod)
Parse the input (FILE or buffer) into tk_token_t structs.
Definition: tk.c:3641
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
json_parse_text
status_t json_parse_text(ses_cb_t *scb, xml_msg_hdr_t *msg, obj_template_t *obj, dlq_hdr_t *returnQ)
Parse token chain representing JSON Text.
Definition: json_parse.c:2566
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
val_new_value
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
ncx.h
YANG module utility functions.
xml_msg_hdr_t_::obj_error_fn
void * obj_error_fn
xml_msg_obj_error_fn_t obj_error_fn
Definition: xml_msg.h:455
json_parse_top_identifier
status_t json_parse_top_identifier(ses_cb_t *scb, xml_msg_hdr_t *msg, obj_template_t *obj, const xmlChar **modname, const xmlChar **name, xmlChar **tempbuff)
Parse a top-level JSON object;.
Definition: json_parse.c:2440
obj.h
Data Object Support.
TK_CUR_TYP
#define TK_CUR_TYP(T)
return the current token type
Definition: tk.h:125
json_parse.h
JSON input stream parser module.
tk_setup_chain_json_buffer
void tk_setup_chain_json_buffer(tk_chain_t *tkc, xmlChar *buff)
Setup a previously allocated chain for a JSON buffer.
Definition: tk.c:3116
TK_TT_QSTRING
@ TK_TT_QSTRING
double quoted string
Definition: tk.h:322
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
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
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
xpath_new_session_pcb
xpath_pcb_t * xpath_new_session_pcb(ses_cb_t *scb, const xmlChar *expr, status_t *res)
Get a new XPath parser control block for a session.
Definition: xpath.c:4669
VAL_STR
#define VAL_STR(V)
Access the value as a string ONLY if typ_is_string() is true.
Definition: val.h:464
ncx_find_module
ncx_module_t * ncx_find_module(const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3227
ses_free_scb
void ses_free_scb(ses_cb_t *scb)
Free a session control block.
Definition: ses.c:2221
xml_val_new_struct2
val_value_t * xml_val_new_struct2(const xmlChar *name, xmlns_id_t nsid)
Set up a new generic struct; copy the name.
Definition: xml_val.c:354
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
NCX_BT_STRING
@ NCX_BT_STRING
string
Definition: ncxtypes.h:217
val_child_add_force
status_t val_child_add_force(val_value_t *child, val_value_t *parent)
Add a child value node to a parent value node Force add even if Tree Insersion fails.
Definition: val_child.c:1624
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
xmlns.h
XML namespace support.
obj_get_typestr
const xmlChar * obj_get_typestr(const obj_template_t *obj)
Get the name of the object type.
Definition: obj.c:11392
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_is_root
boolean obj_is_root(const obj_template_t *obj)
Check if object is marked as a root object.
Definition: obj.c:14152
xml_val_new_cstring2
val_value_t * xml_val_new_cstring2(const xmlChar *name, xmlns_id_t nsid, const xmlChar *strval)
Set up a new string from a const string copy a const string; malloc the name!
Definition: xml_val.c:486
status.h
Global error messages for status code enumerations.
NCX_BT_NONE
@ NCX_BT_NONE
base type not set
Definition: ncxtypes.h:201
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:
val_idref_ok_ex
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.
Definition: val.c:3763
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
obj_template_t_
One YANG data-def-stmt.
Definition: obj.h:1056