yumapro  23.10T-6
YumaPro SDK
Loading...
Searching...
No Matches
sil_sa_types.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_sil_sa_types
13#define _H_sil_sa_types
14
15/* FILE: sil_sa_types.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
34date init comment
35----------------------------------------------------------------------
3615-mar-14 abb Begun
37*/
38
39#include <xmlstring.h>
40
41#ifndef _H_agt
42#include "agt.h"
43#endif
44
45#ifndef _H_dlq
46#include "dlq.h"
47#endif
48
49#ifndef _H_ncxtypes
50#include "ncxtypes.h"
51#endif
52
53#ifndef _H_obj
54#include "obj.h"
55#endif
56
57#ifndef _H_rpc
58#include "rpc.h"
59#endif
60
61#ifndef _H_status_enum
62#include "status_enum.h"
63#endif
64
65#ifndef _H_val
66#include "val.h"
67#endif
68
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73
74
75
90/********************************************************************
91* *
92* C O N S T A N T S *
93* *
94*********************************************************************/
95
96
97/********************************************************************
98* *
99* T Y P E S *
100* *
101*********************************************************************/
102
104typedef enum sil_sa_state_t_ {
107
110
113
116
119
122
125
128
131
137
138
140typedef struct sil_sa_bundle_t_ {
142 dlq_hdr_t qhdr;
143
147 xmlChar *bundle_name;
148
156 dlq_hdr_t bundle_modQ;
157
162
164
165
167typedef struct sil_sa_cb_t_ {
170
173
176
179
182
184 boolean need_replay;
185
187 boolean init2_done;
188
190 uint32 msgid;
191
196
199
202
204 boolean is_validate;
205
208
211
213 dlq_hdr_t editQ; /* Q of sil_sa_edit_t */
214
216 struct sil_sa_edit_t_ *cur_edit;
217
220
222 const xmlChar *user_id;
223
225 const xmlChar *client_addr;
226
228 const xmlChar *target;
229
231 const xmlChar *txid_str;
232
238
241
243 const xmlChar *error_edit_str;
244
246 dlq_hdr_t bundleQ;
247
249 dlq_hdr_t library_parmQ;
250
252 dlq_hdr_t bundle_unloadQ;
253
256
260 dlq_hdr_t added_editQ;
261
264
270
273
280
286
292
294
295
300typedef struct sil_sa_child_edit_t_ {
302 dlq_hdr_t qhdr;
303
306
309
313
314
316typedef struct sil_sa_edit_t_ {
318 dlq_hdr_t qhdr;
319
322
325
327 const xmlChar *path;
328
331
334
337
340
342 boolean apply_done;
343
345 boolean hook_edit;
346
349
353 dlq_hdr_t child_editQ;
354
356
357
361typedef struct sil_sa_added_edit_t_ {
363 dlq_hdr_t qhdr;
364
366 const xmlChar *path;
367
370
372 const xmlChar *editop;
373
375 const xmlChar *where;
376
378 const xmlChar *point;
379
381 boolean skipcb;
382
386
387
388
392#ifdef __cplusplus
393} /* end extern 'C' */
394#endif
395
396#endif /* _H_sil_sa_types */
Multi-Protocol Network Management Server.
dlq provides general double-linked list and queue support:
agt_hook_type_t
Hook types enumeration to specify Hook type.
Definition: agt.h:786
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:210
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:724
sil_sa_state_t
SIL-SA state machine enumerations.
Definition: sil_sa_types.h:104
@ SIL_SA_ST_NONE
not set
Definition: sil_sa_types.h:106
@ SIL_SA_ST_ERROR
SIL-SA service in some error state.
Definition: sil_sa_types.h:115
@ SIL_SA_ST_WAIT_COMMIT
edit transaction in progress and is waiting for commit phase
Definition: sil_sa_types.h:130
@ SIL_SA_ST_WAIT_APPLY
edit transaction started and is waiting for apply phase
Definition: sil_sa_types.h:127
@ SIL_SA_ST_STOPPED
SIL-SA service is stopped.
Definition: sil_sa_types.h:112
@ SIL_SA_ST_WAIT_CONFIG
connection to server in progress, waiting for the configuration
Definition: sil_sa_types.h:118
@ SIL_SA_ST_START
SIL-SA serivice is starting up.
Definition: sil_sa_types.h:109
@ SIL_SA_ST_READY
SIL-SA is idle ready for requests.
Definition: sil_sa_types.h:124
@ SIL_SA_ST_WAIT_REGISTER
connection to server starting with register request
Definition: sil_sa_types.h:121
@ SIL_SA_ST_WAIT_HOOK_GETDATA
waiting for a Get-Data Hook response from the server, interrupting an edit transaction
Definition: sil_sa_types.h:135
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
NETCONF protocol remote procedure call common definitions.
global error status code enumerations
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1125
One YANG data-def-stmt.
Definition: obj.h:1184
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
Hook added edits that will be used in the hook-respose msg Saved from the sil_sa_hook_add_edit functi...
Definition: sil_sa_types.h:361
val_value_t * editval
edit value
Definition: sil_sa_types.h:369
dlq_hdr_t qhdr
queue header
Definition: sil_sa_types.h:363
obj_template_t * cbobj
callback object template
Definition: sil_sa_types.h:384
boolean skipcb
edit operation skip_cb parameter
Definition: sil_sa_types.h:381
const xmlChar * point
edit operation insert_point parameter
Definition: sil_sa_types.h:378
const xmlChar * path
path for the edit
Definition: sil_sa_types.h:366
const xmlChar * where
edit operation insert_where parameter
Definition: sil_sa_types.h:375
const xmlChar * editop
edit operation string
Definition: sil_sa_types.h:372
one bundle unload record in case <unload-bundle> called
Definition: sil_sa_types.h:140
dlq_hdr_t qhdr
queue header
Definition: sil_sa_types.h:142
dlq_hdr_t bundle_modQ
queue of cloned backptrs to the loaded modules assigned to this bundle.
Definition: sil_sa_types.h:156
boolean load_event_done
make sure the bundle-load-event is only sent once for this bundle
Definition: sil_sa_types.h:161
xmlChar * bundle_name
malloced copy of the bundle name This replaces the sil_sa_cb.bundle_nameQ
Definition: sil_sa_types.h:147
control block for the SIL-SA module
Definition: sil_sa_types.h:167
dlq_hdr_t added_editQ
Queue of Hook added edits that will be used in the hook-respose msg Q of sil_sa_added_edit_t.
Definition: sil_sa_types.h:260
boolean init2_done
init2 phase has been done.
Definition: sil_sa_types.h:187
obj_template_t * obj
<sil-sa> object within the /ycontrol/payload object
Definition: sil_sa_types.h:172
status_t error_edit_res
edit entry failure status
Definition: sil_sa_types.h:240
boolean sil_load_done
SIL-SA library load is done.
Definition: sil_sa_types.h:181
dlq_hdr_t editQ
parsed from start request msg
Definition: sil_sa_types.h:213
boolean skip_reverse_edit
keep track of a subsys already did the rollback phase so the cancel-transaction in commit phase cause...
Definition: sil_sa_types.h:279
const xmlChar * user_id
user-id backptr from the transaction
Definition: sil_sa_types.h:222
boolean is_hook_validate
Not the same as is_validate.
Definition: sil_sa_types.h:269
val_value_t * config_response
cached <config-response> message body; list of modules/bundles to load
Definition: sil_sa_types.h:195
struct sil_sa_edit_t_ * cur_edit
edit-id maintained during the callback
Definition: sil_sa_types.h:216
uint32 msgid
request msgid that is expected in the response
Definition: sil_sa_types.h:190
const xmlChar * client_addr
client address backptr from the transaction
Definition: sil_sa_types.h:225
dlq_hdr_t bundle_unloadQ
queue of sil_sa_bundle_t struct
Definition: sil_sa_types.h:252
ncx_transaction_id_t txid
transaction ID derived from start_request
Definition: sil_sa_types.h:201
uint32 get2_user_data_index
keep track of the GETCB_GET2_USER_DATA_INDEX value one per entire SIL-SA which may not be OK if multi...
Definition: sil_sa_types.h:291
val_value_t * keys_val
backptr to the <keys> container passed in an <action-request>
Definition: sil_sa_types.h:255
ncx_module_t * mod
yumaworks-sil-sa YANG module
Definition: sil_sa_types.h:169
dlq_hdr_t library_parmQ
queue of ncx_backptr to malloced string
Definition: sil_sa_types.h:249
uint32 error_edit_index
saved by the sil_call_edit_phase code if an error occurs with a specific edit.
Definition: sil_sa_types.h:237
const xmlChar * txid_str
transaction ID from the transaction
Definition: sil_sa_types.h:231
const xmlChar * error_edit_str
edit string for error
Definition: sil_sa_types.h:243
boolean need_replay
SIL-SA library needs to trigger a config replay from the server.
Definition: sil_sa_types.h:184
void * get2_user_data_ref
keep track of the GETCB_GET2_USER_DATA_REF value one per entire SIL-SA which may not be OK if multipl...
Definition: sil_sa_types.h:285
boolean is_reverse_edit
transaction is a reverse-edit during rollback
Definition: sil_sa_types.h:207
val_value_t * payload
cached <payload> element for use in request messages
Definition: sil_sa_types.h:175
dlq_hdr_t bundleQ
queue of ncx_backptr to ncx_module_t
Definition: sil_sa_types.h:246
rpc_msg_t * rpc_msg
dummy msg used for SIL-SA callback functions
Definition: sil_sa_types.h:219
val_value_t * hook_get_value
<hook-get-response> return value
Definition: sil_sa_types.h:272
boolean is_hook_load
SIL-SA Hook support.
Definition: sil_sa_types.h:263
boolean is_validate
transaction is a <validate> operation
Definition: sil_sa_types.h:204
const xmlChar * target
datastore target backptr from the transaction
Definition: sil_sa_types.h:228
boolean is_load_config
transaction is an internal <load-config>
Definition: sil_sa_types.h:210
val_value_t * start_request
cached <start-transaction> message body
Definition: sil_sa_types.h:198
sil_sa_state_t state
SIL-SA module state.
Definition: sil_sa_types.h:178
EDIT2 children Queue Supports EDIT2 callbacks where child edits for the same parent container or list...
Definition: sil_sa_types.h:300
op_editop_t editop
child edit operation
Definition: sil_sa_types.h:305
dlq_hdr_t qhdr
queue header
Definition: sil_sa_types.h:302
val_value_t * newval
child new value; backptr into start_request msg
Definition: sil_sa_types.h:308
val_value_t * curval
child current value; backptr into start_request msg
Definition: sil_sa_types.h:311
SIL-SA added edit data structure.
Definition: sil_sa_types.h:316
boolean hook_edit
this is a hook edit flag
Definition: sil_sa_types.h:345
agt_hook_type_t hook_type
hook type if a hook edit
Definition: sil_sa_types.h:348
op_editop_t editop
added edit operation
Definition: sil_sa_types.h:324
dlq_hdr_t qhdr
queue header
Definition: sil_sa_types.h:318
obj_template_t * cbobj
child object for callback; backptr to callback object
Definition: sil_sa_types.h:339
dlq_hdr_t child_editQ
Queue of EDIT2 children edits that will be used in the callback Q of sil_sa_child_edit_t.
Definition: sil_sa_types.h:353
val_value_t * newval
new value for edit; backptr into start_request msg
Definition: sil_sa_types.h:330
boolean apply_done
apply phase done
Definition: sil_sa_types.h:342
val_value_t * curval
current value for edit; backptr into start_request msg
Definition: sil_sa_types.h:333
val_value_t * keysval
keys value for edit; backptr into start_request msg
Definition: sil_sa_types.h:336
uint32 edit_index
key leaf for edit list
Definition: sil_sa_types.h:321
const xmlChar * path
path string for added edit
Definition: sil_sa_types.h:327
one value to match one type
Definition: val.h:911
Value Node Basic Support.