yumapro  21.10T-9
YumaPro SDK
agt_restconf.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 - 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 #if defined(WITH_YANGAPI) || defined(WITH_RESTCONF) || defined(WITH_YCONTROL)
12 #ifndef _H_agt_restconf
13 #define _H_agt_restconf
14 /* FILE: agt_restconf.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 18-nov-13 abb Begun; split fromagt_yangapi.h
36 
37 
38 */
39 
40 #ifndef _H_status_enum
41 #include "status_enum.h"
42 #endif
43 
44 #ifndef _H_status
45 #include "status.h"
46 #endif
47 
48 #ifndef _H_agt_restcmn
49 #include "agt_restcmn.h"
50 #endif
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 
57 /********************************************************************
58 * *
59 * C O N S T A N T S *
60 * *
61 *********************************************************************/
62 
63 /********************************************************************
64 * *
65 * T Y P E S *
66 * *
67 *********************************************************************/
68 
69 /********************************************************************
70 * *
71 * F U N C T I O N S *
72 * *
73 *********************************************************************/
74 
75 
76 
99 extern status_t
101  yangapi_cb_t *rcb,
102  rpc_msg_t *msg,
103  boolean *errdone);
104 
105 
117 extern status_t
119  yangapi_cb_t *rcb,
120  rpc_msg_t *msg);
121 
122 
128 extern status_t
129  agt_restconf_init (void);
130 
131 
137 extern void
138  agt_restconf_cleanup (void);
139 
140 
148 extern boolean
150 
151 
162 extern boolean
164  boolean scb_is_static);
165 
166 
167 #if defined(WITH_GNMI) && defined(WITH_RESTCONF) && defined(WITH_YCONTROL)
168 
182 extern boolean
184 #endif // WITH_GNMI
185 
186 
192 extern agt_restconf_data_t *
194 
195 
201 extern val_value_t *
202  agt_restconf_get_root (void);
203 
204 
205 #ifdef STATIC_LINK
206 #ifdef WITH_RESTCONF
207 
214 extern status_t
216 
217 
225 extern status_t
227 
228 
236 extern void
238 
239 #endif // WITH_RESTCONF
240 #endif // STATIC_LINK
241 
242 
247 #ifdef __cplusplus
248 } /* end extern 'C' */
249 #endif
250 
251 #endif /* _H_agt_restconf */
252 #endif // WITH_RESTCONF || WITH_YANGPAI || WITH_YCONTROL
val_value_t * agt_restconf_get_root(void)
Get the RESTCONF Context root val_value_t node.
Definition: agt_restconf.c:2701
Restapi Control Block Used by RESTCONF to hold parse and request processing state.
Definition: yangapi.h:224
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
boolean agt_restconf_dispatch(ses_cb_t *scb)
Dispatch an incoming RESTCONF request.
Definition: agt_restconf.c:2023
boolean agt_restconf_dispatch_ex(ses_cb_t *scb, boolean scb_is_static)
Dispatch an incoming RESTCONF request (Extended)
Definition: agt_restconf.c:2045
status_t agt_restconf_static_restmon_init1(void)
Load the ietf-restconf-monitoring SIL even if it is statically linked.
Definition: agt_restconf.c:2727
agt_restconf_data_t * agt_restconf_get_context(void)
Get the RESTCONF Context structure.
Definition: agt_restconf.c:2685
status_t agt_restconf_setup_fields_nodes(ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, boolean *errdone)
Setup fields nodes if parameter is used.
Definition: agt_restconf.c:1440
void agt_restconf_static_restmon_cleanup(void)
Call the cleanup function for the ietf-restconf-monitoring module.
Definition: agt_restconf.c:2767
status_t agt_restconf_validate_method_params(ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg)
validate that the operation is supported for the URI parameters given.
Definition: agt_restconf.c:1632
RESTCONF structure for data.
Definition: agt_restcmn.h:184
one value to match one type
Definition: val.h:870
status_t agt_restconf_init(void)
Initialize the agt_restconf module.
Definition: agt_restconf.c:1974
boolean agt_restconf_dispatch_gnmi_get(ses_cb_t *scb)
Dispatch an incoming gNMI GET request with help of RESTCONF.
Definition: agt_restconf.c:2799
Session Control Block.
Definition: ses.h:542
status_t
global error return code
Definition: status_enum.h:186
Common function for RESTCONF and YANG-API protocols.
Global error messages for status code enumerations.
status_t agt_restconf_static_restmon_init2(void)
Call the ietf-restconf-monitoring init2 function.
Definition: agt_restconf.c:2747
void agt_restconf_cleanup(void)
Cleanup the agt_yangapi module.
Definition: agt_restconf.c:1999
global error status code enumerations