yumapro  25.10-2
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 - 2025, 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
108#define AGT_CB_FL_EDIT bit0
109
111#define AGT_CB_FL_GET bit1
112
114#define AGT_CB_FL_EDIT2 bit2
115
117#define AGT_CB_FL_PSHOOK bit3
118#define AGT_CB_FL_SHOOK bit4
119#define AGT_CB_FL_TXHOOK bit5
122#define AGT_CB_FL_PUSH bit6
126#define AGT_CB_FL_SETHOOK_TREE bit0
127#define AGT_CB_FL_TRANSHOOK_TREE bit1
128#define AGT_CB_FL_SKIP_SETHOOK bit2
129#define AGT_CB_FL_SKIP_TRANSHOOK bit3
132#define AGT_CB_FL_PSETHOOK bit4
133
135#define AGT_CB_FL_SETHOOK bit5
136
138#define AGT_CB_FL_TRANSHOOK bit6
139
141#define AGT_CB_FL_EDIT3 bit7
142
143/* 3 flags for skip phase callbacks in the agt_cb_fnset_t.flags field */
144#define AGT_CB_FL_SKIP_VALIDATE bit8
145#define AGT_CB_FL_SKIP_APPLY bit9
148#define AGT_CB_SUBSYS_HAS_EDIT(S) ((S)->flags & AGT_CB_FL_EDIT)
149
151#define AGT_CB_SUBSYS_HAS_GET(S) ((S)->flags & AGT_CB_FL_GET)
152
154#define AGT_CB_SUBSYS_HAS_EDIT2(S) ((S)->flags & AGT_CB_FL_EDIT2)
155
157#define AGT_CB_SUBSYS_HAS_PUSH(S) ((S)->flags & AGT_CB_FL_PUSH)
158
159
161#define AGT_CB_SUBSYS_HAS_EDIT3(S) ((S)->flags & AGT_CB_FL_EDIT3)
162
163
167#define AGT_CB_SUBSYS_HAS_PSHOOK(S) ((S)->flags & AGT_CB_FL_PSHOOK)
168
170#define AGT_CB_SUBSYS_HAS_SHOOK(S) ((S)->flags & AGT_CB_FL_SHOOK)
171
173#define AGT_CB_SUBSYS_HAS_TXHOOK(S) ((S)->flags & AGT_CB_FL_TXHOOK)
174
176#define AGT_CB_SUBSYS_SET_PSHOOK(S) (S)->flags |= AGT_CB_FL_PSHOOK
177
179#define AGT_CB_SUBSYS_SET_SHOOK(S) (S)->flags |= AGT_CB_FL_SHOOK
180
182#define AGT_CB_SUBSYS_SET_TXHOOK(S) (S)->flags |= AGT_CB_FL_TXHOOK
183
184
188#define AGT_CB_HAS_REMOTE_PSHOOK(C) ((C)->flags & AGT_CB_FL_PSETHOOK)
189
191#define AGT_CB_HAS_REMOTE_SHOOK(C) ((C)->flags & AGT_CB_FL_SETHOOK)
192
194#define AGT_CB_HAS_REMOTE_TXHOOK(C) ((C)->flags & AGT_CB_FL_TRANSHOOK)
195
197#define AGT_CB_SET_REMOTE_PSHOOK(C) (C)->flags |= AGT_CB_FL_PSETHOOK
198
200#define AGT_CB_SET_REMOTE_SHOOK(C) (C)->flags |= AGT_CB_FL_SETHOOK
201
203#define AGT_CB_SET_REMOTE_TXHOOK(C) (C)->flags |= AGT_CB_FL_TRANSHOOK
204
207#define AGT_CB_HAS_SKIP_VALIDATE(C) ((C)->flags & AGT_CB_FL_SKIP_VALIDATE)
208#define AGT_CB_HAS_SKIP_APPLY(C) ((C)->flags & AGT_CB_FL_SKIP_APPLY)
209
211#define AGT_CB_SET_SKIP_VALIDATE(C) (C)->flags |= AGT_CB_FL_SKIP_VALIDATE
212#define AGT_CB_SET_SKIP_APPLY(C) (C)->flags |= AGT_CB_FL_SKIP_APPLY
213
214
215/********************************************************************
216* *
217* T Y P E S *
218* *
219*********************************************************************/
220
222typedef enum agt_cb_calltype_t_ {
230
231
233typedef enum agt_edit_cbtype_t_ {
238} YPACK agt_edit_cbtype_t;
239
240
247typedef struct agt_cb_subsys_t_ {
249 dlq_hdr_t qhdr;
250
252 const xmlChar *subsys_id;
253
257 uint8 flags;
258
261} YPACK agt_cb_subsys_t;
262
263
286typedef status_t
287 (*agt_cb_fn_t) (ses_cb_t *scb,
288 rpc_msg_t *msg,
289 agt_cbtyp_t cbtyp,
290 op_editop_t editop,
291 val_value_t *newval,
292 val_value_t *curval);
293
294
335typedef status_t
336 (*agt_cb_hook_t) (ses_cb_t *scb,
337 rpc_msg_t *msg,
339 op_editop_t editop,
340 val_value_t *newval,
341 val_value_t *curval);
342
343
344
374typedef uint8
376 op_editop_t editop,
377 val_value_t *newval,
378 val_value_t *curval,
379 status_t *res);
380
381
382
398typedef status_t
400
401
402
421typedef status_t
422 (*agt_cb_sa_trans_start_t) (const xmlChar *transaction_id,
423 boolean isvalidate,
424 boolean isrollback,
425 boolean isrunning);
426
427
428
443typedef void
445
446
447
461typedef void
462 (*agt_cb_sa_trans_complete_t) (const xmlChar *transaction_id_val);
463
464
465
486typedef status_t
488 rpc_msg_t *msg,
489 cfg_template_t *source_config,
490 cfg_template_t *target_config);
491
492
493
516typedef status_t
518 rpc_msg_t *msg,
519 val_value_t *candidate,
520 val_value_t *running);
521
522
523
539typedef status_t
540 (*agt_cb_sa_validate_complete_t) (const xmlChar *transaction_id);
541
542
543
566typedef status_t
568 rpc_msg_t *msg,
569 val_value_t *candidate,
570 val_value_t *running);
571
572
573
589typedef status_t
590 (*agt_cb_sa_apply_complete_t) (const xmlChar *transaction_id);
591
592
593
616typedef status_t
618 rpc_msg_t *msg,
619 val_value_t *candidate,
620 val_value_t *running);
621
622
623
639typedef status_t
640 (*agt_cb_sa_rollback_complete_t) (const xmlChar *transaction_id);
641
642
643
660typedef status_t
661 (*agt_cb_sa_commit_complete_t) (const xmlChar *transaction_id,
662 agt_commit_type_t commit_type);
663
664
665
683typedef status_t
685 rpc_msg_t *msg,
686 const xmlChar *command_modname,
687 const xmlChar *command_name);
688
689
690
711typedef void
713 rpc_msg_t *msg,
714 const xmlChar *command_modname,
715 const xmlChar *command_name);
716
717
718
732typedef void
733 (*agt_cb_shutdown_t) (void);
734
735
751typedef void
753 const ses_cb_t *scb);
754
755
800typedef status_t
801 (*agt_cb_sa_hook_t) (ses_cb_t *scb,
802 rpc_msg_t *msg,
803 op_editop_t editop,
804 val_value_t *newval,
805 val_value_t *curval,
806 const xmlChar *transaction_id,
807 boolean isvalidate,
808 boolean isload,
809 boolean isrunning);
810
811
820typedef status_t
822
823
853typedef status_t
855 ses_cb_t *scb,
856 rpc_msg_t *msg,
857 val_value_t *source,
858 val_value_t *target);
859
860
861
862
863
880typedef status_t
882 const xmlChar *transaction_id);
883
884
885
887typedef struct agt_cb_extra_flags_t_ {
890 boolean skip_apply;
892
893
900typedef struct agt_cb_fnset_t_ {
909 uint16 flags;
910
913
914 /* used ony by SIL-SA */
919
920 dlq_hdr_t subsysQ;
922} YPACK agt_cb_fnset_t;
923
924
928/********************************************************************
929* *
930* F U N C T I O N S *
931* *
932*********************************************************************/
933
934
952extern status_t
953 agt_cb_init (void);
954
955
962extern void
963 agt_cb_cleanup (void);
964
965
985extern status_t
986 agt_cb_register_callback (const xmlChar *modname,
987 const xmlChar *defpath,
988 const xmlChar *version,
989 agt_cb_fn_t cbfn);
990
991
1016extern status_t
1017 agt_cb_register_edit2_callback (const xmlChar *modname,
1018 const xmlChar *defpath,
1019 const xmlChar *version,
1020 agt_cb_fn_t cbfn);
1021
1022
1045extern status_t
1046 agt_cb_register_edit3_callback (const xmlChar *modname,
1047 const xmlChar *defpath,
1048 const xmlChar *version,
1049 agt_edit3_fn_t edit3_cbfn);
1050
1051
1075extern status_t
1076 agt_cb_register_edit_callback_extra (const xmlChar *modname,
1077 const xmlChar *defpath,
1078 const xmlChar *version,
1079 void *cbfn,
1080 const agt_cb_extra_flags_t *extra_flags);
1081
1082
1103extern status_t
1104 agt_cb_register_xpath_callback (const xmlChar *modname,
1105 const xmlChar *defpath,
1106 const xmlChar *version,
1108
1109
1118extern void
1119 agt_cb_unregister_callbacks (const xmlChar *modname,
1120 const xmlChar *defpath);
1121
1122
1123
1143extern status_t
1144 agt_cb_register_get_callback (const xmlChar *modname,
1145 const xmlChar *defpath,
1146 const xmlChar *version,
1147 getcb_fn2_t get_cbfn);
1148
1149
1163extern status_t
1164 agt_cb_hook_register (const xmlChar *defpath,
1165 agt_hook_fmt_t format,
1166 agt_hook_type_t type,
1167 agt_cb_hook_t cbfn);
1168
1169
1180extern void
1181 agt_cb_hook_unregister (const xmlChar *defpath);
1182
1183
1198extern status_t
1199 agt_cb_order_hook_register (const xmlChar *defpath,
1200 agt_cb_order_hook_t cbfn);
1201
1202
1213extern void
1214 agt_cb_order_hook_unregister (const xmlChar *defpath);
1215
1216
1229extern status_t
1231
1232
1244extern status_t
1246
1247
1257extern void
1259
1260
1270extern void
1272
1273
1291extern status_t
1292 agt_cb_run_trans_start (ses_cb_t *scb,
1294 boolean isvalidate,
1295 boolean isrollback,
1296 boolean isrunning,
1297 boolean no_silsa_cb);
1298
1299
1310extern void
1311 agt_cb_run_trans_complete (agt_cfg_transaction_t *txcb);
1312
1313
1327extern status_t
1329
1330
1343extern status_t
1345
1346
1357extern void
1359
1360
1371extern void
1373
1374
1375#ifdef WITH_YCONTROL
1392extern status_t
1393 agt_cb_invoke_trans_start_cb (const xmlChar *transaction_id,
1394 boolean isvalidate,
1395 boolean isrollback,
1396 boolean isrunning);
1397
1398
1410extern void
1411 agt_cb_invoke_trans_complete (const xmlChar *transaction_id);
1412
1413
1424extern void
1425 agt_cb_sa_run_trans_complete (const xmlChar *transaction_id);
1426
1427
1428
1448extern status_t
1449 agt_cb_register_subsys_callback (const xmlChar *modname,
1450 const xmlChar *defpath,
1451 const xmlChar *version,
1452 const xmlChar *subsys_id,
1453 agt_cb_calltype_t calltype);
1454
1455
1456
1466extern void
1467 agt_cb_unregister_subsys_callback (const xmlChar *subsys_id,
1468 const xmlChar *modname,
1469 const xmlChar *defpath,
1470 const xmlChar *revision);
1471
1472#endif // WITH_YCONTROL
1473
1474
1503extern status_t
1504 agt_cb_make_register_msg (obj_template_t *request_obj,
1505 val_value_t *request_val,
1506 obj_template_t *register_obj,
1507 obj_template_t *module_obj,
1508 obj_template_t *revision_obj,
1509 obj_template_t *path_obj,
1510 obj_template_t *get_path_obj,
1511 obj_template_t *rpc_name_obj,
1512 obj_template_t *action_path_obj,
1513 obj_template_t *post_sethook_path_obj,
1514 obj_template_t *sethook_list,
1515 obj_template_t *txhook_list,
1516 obj_template_t *edit2_path_obj,
1517 obj_template_t *push_path_obj,
1518 obj_template_t *edit3_path_obj,
1519 boolean *any_rw_objs);
1520
1521
1528extern boolean
1530
1531
1538extern boolean
1540
1541
1548extern boolean
1550
1551
1561extern status_t
1562 agt_cb_skip_leafref_validation (const xmlChar *defpath);
1563
1564
1574extern status_t
1575 agt_cb_set_sil_priority (const xmlChar *defpath,
1576 uint8 sil_priority);
1577
1578
1591extern status_t
1593
1594
1606extern status_t
1608
1609
1619extern void
1621
1622
1632extern void
1634
1635
1648extern status_t
1650
1651
1661extern void
1663
1664
1679extern status_t
1681
1682
1692extern void
1694
1695
1714extern status_t
1715 agt_cb_run_validate_complete (ses_cb_t *scb,
1716 rpc_msg_t *msg,
1717 val_value_t *candidate,
1718 val_value_t *running,
1719 boolean epc_only);
1720
1721
1737extern status_t
1738 agt_cb_run_startup_hook (ses_cb_t *scb,
1739 rpc_msg_t *msg,
1740 cfg_template_t *source_config,
1741 cfg_template_t *target_config);
1742
1743
1762extern status_t
1763 agt_cb_run_apply_complete (ses_cb_t *scb,
1764 rpc_msg_t *msg,
1765 val_value_t *candidate,
1766 val_value_t *running,
1767 boolean epc_only);
1768
1769
1788extern status_t
1789 agt_cb_run_rollback_complete (ses_cb_t *scb,
1790 rpc_msg_t *msg,
1791 val_value_t *candidate,
1792 val_value_t *running,
1793 boolean epc_only);
1794
1795
1804extern status_t
1806
1807
1815extern void
1817
1818
1831extern status_t
1833 rpc_msg_t *msg,
1834 const xmlChar *command_modname,
1835 const xmlChar *command_name);
1836
1837
1848extern status_t
1850
1851
1864extern void
1865 agt_cb_run_command_complete (ses_cb_t *scb,
1866 rpc_msg_t *msg,
1867 const xmlChar *command_modname,
1868 const xmlChar *command_name);
1869
1870
1880extern void
1882
1883
1894extern status_t
1896
1897
1907extern void
1909
1910
1918extern void
1919 agt_cb_run_shutdown (void);
1920
1921
1932extern status_t
1933 agt_cb_post_sethook_register (const xmlChar *defpath,
1934 agt_cb_hook_t cbfn);
1935
1936
1945extern void
1946 agt_cb_post_sethook_unregister (const xmlChar *defpath);
1947
1948
1959extern status_t
1961
1962
1972extern void
1974
1975
1985extern void
1986 agt_cb_run_session_hook (ncx_ses_event_t ses_event,
1987 const ses_cb_t *scb);
1988
1989
2002extern status_t
2003 agt_cb_def_hook_register (const xmlChar *defpath,
2004 ncx_def_hook_cbfn_t cbfn);
2005
2006
2014extern void
2015 agt_cb_def_hook_unregister (const xmlChar *defpath);
2016
2017
2030extern status_t
2031 agt_cb_sa_hook_register (const xmlChar *defpath,
2032 agt_hook_fmt_t format,
2033 agt_hook_type_t type,
2034 agt_cb_sa_hook_t cbfn);
2035
2036
2047extern void
2048 agt_cb_sa_hook_unregister (const xmlChar *defpath);
2049
2050
2061extern status_t
2062 agt_cb_sa_post_sethook_register (const xmlChar *defpath,
2063 agt_cb_sa_hook_t cbfn);
2064
2065
2074extern void
2075 agt_cb_sa_post_sethook_unregister (const xmlChar *defpath);
2076
2077
2085extern void
2086 agt_cb_unload_module (const xmlChar *modname);
2087
2088
2101extern status_t
2103
2104
2113extern void
2115
2116
2129extern status_t
2131
2132
2141extern void
2143
2144
2157extern status_t
2159
2160
2169extern void
2171
2172
2185extern status_t
2187
2188
2197extern void
2199
2200
2201#ifdef WITH_YCONTROL
2218extern status_t
2219 agt_cb_sa_run_commit_completeness_cb (const xmlChar *transaction_id,
2220 agt_cbtyp_t cbtyp,
2221 agt_commit_type_t commit_type);
2222
2223#endif // WITH_YCONTROL
2224
2225
2238extern status_t
2240
2241
2251extern void
2253
2254
2267extern status_t
2269
2270
2279extern void
2281
2282
2283
2291extern boolean
2293
2294
2308extern status_t
2309 agt_cb_run_epc_commit_complete (ses_cb_t *scb,
2310 rpc_msg_t *msg,
2311 val_value_t *source,
2312 val_value_t *target);
2313
2314
2324extern boolean
2326 agt_cbtyp_t cbtyp);
2327
2328
2349extern status_t
2350 agt_cb_register_sa_push_callback (const xmlChar *modname,
2351 const xmlChar *defpath,
2352 const xmlChar *version,
2353 agt_cb_sa_push_t cbfn);
2354
2355
2358#ifdef __cplusplus
2359} /* end extern 'C' */
2360#endif
2361
2362#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:1636
void agt_cb_sa_trans_complete_unregister(agt_cb_sa_trans_complete_t cbfn)
Uregister a Transaction Complete callback.
Definition: agt_cb.c:2858
void agt_cb_unregister_callbacks(const xmlChar *modname, const xmlChar *defpath)
Unregister all EDIT callback functions for a specific object.
Definition: agt_cb.c:2615
status_t agt_cb_rollback_complete_register(agt_cb_rollback_complete_t cbfn)
Register a Rollback Complete callback.
Definition: agt_cb.c:5323
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:2160
void agt_cb_def_hook_unregister(const xmlChar *defpath)
Unregister Dynamic Default callback functions for a specific object.
Definition: agt_cb.c:6577
void agt_cb_session_hook_unregister(agt_cb_session_hook_t cbfn)
Unregister a Session Hook callback.
Definition: agt_cb.c:6418
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:7574
void agt_cb_command_complete_unregister(agt_cb_command_complete_t cbfn)
Unregister a Command Complete callback.
Definition: agt_cb.c:6030
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:1980
void agt_cb_hook_unregister(const xmlChar *defpath)
Unregister a Hook callback.
Definition: agt_cb.c:2083
void agt_cb_shutdown_unregister(agt_cb_shutdown_t cbfn)
Unregister a Shutdown callback.
Definition: agt_cb.c:6157
void agt_cb_trans_start_unregister(agt_cb_trans_start_t cbfn)
Unregister a Transaction Start callback.
Definition: agt_cb.c:2397
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:4935
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:7343
void agt_cb_edit_phase_complete_unregister(agt_cb_edit_phase_complete_t cbfn)
Unregister an Edit Phase Complete callback.
Definition: agt_cb.c:7620
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:1880
void agt_cb_command_start_unregister(agt_cb_command_start_t cbfn)
Unregister a Command Start callback.
Definition: agt_cb.c:5885
boolean agt_cb_obj_has_push_callback(obj_template_t *obj)
Check if the specified object has a SIL-SA PUSH callback.
Definition: agt_cb.c:4958
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:6617
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:7229
void agt_cb_startup_hook_unregister(agt_cb_startup_hook_t cbfn)
Unregister a Startup Hook callback.
Definition: agt_cb.c:5122
void agt_cb_validate_complete_unregister(agt_cb_validate_complete_t cbfn)
Unregister a Validate Complete callback.
Definition: agt_cb.c:5207
void agt_cb_order_hook_unregister(const xmlChar *defpath)
Unregister a Set-Order-Hook callback.
Definition: agt_cb.c:2236
void agt_cb_trans_complete_unregister(agt_cb_trans_complete_t cbfn)
Unregister a Transaction Complete callback.
Definition: agt_cb.c:2430
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:7264
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:4912
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:7389
status_t agt_cb_register_sa_push_callback(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_cb_sa_push_t cbfn)
Register an object specific SIL-SA PUSH callback function.
Definition: agt_cb.c:7712
void agt_cb_apply_complete_unregister(agt_cb_apply_complete_t cbfn)
Unregister a Apply Complete callback.
Definition: agt_cb.c:5288
status_t agt_cb_startup_hook_register(agt_cb_startup_hook_t cbfn)
Register a Startup Hook callback.
Definition: agt_cb.c:5067
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:6230
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:6501
status_t agt_cb_sa_trans_start_register(agt_cb_sa_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2731
void agt_cb_post_sethook_unregister(const xmlChar *defpath)
Unregister a Post Set Hook callback.
Definition: agt_cb.c:6298
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:1773
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:1735
void agt_cb_sa_trans_start_unregister(agt_cb_sa_trans_start_t cbfn)
Uregister a Transaction Start callback.
Definition: agt_cb.c:2827
status_t agt_cb_trans_start_register(agt_cb_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2310
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:7066
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:1587
void agt_cb_sa_post_sethook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Post Set Hook callback.
Definition: agt_cb.c:6894
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:7101
void agt_cb_sa_hook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Hook SIL-SA callback.
Definition: agt_cb.c:6727
status_t agt_cb_command_complete_register(agt_cb_command_complete_t cbfn)
Register a Command Complete callback.
Definition: agt_cb.c:5974
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:7801
status_t agt_cb_sa_trans_complete_register(agt_cb_sa_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2780
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:6813
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:7019
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:1685
boolean agt_cb_any_edit_phase_complete(void)
Return true if any edit phase complete callbacks registered.
Definition: agt_cb.c:7646
status_t agt_cb_run_command_start(ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *command_modname, const xmlChar *command_name)
Run Command Start callbacks.
Definition: agt_cb.c:5922
status_t agt_cb_command_start_register(agt_cb_command_start_t cbfn)
Register a Command Start callback.
Definition: agt_cb.c:5837
status_t agt_cb_trans_complete_register(agt_cb_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2354
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:7311
status_t agt_cb_validate_complete_register(agt_cb_validate_complete_t cbfn)
Register a Validate Complete callback.
Definition: agt_cb.c:5159
void agt_cb_rollback_complete_unregister(agt_cb_rollback_complete_t cbfn)
Unregister a Rollback Complete callback.
Definition: agt_cb.c:5370
status_t agt_cb_shutdown_register(agt_cb_shutdown_t cbfn)
Register a Shutdown callback.
Definition: agt_cb.c:6110
status_t agt_cb_session_hook_register(agt_cb_session_hook_t cbfn)
Register a Session Hook callback.
Definition: agt_cb.c:6372
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:7147
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:7182
status_t agt_cb_apply_complete_register(agt_cb_apply_complete_t cbfn)
Register a Apply Complete callback.
Definition: agt_cb.c:5242
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:336
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:590
agt_edit_cbtype_t
Enumeration for EDIT callback types for SIL and SIL-SA to register.
Definition: agt_cb.h:233
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:444
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:640
status_t(* agt_cb_sa_push_t)(agt_sa_push_parms_t *sa_parms)
Callback function for PUSH object handler.
Definition: agt_cb.h:821
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:661
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:487
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:801
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:287
status_t(* agt_cb_trans_start_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_start callback.
Definition: agt_cb.h:399
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_cb_command_complete_t callback.
Definition: agt_cb.h:712
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:854
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:422
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:540
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:517
void(* agt_cb_sa_trans_complete_t)(const xmlChar *transaction_id_val)
Typedef of the sa_trans_complete callback.
Definition: agt_cb.h:462
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:567
void(* agt_cb_shutdown_t)(void)
Typedef of the agt_cb_shutdown_t callback.
Definition: agt_cb.h:733
agt_cb_calltype_t
different data node callback types for SIL and SIL-SA to register
Definition: agt_cb.h:222
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:617
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:881
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:375
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:752
status_t(* agt_cb_command_start_t)(ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *command_modname, const xmlChar *command_name)
Typedef of the agt_cb_command_start_t callback.
Definition: agt_cb.h:684
@ AGT_EDIT_CBTYPE_EDIT2
EDIT2 callback type.
Definition: agt_cb.h:236
@ AGT_EDIT_CBTYPE_EDIT
EDIT callback type.
Definition: agt_cb.h:235
@ AGT_EDIT_CBTYPE_NONE
not set
Definition: agt_cb.h:234
@ AGT_EDIT_CBTYPE_EDIT3
EDIT3 callback type.
Definition: agt_cb.h:237
@ AGT_CB_CALLTYPE_GET
GET2 callback.
Definition: agt_cb.h:227
@ AGT_CB_CALLTYPE_NONE
not set
Definition: agt_cb.h:223
@ AGT_CB_CALLTYPE_EDIT
EDIT1 callback.
Definition: agt_cb.h:224
@ AGT_CB_CALLTYPE_PUSH
PUSH callback.
Definition: agt_cb.h:228
@ AGT_CB_CALLTYPE_EDIT3
EDIT3 callback.
Definition: agt_cb.h:226
@ AGT_CB_CALLTYPE_EDIT2
EDIT2 callback.
Definition: agt_cb.h:225
agt_hook_fmt_t
different hook formats dictates specific hook functionality
Definition: agt_hook_util.h:110
agt_commit_type_t
NETCONF commit types.
Definition: agt.h:788
agt_hook_type_t
Hook types enumeration to specify Hook type.
Definition: agt.h:854
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:762
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:1720
ncx_ses_event_t
internal enumerations for session event types
Definition: ncxtypes.h:1684
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:729
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:887
boolean skip_validate
false = perform validate phase, true = skip
Definition: agt_cb.h:889
agt_edit_cbtype_t edit_cbtype
EDIT callback type.
Definition: agt_cb.h:888
boolean skip_apply
false = perform apply phase, true = skip
Definition: agt_cb.h:890
Definition: agt_cb.h:900
getcb_fn2_t get_cbfn
GET-2.
Definition: agt_cb.h:903
agt_cb_sa_hook_t sa_post_set_hook_cbfn
SIL-SA Post Set Hook.
Definition: agt_cb.h:916
agt_cb_hook_t post_set_hook_cbfn
Post Set Hook.
Definition: agt_cb.h:906
dlq_hdr_t subsysQ
Q of agt_cb_subsys_t.
Definition: agt_cb.h:920
agt_cb_hook_t trans_hook_cbfn
Transaction Hook.
Definition: agt_cb.h:907
agt_cb_order_hook_t order_hook_cbfn
Set Order Hook.
Definition: agt_cb.h:904
agt_cb_fn_t cbfn
EDIT-1 or EDIT-2.
Definition: agt_cb.h:901
ncx_transaction_id_t txid
current edit transaction ID for intermediate processing
Definition: agt_cb.h:912
xpath_bool_eval_fn_t xpath_cbfn
XPath Callback.
Definition: agt_cb.h:908
agt_cb_sa_hook_t sa_set_hook_cbfn
SIL-SA Set Hook.
Definition: agt_cb.h:915
agt_cb_hook_t set_hook_cbfn
Set Hook.
Definition: agt_cb.h:905
agt_cb_sa_hook_t sa_trans_hook_cbfn
SIL-SA Transaction Hook.
Definition: agt_cb.h:917
agt_cb_sa_push_t sa_push_cbfn
SIL-SA PUSH Callback.
Definition: agt_cb.h:918
uint16 flags
internal flags
Definition: agt_cb.h:909
agt_edit3_fn_t edit3_cbfn
EDIT-3.
Definition: agt_cb.h:902
Definition: agt_cb.h:247
dlq_hdr_t qhdr
queue header
Definition: agt_cb.h:249
status_t res
status used by GET only
Definition: agt_cb.h:260
const xmlChar * subsys_id
backptr to agt_sil_state->subsys_id
Definition: agt_cb.h:252
uint8 flags
EDIT, EDIT2, GET, or both get and edit; BUT cannot be EDIT2 and EDIT1 at the same time.
Definition: agt_cb.h:257
Transaction Control Block.
Definition: agt_cfg.h:235
SIL-SA PUSH Parameter Block.
Definition: agt.h:897
struct representing 1 configuration database
Definition: cfg.h:229
One YANG data-def-stmt.
Definition: obj.h:1284
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:185
Session Control Block.
Definition: ses.h:759
one value to match one type
Definition: val.h:962
Value Node Basic Support.
Schema and data model Xpath search support.