yumapro  20.10-12
YumaPro SDK
agt_val_silcall.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_agt_val_silcall
13 #define _H_agt_val_silcall
14 
15 /* FILE: agt_val_silcall.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
29 /*********************************************************************
30 * *
31 * C H A N G E H I S T O R Y *
32 * *
33 *********************************************************************
34 
35 date init comment
36 ----------------------------------------------------------------------
37 19-dec-15 abb Begun; split from agt_val.c
38 */
39 
40 #ifndef _H_agt_cfg
41 #include "agt_cfg.h"
42 #endif
43 
44 #ifndef _H_cfg
45 #include "cfg.h"
46 #endif
47 
48 #ifndef _H_rpc
49 #include "rpc.h"
50 #endif
51 
52 #ifndef _H_ses
53 #include "ses.h"
54 #endif
55 
56 #ifndef _H_status_enum
57 #include "status_enum.h"
58 #endif
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 /********************************************************************
65 * *
66 * C O N S T A N T S *
67 * *
68 *********************************************************************/
69 
70 /********************************************************************
71 * *
72 * T Y P E S *
73 * *
74 *********************************************************************/
75 
76 /********************************************************************
77 * *
78 * F U N C T I O N S *
79 * *
80 *********************************************************************/
81 
82 
109 extern status_t
111  rpc_msg_t *msg,
112  cfg_template_t *target,
113  op_editop_t editop);
114 
115 
127 extern status_t
128  agt_val_silcall_call_sil_callbacks (agt_cbtyp_t cbtyp,
129  ses_cb_t *scb,
130  rpc_msg_t *msg,
131  cfg_template_t *target,
132  op_editop_t editop);
133 
134 
144 extern boolean
145  agt_val_silcall_has_subsys_callbacks (agt_cfg_transaction_t *txcb);
146 
147 
170 extern status_t
171  agt_val_silcall_setup (agt_cbtyp_t cbtyp,
172  op_editop_t editop,
173  ses_cb_t *scb,
174  rpc_msg_t *msg,
175  val_value_t *newnode,
176  val_value_t *curnode,
177  boolean lookparent,
178  boolean indelete,
179  boolean in_reverse_delete,
180  agt_cfg_undo_rec_t *undo);
181 
182 
215 extern status_t
216  agt_val_silcall_setup_ex (agt_cbtyp_t cbtyp,
217  op_editop_t editop,
218  ses_cb_t *scb,
219  rpc_msg_t *msg,
220  val_value_t *newnode,
221  val_value_t *curnode,
222  boolean lookparent,
223  boolean indelete,
224  boolean in_reverse_delete,
225  agt_cfg_undo_rec_t *undo,
226  agt_cfg_transaction_t *txcb);
227 
228 
245 extern status_t
246  agt_val_silcall_reverse_edit (agt_cfg_undo_rec_t *undo,
247  ses_cb_t *scb,
248  rpc_msg_t *msg,
249  op_editop_t editop,
250  val_value_t *newval,
251  val_value_t *curval,
252  boolean lookparent,
253  boolean indelete,
254  agt_cfg_edit_action_t edit_action);
255 
256 
268 extern status_t
269  agt_val_silcall_invoke_raw (ses_cb_t *scb,
270  rpc_msg_t *msg,
271  agt_cbtyp_t cbtyp,
272  op_editop_t editop,
273  val_value_t *newval,
274  val_value_t *curval);
275 
276 
277 #ifdef WITH_YCONTROL
278 
292 extern status_t
294  (agt_cfg_transaction_t *txcb,
295  ses_cb_t *scb,
296  rpc_msg_t *msg,
297  agt_cbtyp_t cbtyp,
298  boolean is_reverse_edit);
299 #endif // WITH_YCONTROL
300 
301 
317 extern status_t
318  agt_val_silcall_invoke (agt_cbtyp_t cbtyp,
319  ses_cb_t *scb,
320  rpc_msg_t *msg,
321  agt_cfg_undo_rec_t *undo);
322 
323 
367 extern boolean
368  agt_val_silcall_is_deepest (rpc_msg_t *msg);
369 
370 
412 extern boolean
413  agt_val_silcall_deepest_and_last (agt_cfg_nested_silcall_t *silcall);
414 
415 
426 extern status_t
427  agt_val_silcall_check_order_hook (agt_cfg_transaction_t *txcb,
428  op_editop_t editop,
429  val_value_t *newnode,
430  val_value_t *curnode);
431 
432 
433 
437 #ifdef __cplusplus
438 } /* end extern 'C' */
439 #endif
440 
441 #endif /* _H_agt_val_unload */
NCX_AGT_TARG_RUNNING
@ NCX_AGT_TARG_RUNNING
target=running
Definition: ncxtypes.h:355
AGT_HOOK_TYPE_SETHOOK
@ AGT_HOOK_TYPE_SETHOOK
Set-Hook.
Definition: agt.h:712
ses.h
NETCONF Session Common definitions module.
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
agt_val_delete_def_dead_nodes
status_t agt_val_delete_def_dead_nodes(ses_cb_t *scb, xml_msg_hdr_t *msghdr, val_value_t *startval, val_value_t *curval, val_value_t *root)
Delete all the default nodes that have false when-stmt exprs.
Definition: agt_val.c:15427
NCX_NT_STRING
@ NCX_NT_STRING
xmlChar *, error only
Definition: ncxtypes.h:279
ncx_get_sethook_registered
boolean ncx_get_sethook_registered(void)
Check if the Set-Hook callbacks were registered.
Definition: ncx.c:14646
agt_cap.h
NETCONF Server capabilities handler.
ERR_NCX_TIMEOUT
@ ERR_NCX_TIMEOUT
368
Definition: status_enum.h:411
cfg.h
agt_cfg_next_trans_hook
agt_cfg_trans_hook_t * agt_cfg_next_trans_hook(agt_cfg_trans_hook_t *cur_hook)
Get the next Transaction Hook callback.
Definition: agt_cfg.c:3451
agt_cfg_add_silcall
status_t agt_cfg_add_silcall(agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval, dlq_hdr_t *subsysQ, val_value_t *callval)
Create and fill in a remote SIL callback back pointer Add it to the transaction control block silcall...
Definition: agt_cfg.c:2021
OP_EDITOP_CREATE
@ OP_EDITOP_CREATE
edit op is create
Definition: op.h:126
agt_util.h
Utility Functions for NCX Server method routines.
OP_EDITOP_REPLACE
@ OP_EDITOP_REPLACE
edit op is replace
Definition: op.h:125
tstamp.h
Timestamp utilities.
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
agt_val_silcall_invoke
status_t agt_val_silcall_invoke(agt_cbtyp_t cbtyp, ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_undo_rec_t *undo)
Invoke the callbacks recorded in an undo record.
Definition: agt_val_silcall.c:3486
agt_val_check_in_reverse_delete
boolean agt_val_check_in_reverse_delete(val_value_t *useval, agt_cfg_undo_rec_t *undo)
Check if currently in reverse deletes.
Definition: agt_val.c:15360
plock.h
RFC 57517 partial lock support.
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
agt_cfg_dump_undo
void agt_cfg_dump_undo(agt_cfg_undo_rec_t *undo)
Debug log a description of the undo record.
Definition: agt_cfg.c:2742
agt_cfg_first_active_undo
agt_cfg_undo_rec_t * agt_cfg_first_active_undo(agt_cfg_transaction_t *txcb)
Get the first active undo record.
Definition: agt_cfg.c:3578
val.h
Value Node Basic Support.
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
agt_cfg_first_child_undo
agt_cfg_undo_rec_t * agt_cfg_first_child_undo(agt_cfg_undo_rec_t *undo)
Get the first child undo record for EDIT2 mode.
Definition: agt_cfg.c:2925
status_enum.h
global error status code enumerations
obj_in_edit2_mode
boolean obj_in_edit2_mode(obj_template_t *obj)
Check if the object is an edit2 container or list or terminal node child in an edit2 container or lis...
Definition: obj.c:17260
AGT_CB_HAS_REMOTE_TXHOOK
#define AGT_CB_HAS_REMOTE_TXHOOK(C)
check subsystem has a remote transaction-hook
Definition: agt_cb.h:172
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_cfg_first_trans_hook
agt_cfg_trans_hook_t * agt_cfg_first_trans_hook(agt_cfg_transaction_t *txcb)
Get the first transaction hook record.
Definition: agt_cfg.c:3431
val_get_mod_name
const xmlChar * val_get_mod_name(const val_value_t *val)
Get the module name associated with this value node.
Definition: val.c:12223
agt_sil_continue_transaction
status_t agt_sil_continue_transaction(const xmlChar *txid_str, agt_cbtyp_t cur_phase)
Continue a transaction to apply or commit phase.
Definition: agt_sil.c:8199
agt_ncxserver.h
NCX Server Transport and IO Library.
obj_is_key
boolean obj_is_key(const obj_template_t *obj)
Check if object is being used as a key leaf within a list.
Definition: obj.c:14278
dlq_lastEntry
#define dlq_lastEntry(listP)
get the last entry in the queue list
Definition: dlq.h:352
AGT_CB_FL_TRANSHOOK_TREE
#define AGT_CB_FL_TRANSHOOK_TREE
transaction hook tree
Definition: agt_cb.h:118
op.h
NETCONF protocol operations.
VAL_NAME
#define VAL_NAME(V)
Access the value name.
Definition: val.h:399
ncxconst.h
Contains NCX constants.
val_unique.h
unique-stmt tests for val_value_t node
dlq_reverse_que
void dlq_reverse_que(dlq_hdr_t *que)
Reverse the order of all the entries in a Q.
Definition: dlq.c:1070
agt_cfg_next_child_undo
agt_cfg_undo_rec_t * agt_cfg_next_child_undo(agt_cfg_undo_rec_t *cur_undo)
Get the next child undo record.
Definition: agt_cfg.c:2944
agt_val_silcall_handle_remote_transaction
status_t agt_val_silcall_handle_remote_transaction(agt_cfg_transaction_t *txcb, ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, boolean is_reverse_edit)
Start a distributed transaction with the agt_sil module This function will not return until the entir...
Definition: agt_val_silcall.c:3299
agt_sil_walk_shook_results
status_t agt_sil_walk_shook_results(ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_transaction_t *txcb, const xmlChar *txid_str, agt_sil_shook_walker_fn_t shook_walker_fn)
Walk the Set Hook results.
Definition: agt_sil.c:9124
agt_cfg_find_duplicate_silcall
boolean agt_cfg_find_duplicate_silcall(agt_cfg_transaction_t *txcb, val_value_t *newnode, val_value_t *curnode)
Check if there is already the same callback in the nested silcall.
Definition: agt_cfg.c:3265
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
agt_sil_continue_start_transaction
status_t agt_sil_continue_start_transaction(const xmlChar *txid_str, const xmlChar *user_id, const xmlChar *client_addr, const xmlChar *target, boolean is_replay, dlq_hdr_t *editQ)
Continue already existed Start Transaction.
Definition: agt_sil.c:7984
OP_EDITOP_MERGE
@ OP_EDITOP_MERGE
edit op is merge
Definition: op.h:124
agt_record_error
void agt_record_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:1942
agt_cbtype_name
const xmlChar * agt_cbtype_name(agt_cbtyp_t cbtyp)
Get the string for the server callback phase.
Definition: agt.c:4247
log_debug2
void void void void void void void void void log_debug2(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG2 log entry.
agt_val.h
NETCONF Server database callback handler.
xpath1.h
XPath 1.0 expression support.
obj_is_leafy
boolean obj_is_leafy(const obj_template_t *obj)
Check if object is a proper leaf or leaflist.
Definition: obj.c:13478
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xpath.h
Schema and data model Xpath search support.
ERR_NCX_SESSION_CLOSED
@ ERR_NCX_SESSION_CLOSED
1010
Definition: status_enum.h:499
AGT_CB_HAS_REMOTE_SHOOK
#define AGT_CB_HAS_REMOTE_SHOOK(C)
check subsystem has a remote set-hook
Definition: agt_cb.h:169
agt_cvt_editop
op_editop_t agt_cvt_editop(op_editop_t editop, const val_value_t *newval, const val_value_t *curval)
Determine the effective edit (if OP_EDITOP_COMMIT)
Definition: agt_util.c:6205
SES_MY_USERNAME
#define SES_MY_USERNAME(S)
get username
Definition: ses.h:111
xml_val.h
Utility functions for creating value structs.
AGT_HOOK_TYPE_TRANSACTION
@ AGT_HOOK_TYPE_TRANSACTION
Transaction Hook.
Definition: agt.h:713
agt_cfg_add_hook_silcall
status_t agt_cfg_add_hook_silcall(agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval, dlq_hdr_t *subsysQ, val_value_t *callval, agt_hook_type_t hook_type)
Create and fill in a remote Hook SIL callback back pointer Add it to the transaction control block si...
Definition: agt_cfg.c:1927
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
agt_ncx.h
NETCONF Server standard method routines.
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
agt_sil.h
SIL Transaction APIs.
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
OP_EDITOP_DELETE
@ OP_EDITOP_DELETE
edit op is delete
Definition: op.h:127
AGT_CFG_IS_TOP_REPLACE
#define AGT_CFG_IS_TOP_REPLACE(C)
check the top replace mode
Definition: agt_cfg.h:153
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
agt_cfg_use_child_undo
boolean agt_cfg_use_child_undo(agt_cfg_undo_rec_t *undo, agt_cfg_undo_rec_t *child_undo)
Check if the child edit node should be invoked.
Definition: agt_cfg.c:2811
agt_cfg_add_edit2_silcall
status_t agt_cfg_add_edit2_silcall(agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval, dlq_hdr_t *subsysQ, val_value_t *callval)
Create and fill in a remote SIL callback back pointer.
Definition: agt_cfg.c:2113
AGT_TX_TYPE_EDIT
@ AGT_TX_TYPE_EDIT
EDIT1 or EDIT2 transaction.
Definition: agt.h:666
val_util.h
Value Node Utilities.
agt_cfg_prev_active_undo
agt_cfg_undo_rec_t * agt_cfg_prev_active_undo(agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *cur_undo)
Get the prev active undo record.
Definition: agt_cfg.c:3690
NCX_CFGID_CANDIDATE
@ NCX_CFGID_CANDIDATE
candidate datastore
Definition: ncxtypes.h:385
obj_is_sil_force_replace_replay
boolean obj_is_sil_force_replace_replay(const obj_template_t *obj)
Check if this object has the OBJ_FL_SIL_FORCE_REPLACE_REPLAY bit set.
Definition: obj.c:16963
AGT_CB_VALIDATE
@ AGT_CB_VALIDATE
P1: write operation validate.
Definition: agt.h:620
agt_val_silcall_invoke_raw
status_t agt_val_silcall_invoke_raw(ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval)
Call a SIL callback directly; used in rollback.
Definition: agt_val_silcall.c:3238
rpc.h
NETCONF protocol remote procedure call common definitions.
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
agt_sil_end_transaction
void agt_sil_end_transaction(const xmlChar *txid_str)
End a transaction.
Definition: agt_sil.c:8322
AGT_CFG_GET_SKIP_SIL_PARTIAL
#define AGT_CFG_GET_SKIP_SIL_PARTIAL(C)
check the skip SIL partial callback flag
Definition: agt_cfg.h:124
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
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.
typ.h
Parameter Type Handler.
NCX_CFGID_RUNNING
@ NCX_CFGID_RUNNING
running datastore (no value for not set!)
Definition: ncxtypes.h:384
yangconst.h
Contains YANG constants separated to prevent H file include loops.
dlq_prevEntry
#define dlq_prevEntry(nodeP)
get the previous queue entry before the current entry
Definition: dlq.h:280
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
agt.h
Multi-Protocol Network Management Server.
agt_val_add_edit_max
status_t agt_val_add_edit_max(ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_transaction_t *txcb, const xmlChar *defpath, val_value_t *edit_value, const xmlChar *edit_operation, const xmlChar *insert_where, const xmlChar *insert_point, boolean skip_cb)
Create a new edit based on edit_value.
Definition: agt_val.c:15185
OP_EDITOP_DELETE_ALL
@ OP_EDITOP_DELETE_ALL
delete-all, yumapro only
Definition: op.h:131
op_editop_name
const xmlChar * op_editop_name(op_editop_t ed_id)
Get the keyword for the specified op_editop_t enumeration.
Definition: op.c:106
xpath_yang.h
YANG-specific Xpath support.
AGT_CFG_GET_CUR_SILCALL
#define AGT_CFG_GET_CUR_SILCALL(C)
get the current SIL callback
Definition: agt_cfg.h:147
val_first_child_match_fast
val_value_t * val_first_child_match_fast(const val_value_t *parent, const val_value_t *child, val_value_t *lastmatch)
Get the first instance of the corresponding child node Object pointers must be from the same tree!...
Definition: val.c:8388
agt_cfg_new_undorec
agt_cfg_undo_rec_t * agt_cfg_new_undorec(void)
Malloc and initialize a new agt_cfg_undo_rec_t struct.
Definition: agt_cfg.c:1501
agt_val_silcall.h
NETCONF Server database callback handler. SIL callback code.
agt_cfg_free_undorec
void agt_cfg_free_undorec(agt_cfg_undo_rec_t *undo)
Free all the memory used by the specified agt_cfg_undo_rec_t.
Definition: agt_cfg.c:1558
obj_get_mod_name
const xmlChar * obj_get_mod_name(const obj_template_t *obj)
Get the module name for this object.
Definition: obj.c:12176
EMPTY_STRING
#define EMPTY_STRING
empty string used to get const xmlChar * cast
Definition: ncxconst.h:289
AGT_CFG_GET_SKIP_SIL
#define AGT_CFG_GET_SKIP_SIL(C)
check the skip SIL callback flag
Definition: agt_cfg.h:118
AGT_CB_FL_SKIP_SETHOOK
#define AGT_CB_FL_SKIP_SETHOOK
skip set-hook
Definition: agt_cb.h:119
val_get_next_child
val_value_t * val_get_next_child(const val_value_t *curchild)
Get the next child node.
Definition: val.c:8496
OP_EDITOP_LOAD
@ OP_EDITOP_LOAD
load, internal enum
Definition: op.h:128
val_set_by_default
boolean val_set_by_default(const val_value_t *val)
Check if the value was set by val_add_defaults.
Definition: val.c:12571
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
ncx_set_secondary_sil_priority_used
void ncx_set_secondary_sil_priority_used(void)
Flag that a value node set a non-default secondary SIL priority.
Definition: ncx.c:12984
agt_cfg_check_hook_created
boolean agt_cfg_check_hook_created(agt_cfg_transaction_t *txcb, val_value_t *newval, val_value_t *curval)
Check if the Transaction Hook has been already setup for the current undo record or newval/curval val...
Definition: agt_cfg.c:3520
rpc_err.h
NETCONF protocol standard error definitions.
OP_EDITOP_REMOVE
@ OP_EDITOP_REMOVE
remove, base:1.1 only
Definition: op.h:130
agt_cfg_check_parent_edits
boolean agt_cfg_check_parent_edits(agt_cfg_transaction_t *txcb, val_value_t *newnode)
Make sure that current undo is unique and does not have the same undo in different parent undo.
Definition: agt_cfg.c:3335
NCX_NT_VAL
@ NCX_NT_VAL
val_value_t
Definition: ncxtypes.h:276
SES_PEERADDR
#define SES_PEERADDR(S)
get the session peer address
Definition: ses.h:180
agt_cfg.h
Manage Server configuration edit transactions.
val_get_first_child
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
NCX_NT_NONE
@ NCX_NT_NONE
not set
Definition: ncxtypes.h:273
AGT_CB_HAS_REMOTE_PSHOOK
#define AGT_CB_HAS_REMOTE_PSHOOK(C)
Flags to tell the server that the CBSET has remote hook callbacks check subsystem has a remote post-s...
Definition: agt_cb.h:166
AGT_CFG_SET_CUR_SILCALL
#define AGT_CFG_SET_CUR_SILCALL(C, S)
set the current SIL callback
Definition: agt_cfg.h:144
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
agt_acm.h
NETCONF Server Access Control Entry Points.
agt_cfg_next_active_undo
agt_cfg_undo_rec_t * agt_cfg_next_active_undo(agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *cur_undo)
Get the next active undo record.
Definition: agt_cfg.c:3616
val_has_children
boolean val_has_children(const val_value_t *val)
Determine if there are any child nodes for this val.
Definition: val.c:13719
AGT_CB_ROLLBACK
@ AGT_CB_ROLLBACK
P3-neg: write operation rollback.
Definition: agt.h:623
agt_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
cap.h
NETCONF protocol capabilities.
NCX_LAYER_CONTENT
@ NCX_LAYER_CONTENT
application layer
Definition: ncxtypes.h:347
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
ncx.h
YANG module utility functions.
agt_replay_main_is_active
boolean agt_replay_main_is_active(void)
Check if the replay in progress is for the main server or could be for a subsystem.
Definition: agt.c:4790
AGT_CB_COMMIT
@ AGT_CB_COMMIT
P3-pos: write operation commit.
Definition: agt.h:622
agt_yp_ha.h
YumaPro High Availability module (YP-HA)
OP_EDITOP_REMOVE_ALL
@ OP_EDITOP_REMOVE_ALL
remove-all, yumapro only
Definition: op.h:132
obj.h
Data Object Support.
agt_val_silcall_check_order_hook
status_t agt_val_silcall_check_order_hook(agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newnode, val_value_t *curnode)
Check if a Set-Order-Hook callback is needed for the current edit; only checked for the list actually...
Definition: agt_val_silcall.c:3694
cfg_get_config_id
cfg_template_t * cfg_get_config_id(ncx_cfg_t cfgid)
Get the config struct from its ID.
Definition: cfg.c:1530
agt_yp_ha_sil_disabled
boolean agt_yp_ha_sil_disabled(void)
Check if all hooks are enabled or disabled because of the YP-HA Standby mode.
Definition: agt_yp_ha.c:1221
agt_val_edit_was_deleted
boolean agt_val_edit_was_deleted(agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *undo, val_value_t *newnode, val_value_t *curnode, boolean find_real_edit)
Check if the edit in progress was deleted by delete_dead_nodes.
Definition: agt_val.c:14045
agt_val_silcall_setup_ex
status_t agt_val_silcall_setup_ex(agt_cbtyp_t cbtyp, op_editop_t editop, ses_cb_t *scb, rpc_msg_t *msg, val_value_t *newnode, val_value_t *curnode, boolean lookparent, boolean indelete, boolean in_reverse_delete, agt_cfg_undo_rec_t *undo, agt_cfg_transaction_t *txcb)
Find the correct user callback function and invoke it Extended.
Definition: agt_val_silcall.c:3824
agt_val_silcall_call_sil_callbacks
status_t agt_val_silcall_call_sil_callbacks(agt_cbtyp_t cbtyp, ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, op_editop_t editop)
Invoke all the mode (AGT_CB_APPLY) callbacks for a source and target and write operation.
Definition: agt_val_silcall.c:2326
obj_is_sil_delete_children_first
boolean obj_is_sil_delete_children_first(const obj_template_t *obj)
Check if object is marked as ncx:sil-delete-children-first.
Definition: obj.c:16013
obj_is_no_sil_delete_children_first
boolean obj_is_no_sil_delete_children_first(const obj_template_t *obj)
Check if object is marked as ypx:no-sil-delete-children-first OR AN ANCESTOR IS MARKED.
Definition: obj.c:16027
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
agt_val_silcall_has_subsys_callbacks
boolean agt_val_silcall_has_subsys_callbacks(agt_cfg_transaction_t *txcb)
Check if the transaction needs subsystem callbacks.
Definition: agt_val_silcall.c:2530
agt_val_silcall_setup
status_t agt_val_silcall_setup(agt_cbtyp_t cbtyp, op_editop_t editop, ses_cb_t *scb, rpc_msg_t *msg, val_value_t *newnode, val_value_t *curnode, boolean lookparent, boolean indelete, boolean in_reverse_delete, agt_cfg_undo_rec_t *undo)
Find the correct user callback function and invoke it.
Definition: agt_val_silcall.c:2582
agt_cfg_add_nested_silcall
status_t agt_cfg_add_nested_silcall(agt_cfg_transaction_t *txcb, agt_cfg_undo_rec_t *undo, op_editop_t editop, val_value_t *newval, val_value_t *curval, obj_template_t *callback_obj, boolean indelete, boolean in_reverse_delete, agt_cfg_nested_silcall_t **result)
Malloc and fill in a new nested SIL callback record.
Definition: agt_cfg.c:2253
val_compare_ex
int32 val_compare_ex(const val_value_t *val1, const val_value_t *val2, boolean configonly)
Compare 2 val_value_t struct value contents Check all or config only.
Definition: val.c:9421
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
agt_val_silcall_deepest_and_last
boolean agt_val_silcall_deepest_and_last(agt_cfg_nested_silcall_t *silcall)
Check if the current nested SIL callback is at the deepest level for the current edit and that it is ...
Definition: agt_val_silcall.c:3638
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
AGT_CB_FL_SETHOOK_TREE
#define AGT_CB_FL_SETHOOK_TREE
4 flags for the agt_cb_fnset_t.flags field
Definition: agt_cb.h:117
agt_val_silcall_reverse_edit
status_t agt_val_silcall_reverse_edit(agt_cfg_undo_rec_t *undo, ses_cb_t *scb, rpc_msg_t *msg, op_editop_t editop, val_value_t *newval, val_value_t *curval, boolean lookparent, boolean indelete, agt_cfg_edit_action_t edit_action)
Attempt SIL callbacks for a reverse edit.
Definition: agt_val_silcall.c:3080
val_set_sil_priority
status_t val_set_sil_priority(val_value_t *val, uint8 silprio)
Set the secondary SIL priority.
Definition: val.c:14297
agt_sil_start_transaction
status_t agt_sil_start_transaction(const xmlChar *txid_str, const xmlChar *user_id, const xmlChar *client_addr, const xmlChar *target, boolean is_validate, boolean is_replay, boolean is_reverse_edit, boolean is_load_config, boolean is_hook_load, boolean is_hook_validate, dlq_hdr_t *editQ)
Start Transaction Handler.
Definition: agt_sil.c:7782
agt_val_silcall_is_deepest
boolean agt_val_silcall_is_deepest(rpc_msg_t *msg)
Check if the current nested SIL callback is at the deepest level for the current edit.
Definition: agt_val_silcall.c:3576
xmlns.h
XML namespace support.
AGT_HOOK_TYPE_POST_SETHOOK
@ AGT_HOOK_TYPE_POST_SETHOOK
Post Set-Hook.
Definition: agt.h:714
obj_is_root
boolean obj_is_root(const obj_template_t *obj)
Check if object is marked as a root object.
Definition: obj.c:14152
status.h
Global error messages for status code enumerations.
VAL_RES
#define VAL_RES(V)
Access the value status enum.
Definition: val.h:402
agt_cfg_new_trans_hook
agt_cfg_trans_hook_t * agt_cfg_new_trans_hook(obj_template_t *target_obj, val_value_t *newval, val_value_t *curval, op_editop_t editop)
Create and fill in a Trans Hook callback back pointer.
Definition: agt_cfg.c:3377
log_debug3_append
void void void void void void void void void void void void log_debug3_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG3 log entry.
dlq.h
dlq provides general double-linked list and queue support:
agt_val_silcall_run_validate_callbacks
status_t agt_val_silcall_run_validate_callbacks(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, op_editop_t editop)
Run the validate SIL callbacks for the transaction in progress.
Definition: agt_val_silcall.c:2175
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
AGT_CB_APPLY
@ AGT_CB_APPLY
P2: write operation apply.
Definition: agt.h:621