yumapro  24.10-3
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
28/*********************************************************************
29* *
30* C H A N G E H I S T O R Y *
31* *
32*********************************************************************
33
34date init comment
35----------------------------------------------------------------------
3616-apr-07 abb Begun; split out from agt_ps.h
3701-aug-08 abb Remove NCX specific stuff; YANG only now
38*/
39
40#include "agt.h"
41#include "agt_editcb.h"
42#include "getcb.h"
43#include "op.h"
44#include "rpc.h"
45#include "ses.h"
46#include "status_enum.h"
47#include "val.h"
48#include "xpath.h"
49
50#ifndef _H_agt_cfg
51#include "agt_cfg.h"
52#endif
53
54#ifndef _H_agt_hook_util
55#include "agt_hook_util.h"
56#endif
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
62
63/* Header only */
64
87/********************************************************************
88* *
89* C O N S T A N T S *
90* *
91*********************************************************************/
92
93
95#define FORALL TRUE
96
98#define FORONE FALSE
99
103#define AGT_CB_FL_EDIT bit0
104
106#define AGT_CB_FL_GET bit1
107
109#define AGT_CB_FL_EDIT2 bit2
110
111
113#define AGT_CB_FL_PSHOOK bit3
114#define AGT_CB_FL_SHOOK bit4
115#define AGT_CB_FL_TXHOOK bit5
119#define AGT_CB_FL_SETHOOK_TREE bit0
120#define AGT_CB_FL_TRANSHOOK_TREE bit1
121#define AGT_CB_FL_SKIP_SETHOOK bit2
122#define AGT_CB_FL_SKIP_TRANSHOOK bit3
126#define AGT_CB_FL_PSETHOOK bit4
127
129#define AGT_CB_FL_SETHOOK bit5
130
132#define AGT_CB_FL_TRANSHOOK bit6
133
135#define AGT_CB_FL_EDIT3 bit7
136
137/* 3 flags for skip phase callbacks in the agt_cb_fnset_t.flags field */
138#define AGT_CB_FL_SKIP_VALIDATE bit8
139#define AGT_CB_FL_SKIP_APPLY bit9
142#define AGT_CB_SUBSYS_HAS_EDIT(S) ((S)->flags & AGT_CB_FL_EDIT)
143
145#define AGT_CB_SUBSYS_HAS_GET(S) ((S)->flags & AGT_CB_FL_GET)
146
148#define AGT_CB_SUBSYS_HAS_EDIT2(S) ((S)->flags & AGT_CB_FL_EDIT2)
149
151#define AGT_CB_SUBSYS_HAS_EDIT3(S) ((S)->flags & AGT_CB_FL_EDIT3)
152
153
157#define AGT_CB_SUBSYS_HAS_PSHOOK(S) ((S)->flags & AGT_CB_FL_PSHOOK)
158
160#define AGT_CB_SUBSYS_HAS_SHOOK(S) ((S)->flags & AGT_CB_FL_SHOOK)
161
163#define AGT_CB_SUBSYS_HAS_TXHOOK(S) ((S)->flags & AGT_CB_FL_TXHOOK)
164
166#define AGT_CB_SUBSYS_SET_PSHOOK(S) (S)->flags |= AGT_CB_FL_PSHOOK
167
169#define AGT_CB_SUBSYS_SET_SHOOK(S) (S)->flags |= AGT_CB_FL_SHOOK
170
172#define AGT_CB_SUBSYS_SET_TXHOOK(S) (S)->flags |= AGT_CB_FL_TXHOOK
173
174
178#define AGT_CB_HAS_REMOTE_PSHOOK(C) ((C)->flags & AGT_CB_FL_PSETHOOK)
179
181#define AGT_CB_HAS_REMOTE_SHOOK(C) ((C)->flags & AGT_CB_FL_SETHOOK)
182
184#define AGT_CB_HAS_REMOTE_TXHOOK(C) ((C)->flags & AGT_CB_FL_TRANSHOOK)
185
187#define AGT_CB_SET_REMOTE_PSHOOK(C) (C)->flags |= AGT_CB_FL_PSETHOOK
188
190#define AGT_CB_SET_REMOTE_SHOOK(C) (C)->flags |= AGT_CB_FL_SETHOOK
191
193#define AGT_CB_SET_REMOTE_TXHOOK(C) (C)->flags |= AGT_CB_FL_TRANSHOOK
194
197#define AGT_CB_HAS_SKIP_VALIDATE(C) ((C)->flags & AGT_CB_FL_SKIP_VALIDATE)
198#define AGT_CB_HAS_SKIP_APPLY(C) ((C)->flags & AGT_CB_FL_SKIP_APPLY)
199
201#define AGT_CB_SET_SKIP_VALIDATE(C) (C)->flags |= AGT_CB_FL_SKIP_VALIDATE
202#define AGT_CB_SET_SKIP_APPLY(C) (C)->flags |= AGT_CB_FL_SKIP_APPLY
203
204
205/********************************************************************
206* *
207* T Y P E S *
208* *
209*********************************************************************/
210
212typedef enum agt_cb_calltype_t_ {
219
220
222typedef enum agt_edit_cbtype_t_ {
227} YPACK agt_edit_cbtype_t;
228
229
234typedef struct agt_cb_subsys_t_ {
236 dlq_hdr_t qhdr;
237
239 const xmlChar *subsys_id;
240
244 uint8 flags;
245
248} YPACK agt_cb_subsys_t;
249
250
271typedef status_t
272 (*agt_cb_fn_t) (ses_cb_t *scb,
273 rpc_msg_t *msg,
274 agt_cbtyp_t cbtyp,
275 op_editop_t editop,
276 val_value_t *newval,
277 val_value_t *curval);
278
279
318typedef status_t
319 (*agt_cb_hook_t) (ses_cb_t *scb,
320 rpc_msg_t *msg,
322 op_editop_t editop,
323 val_value_t *newval,
324 val_value_t *curval);
325
326
327
355typedef uint8
357 op_editop_t editop,
358 val_value_t *newval,
359 val_value_t *curval,
360 status_t *res);
361
362
363
377typedef status_t
379
380
381
398typedef status_t
399 (*agt_cb_sa_trans_start_t) (const xmlChar *transaction_id,
400 boolean isvalidate,
401 boolean isrollback,
402 boolean isrunning);
403
404
405
418typedef void
420
421
422
434typedef void
435 (*agt_cb_sa_trans_complete_t) (const xmlChar *transaction_id_val);
436
437
438
457typedef status_t
459 rpc_msg_t *msg,
460 cfg_template_t *source_config,
461 cfg_template_t *target_config);
462
463
464
485typedef status_t
487 rpc_msg_t *msg,
488 val_value_t *candidate,
489 val_value_t *running);
490
491
492
508typedef status_t
509 (*agt_cb_sa_validate_complete_t) (const xmlChar *transaction_id);
510
511
512
533typedef status_t
535 rpc_msg_t *msg,
536 val_value_t *candidate,
537 val_value_t *running);
538
539
540
556typedef status_t
557 (*agt_cb_sa_apply_complete_t) (const xmlChar *transaction_id);
558
559
560
581typedef status_t
583 rpc_msg_t *msg,
584 val_value_t *candidate,
585 val_value_t *running);
586
587
588
604typedef status_t
605 (*agt_cb_sa_rollback_complete_t) (const xmlChar *transaction_id);
606
607
608
625typedef status_t
626 (*agt_cb_sa_commit_complete_t) (const xmlChar *transaction_id,
627 agt_commit_type_t commit_type);
628
629
630
649typedef void
651 rpc_msg_t *msg,
652 const xmlChar *command_modname,
653 const xmlChar *command_name);
654
655
656
668typedef void
669 (*agt_cb_shutdown_t) (void);
670
671
684typedef void
686 const ses_cb_t *scb);
687
688
731typedef status_t
732 (*agt_cb_sa_hook_t) (ses_cb_t *scb,
733 rpc_msg_t *msg,
734 op_editop_t editop,
735 val_value_t *newval,
736 val_value_t *curval,
737 const xmlChar *transaction_id,
738 boolean isvalidate,
739 boolean isload,
740 boolean isrunning);
741
742
770typedef status_t
772 ses_cb_t *scb,
773 rpc_msg_t *msg,
774 val_value_t *source,
775 val_value_t *target);
776
777
778
779
780
797typedef status_t
799 const xmlChar *transaction_id);
800
801
802
803
805typedef struct agt_cb_extra_flags_t_ {
808 boolean skip_apply;
810
811
816typedef struct agt_cb_fnset_t_ {
825 uint16 flags;
826
827 /* used ony by SIL-SA */
831
832 dlq_hdr_t subsysQ;
834} YPACK agt_cb_fnset_t;
835
836
840/********************************************************************
841* *
842* F U N C T I O N S *
843* *
844*********************************************************************/
845
846
863extern status_t
864 agt_cb_init (void);
865
866
872extern void
873 agt_cb_cleanup (void);
874
875
893extern status_t
894 agt_cb_register_callback (const xmlChar *modname,
895 const xmlChar *defpath,
896 const xmlChar *version,
897 agt_cb_fn_t cbfn);
898
899
922extern status_t
923 agt_cb_register_edit2_callback (const xmlChar *modname,
924 const xmlChar *defpath,
925 const xmlChar *version,
926 agt_cb_fn_t cbfn);
927
928
951extern status_t
952 agt_cb_register_edit3_callback (const xmlChar *modname,
953 const xmlChar *defpath,
954 const xmlChar *version,
955 agt_edit3_fn_t edit3_cbfn);
956
957
981extern status_t
982 agt_cb_register_edit_callback_extra (const xmlChar *modname,
983 const xmlChar *defpath,
984 const xmlChar *version,
985 void *cbfn,
986 const agt_cb_extra_flags_t *extra_flags);
987
988
1007extern status_t
1008 agt_cb_register_xpath_callback (const xmlChar *modname,
1009 const xmlChar *defpath,
1010 const xmlChar *version,
1012
1013
1020extern void
1021 agt_cb_unregister_callbacks (const xmlChar *modname,
1022 const xmlChar *defpath);
1023
1024
1025
1043extern status_t
1044 agt_cb_register_get_callback (const xmlChar *modname,
1045 const xmlChar *defpath,
1046 const xmlChar *version,
1047 getcb_fn2_t get_cbfn);
1048
1049
1061extern status_t
1062 agt_cb_hook_register (const xmlChar *defpath,
1063 agt_hook_fmt_t format,
1064 agt_hook_type_t type,
1065 agt_cb_hook_t cbfn);
1066
1067
1076extern void
1077 agt_cb_hook_unregister (const xmlChar *defpath);
1078
1079
1092extern status_t
1093 agt_cb_order_hook_register (const xmlChar *defpath,
1094 agt_cb_order_hook_t cbfn);
1095
1096
1105extern void
1106 agt_cb_order_hook_unregister (const xmlChar *defpath);
1107
1108
1119extern status_t
1121
1122
1132extern status_t
1134
1135
1143extern void
1145
1146
1154extern void
1156
1157
1174extern status_t
1177 boolean isvalidate,
1178 boolean isrollback,
1179 boolean isrunning,
1180 boolean no_silsa_cb);
1181
1182
1192extern void
1194
1195
1207extern status_t
1209
1210
1221extern status_t
1223
1224
1233extern void
1235
1236
1245extern void
1247
1248
1249#ifdef WITH_YCONTROL
1265extern status_t
1266 agt_cb_invoke_trans_start_cb (const xmlChar *transaction_id,
1267 boolean isvalidate,
1268 boolean isrollback,
1269 boolean isrunning);
1270
1271
1282extern void
1283 agt_cb_invoke_trans_complete (const xmlChar *transaction_id);
1284
1285
1295extern void
1296 agt_cb_sa_run_trans_complete (const xmlChar *transaction_id);
1297
1298
1299
1318extern status_t
1319 agt_cb_register_subsys_callback (const xmlChar *modname,
1320 const xmlChar *defpath,
1321 const xmlChar *version,
1322 const xmlChar *subsys_id,
1323 agt_cb_calltype_t calltype);
1324
1325
1326
1335extern void
1336 agt_cb_unregister_subsys_callback (const xmlChar *subsys_id,
1337 const xmlChar *modname,
1338 const xmlChar *defpath,
1339 const xmlChar *revision);
1340
1341#endif // WITH_YCONTROL
1342
1343
1370extern status_t
1372 val_value_t *request_val,
1373 obj_template_t *register_obj,
1374 obj_template_t *module_obj,
1375 obj_template_t *revision_obj,
1376 obj_template_t *path_obj,
1377 obj_template_t *get_path_obj,
1378 obj_template_t *rpc_name_obj,
1379 obj_template_t *action_path_obj,
1380 obj_template_t *post_sethook_path_obj,
1381 obj_template_t *sethook_list,
1382 obj_template_t *txhook_list,
1383 obj_template_t *edit2_path_obj,
1384 obj_template_t *edit3_path_obj,
1385 boolean *any_rw_objs);
1386
1387
1394extern boolean
1396
1397
1404extern boolean
1406
1407
1416extern status_t
1417 agt_cb_skip_leafref_validation (const xmlChar *defpath);
1418
1419
1428extern status_t
1429 agt_cb_set_sil_priority (const xmlChar *defpath,
1430 uint8 sil_priority);
1431
1432
1443extern status_t
1445
1446
1456extern status_t
1458
1459
1467extern void
1469
1470
1478extern void
1480
1481
1492extern status_t
1494
1495
1503extern void
1505
1506
1519extern status_t
1521
1522
1530extern void
1532
1533
1551extern status_t
1553 rpc_msg_t *msg,
1554 val_value_t *candidate,
1555 val_value_t *running,
1556 boolean epc_only);
1557
1558
1573extern status_t
1575 rpc_msg_t *msg,
1576 cfg_template_t *source_config,
1577 cfg_template_t *target_config);
1578
1579
1597extern status_t
1599 rpc_msg_t *msg,
1600 val_value_t *candidate,
1601 val_value_t *running,
1602 boolean epc_only);
1603
1604
1622extern status_t
1624 rpc_msg_t *msg,
1625 val_value_t *candidate,
1626 val_value_t *running,
1627 boolean epc_only);
1628
1629
1638extern status_t
1640
1641
1653extern void
1655 rpc_msg_t *msg,
1656 const xmlChar *command_modname,
1657 const xmlChar *command_name);
1658
1659
1667extern void
1669
1670
1679extern status_t
1681
1682
1690extern void
1692
1693
1700extern void
1701 agt_cb_run_shutdown (void);
1702
1703
1712extern status_t
1713 agt_cb_post_sethook_register (const xmlChar *defpath,
1714 agt_cb_hook_t cbfn);
1715
1716
1723extern void
1724 agt_cb_post_sethook_unregister (const xmlChar *defpath);
1725
1726
1735extern status_t
1737
1738
1746extern void
1748
1749
1758extern void
1760 const ses_cb_t *scb);
1761
1762
1773extern status_t
1774 agt_cb_def_hook_register (const xmlChar *defpath,
1775 ncx_def_hook_cbfn_t cbfn);
1776
1777
1783extern void
1784 agt_cb_def_hook_unregister (const xmlChar *defpath);
1785
1786
1797extern status_t
1798 agt_cb_sa_hook_register (const xmlChar *defpath,
1799 agt_hook_fmt_t format,
1800 agt_hook_type_t type,
1801 agt_cb_sa_hook_t cbfn);
1802
1803
1812extern void
1813 agt_cb_sa_hook_unregister (const xmlChar *defpath);
1814
1815
1824extern status_t
1825 agt_cb_sa_post_sethook_register (const xmlChar *defpath,
1826 agt_cb_sa_hook_t cbfn);
1827
1828
1835extern void
1836 agt_cb_sa_post_sethook_unregister (const xmlChar *defpath);
1837
1838
1845extern void
1846 agt_cb_unload_module (const xmlChar *modname);
1847
1848
1859extern status_t
1861
1862
1869extern void
1871
1872
1883extern status_t
1885
1886
1893extern void
1895
1896
1907extern status_t
1909
1910
1917extern void
1919
1920
1931extern status_t
1933
1934
1941extern void
1943
1944
1945#ifdef WITH_YCONTROL
1961extern status_t
1962 agt_cb_sa_run_commit_completeness_cb (const xmlChar *transaction_id,
1963 agt_cbtyp_t cbtyp,
1964 agt_commit_type_t commit_type);
1965#endif // WITH_YCONTROL
1966
1967
1968
1979extern status_t
1981
1982
1990extern void
1992
1993
2004extern status_t
2006
2007
2014extern void
2016
2017
2018
2024extern boolean
2026
2039extern status_t
2041 rpc_msg_t *msg,
2042 val_value_t *source,
2043 val_value_t *target);
2044
2045
2055extern boolean
2057 agt_cbtyp_t cbtyp);
2058
2059
2062#ifdef __cplusplus
2063} /* end extern 'C' */
2064#endif
2065
2066#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:2764
void agt_cb_unregister_callbacks(const xmlChar *modname, const xmlChar *defpath)
Unregister all EDIT callback functions for a specific object.
Definition: agt_cb.c:2521
status_t agt_cb_rollback_complete_register(agt_cb_rollback_complete_t cbfn)
Register a Rollback Complete callback.
Definition: agt_cb.c:5179
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:6295
status_t agt_cb_run_rollback_complete(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running, boolean epc_only)
Run Rollback Complete callbacks.
Definition: agt_cb.c:5601
void agt_cb_session_hook_unregister(agt_cb_session_hook_t cbfn)
Unregister a Session Hook callback.
Definition: agt_cb.c:6136
void agt_cb_unregister_subsys_callback(const xmlChar *subsys_id, const xmlChar *modname, const xmlChar *defpath, const xmlChar *revision)
Unregister remote subsystem callback for a specific object.
Definition: agt_cb.c:3331
void agt_cb_run_shutdown(void)
Run Shutdown callbacks.
Definition: agt_cb.c:5907
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:7291
void agt_cb_command_complete_unregister(agt_cb_command_complete_t cbfn)
Unregister a Command Complete callback.
Definition: agt_cb.c:5748
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:5875
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:4814
void agt_cb_invoke_trans_complete(const xmlChar *transaction_id)
Invoke Transaction Complete callbacks.
Definition: agt_cb.c:2855
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:7061
void agt_cb_edit_phase_complete_unregister(agt_cb_edit_phase_complete_t cbfn)
Unregister an Edit Phase Complete callback.
Definition: agt_cb.c:7337
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
void agt_cb_sa_run_trans_complete(const xmlChar *transaction_id)
This function simply calls agt_sil_transaction_complete_cb, which makes a <server-event> message and ...
Definition: agt_cb.c:2891
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:6335
status_t agt_cb_run_trans_start(ses_cb_t *scb, agt_cfg_transaction_t *txcb, boolean isvalidate, boolean isrollback, boolean isrunning, boolean no_silsa_cb)
Run Transaction start callbacks.
Definition: agt_cb.c:2389
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:6947
void agt_cb_startup_hook_unregister(agt_cb_startup_hook_t cbfn)
Unregister a Startup Hook callback.
Definition: agt_cb.c:4978
void agt_cb_validate_complete_unregister(agt_cb_validate_complete_t cbfn)
Unregister a Validate Complete callback.
Definition: agt_cb.c:5063
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:6982
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:4791
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:7107
void agt_cb_run_session_hook(ncx_ses_event_t ses_event, const ses_cb_t *scb)
Run Session Hook callbacks.
Definition: agt_cb.c:6172
status_t agt_cb_run_epc_commit_complete(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *source, val_value_t *target)
agt_cb_run_epc_commit_complete
Definition: agt_cb.c:7394
void agt_cb_apply_complete_unregister(agt_cb_apply_complete_t cbfn)
Unregister a Apply Complete callback.
Definition: agt_cb.c:5144
status_t agt_cb_run_validate_complete(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running, boolean epc_only)
Run Validate Complete callbacks.
Definition: agt_cb.c:5317
status_t agt_cb_startup_hook_register(agt_cb_startup_hook_t cbfn)
Register a Startup Hook callback.
Definition: agt_cb.c:4923
status_t agt_cb_skip_leafref_validation(const xmlChar *defpath)
Set a previously registered callback as a node that the server should skip leafref validation in orde...
Definition: agt_cb.c:4841
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:5948
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:6219
status_t agt_cb_sa_trans_start_register(agt_cb_sa_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2637
void agt_cb_post_sethook_unregister(const xmlChar *defpath)
Unregister a Post Set Hook callback.
Definition: agt_cb.c:6016
status_t agt_cb_sa_run_commit_completeness_cb(const xmlChar *transaction_id, agt_cbtyp_t cbtyp, agt_commit_type_t commit_type)
Run SIL-SA Commit Completeness callbacks.
Definition: agt_cb.c:7151
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
status_t agt_cb_register_subsys_callback(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, const xmlChar *subsys_id, agt_cb_calltype_t calltype)
Register an object specific callback function.
Definition: agt_cb.c:3108
void agt_cb_unload_module(const xmlChar *modname)
Remove the modhdr for the specified module since it is being unloaded from the server or subsystem.
Definition: agt_cb.c:6690
void agt_cb_sa_trans_start_unregister(agt_cb_sa_trans_start_t cbfn)
Uregister a Transaction Start callback.
Definition: agt_cb.c:2733
status_t agt_cb_make_register_msg(obj_template_t *request_obj, val_value_t *request_val, obj_template_t *register_obj, obj_template_t *module_obj, obj_template_t *revision_obj, obj_template_t *path_obj, obj_template_t *get_path_obj, obj_template_t *rpc_name_obj, obj_template_t *action_path_obj, obj_template_t *post_sethook_path_obj, obj_template_t *sethook_list, obj_template_t *txhook_list, obj_template_t *edit2_path_obj, obj_template_t *edit3_path_obj, boolean *any_rw_objs)
Make a subsystem register message.
Definition: agt_cb.c:4305
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:6784
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:6612
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:6819
status_t agt_cb_run_startup_hook(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *source_config, cfg_template_t *target_config)
Run startup hook callbacks.
Definition: agt_cb.c:5541
status_t agt_cb_set_sil_priority(const xmlChar *defpath, uint8 sil_priority)
Set the desired SIL priority with a callback instead of using the YANG extension for this purpose.
Definition: agt_cb.c:4879
void agt_cb_sa_hook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Hook SIL-SA callback.
Definition: agt_cb.c:6445
status_t agt_cb_command_complete_register(agt_cb_command_complete_t cbfn)
Register a Command Complete callback.
Definition: agt_cb.c:5692
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:7424
status_t agt_cb_sa_trans_complete_register(agt_cb_sa_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2686
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:6531
status_t agt_cb_init(void)
Init the server callback module.
Definition: agt_cb.c:1400
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:6737
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:7363
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_run_command_complete(ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *command_modname, const xmlChar *command_name)
Run Command Complete callbacks.
Definition: agt_cb.c:5784
status_t agt_cb_run_apply_complete(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running, boolean epc_only)
Run Apply Complete callbacks.
Definition: agt_cb.c:5428
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:7029
void agt_cb_cleanup(void)
Cleanup the server callback module.
Definition: agt_cb.c:1445
void agt_cb_run_trans_complete(agt_cfg_transaction_t *txcb)
Run Transaction Complete callbacks.
Definition: agt_cb.c:2478
status_t agt_cb_validate_complete_register(agt_cb_validate_complete_t cbfn)
Register a Validate Complete callback.
Definition: agt_cb.c:5015
void agt_cb_rollback_complete_unregister(agt_cb_rollback_complete_t cbfn)
Unregister a Rollback Complete callback.
Definition: agt_cb.c:5226
status_t agt_cb_shutdown_register(agt_cb_shutdown_t cbfn)
Register a Shutdown callback.
Definition: agt_cb.c:5828
status_t agt_cb_session_hook_register(agt_cb_session_hook_t cbfn)
Register a Session Hook callback.
Definition: agt_cb.c:6090
status_t agt_cb_invoke_trans_start_cb(const xmlChar *transaction_id, boolean isvalidate, boolean isrollback, boolean isrunning)
Invoke Transaction start callbacks.
Definition: agt_cb.c:2802
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:6865
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:6900
status_t agt_cb_apply_complete_register(agt_cb_apply_complete_t cbfn)
Register a Apply Complete callback.
Definition: agt_cb.c:5098
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:319
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:557
agt_edit_cbtype_t
Enumeration for EDIT callback types for SIL and SIL-SA to register.
Definition: agt_cb.h:222
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:419
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:605
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:626
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:458
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:732
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:272
status_t(* agt_cb_trans_start_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_start callback.
Definition: agt_cb.h:378
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:650
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:771
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:399
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:509
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:486
void(* agt_cb_sa_trans_complete_t)(const xmlChar *transaction_id_val)
Typedef of the sa_trans_complete callback.
Definition: agt_cb.h:435
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:534
void(* agt_cb_shutdown_t)(void)
Typedef of the agt_cb_shutdown_t callback.
Definition: agt_cb.h:669
agt_cb_calltype_t
different data node callback types for SIL and SIL-SA to register
Definition: agt_cb.h:212
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:582
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:798
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:356
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:685
@ AGT_EDIT_CBTYPE_EDIT2
EDIT2 callback type.
Definition: agt_cb.h:225
@ AGT_EDIT_CBTYPE_EDIT
EDIT callback type.
Definition: agt_cb.h:224
@ AGT_EDIT_CBTYPE_NONE
not set
Definition: agt_cb.h:223
@ AGT_EDIT_CBTYPE_EDIT3
EDIT3 callback type.
Definition: agt_cb.h:226
@ AGT_CB_CALLTYPE_GET
GET2 callback.
Definition: agt_cb.h:217
@ AGT_CB_CALLTYPE_NONE
not set
Definition: agt_cb.h:213
@ AGT_CB_CALLTYPE_EDIT
EDIT1 callback.
Definition: agt_cb.h:214
@ AGT_CB_CALLTYPE_EDIT3
EDIT3 callback.
Definition: agt_cb.h:216
@ AGT_CB_CALLTYPE_EDIT2
EDIT2 callback.
Definition: agt_cb.h:215
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:752
agt_hook_type_t
Hook types enumeration to specify Hook type.
Definition: agt.h:817
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:726
status_t(* getcb_fn2_t)(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 PRODUCER FUNCTION.
Definition: getcb.h:676
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:210
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:805
boolean skip_validate
false = perform validate phase, true = skip
Definition: agt_cb.h:807
agt_edit_cbtype_t edit_cbtype
EDIT callback type.
Definition: agt_cb.h:806
boolean skip_apply
false = perform apply phase, true = skip
Definition: agt_cb.h:808
set of server object callback functions back pointer to this struct stored in obj_template_t Shared b...
Definition: agt_cb.h:816
getcb_fn2_t get_cbfn
GET-2.
Definition: agt_cb.h:819
agt_cb_sa_hook_t sa_post_set_hook_cbfn
SIL-SA Post Set Hook.
Definition: agt_cb.h:829
agt_cb_hook_t post_set_hook_cbfn
Post Set Hook.
Definition: agt_cb.h:822
dlq_hdr_t subsysQ
Q of agt_cb_subsys_t.
Definition: agt_cb.h:832
agt_cb_hook_t trans_hook_cbfn
Transaction Hook.
Definition: agt_cb.h:823
agt_cb_order_hook_t order_hook_cbfn
Set Order Hook.
Definition: agt_cb.h:820
agt_cb_fn_t cbfn
EDIT-1 or EDIT-2.
Definition: agt_cb.h:817
xpath_bool_eval_fn_t xpath_cbfn
XPath Callback.
Definition: agt_cb.h:824
agt_cb_sa_hook_t sa_set_hook_cbfn
SIL-SA Set Hook.
Definition: agt_cb.h:828
agt_cb_hook_t set_hook_cbfn
Set Hook.
Definition: agt_cb.h:821
agt_cb_sa_hook_t sa_trans_hook_cbfn
SIL-SA Transaction Hook.
Definition: agt_cb.h:830
uint16 flags
internal flags
Definition: agt_cb.h:825
agt_edit3_fn_t edit3_cbfn
EDIT-3.
Definition: agt_cb.h:818
header for 1 subsystem that has a SIL-SA callback function registered for the data node in the agt_cb...
Definition: agt_cb.h:234
dlq_hdr_t qhdr
queue header
Definition: agt_cb.h:236
status_t res
status used by GET only
Definition: agt_cb.h:247
const xmlChar * subsys_id
backptr to agt_sil_state->subsys_id
Definition: agt_cb.h:239
uint8 flags
EDIT, EDIT2, GET, or both get and edit; BUT cannot be EDIT2 and EDIT1 at the same time.
Definition: agt_cb.h:244
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:1229
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.