yumapro  20.10-12
YumaPro SDK
agt_get2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2021, 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_agt_get2
12 #define _H_agt_get2
13 
14 /* FILE: agt_get2.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
27 /*********************************************************************
28 * *
29 * C H A N G E H I S T O R Y *
30 * *
31 *********************************************************************
32 
33 date init comment
34 ----------------------------------------------------------------------
35 19-jan-15 abb Begun
36 */
37 
38 #ifndef _H_getcb
39 #include "getcb.h"
40 #endif
41 
42 #ifndef _H_ses
43 #include "ses.h"
44 #endif
45 
46 #ifndef _H_status_enum
47 #include "status_enum.h"
48 #endif
49 
50 #ifndef _H_xml_msg
51 #include "xml_msg.h"
52 #endif
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 /********************************************************************
59 * *
60 * C O N S T A N T S *
61 * *
62 *********************************************************************/
63 
64 
65 /********************************************************************
66 * *
67 * T Y P E S *
68 * *
69 *********************************************************************/
70 
71 
72 /********************************************************************
73 * *
74 * F U N C T I O N S *
75 * *
76 *********************************************************************/
77 
78 
96 extern status_t
97  agt_get2_init (void);
98 
99 
105 extern status_t
106  agt_get2_init2 (void);
107 
108 
114 extern void
115  agt_get2_cleanup (void);
116 
117 
137 extern status_t
138  agt_get2_wrapper (ses_cb_t *scb,
139  xml_msg_hdr_t *msg,
140  getcb_get2_t *get2cb);
141 
142 
146 #ifdef __cplusplus
147 } /* end extern 'C' */
148 #endif
149 
150 #endif /* _H_agt_get2 */
ncx_str.h
NCX Module Library String Utility Functions.
ses.h
NETCONF Session Common definitions module.
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
agt_cap.h
NETCONF Server capabilities handler.
dlq_block_enque
void dlq_block_enque(dlq_hdrT *srcP, dlq_hdrT *dstP)
add all the queue entries in the srcP queue list to the end of the dstP queue list
Definition: dlq.c:731
agt_util.h
Utility Functions for NCX Server method routines.
agt_sil_walk_get_results
void agt_sil_walk_get_results(const xmlChar *txid_str, agt_sil_get_walker_fn_t get_walker_fn)
Walk the GET2 results.
Definition: agt_sil.c:9015
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
agt_acm_extern.h
NETCONF Server Access Control handler for external data model.
obj_is_terminal
boolean obj_is_terminal(const obj_template_t *obj)
Check if object is a proper leaf or leaflist or anyxml.
Definition: obj.c:13493
getcb_replace_response_get2cb
status_t getcb_replace_response_get2cb(getcb_get2_t *response_get2cb, getcb_get2_t *get2cb, boolean replace_mode)
Move the return fields from the return get2cb to the target get2cb Can clean out old data first.
Definition: getcb.c:7418
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
agt_ncxserver_run_ycontrol
status_t agt_ncxserver_run_ycontrol(boolean ycontrol, const xmlChar *txid_str)
IO server loop for the ncxserver socket.
Definition: agt_ncxserver.c:3469
getcb.h
GET1 and GET2 Callback Support.
status_enum.h
global error status code enumerations
agt_get2_wrapper
status_t agt_get2_wrapper(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 WRAPPER.
Definition: agt_get2.c:648
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.
agt_ncxserver.h
NCX Server Transport and IO Library.
val_compare
int32 val_compare(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:9456
ERR_NCX_NO_INSTANCE
@ ERR_NCX_NO_INSTANCE
1009
Definition: status_enum.h:498
ncxconst.h
Contains NCX constants.
ncxmod.h
NCX Module Load Manager.
AGT_TX_TYPE_GET
@ AGT_TX_TYPE_GET
GET2 transaction.
Definition: agt.h:665
agt_cb.h
NETCONF Server Data Model callback handler.
obj_is_list
boolean obj_is_list(const obj_template_t *obj)
Check if object is a YANG list.
Definition: obj.c:13349
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
agt_val.h
NETCONF Server database callback handler.
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
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
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
agt_sil.h
SIL Transaction APIs.
getcb_move_response_get2cb
status_t getcb_move_response_get2cb(getcb_get2_t *response_get2cb, getcb_get2_t *get2cb)
Move the return fields from the return get2cb to the target get2cb.
Definition: getcb.c:7395
getcb_add_return_get2cb
void getcb_add_return_get2cb(getcb_get2_t *get2cb, getcb_get2_t *return_get2cb)
Add a return get2cb to a get2cb responseQ Used for get-bulk support.
Definition: getcb.c:7373
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
agt_get2_init
status_t agt_get2_init(void)
Initialize the Get2 module.
Definition: agt_get2.c:558
ERR_INTERNAL_INIT_SEQ
@ ERR_INTERNAL_INIT_SEQ
007
Definition: status_enum.h:197
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
agt_sil_start_get_transaction
status_t agt_sil_start_get_transaction(ses_cb_t *client_scb, getcb_get2_t *get2cb, xml_msg_hdr_t *msg, const xmlChar **txid_str)
Start a GET2 transaction.
Definition: agt_sil.c:8753
getcb_free_get2cb
void getcb_free_get2cb(getcb_get2_t *get2cb)
Clean and free a malloced GET2 control block.
Definition: getcb.c:5694
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.
dlq_count
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:994
yangconst.h
Contains YANG constants separated to prevent H file include loops.
agt.h
Multi-Protocol Network Management Server.
val_merge_return_vals
void val_merge_return_vals(dlq_hdr_t *srcQ, dlq_hdr_t *dstQ)
Merge return values into a dest Q Remove duplicates.
Definition: val_util.c:7781
xml_msg.h
XML and JSON Message send and receive support.
obj_is_container
boolean obj_is_container(const obj_template_t *obj)
Check if object is a YANG container.
Definition: obj.c:13405
ses_dropped
boolean ses_dropped(const ses_cb_t *scb)
Check if the session has been dropped by the client.
Definition: ses.c:4860
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
getcb_is_get_exact
boolean getcb_is_get_exact(getcb_get2_t *get2cb)
Check if the getcb represents a response that is for a get-exact or a getnext.
Definition: getcb.c:8812
agt_get2.h
2nd generation GET support
agt_get2_cleanup
void agt_get2_cleanup(void)
Cleanup the Get2 module.
Definition: agt_get2.c:608
obj_is_choice
boolean obj_is_choice(const obj_template_t *obj)
Check if object is a YANG choice.
Definition: obj.c:13425
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
log.h
NCX System Logging Manager.
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
agt_cfg.h
Manage Server configuration edit transactions.
agt_acm.h
NETCONF Server Access Control Entry Points.
thd.h
Thread support (for now limited to netconfd)
ncx.h
YANG module utility functions.
agt_get2_init2
status_t agt_get2_init2(void)
Initialize the Get2 module (phase II init)
Definition: agt_get2.c:580
agt_ycontrol.h
Handle the YumaPro Control Protocol <ycontrol> (top-level) element.
obj_key_count
uint32 obj_key_count(const obj_template_t *obj)
Get the number of keys for this object.
Definition: obj.c:9637
getcb_clean_responseQ
void getcb_clean_responseQ(getcb_get2_t *get2cb)
Clean the response Q within a get2cb.
Definition: getcb.c:8852
agt_sil_get_exit_mode
status_t agt_sil_get_exit_mode(const xmlChar *txid_str, agt_tx_type_t tx_type, val_value_t **error_val, xmlChar **error_path)
Get the transaction exit code.
Definition: agt_sil.c:9575
ERR_NCX_SESSION_DROPPED
@ ERR_NCX_SESSION_DROPPED
400
Definition: status_enum.h:443
getcb_response_val_to_get2cb
getcb_get2_t * getcb_response_val_to_get2cb(val_value_t *response_val, boolean preserve_data, status_t *res)
Convert a <get-response> value to a get2cb struct.
Definition: getcb.c:7238
agt_sil_end_get_transaction
void agt_sil_end_get_transaction(const xmlChar *txid_str)
End a GET2 transaction.
Definition: agt_sil.c:9188
status.h
Global error messages for status code enumerations.
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297