yumapro  23.10T-8
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
138#define AGT_CB_SUBSYS_HAS_EDIT(S) ((S)->flags & AGT_CB_FL_EDIT)
139
141#define AGT_CB_SUBSYS_HAS_GET(S) ((S)->flags & AGT_CB_FL_GET)
142
144#define AGT_CB_SUBSYS_HAS_EDIT2(S) ((S)->flags & AGT_CB_FL_EDIT2)
145
147#define AGT_CB_SUBSYS_HAS_EDIT3(S) ((S)->flags & AGT_CB_FL_EDIT3)
148
149
153#define AGT_CB_SUBSYS_HAS_PSHOOK(S) ((S)->flags & AGT_CB_FL_PSHOOK)
154
156#define AGT_CB_SUBSYS_HAS_SHOOK(S) ((S)->flags & AGT_CB_FL_SHOOK)
157
159#define AGT_CB_SUBSYS_HAS_TXHOOK(S) ((S)->flags & AGT_CB_FL_TXHOOK)
160
162#define AGT_CB_SUBSYS_SET_PSHOOK(S) (S)->flags |= AGT_CB_FL_PSHOOK
163
165#define AGT_CB_SUBSYS_SET_SHOOK(S) (S)->flags |= AGT_CB_FL_SHOOK
166
168#define AGT_CB_SUBSYS_SET_TXHOOK(S) (S)->flags |= AGT_CB_FL_TXHOOK
169
170
174#define AGT_CB_HAS_REMOTE_PSHOOK(C) ((C)->flags & AGT_CB_FL_PSETHOOK)
175
177#define AGT_CB_HAS_REMOTE_SHOOK(C) ((C)->flags & AGT_CB_FL_SETHOOK)
178
180#define AGT_CB_HAS_REMOTE_TXHOOK(C) ((C)->flags & AGT_CB_FL_TRANSHOOK)
181
183#define AGT_CB_SET_REMOTE_PSHOOK(C) (C)->flags |= AGT_CB_FL_PSETHOOK
184
186#define AGT_CB_SET_REMOTE_SHOOK(C) (C)->flags |= AGT_CB_FL_SETHOOK
187
189#define AGT_CB_SET_REMOTE_TXHOOK(C) (C)->flags |= AGT_CB_FL_TRANSHOOK
190
191
192/********************************************************************
193* *
194* T Y P E S *
195* *
196*********************************************************************/
197
199typedef enum agt_cb_calltype_t_ {
206
207
212typedef struct agt_cb_subsys_t_ {
214 dlq_hdr_t qhdr;
215
217 const xmlChar *subsys_id;
218
222 uint8 flags;
223
226} YPACK agt_cb_subsys_t;
227
228
249typedef status_t
250 (*agt_cb_fn_t) (ses_cb_t *scb,
251 rpc_msg_t *msg,
252 agt_cbtyp_t cbtyp,
253 op_editop_t editop,
254 val_value_t *newval,
255 val_value_t *curval);
256
257
296typedef status_t
297 (*agt_cb_hook_t) (ses_cb_t *scb,
298 rpc_msg_t *msg,
300 op_editop_t editop,
301 val_value_t *newval,
302 val_value_t *curval);
303
304
305
333typedef uint8
335 op_editop_t editop,
336 val_value_t *newval,
337 val_value_t *curval,
338 status_t *res);
339
340
341
355typedef status_t
357
358
359
376typedef status_t
377 (*agt_cb_sa_trans_start_t) (const xmlChar *transaction_id,
378 boolean isvalidate,
379 boolean isrollback,
380 boolean isrunning);
381
382
383
396typedef void
398
399
400
412typedef void
413 (*agt_cb_sa_trans_complete_t) (const xmlChar *transaction_id_val);
414
415
416
435typedef status_t
437 rpc_msg_t *msg,
438 cfg_template_t *source_config,
439 cfg_template_t *target_config);
440
441
442
463typedef status_t
465 rpc_msg_t *msg,
466 val_value_t *candidate,
467 val_value_t *running);
468
469
470
486typedef status_t
487 (*agt_cb_sa_validate_complete_t) (const xmlChar *transaction_id);
488
489
490
511typedef status_t
513 rpc_msg_t *msg,
514 val_value_t *candidate,
515 val_value_t *running);
516
517
518
534typedef status_t
535 (*agt_cb_sa_apply_complete_t) (const xmlChar *transaction_id);
536
537
538
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_rollback_complete_t) (const xmlChar *transaction_id);
584
585
586
603typedef status_t
604 (*agt_cb_sa_commit_complete_t) (const xmlChar *transaction_id,
605 agt_commit_type_t commit_type);
606
607
608
627typedef void
629 rpc_msg_t *msg,
630 const xmlChar *command_modname,
631 const xmlChar *command_name);
632
633
634
646typedef void
647 (*agt_cb_shutdown_t) (void);
648
649
662typedef void
664 const ses_cb_t *scb);
665
666
709typedef status_t
710 (*agt_cb_sa_hook_t) (ses_cb_t *scb,
711 rpc_msg_t *msg,
712 op_editop_t editop,
713 val_value_t *newval,
714 val_value_t *curval,
715 const xmlChar *transaction_id,
716 boolean isvalidate,
717 boolean isload,
718 boolean isrunning);
719
720
748typedef status_t
750 ses_cb_t *scb,
751 rpc_msg_t *msg,
752 val_value_t *source,
753 val_value_t *target);
754
755
756
757
758
775typedef status_t
777 const xmlChar *transaction_id);
778
779
780
781
786typedef struct agt_cb_fnset_t_ {
795 uint8 flags;
796
797#ifdef WITH_YCONTROL
798 /* used ony by SIL-SA */
802
803 dlq_hdr_t subsysQ;
804#endif
805} YPACK agt_cb_fnset_t;
806
807
811/********************************************************************
812* *
813* F U N C T I O N S *
814* *
815*********************************************************************/
816
817
834extern status_t
835 agt_cb_init (void);
836
837
843extern void
844 agt_cb_cleanup (void);
845
846
864extern status_t
865 agt_cb_register_callback (const xmlChar *modname,
866 const xmlChar *defpath,
867 const xmlChar *version,
868 agt_cb_fn_t cbfn);
869
870
893extern status_t
894 agt_cb_register_edit2_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_edit3_callback (const xmlChar *modname,
924 const xmlChar *defpath,
925 const xmlChar *version,
926 agt_edit3_fn_t edit3_cbfn);
927
928
947extern status_t
948 agt_cb_register_xpath_callback (const xmlChar *modname,
949 const xmlChar *defpath,
950 const xmlChar *version,
952
953
960extern void
961 agt_cb_unregister_callbacks (const xmlChar *modname,
962 const xmlChar *defpath);
963
964
965
983extern status_t
984 agt_cb_register_get_callback (const xmlChar *modname,
985 const xmlChar *defpath,
986 const xmlChar *version,
987 getcb_fn2_t get_cbfn);
988
989
1001extern status_t
1002 agt_cb_hook_register (const xmlChar *defpath,
1003 agt_hook_fmt_t format,
1004 agt_hook_type_t type,
1005 agt_cb_hook_t cbfn);
1006
1007
1016extern void
1017 agt_cb_hook_unregister (const xmlChar *defpath);
1018
1019
1032extern status_t
1033 agt_cb_order_hook_register (const xmlChar *defpath,
1034 agt_cb_order_hook_t cbfn);
1035
1036
1045extern void
1046 agt_cb_order_hook_unregister (const xmlChar *defpath);
1047
1048
1059extern status_t
1061
1062
1072extern status_t
1074
1075
1083extern void
1085
1086
1094extern void
1096
1097
1114extern status_t
1117 boolean isvalidate,
1118 boolean isrollback,
1119 boolean isrunning,
1120 boolean no_silsa_cb);
1121
1122
1132extern void
1134
1135
1147extern status_t
1149
1150
1161extern status_t
1163
1164
1173extern void
1175
1176
1185extern void
1187
1188
1189#ifdef WITH_YCONTROL
1205extern status_t
1206 agt_cb_invoke_trans_start_cb (const xmlChar *transaction_id,
1207 boolean isvalidate,
1208 boolean isrollback,
1209 boolean isrunning);
1210
1211
1222extern void
1223 agt_cb_invoke_trans_complete (const xmlChar *transaction_id);
1224
1225
1235extern void
1236 agt_cb_sa_run_trans_complete (const xmlChar *transaction_id);
1237
1238
1239
1258extern status_t
1259 agt_cb_register_subsys_callback (const xmlChar *modname,
1260 const xmlChar *defpath,
1261 const xmlChar *version,
1262 const xmlChar *subsys_id,
1263 agt_cb_calltype_t calltype);
1264
1265
1266
1275extern void
1276 agt_cb_unregister_subsys_callback (const xmlChar *subsys_id,
1277 const xmlChar *modname,
1278 const xmlChar *defpath,
1279 const xmlChar *revision);
1280
1281#endif // WITH_YCONTROL
1282
1283
1310extern status_t
1312 val_value_t *request_val,
1313 obj_template_t *register_obj,
1314 obj_template_t *module_obj,
1315 obj_template_t *revision_obj,
1316 obj_template_t *path_obj,
1317 obj_template_t *get_path_obj,
1318 obj_template_t *rpc_name_obj,
1319 obj_template_t *action_path_obj,
1320 obj_template_t *post_sethook_path_obj,
1321 obj_template_t *sethook_list,
1322 obj_template_t *txhook_list,
1323 obj_template_t *edit2_path_obj,
1324 obj_template_t *edit3_path_obj,
1325 boolean *any_rw_objs);
1326
1327
1334extern boolean
1336
1337
1344extern boolean
1346
1347
1356extern status_t
1357 agt_cb_skip_leafref_validation (const xmlChar *defpath);
1358
1359
1368extern status_t
1369 agt_cb_set_sil_priority (const xmlChar *defpath,
1370 uint8 sil_priority);
1371
1372
1383extern status_t
1385
1386
1396extern status_t
1398
1399
1407extern void
1409
1410
1418extern void
1420
1421
1432extern status_t
1434
1435
1443extern void
1445
1446
1459extern status_t
1461
1462
1470extern void
1472
1473
1491extern status_t
1493 rpc_msg_t *msg,
1494 val_value_t *candidate,
1495 val_value_t *running,
1496 boolean epc_only);
1497
1498
1513extern status_t
1515 rpc_msg_t *msg,
1516 cfg_template_t *source_config,
1517 cfg_template_t *target_config);
1518
1519
1537extern status_t
1539 rpc_msg_t *msg,
1540 val_value_t *candidate,
1541 val_value_t *running,
1542 boolean epc_only);
1543
1544
1562extern status_t
1564 rpc_msg_t *msg,
1565 val_value_t *candidate,
1566 val_value_t *running,
1567 boolean epc_only);
1568
1569
1578extern status_t
1580
1581
1593extern void
1595 rpc_msg_t *msg,
1596 const xmlChar *command_modname,
1597 const xmlChar *command_name);
1598
1599
1607extern void
1609
1610
1619extern status_t
1621
1622
1630extern void
1632
1633
1640extern void
1641 agt_cb_run_shutdown (void);
1642
1643
1652extern status_t
1653 agt_cb_post_sethook_register (const xmlChar *defpath,
1654 agt_cb_hook_t cbfn);
1655
1656
1663extern void
1664 agt_cb_post_sethook_unregister (const xmlChar *defpath);
1665
1666
1675extern status_t
1677
1678
1686extern void
1688
1689
1698extern void
1700 const ses_cb_t *scb);
1701
1702
1713extern status_t
1714 agt_cb_def_hook_register (const xmlChar *defpath,
1715 ncx_def_hook_cbfn_t cbfn);
1716
1717
1723extern void
1724 agt_cb_def_hook_unregister (const xmlChar *defpath);
1725
1726
1737extern status_t
1738 agt_cb_sa_hook_register (const xmlChar *defpath,
1739 agt_hook_fmt_t format,
1740 agt_hook_type_t type,
1741 agt_cb_sa_hook_t cbfn);
1742
1743
1752extern void
1753 agt_cb_sa_hook_unregister (const xmlChar *defpath);
1754
1755
1764extern status_t
1765 agt_cb_sa_post_sethook_register (const xmlChar *defpath,
1766 agt_cb_sa_hook_t cbfn);
1767
1768
1775extern void
1776 agt_cb_sa_post_sethook_unregister (const xmlChar *defpath);
1777
1778
1785extern void
1786 agt_cb_unload_module (const xmlChar *modname);
1787
1788
1799extern status_t
1801
1802
1809extern void
1811
1812
1823extern status_t
1825
1826
1833extern void
1835
1836
1847extern status_t
1849
1850
1857extern void
1859
1860
1871extern status_t
1873
1874
1881extern void
1883
1884
1885#ifdef WITH_YCONTROL
1901extern status_t
1902 agt_cb_sa_run_commit_completeness_cb (const xmlChar *transaction_id,
1903 agt_cbtyp_t cbtyp,
1904 agt_commit_type_t commit_type);
1905#endif // WITH_YCONTROL
1906
1907
1908
1919extern status_t
1921
1922
1930extern void
1932
1933
1944extern status_t
1946
1947
1954extern void
1956
1957
1958
1964extern boolean
1966
1979extern status_t
1981 rpc_msg_t *msg,
1982 val_value_t *source,
1983 val_value_t *target);
1984
1985
1988#ifdef __cplusplus
1989} /* end extern 'C' */
1990#endif
1991
1992#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:1623
void agt_cb_sa_trans_complete_unregister(agt_cb_sa_trans_complete_t cbfn)
Uregister a Transaction Complete callback.
Definition: agt_cb.c:2770
void agt_cb_unregister_callbacks(const xmlChar *modname, const xmlChar *defpath)
Unregister all EDIT callback functions for a specific object.
Definition: agt_cb.c:2532
status_t agt_cb_rollback_complete_register(agt_cb_rollback_complete_t cbfn)
Register a Rollback Complete callback.
Definition: agt_cb.c:5015
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:2089
void agt_cb_def_hook_unregister(const xmlChar *defpath)
Unregister Dynamic Default callback functions for a specific object.
Definition: agt_cb.c:6131
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:5437
void agt_cb_session_hook_unregister(agt_cb_session_hook_t cbfn)
Unregister a Session Hook callback.
Definition: agt_cb.c:5972
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:3337
void agt_cb_run_shutdown(void)
Run Shutdown callbacks.
Definition: agt_cb.c:5743
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:7127
void agt_cb_command_complete_unregister(agt_cb_command_complete_t cbfn)
Unregister a Command Complete callback.
Definition: agt_cb.c:5584
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:1911
void agt_cb_hook_unregister(const xmlChar *defpath)
Unregister a Hook callback.
Definition: agt_cb.c:2012
void agt_cb_shutdown_unregister(agt_cb_shutdown_t cbfn)
Unregister a Shutdown callback.
Definition: agt_cb.c:5711
void agt_cb_trans_start_unregister(agt_cb_trans_start_t cbfn)
Unregister a Transaction Start callback.
Definition: agt_cb.c:2326
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:4650
void agt_cb_invoke_trans_complete(const xmlChar *transaction_id)
Invoke Transaction Complete callbacks.
Definition: agt_cb.c:2861
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:6897
void agt_cb_edit_phase_complete_unregister(agt_cb_edit_phase_complete_t cbfn)
Unregister an Edit Phase Complete callback.
Definition: agt_cb.c:7173
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:1811
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:2897
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:6171
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:2400
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:6783
void agt_cb_startup_hook_unregister(agt_cb_startup_hook_t cbfn)
Unregister a Startup Hook callback.
Definition: agt_cb.c:4814
void agt_cb_validate_complete_unregister(agt_cb_validate_complete_t cbfn)
Unregister a Validate Complete callback.
Definition: agt_cb.c:4899
void agt_cb_order_hook_unregister(const xmlChar *defpath)
Unregister a Set-Order-Hook callback.
Definition: agt_cb.c:2165
void agt_cb_trans_complete_unregister(agt_cb_trans_complete_t cbfn)
Unregister a Transaction Complete callback.
Definition: agt_cb.c:2359
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:6818
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:4627
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:6943
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:6008
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:7230
void agt_cb_apply_complete_unregister(agt_cb_apply_complete_t cbfn)
Unregister a Apply Complete callback.
Definition: agt_cb.c:4980
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:5153
status_t agt_cb_startup_hook_register(agt_cb_startup_hook_t cbfn)
Register a Startup Hook callback.
Definition: agt_cb.c:4759
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:4677
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:5784
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:6055
status_t agt_cb_sa_trans_start_register(agt_cb_sa_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2643
void agt_cb_post_sethook_unregister(const xmlChar *defpath)
Unregister a Post Set Hook callback.
Definition: agt_cb.c:5852
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:6987
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:1704
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:3114
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:6526
void agt_cb_sa_trans_start_unregister(agt_cb_sa_trans_start_t cbfn)
Uregister a Transaction Start callback.
Definition: agt_cb.c:2739
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:4153
status_t agt_cb_trans_start_register(agt_cb_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2239
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:6620
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:1578
void agt_cb_sa_post_sethook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Post Set Hook callback.
Definition: agt_cb.c:6448
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:6655
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:5377
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:4715
void agt_cb_sa_hook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Hook SIL-SA callback.
Definition: agt_cb.c:6281
status_t agt_cb_command_complete_register(agt_cb_command_complete_t cbfn)
Register a Command Complete callback.
Definition: agt_cb.c:5528
status_t agt_cb_sa_trans_complete_register(agt_cb_sa_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2692
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:6367
status_t agt_cb_init(void)
Init the server callback module.
Definition: agt_cb.c:1473
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:6573
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:1668
boolean agt_cb_any_edit_phase_complete(void)
Return true if any edit phase complete callbacks registered.
Definition: agt_cb.c:7199
status_t agt_cb_trans_complete_register(agt_cb_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2283
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:5620
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:5264
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:6865
void agt_cb_cleanup(void)
Cleanup the server callback module.
Definition: agt_cb.c:1518
void agt_cb_run_trans_complete(agt_cfg_transaction_t *txcb)
Run Transaction Complete callbacks.
Definition: agt_cb.c:2489
status_t agt_cb_validate_complete_register(agt_cb_validate_complete_t cbfn)
Register a Validate Complete callback.
Definition: agt_cb.c:4851
void agt_cb_rollback_complete_unregister(agt_cb_rollback_complete_t cbfn)
Unregister a Rollback Complete callback.
Definition: agt_cb.c:5062
status_t agt_cb_shutdown_register(agt_cb_shutdown_t cbfn)
Register a Shutdown callback.
Definition: agt_cb.c:5664
status_t agt_cb_session_hook_register(agt_cb_session_hook_t cbfn)
Register a Session Hook callback.
Definition: agt_cb.c:5926
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:2808
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:6701
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:6736
status_t agt_cb_apply_complete_register(agt_cb_apply_complete_t cbfn)
Register a Apply Complete callback.
Definition: agt_cb.c:4934
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:297
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:535
status_t(* agt_edit3_fn_t)(agt_editcb_t *editcb)
EDIT3 Callback function for server object handler.
Definition: agt_editcb.h:196
void(* agt_cb_trans_complete_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_complete callback.
Definition: agt_cb.h:397
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:583
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:604
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:436
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:710
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:250
status_t(* agt_cb_trans_start_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_start callback.
Definition: agt_cb.h:356
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:628
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:749
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:377
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:487
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:464
void(* agt_cb_sa_trans_complete_t)(const xmlChar *transaction_id_val)
Typedef of the sa_trans_complete callback.
Definition: agt_cb.h:413
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:512
void(* agt_cb_shutdown_t)(void)
Typedef of the agt_cb_shutdown_t callback.
Definition: agt_cb.h:647
agt_cb_calltype_t
different data node callback types for SIL and SIL-SA to register
Definition: agt_cb.h:199
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:560
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:776
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:334
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:663
@ AGT_CB_CALLTYPE_GET
GET2 callback.
Definition: agt_cb.h:204
@ AGT_CB_CALLTYPE_NONE
not set
Definition: agt_cb.h:200
@ AGT_CB_CALLTYPE_EDIT
EDIT1 callback.
Definition: agt_cb.h:201
@ AGT_CB_CALLTYPE_EDIT3
EDIT3 callback.
Definition: agt_cb.h:203
@ AGT_CB_CALLTYPE_EDIT2
EDIT2 callback.
Definition: agt_cb.h:202
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:737
agt_hook_type_t
Hook types enumeration to specify Hook type.
Definition: agt.h:802
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:711
status_t(* getcb_fn2_t)(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 PRODUCER FUNCTION.
Definition: getcb.h:668
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:1734
ncx_ses_event_t
internal enumerations for session event types
Definition: ncxtypes.h:1698
NETCONF protocol operations.
NETCONF protocol remote procedure call common definitions.
NETCONF Session Common definitions module.
global error status code enumerations
set of server object callback functions back pointer to this struct stored in obj_template_t Shared b...
Definition: agt_cb.h:786
getcb_fn2_t get_cbfn
GET-2.
Definition: agt_cb.h:789
agt_cb_sa_hook_t sa_post_set_hook_cbfn
SIL-SA Post Set Hook.
Definition: agt_cb.h:800
agt_cb_hook_t post_set_hook_cbfn
Post Set Hook.
Definition: agt_cb.h:792
dlq_hdr_t subsysQ
Q of agt_cb_subsys_t.
Definition: agt_cb.h:803
agt_cb_hook_t trans_hook_cbfn
Transaction Hook.
Definition: agt_cb.h:793
agt_cb_order_hook_t order_hook_cbfn
Set Order Hook.
Definition: agt_cb.h:790
agt_cb_fn_t cbfn
EDIT-1 or EDIT-2.
Definition: agt_cb.h:787
xpath_bool_eval_fn_t xpath_cbfn
XPath Callback.
Definition: agt_cb.h:794
agt_cb_sa_hook_t sa_set_hook_cbfn
SIL-SA Set Hook.
Definition: agt_cb.h:799
agt_cb_hook_t set_hook_cbfn
Set Hook.
Definition: agt_cb.h:791
agt_cb_sa_hook_t sa_trans_hook_cbfn
SIL-SA Transaction Hook.
Definition: agt_cb.h:801
uint8 flags
internal flags
Definition: agt_cb.h:795
agt_edit3_fn_t edit3_cbfn
EDIT-3.
Definition: agt_cb.h:788
header for 1 subsystem that has a SIL-SA callback function registered for the data node in the agt_cb...
Definition: agt_cb.h:212
dlq_hdr_t qhdr
queue header
Definition: agt_cb.h:214
status_t res
status used by GET only
Definition: agt_cb.h:225
const xmlChar * subsys_id
backptr to agt_sil_state->subsys_id
Definition: agt_cb.h:217
uint8 flags
EDIT, EDIT2, GET, or both get and edit; BUT cannot be EDIT2 and EDIT1 at the same time.
Definition: agt_cb.h:222
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:1220
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:911
Value Node Basic Support.
Schema and data model Xpath search support.