yumapro  20.10-12
YumaPro SDK
agt_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_agt_val_parse
13 #define _H_agt_val_parse
14 
15 /* FILE: agt_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 11-feb-06 abb Begun
37 06-aug-08 abb Rewrite for OBJ/VAL only model in YANG
38  Remove app, parmset, and parm from database model
39 */
40 
41 #ifndef _H_rpc
42 #include "rpc.h"
43 #endif
44 
45 #ifndef _H_ses
46 #include "ses.h"
47 #endif
48 
49 #ifndef _H_status
50 #include "status.h"
51 #endif
52 
53 #ifndef _H_typ
54 #include "typ.h"
55 #endif
56 
57 #ifndef _H_xml_util
58 #include "xml_util.h"
59 #endif
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
65 
66 #ifdef DEBUG
67 //#define DEBUG_PARSE_TEST 1
68 #endif
69 
70 
71 /********************************************************************
72 * *
73 * F U N C T I O N S *
74 * *
75 *********************************************************************/
76 
77 
78 /* header defined in agt_top.h */
79 
122 extern status_t
123  agt_val_parse_nc (ses_cb_t *scb,
124  xml_msg_hdr_t *msg,
125  obj_template_t *obj,
126  const xml_node_t *startnode,
127  ncx_data_class_t parentdc,
128  val_value_t *retval);
129 
130 
131 #ifdef DEBUG_PARSE_TEST
132 
137 extern void
138  agt_val_parse_test (const char *testfile);
139 #endif // DEBUG_PARSE_TEST
140 
141 
145 #ifdef __cplusplus
146 } /* end extern 'C' */
147 #endif
148 
149 #endif /* _H_agt_val_parse */
ses.h
NETCONF Session Common definitions module.
agt_ses.h
Server Session Management.
agt_util.h
Utility Functions for NCX Server method routines.
val.h
Value Node Basic Support.
xml_util.h
XML Utilities.
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.
typ_userdef.h
User Defined Types.
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
xml_get_reader_from_filespec
status_t xml_get_reader_from_filespec(const char *filespec, xmlTextReaderPtr *reader)
Get a new xmlTextReader for parsing a debug test file.
Definition: xml_util.c:341
agt_record_error
void agt_record_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:1942
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
agt_record_attr_error
void agt_record_attr_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_attr_t *xmlattr, const xml_node_t *xmlnode, const xmlChar *badns, ncx_node_t nodetyp, void *errnode)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:2162
val_util.h
Value Node Utilities.
rpc.h
NETCONF protocol remote procedure call common definitions.
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
val_child.h
Value Node Child Access Support.
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
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
xml_parse.h
XML Parser functions.
agt.h
Multi-Protocol Network Management Server.
agt_val_parse_nc
status_t agt_val_parse_nc(ses_cb_t *scb, xml_msg_hdr_t *msg, obj_template_t *obj, const xml_node_t *startnode, ncx_data_class_t parentdc, val_value_t *retval)
Parse NETCONF PDU sub-contents into value fields.
Definition: agt_val_parse.c:118
agt_val_parse.h
XML Parameter Value Parser Module.
log.h
NCX System Logging Manager.
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
agt_top_dispatch_msg
boolean agt_top_dispatch_msg(ses_cb_t **ppscb)
Find the appropriate top node handler and call it.
Definition: agt_top.c:108
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.h
YANG module utility functions.
obj.h
Data Object Support.
xml_parse_btype_nc
status_t xml_parse_btype_nc(ses_cb_t *scb, xml_msg_hdr_t *msg, obj_template_t *obj, const xml_node_t *startnode, ncx_data_class_t parentdc, val_value_t *retval)
Parse the XML node.
Definition: xml_parse.c:4051
agt_ses_new_dummy_session
ses_cb_t * agt_ses_new_dummy_session(void)
Create a dummy session control block.
Definition: agt_ses.c:535
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
agt_record_error_errinfo
void agt_record_error_errinfo(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path, const ncx_errinfo_t *errinfo)
Generate an rpc_err_rec_t and save it in the msg Use provided error fields.
Definition: agt_util.c:2051
xmlns.h
XML namespace support.
status.h
Global error messages for status code enumerations.
agt_ses_free_dummy_session
void agt_ses_free_dummy_session(ses_cb_t *scb)
Free a dummy session control block.
Definition: agt_ses.c:641
dlq.h
dlq provides general double-linked list and queue support:
agt_top.h
NETCONF Server Top Element module. Manage callback registry for received XML messages.
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297