yumapro  24.10-2
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
152 const xmlChar *modname;
153
156
158 boolean isvalidate;
159
161 boolean isrunning;
162
164 const xmlChar *user_id;
165
167 const xmlChar *client_addr;
168
170 const xmlChar *target;
171
173 const xmlChar *txid_str;
174
178 xmlChar *instance_id;
179
182
183} YPACK agt_editcb_t;
184
185
197typedef status_t
198 (*agt_edit3_fn_t) (agt_editcb_t *editcb);
199
200
201
205/********************************************************************
206* *
207* F U N C T I O N S *
208* *
209*********************************************************************/
210
221extern val_value_t *
223 val_value_t *curval,
224 op_editop_t editop,
225 status_t *res);
226
227
233extern void
235
236
252extern agt_editcb_t *
254 rpc_msg_t *msg,
255 agt_cbtyp_t cbtyp,
256 op_editop_t editop,
257 val_value_t *newval,
258 val_value_t *curval);
259
260
261
262#ifdef __cplusplus
263} /* end extern 'C' */
264#endif
265
266#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:302
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:198
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:726
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:155
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:178
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:164
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:161
const xmlChar * client_addr
client address backptr from the transaction
Definition: agt_editcb.h:167
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
boolean silsa_editcb
Indicate that this is a SIL-SA editcb or not.
Definition: agt_editcb.h:181
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:152
const xmlChar * txid_str
transaction ID from the transaction
Definition: agt_editcb.h:173
boolean isvalidate
Transaction is a <validate> operation.
Definition: agt_editcb.h:158
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:170
One YANG data-def-stmt.
Definition: obj.h:1229
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:912
Value Node Basic Support.
XML Utilities.