yumapro  24.10-11
YumaPro SDK
Loading...
Searching...
No Matches
agt_cb.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2024, 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_cb
13#define _H_agt_cb
14
15/* FILE: agt_cb.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
32/*********************************************************************
33* *
34* C H A N G E H I S T O R Y *
35* *
36*********************************************************************
37
38date init comment
39----------------------------------------------------------------------
4016-apr-07 abb Begun; split out from agt_ps.h
4101-aug-08 abb Remove NCX specific stuff; YANG only now
42*/
43
44#include "agt.h"
45#include "agt_editcb.h"
46#include "getcb.h"
47#include "op.h"
48#include "rpc.h"
49#include "ses.h"
50#include "status_enum.h"
51#include "val.h"
52#include "xpath.h"
53
54#ifndef _H_agt_cfg
55#include "agt_cfg.h"
56#endif
57
58#ifndef _H_agt_hook_util
59#include "agt_hook_util.h"
60#endif
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66
67/* Header only */
68
91/********************************************************************
92* *
93* C O N S T A N T S *
94* *
95*********************************************************************/
96
97
99#define FORALL TRUE
100
102#define FORONE FALSE
103
107#define AGT_CB_FL_EDIT bit0
108
110#define AGT_CB_FL_GET bit1
111
113#define AGT_CB_FL_EDIT2 bit2
114
115
117#define AGT_CB_FL_PSHOOK bit3
118#define AGT_CB_FL_SHOOK bit4
119#define AGT_CB_FL_TXHOOK bit5
123#define AGT_CB_FL_SETHOOK_TREE bit0
124#define AGT_CB_FL_TRANSHOOK_TREE bit1
125#define AGT_CB_FL_SKIP_SETHOOK bit2
126#define AGT_CB_FL_SKIP_TRANSHOOK bit3
130#define AGT_CB_FL_PSETHOOK bit4
131
133#define AGT_CB_FL_SETHOOK bit5
134
136#define AGT_CB_FL_TRANSHOOK bit6
137
139#define AGT_CB_FL_EDIT3 bit7
140
141/* 3 flags for skip phase callbacks in the agt_cb_fnset_t.flags field */
142#define AGT_CB_FL_SKIP_VALIDATE bit8
143#define AGT_CB_FL_SKIP_APPLY bit9
146#define AGT_CB_SUBSYS_HAS_EDIT(S) ((S)->flags & AGT_CB_FL_EDIT)
147
149#define AGT_CB_SUBSYS_HAS_GET(S) ((S)->flags & AGT_CB_FL_GET)
150
152#define AGT_CB_SUBSYS_HAS_EDIT2(S) ((S)->flags & AGT_CB_FL_EDIT2)
153
155#define AGT_CB_SUBSYS_HAS_EDIT3(S) ((S)->flags & AGT_CB_FL_EDIT3)
156
157
161#define AGT_CB_SUBSYS_HAS_PSHOOK(S) ((S)->flags & AGT_CB_FL_PSHOOK)
162
164#define AGT_CB_SUBSYS_HAS_SHOOK(S) ((S)->flags & AGT_CB_FL_SHOOK)
165
167#define AGT_CB_SUBSYS_HAS_TXHOOK(S) ((S)->flags & AGT_CB_FL_TXHOOK)
168
170#define AGT_CB_SUBSYS_SET_PSHOOK(S) (S)->flags |= AGT_CB_FL_PSHOOK
171
173#define AGT_CB_SUBSYS_SET_SHOOK(S) (S)->flags |= AGT_CB_FL_SHOOK
174
176#define AGT_CB_SUBSYS_SET_TXHOOK(S) (S)->flags |= AGT_CB_FL_TXHOOK
177
178
182#define AGT_CB_HAS_REMOTE_PSHOOK(C) ((C)->flags & AGT_CB_FL_PSETHOOK)
183
185#define AGT_CB_HAS_REMOTE_SHOOK(C) ((C)->flags & AGT_CB_FL_SETHOOK)
186
188#define AGT_CB_HAS_REMOTE_TXHOOK(C) ((C)->flags & AGT_CB_FL_TRANSHOOK)
189
191#define AGT_CB_SET_REMOTE_PSHOOK(C) (C)->flags |= AGT_CB_FL_PSETHOOK
192
194#define AGT_CB_SET_REMOTE_SHOOK(C) (C)->flags |= AGT_CB_FL_SETHOOK
195
197#define AGT_CB_SET_REMOTE_TXHOOK(C) (C)->flags |= AGT_CB_FL_TRANSHOOK
198
201#define AGT_CB_HAS_SKIP_VALIDATE(C) ((C)->flags & AGT_CB_FL_SKIP_VALIDATE)
202#define AGT_CB_HAS_SKIP_APPLY(C) ((C)->flags & AGT_CB_FL_SKIP_APPLY)
203
205#define AGT_CB_SET_SKIP_VALIDATE(C) (C)->flags |= AGT_CB_FL_SKIP_VALIDATE
206#define AGT_CB_SET_SKIP_APPLY(C) (C)->flags |= AGT_CB_FL_SKIP_APPLY
207
208
209/********************************************************************
210* *
211* T Y P E S *
212* *
213*********************************************************************/
214
216typedef enum agt_cb_calltype_t_ {
223
224
226typedef enum agt_edit_cbtype_t_ {
231} YPACK agt_edit_cbtype_t;
232
233
240typedef struct agt_cb_subsys_t_ {
242 dlq_hdr_t qhdr;
243
245 const xmlChar *subsys_id;
246
250 uint8 flags;
251
254} YPACK agt_cb_subsys_t;
255
256
279typedef status_t
280 (*agt_cb_fn_t) (ses_cb_t *scb,
281 rpc_msg_t *msg,
282 agt_cbtyp_t cbtyp,
283 op_editop_t editop,
284 val_value_t *newval,
285 val_value_t *curval);
286
287
328typedef status_t
329 (*agt_cb_hook_t) (ses_cb_t *scb,
330 rpc_msg_t *msg,
332 op_editop_t editop,
333 val_value_t *newval,
334 val_value_t *curval);
335
336
337
367typedef uint8
369 op_editop_t editop,
370 val_value_t *newval,
371 val_value_t *curval,
372 status_t *res);
373
374
375
391typedef status_t
393
394
395
414typedef status_t
415 (*agt_cb_sa_trans_start_t) (const xmlChar *transaction_id,
416 boolean isvalidate,
417 boolean isrollback,
418 boolean isrunning);
419
420
421
436typedef void
438
439
440
454typedef void
455 (*agt_cb_sa_trans_complete_t) (const xmlChar *transaction_id_val);
456
457
458
479typedef status_t
481 rpc_msg_t *msg,
482 cfg_template_t *source_config,
483 cfg_template_t *target_config);
484
485
486
509typedef status_t
511 rpc_msg_t *msg,
512 val_value_t *candidate,
513 val_value_t *running);
514
515
516
532typedef status_t
533 (*agt_cb_sa_validate_complete_t) (const xmlChar *transaction_id);
534
535
536
559typedef status_t
561 rpc_msg_t *msg,
562 val_value_t *candidate,
563 val_value_t *running);
564
565
566
582typedef status_t
583 (*agt_cb_sa_apply_complete_t) (const xmlChar *transaction_id);
584
585
586
609typedef status_t
611 rpc_msg_t *msg,
612 val_value_t *candidate,
613 val_value_t *running);
614
615
616
632typedef status_t
633 (*agt_cb_sa_rollback_complete_t) (const xmlChar *transaction_id);
634
635
636
653typedef status_t
654 (*agt_cb_sa_commit_complete_t) (const xmlChar *transaction_id,
655 agt_commit_type_t commit_type);
656
657
658
679typedef void
681 rpc_msg_t *msg,
682 const xmlChar *command_modname,
683 const xmlChar *command_name);
684
685
686
700typedef void
701 (*agt_cb_shutdown_t) (void);
702
703
719typedef void
721 const ses_cb_t *scb);
722
723
768typedef status_t
769 (*agt_cb_sa_hook_t) (ses_cb_t *scb,
770 rpc_msg_t *msg,
771 op_editop_t editop,
772 val_value_t *newval,
773 val_value_t *curval,
774 const xmlChar *transaction_id,
775 boolean isvalidate,
776 boolean isload,
777 boolean isrunning);
778
779
809typedef status_t
811 ses_cb_t *scb,
812 rpc_msg_t *msg,
813 val_value_t *source,
814 val_value_t *target);
815
816
817
818
819
836typedef status_t
838 const xmlChar *transaction_id);
839
840
841
843typedef struct agt_cb_extra_flags_t_ {
846 boolean skip_apply;
848
849
856typedef struct agt_cb_fnset_t_ {
865 uint16 flags;
866
867 /* used ony by SIL-SA */
871
872 dlq_hdr_t subsysQ;
874} YPACK agt_cb_fnset_t;
875
876
880/********************************************************************
881* *
882* F U N C T I O N S *
883* *
884*********************************************************************/
885
886
904extern status_t
905 agt_cb_init (void);
906
907
914extern void
915 agt_cb_cleanup (void);
916
917
937extern status_t
938 agt_cb_register_callback (const xmlChar *modname,
939 const xmlChar *defpath,
940 const xmlChar *version,
941 agt_cb_fn_t cbfn);
942
943
968extern status_t
969 agt_cb_register_edit2_callback (const xmlChar *modname,
970 const xmlChar *defpath,
971 const xmlChar *version,
972 agt_cb_fn_t cbfn);
973
974
997extern status_t
998 agt_cb_register_edit3_callback (const xmlChar *modname,
999 const xmlChar *defpath,
1000 const xmlChar *version,
1001 agt_edit3_fn_t edit3_cbfn);
1002
1003
1027extern status_t
1028 agt_cb_register_edit_callback_extra (const xmlChar *modname,
1029 const xmlChar *defpath,
1030 const xmlChar *version,
1031 void *cbfn,
1032 const agt_cb_extra_flags_t *extra_flags);
1033
1034
1055extern status_t
1056 agt_cb_register_xpath_callback (const xmlChar *modname,
1057 const xmlChar *defpath,
1058 const xmlChar *version,
1060
1061
1070extern void
1071 agt_cb_unregister_callbacks (const xmlChar *modname,
1072 const xmlChar *defpath);
1073
1074
1075
1095extern status_t
1096 agt_cb_register_get_callback (const xmlChar *modname,
1097 const xmlChar *defpath,
1098 const xmlChar *version,
1099 getcb_fn2_t get_cbfn);
1100
1101
1115extern status_t
1116 agt_cb_hook_register (const xmlChar *defpath,
1117 agt_hook_fmt_t format,
1118 agt_hook_type_t type,
1119 agt_cb_hook_t cbfn);
1120
1121
1132extern void
1133 agt_cb_hook_unregister (const xmlChar *defpath);
1134
1135
1150extern status_t
1151 agt_cb_order_hook_register (const xmlChar *defpath,
1152 agt_cb_order_hook_t cbfn);
1153
1154
1165extern void
1166 agt_cb_order_hook_unregister (const xmlChar *defpath);
1167
1168
1181extern status_t
1183
1184
1196extern status_t
1198
1199
1209extern void
1211
1212
1222extern void
1224
1225
1243extern status_t
1244 agt_cb_run_trans_start (ses_cb_t *scb,
1246 boolean isvalidate,
1247 boolean isrollback,
1248 boolean isrunning,
1249 boolean no_silsa_cb);
1250
1251
1262extern void
1263 agt_cb_run_trans_complete (agt_cfg_transaction_t *txcb);
1264
1265
1279extern status_t
1281
1282
1295extern status_t
1297
1298
1309extern void
1311
1312
1323extern void
1325
1326
1327#ifdef WITH_YCONTROL
1344extern status_t
1345 agt_cb_invoke_trans_start_cb (const xmlChar *transaction_id,
1346 boolean isvalidate,
1347 boolean isrollback,
1348 boolean isrunning);
1349
1350
1362extern void
1363 agt_cb_invoke_trans_complete (const xmlChar *transaction_id);
1364
1365
1376extern void
1377 agt_cb_sa_run_trans_complete (const xmlChar *transaction_id);
1378
1379
1380
1400extern status_t
1401 agt_cb_register_subsys_callback (const xmlChar *modname,
1402 const xmlChar *defpath,
1403 const xmlChar *version,
1404 const xmlChar *subsys_id,
1405 agt_cb_calltype_t calltype);
1406
1407
1408
1418extern void
1419 agt_cb_unregister_subsys_callback (const xmlChar *subsys_id,
1420 const xmlChar *modname,
1421 const xmlChar *defpath,
1422 const xmlChar *revision);
1423
1424#endif // WITH_YCONTROL
1425
1426
1454extern status_t
1455 agt_cb_make_register_msg (obj_template_t *request_obj,
1456 val_value_t *request_val,
1457 obj_template_t *register_obj,
1458 obj_template_t *module_obj,
1459 obj_template_t *revision_obj,
1460 obj_template_t *path_obj,
1461 obj_template_t *get_path_obj,
1462 obj_template_t *rpc_name_obj,
1463 obj_template_t *action_path_obj,
1464 obj_template_t *post_sethook_path_obj,
1465 obj_template_t *sethook_list,
1466 obj_template_t *txhook_list,
1467 obj_template_t *edit2_path_obj,
1468 obj_template_t *edit3_path_obj,
1469 boolean *any_rw_objs);
1470
1471
1478extern boolean
1480
1481
1488extern boolean
1490
1491
1501extern status_t
1502 agt_cb_skip_leafref_validation (const xmlChar *defpath);
1503
1504
1514extern status_t
1515 agt_cb_set_sil_priority (const xmlChar *defpath,
1516 uint8 sil_priority);
1517
1518
1531extern status_t
1533
1534
1546extern status_t
1548
1549
1559extern void
1561
1562
1572extern void
1574
1575
1588extern status_t
1590
1591
1601extern void
1603
1604
1619extern status_t
1621
1622
1632extern void
1634
1635
1654extern status_t
1655 agt_cb_run_validate_complete (ses_cb_t *scb,
1656 rpc_msg_t *msg,
1657 val_value_t *candidate,
1658 val_value_t *running,
1659 boolean epc_only);
1660
1661
1677extern status_t
1678 agt_cb_run_startup_hook (ses_cb_t *scb,
1679 rpc_msg_t *msg,
1680 cfg_template_t *source_config,
1681 cfg_template_t *target_config);
1682
1683
1702extern status_t
1703 agt_cb_run_apply_complete (ses_cb_t *scb,
1704 rpc_msg_t *msg,
1705 val_value_t *candidate,
1706 val_value_t *running,
1707 boolean epc_only);
1708
1709
1728extern status_t
1729 agt_cb_run_rollback_complete (ses_cb_t *scb,
1730 rpc_msg_t *msg,
1731 val_value_t *candidate,
1732 val_value_t *running,
1733 boolean epc_only);
1734
1735
1746extern status_t
1748
1749
1762extern void
1763 agt_cb_run_command_complete (ses_cb_t *scb,
1764 rpc_msg_t *msg,
1765 const xmlChar *command_modname,
1766 const xmlChar *command_name);
1767
1768
1778extern void
1780
1781
1792extern status_t
1794
1795
1805extern void
1807
1808
1816extern void
1817 agt_cb_run_shutdown (void);
1818
1819
1830extern status_t
1831 agt_cb_post_sethook_register (const xmlChar *defpath,
1832 agt_cb_hook_t cbfn);
1833
1834
1843extern void
1844 agt_cb_post_sethook_unregister (const xmlChar *defpath);
1845
1846
1857extern status_t
1859
1860
1870extern void
1872
1873
1883extern void
1884 agt_cb_run_session_hook (ncx_ses_event_t ses_event,
1885 const ses_cb_t *scb);
1886
1887
1900extern status_t
1901 agt_cb_def_hook_register (const xmlChar *defpath,
1902 ncx_def_hook_cbfn_t cbfn);
1903
1904
1912extern void
1913 agt_cb_def_hook_unregister (const xmlChar *defpath);
1914
1915
1928extern status_t
1929 agt_cb_sa_hook_register (const xmlChar *defpath,
1930 agt_hook_fmt_t format,
1931 agt_hook_type_t type,
1932 agt_cb_sa_hook_t cbfn);
1933
1934
1945extern void
1946 agt_cb_sa_hook_unregister (const xmlChar *defpath);
1947
1948
1959extern status_t
1960 agt_cb_sa_post_sethook_register (const xmlChar *defpath,
1961 agt_cb_sa_hook_t cbfn);
1962
1963
1972extern void
1973 agt_cb_sa_post_sethook_unregister (const xmlChar *defpath);
1974
1975
1983extern void
1984 agt_cb_unload_module (const xmlChar *modname);
1985
1986
1999extern status_t
2001
2002
2011extern void
2013
2014
2027extern status_t
2029
2030
2039extern void
2041
2042
2055extern status_t
2057
2058
2067extern void
2069
2070
2083extern status_t
2085
2086
2095extern void
2097
2098
2099#ifdef WITH_YCONTROL
2116extern status_t
2117 agt_cb_sa_run_commit_completeness_cb (const xmlChar *transaction_id,
2118 agt_cbtyp_t cbtyp,
2119 agt_commit_type_t commit_type);
2120#endif // WITH_YCONTROL
2121
2122
2123
2136extern status_t
2138
2139
2149extern void
2151
2152
2165extern status_t
2167
2168
2177extern void
2179
2180
2181
2189extern boolean
2191
2192
2206extern status_t
2207 agt_cb_run_epc_commit_complete (ses_cb_t *scb,
2208 rpc_msg_t *msg,
2209 val_value_t *source,
2210 val_value_t *target);
2211
2212
2222extern boolean
2224 agt_cbtyp_t cbtyp);
2225
2226
2229#ifdef __cplusplus
2230} /* end extern 'C' */
2231#endif
2232
2233#endif /* _H_agt_cb */
Multi-Protocol Network Management Server.
Manage Server configuration edit transactions.
EDIT3 Edit Control Block Processing.
NETCONF Server Set/Transaction Hook utility functions.
GET1 and GET2 Callback Support.
status_t agt_cb_register_edit2_callback(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_cb_fn_t cbfn)
Register an object specific edit2 callback function.
Definition: agt_cb.c:1554
void agt_cb_sa_trans_complete_unregister(agt_cb_sa_trans_complete_t cbfn)
Uregister a Transaction Complete callback.
Definition: agt_cb.c:2776
void agt_cb_unregister_callbacks(const xmlChar *modname, const xmlChar *defpath)
Unregister all EDIT callback functions for a specific object.
Definition: agt_cb.c:2533
status_t agt_cb_rollback_complete_register(agt_cb_rollback_complete_t cbfn)
Register a Rollback Complete callback.
Definition: agt_cb.c:5191
status_t agt_cb_order_hook_register(const xmlChar *defpath, agt_cb_order_hook_t cbfn)
Register an object specific Set-Order-Hook callback function.
Definition: agt_cb.c:2078
void agt_cb_def_hook_unregister(const xmlChar *defpath)
Unregister Dynamic Default callback functions for a specific object.
Definition: agt_cb.c:6307
void agt_cb_session_hook_unregister(agt_cb_session_hook_t cbfn)
Unregister a Session Hook callback.
Definition: agt_cb.c:6148
status_t agt_cb_edit_phase_complete_register(agt_cb_edit_phase_complete_t cbfn)
Register an Edit Phase Complete callback.
Definition: agt_cb.c:7303
void agt_cb_command_complete_unregister(agt_cb_command_complete_t cbfn)
Unregister a Command Complete callback.
Definition: agt_cb.c:5760
status_t agt_cb_hook_register(const xmlChar *defpath, agt_hook_fmt_t format, agt_hook_type_t type, agt_cb_hook_t cbfn)
Register an object specific Hook callback function.
Definition: agt_cb.c:1898
void agt_cb_hook_unregister(const xmlChar *defpath)
Unregister a Hook callback.
Definition: agt_cb.c:2001
void agt_cb_shutdown_unregister(agt_cb_shutdown_t cbfn)
Unregister a Shutdown callback.
Definition: agt_cb.c:5887
void agt_cb_trans_start_unregister(agt_cb_trans_start_t cbfn)
Unregister a Transaction Start callback.
Definition: agt_cb.c:2315
boolean agt_cb_obj_has_get_callback(obj_template_t *obj)
Check if the specified object has a local get2 callback.
Definition: agt_cb.c:4826
status_t agt_cb_sa_edit_phase_complete_register(agt_cb_sa_edit_phase_complete_t cbfn)
Register a SIL-SA Edit Phase Complete callback.
Definition: agt_cb.c:7073
void agt_cb_edit_phase_complete_unregister(agt_cb_edit_phase_complete_t cbfn)
Unregister an Edit Phase Complete callback.
Definition: agt_cb.c:7349
status_t agt_cb_register_get_callback(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, getcb_fn2_t get_cbfn)
Register an object specific GET callback function.
Definition: agt_cb.c:1798
status_t agt_cb_sa_hook_register(const xmlChar *defpath, agt_hook_fmt_t format, agt_hook_type_t type, agt_cb_sa_hook_t cbfn)
Register an object specific Hook callback function.
Definition: agt_cb.c:6347
void agt_cb_sa_commit_complete_unregister(agt_cb_sa_commit_complete_t cbfn)
Unregister a SIL-SA Commit Complete callback.
Definition: agt_cb.c:6959
void agt_cb_startup_hook_unregister(agt_cb_startup_hook_t cbfn)
Unregister a Startup Hook callback.
Definition: agt_cb.c:4990
void agt_cb_validate_complete_unregister(agt_cb_validate_complete_t cbfn)
Unregister a Validate Complete callback.
Definition: agt_cb.c:5075
void agt_cb_order_hook_unregister(const xmlChar *defpath)
Unregister a Set-Order-Hook callback.
Definition: agt_cb.c:2154
void agt_cb_trans_complete_unregister(agt_cb_trans_complete_t cbfn)
Unregister a Transaction Complete callback.
Definition: agt_cb.c:2348
status_t agt_cb_sa_rollback_complete_register(agt_cb_sa_rollback_complete_t cbfn)
Register a SIL-SA Rollback Complete callback.
Definition: agt_cb.c:6994
boolean agt_cb_obj_has_edit_callback(obj_template_t *obj)
Check if the specified object has a local edit callback.
Definition: agt_cb.c:4803
void agt_cb_sa_edit_phase_complete_unregister(agt_cb_sa_edit_phase_complete_t cbfn)
Unregister a SIL-SA Edit Phase Complete callback.
Definition: agt_cb.c:7119
void agt_cb_apply_complete_unregister(agt_cb_apply_complete_t cbfn)
Unregister a Apply Complete callback.
Definition: agt_cb.c:5156
status_t agt_cb_startup_hook_register(agt_cb_startup_hook_t cbfn)
Register a Startup Hook callback.
Definition: agt_cb.c:4935
status_t agt_cb_post_sethook_register(const xmlChar *defpath, agt_cb_hook_t cbfn)
Register an object specific Post Set Hook callback function.
Definition: agt_cb.c:5960
status_t agt_cb_def_hook_register(const xmlChar *defpath, ncx_def_hook_cbfn_t cbfn)
Register an object specific Dynamic Default callback function to enable custom default value setup fo...
Definition: agt_cb.c:6231
status_t agt_cb_sa_trans_start_register(agt_cb_sa_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2649
void agt_cb_post_sethook_unregister(const xmlChar *defpath)
Unregister a Post Set Hook callback.
Definition: agt_cb.c:6028
status_t agt_cb_register_xpath_callback(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, xpath_bool_eval_fn_t cbfn)
Register an object specific XPath callback function.
Definition: agt_cb.c:1691
status_t agt_cb_register_edit_callback_extra(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, void *cbfn, const agt_cb_extra_flags_t *extra_flags)
Register an edit callback function with extra flags.
Definition: agt_cb.c:1653
void agt_cb_sa_trans_start_unregister(agt_cb_sa_trans_start_t cbfn)
Uregister a Transaction Start callback.
Definition: agt_cb.c:2745
status_t agt_cb_trans_start_register(agt_cb_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2228
void agt_cb_sa_validate_complete_unregister(agt_cb_sa_validate_complete_t cbfn)
Unregister a SIL-SA Validate Complete callback.
Definition: agt_cb.c:6796
status_t agt_cb_register_callback(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_cb_fn_t cbfn)
Register an object specific edit callback function use the same fn for all callback phases all phases...
Definition: agt_cb.c:1505
void agt_cb_sa_post_sethook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Post Set Hook callback.
Definition: agt_cb.c:6624
status_t agt_cb_sa_apply_complete_register(agt_cb_sa_apply_complete_t cbfn)
Register a SIL-SA Apply Complete callback.
Definition: agt_cb.c:6831
void agt_cb_sa_hook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Hook SIL-SA callback.
Definition: agt_cb.c:6457
status_t agt_cb_command_complete_register(agt_cb_command_complete_t cbfn)
Register a Command Complete callback.
Definition: agt_cb.c:5704
boolean agt_cb_is_skip_callback(const obj_template_t *obj, agt_cbtyp_t cbtyp)
Determine whether the edit phase callback for the given object and callback type should be skipped ba...
Definition: agt_cb.c:7436
status_t agt_cb_sa_trans_complete_register(agt_cb_sa_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2698
status_t agt_cb_sa_post_sethook_register(const xmlChar *defpath, agt_cb_sa_hook_t cbfn)
Register an object specific SIL-SA Post Set Hook callback function.
Definition: agt_cb.c:6543
status_t agt_cb_sa_validate_complete_register(agt_cb_sa_validate_complete_t cbfn)
Register a SIL-SA Validate Complete callback.
Definition: agt_cb.c:6749
status_t agt_cb_register_edit3_callback(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_edit3_fn_t edit3_cbfn)
Register an object specific edit3 callback function.
Definition: agt_cb.c:1603
boolean agt_cb_any_edit_phase_complete(void)
Return true if any edit phase complete callbacks registered.
Definition: agt_cb.c:7375
status_t agt_cb_trans_complete_register(agt_cb_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2272
void agt_cb_sa_rollback_complete_unregister(agt_cb_sa_rollback_complete_t cbfn)
Unregister a SIL-SA Rollback Complete callback.
Definition: agt_cb.c:7041
status_t agt_cb_validate_complete_register(agt_cb_validate_complete_t cbfn)
Register a Validate Complete callback.
Definition: agt_cb.c:5027
void agt_cb_rollback_complete_unregister(agt_cb_rollback_complete_t cbfn)
Unregister a Rollback Complete callback.
Definition: agt_cb.c:5238
status_t agt_cb_shutdown_register(agt_cb_shutdown_t cbfn)
Register a Shutdown callback.
Definition: agt_cb.c:5840
status_t agt_cb_session_hook_register(agt_cb_session_hook_t cbfn)
Register a Session Hook callback.
Definition: agt_cb.c:6102
void agt_cb_sa_apply_complete_unregister(agt_cb_sa_apply_complete_t cbfn)
Unregister a SIL-SA Apply Complete callback.
Definition: agt_cb.c:6877
status_t agt_cb_sa_commit_complete_register(agt_cb_sa_commit_complete_t cbfn)
Register a SIL-SA Commit Complete callback.
Definition: agt_cb.c:6912
status_t agt_cb_apply_complete_register(agt_cb_apply_complete_t cbfn)
Register a Apply Complete callback.
Definition: agt_cb.c:5110
status_t(* agt_cb_hook_t)(ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval)
Typedef of the agt_cb_hook_t callback.
Definition: agt_cb.h:329
status_t(* agt_cb_sa_apply_complete_t)(const xmlChar *transaction_id)
Typedef of the agt_cb_sa_apply_complete_t callback.
Definition: agt_cb.h:583
agt_edit_cbtype_t
Enumeration for EDIT callback types for SIL and SIL-SA to register.
Definition: agt_cb.h:226
status_t(* agt_edit3_fn_t)(agt_editcb_t *editcb)
EDIT3 Callback function for server object handler.
Definition: agt_editcb.h:204
void(* agt_cb_trans_complete_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_complete callback.
Definition: agt_cb.h:437
status_t(* agt_cb_sa_rollback_complete_t)(const xmlChar *transaction_id)
Typedef of the agt_cb_sa_rollback_complete_t callback.
Definition: agt_cb.h:633
status_t(* agt_cb_sa_commit_complete_t)(const xmlChar *transaction_id, agt_commit_type_t commit_type)
Typedef of the agt_cb_sa_commit_complete_t callback.
Definition: agt_cb.h:654
status_t(* agt_cb_startup_hook_t)(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *source_config, cfg_template_t *target_config)
Typedef of the agt_cb_startup_hook_t callback.
Definition: agt_cb.h:480
status_t(* agt_cb_sa_hook_t)(ses_cb_t *scb, rpc_msg_t *msg, op_editop_t editop, val_value_t *newval, val_value_t *curval, const xmlChar *transaction_id, boolean isvalidate, boolean isload, boolean isrunning)
Typedef of the SIL-SA version of agt_cb_hook_t callback.
Definition: agt_cb.h:769
status_t(* agt_cb_fn_t)(ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval)
EDIT1 and EDIT2 Callback function for server object handler.
Definition: agt_cb.h:280
status_t(* agt_cb_trans_start_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_start callback.
Definition: agt_cb.h:392
void(* agt_cb_command_complete_t)(ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *command_modname, const xmlChar *command_name)
Typedef of the agt_command_complete_cb_t callback.
Definition: agt_cb.h:680
status_t(* agt_cb_edit_phase_complete_t)(agt_cbtyp_t edit_phase, ses_cb_t *scb, rpc_msg_t *msg, val_value_t *source, val_value_t *target)
Typedef of the agt_cb_edit_phase_complete_t callback.
Definition: agt_cb.h:810
status_t(* agt_cb_sa_trans_start_t)(const xmlChar *transaction_id, boolean isvalidate, boolean isrollback, boolean isrunning)
Typedef of the sa_trans_start callback.
Definition: agt_cb.h:415
status_t(* agt_cb_sa_validate_complete_t)(const xmlChar *transaction_id)
Typedef of the agt_cb_sa_validate_complete_t callback.
Definition: agt_cb.h:533
status_t(* agt_cb_validate_complete_t)(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running)
Typedef of the agt_cb_validate_complete_t callback.
Definition: agt_cb.h:510
void(* agt_cb_sa_trans_complete_t)(const xmlChar *transaction_id_val)
Typedef of the sa_trans_complete callback.
Definition: agt_cb.h:455
status_t(* agt_cb_apply_complete_t)(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running)
Typedef of the agt_cb_apply_complete_t callback.
Definition: agt_cb.h:560
void(* agt_cb_shutdown_t)(void)
Typedef of the agt_cb_shutdown_t callback.
Definition: agt_cb.h:701
agt_cb_calltype_t
different data node callback types for SIL and SIL-SA to register
Definition: agt_cb.h:216
status_t(* agt_cb_rollback_complete_t)(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running)
Typedef of the agt_cb_rollback_complete_t callback.
Definition: agt_cb.h:610
status_t(* agt_cb_sa_edit_phase_complete_t)(agt_cbtyp_t edit_phase, const xmlChar *transaction_id)
Typedef of the agt_cb_sa_edit_phase_complete_t callback.
Definition: agt_cb.h:837
uint8(* agt_cb_order_hook_t)(agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newval, val_value_t *curval, status_t *res)
Typedef of the agt_order_hook_cb callback.
Definition: agt_cb.h:368
void(* agt_cb_session_hook_t)(ncx_ses_event_t ses_event, const ses_cb_t *scb)
Typedef of the agt_cb_session_hook_t callback.
Definition: agt_cb.h:720
@ AGT_EDIT_CBTYPE_EDIT2
EDIT2 callback type.
Definition: agt_cb.h:229
@ AGT_EDIT_CBTYPE_EDIT
EDIT callback type.
Definition: agt_cb.h:228
@ AGT_EDIT_CBTYPE_NONE
not set
Definition: agt_cb.h:227
@ AGT_EDIT_CBTYPE_EDIT3
EDIT3 callback type.
Definition: agt_cb.h:230
@ AGT_CB_CALLTYPE_GET
GET2 callback.
Definition: agt_cb.h:221
@ AGT_CB_CALLTYPE_NONE
not set
Definition: agt_cb.h:217
@ AGT_CB_CALLTYPE_EDIT
EDIT1 callback.
Definition: agt_cb.h:218
@ AGT_CB_CALLTYPE_EDIT3
EDIT3 callback.
Definition: agt_cb.h:220
@ AGT_CB_CALLTYPE_EDIT2
EDIT2 callback.
Definition: agt_cb.h:219
agt_hook_fmt_t
different hook formats dictates specific hook functionality
Definition: agt_hook_util.h:101
agt_commit_type_t
NETCONF commit types.
Definition: agt.h:772
agt_hook_type_t
Hook types enumeration to specify Hook type.
Definition: agt.h:837
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:746
status_t(* getcb_fn2_t)(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 PRODUCER FUNCTION.
Definition: getcb.h:692
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:219
status_t(* xpath_bool_eval_fn_t)(struct xpath_pcb_t_ *pcb, val_value_t *context, val_value_t *docroot, boolean *result)
XPath Boolean EVAL Replacement Callback.
Definition: xpath.h:551
status_t(* ncx_def_hook_cbfn_t)(struct val_value_t_ *parentval, struct obj_template_t_ *obj, xmlChar **buff)
Typedef of the ncx_def_hook_cbfn_t callback.
Definition: ncxtypes.h:1739
ncx_ses_event_t
internal enumerations for session event types
Definition: ncxtypes.h:1703
NETCONF protocol operations.
NETCONF protocol remote procedure call common definitions.
NETCONF Session Common definitions module.
global error status code enumerations
Structure to hold extra flags for callback registration.
Definition: agt_cb.h:843
boolean skip_validate
false = perform validate phase, true = skip
Definition: agt_cb.h:845
agt_edit_cbtype_t edit_cbtype
EDIT callback type.
Definition: agt_cb.h:844
boolean skip_apply
false = perform apply phase, true = skip
Definition: agt_cb.h:846
Definition: agt_cb.h:856
getcb_fn2_t get_cbfn
GET-2.
Definition: agt_cb.h:859
agt_cb_sa_hook_t sa_post_set_hook_cbfn
SIL-SA Post Set Hook.
Definition: agt_cb.h:869
agt_cb_hook_t post_set_hook_cbfn
Post Set Hook.
Definition: agt_cb.h:862
dlq_hdr_t subsysQ
Q of agt_cb_subsys_t.
Definition: agt_cb.h:872
agt_cb_hook_t trans_hook_cbfn
Transaction Hook.
Definition: agt_cb.h:863
agt_cb_order_hook_t order_hook_cbfn
Set Order Hook.
Definition: agt_cb.h:860
agt_cb_fn_t cbfn
EDIT-1 or EDIT-2.
Definition: agt_cb.h:857
xpath_bool_eval_fn_t xpath_cbfn
XPath Callback.
Definition: agt_cb.h:864
agt_cb_sa_hook_t sa_set_hook_cbfn
SIL-SA Set Hook.
Definition: agt_cb.h:868
agt_cb_hook_t set_hook_cbfn
Set Hook.
Definition: agt_cb.h:861
agt_cb_sa_hook_t sa_trans_hook_cbfn
SIL-SA Transaction Hook.
Definition: agt_cb.h:870
uint16 flags
internal flags
Definition: agt_cb.h:865
agt_edit3_fn_t edit3_cbfn
EDIT-3.
Definition: agt_cb.h:858
Definition: agt_cb.h:240
dlq_hdr_t qhdr
queue header
Definition: agt_cb.h:242
status_t res
status used by GET only
Definition: agt_cb.h:253
const xmlChar * subsys_id
backptr to agt_sil_state->subsys_id
Definition: agt_cb.h:245
uint8 flags
EDIT, EDIT2, GET, or both get and edit; BUT cannot be EDIT2 and EDIT1 at the same time.
Definition: agt_cb.h:250
Transaction Control Block.
Definition: agt_cfg.h:235
struct representing 1 configuration database
Definition: cfg.h:229
One YANG data-def-stmt.
Definition: obj.h:1232
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:185
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:912
Value Node Basic Support.
Schema and data model Xpath search support.