yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
agt_editcb.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 2024, 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_editcb
12#define _H_agt_editcb
13
14/* FILE: agt_editcb.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
33date init comment
34----------------------------------------------------------------------
3520-feb-24 am Begun
36
37*/
38
39#include "agt_cfg.h"
40
41#ifndef _H_agt_rpc
42#include "agt_rpc.h"
43#endif
44
45#ifndef _H_rpc
46#include "rpc.h"
47#endif
48
49#ifndef _H_ses
50#include "ses.h"
51#endif
52
53#ifndef _H_status_enum
54#include "status_enum.h"
55#endif
56
57#ifndef _H_val
58#include "val.h"
59#endif
60
61#ifndef _H_xml_util
62#include "xml_util.h"
63#endif
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69
70/********************************************************************
71* *
72* T Y P E S *
73* *
74*********************************************************************/
75
76
100typedef struct agt_editcb_t_ {
101
105
109
113
121
133
139
145
150
153 const xmlChar *modname;
154
157
159 boolean isvalidate;
160
162 boolean isrunning;
163
165 const xmlChar *user_id;
166
168 const xmlChar *client_addr;
169
171 const xmlChar *target;
172
174 const xmlChar *txid_str;
175
179 xmlChar *instance_id;
180
181} YPACK agt_editcb_t;
182
183
195typedef status_t
196 (*agt_edit3_fn_t) (agt_editcb_t *editcb);
197
198
199
203/********************************************************************
204* *
205* F U N C T I O N S *
206* *
207*********************************************************************/
208
219extern val_value_t *
221 val_value_t *curval,
222 op_editop_t editop,
223 status_t *res);
224
225
231extern void
233
234
250extern agt_editcb_t *
252 rpc_msg_t *msg,
253 agt_cbtyp_t cbtyp,
254 op_editop_t editop,
255 val_value_t *newval,
256 val_value_t *curval);
257
258
259
260#ifdef __cplusplus
261} /* end extern 'C' */
262#endif
263
264#endif /* _H_agt_editcb */
Manage Server configuration edit transactions.
agt_editcb_t * agt_editcb_make_new_cb(ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval)
Create Edit Control Block for the EDIT3 callback.
Definition: agt_editcb.c:299
val_value_t * agt_editcb_make_update_value(val_value_t *newval, val_value_t *curval, op_editop_t editop, status_t *res)
make a combine value of newval and curval
Definition: agt_editcb.c:188
void agt_editcb_free_cb(agt_editcb_t *editcb)
Clean and free an agt_editcb_t.
Definition: agt_editcb.c:262
NETCONF protocol remote procedure call server-side definitions.
status_t(* agt_edit3_fn_t)(agt_editcb_t *editcb)
EDIT3 Callback function for server object handler.
Definition: agt_editcb.h:196
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:711
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:210
NETCONF protocol remote procedure call common definitions.
NETCONF Session Common definitions module.
global error status code enumerations
Transaction Control Block.
Definition: agt_cfg.h:235
EDIT Control Block used to store all the pointers for the EDIT3 callbacks.
Definition: agt_editcb.h:100
obj_template_t * obj
Object of a a current node in the callback.
Definition: agt_editcb.h:156
val_value_t * update
Update value contains all new values and the current values from the datastore.
Definition: agt_editcb.h:149
xmlChar * instance_id
instance-identifier path string for target object with all the keys
Definition: agt_editcb.h:179
agt_cbtyp_t cbtyp
Callback type - reason for the callback.
Definition: agt_editcb.h:120
const xmlChar * user_id
user-id backptr from the transaction
Definition: agt_editcb.h:165
op_editop_t editop
Callback editop - the parent edit-config operation type, which is also used for all other callbacks t...
Definition: agt_editcb.h:132
boolean isrunning
TRUE if this Transaction is for the the running datastore
Definition: agt_editcb.h:162
const xmlChar * client_addr
client address backptr from the transaction
Definition: agt_editcb.h:168
ses_cb_t * scb
Session control block making the request.
Definition: agt_editcb.h:104
val_value_t * newval
Container object holding the proposed changes to apply to the current config, depending on the editop...
Definition: agt_editcb.h:138
agt_cfg_transaction_t * txcb
Transaction control block in progress.
Definition: agt_editcb.h:112
val_value_t * curval
Current container values from the <running> or <candidate> configuration, if any.
Definition: agt_editcb.h:144
const xmlChar * modname
Name of a module the current callback is invoked for:
Definition: agt_editcb.h:153
const xmlChar * txid_str
transaction ID from the transaction
Definition: agt_editcb.h:174
boolean isvalidate
Transaction is a <validate> operation.
Definition: agt_editcb.h:159
rpc_msg_t * msg
Incoming rpc_msg_t in progress.
Definition: agt_editcb.h:108
const xmlChar * target
datastore target backptr from the transaction
Definition: agt_editcb.h:171
One YANG data-def-stmt.
Definition: obj.h:1209
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:911
Value Node Basic Support.
XML Utilities.