yumapro  23.10T-6
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 - 2021, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_agt_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 "getcb.h"
42#include "op.h"
43#include "rpc.h"
44#include "ses.h"
45#include "status_enum.h"
46#include "val.h"
47#include "xpath.h"
48
49#ifndef _H_agt_cfg
50#include "agt_cfg.h"
51#endif
52
53#ifndef _H_agt_hook_util
54#include "agt_hook_util.h"
55#endif
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61
62/* Header only */
63
86/********************************************************************
87* *
88* C O N S T A N T S *
89* *
90*********************************************************************/
91
92
94#define FORALL TRUE
95
97#define FORONE FALSE
98
102#define AGT_CB_FL_EDIT bit0
103
105#define AGT_CB_FL_GET bit1
106
108#define AGT_CB_FL_EDIT2 bit2
109
110
112#define AGT_CB_FL_PSHOOK bit3
113#define AGT_CB_FL_SHOOK bit4
114#define AGT_CB_FL_TXHOOK bit5
118#define AGT_CB_FL_SETHOOK_TREE bit0
119#define AGT_CB_FL_TRANSHOOK_TREE bit1
120#define AGT_CB_FL_SKIP_SETHOOK bit2
121#define AGT_CB_FL_SKIP_TRANSHOOK bit3
125#define AGT_CB_FL_PSETHOOK bit4
126
128#define AGT_CB_FL_SETHOOK bit5
129
131#define AGT_CB_FL_TRANSHOOK bit6
132
134#define AGT_CB_SUBSYS_HAS_EDIT(S) ((S)->flags & AGT_CB_FL_EDIT)
135
137#define AGT_CB_SUBSYS_HAS_GET(S) ((S)->flags & AGT_CB_FL_GET)
138
140#define AGT_CB_SUBSYS_HAS_EDIT2(S) ((S)->flags & AGT_CB_FL_EDIT2)
141
142
146#define AGT_CB_SUBSYS_HAS_PSHOOK(S) ((S)->flags & AGT_CB_FL_PSHOOK)
147
149#define AGT_CB_SUBSYS_HAS_SHOOK(S) ((S)->flags & AGT_CB_FL_SHOOK)
150
152#define AGT_CB_SUBSYS_HAS_TXHOOK(S) ((S)->flags & AGT_CB_FL_TXHOOK)
153
155#define AGT_CB_SUBSYS_SET_PSHOOK(S) (S)->flags |= AGT_CB_FL_PSHOOK
156
158#define AGT_CB_SUBSYS_SET_SHOOK(S) (S)->flags |= AGT_CB_FL_SHOOK
159
161#define AGT_CB_SUBSYS_SET_TXHOOK(S) (S)->flags |= AGT_CB_FL_TXHOOK
162
163
167#define AGT_CB_HAS_REMOTE_PSHOOK(C) ((C)->flags & AGT_CB_FL_PSETHOOK)
168
170#define AGT_CB_HAS_REMOTE_SHOOK(C) ((C)->flags & AGT_CB_FL_SETHOOK)
171
173#define AGT_CB_HAS_REMOTE_TXHOOK(C) ((C)->flags & AGT_CB_FL_TRANSHOOK)
174
176#define AGT_CB_SET_REMOTE_PSHOOK(C) (C)->flags |= AGT_CB_FL_PSETHOOK
177
179#define AGT_CB_SET_REMOTE_SHOOK(C) (C)->flags |= AGT_CB_FL_SETHOOK
180
182#define AGT_CB_SET_REMOTE_TXHOOK(C) (C)->flags |= AGT_CB_FL_TRANSHOOK
183
184
185/********************************************************************
186* *
187* T Y P E S *
188* *
189*********************************************************************/
190
192typedef enum agt_cb_calltype_t_ {
198
199
204typedef struct agt_cb_subsys_t_ {
206 dlq_hdr_t qhdr;
207
209 const xmlChar *subsys_id;
210
214 uint8 flags;
215
218} YPACK agt_cb_subsys_t;
219
220
241typedef status_t
242 (*agt_cb_fn_t) (ses_cb_t *scb,
243 rpc_msg_t *msg,
244 agt_cbtyp_t cbtyp,
245 op_editop_t editop,
246 val_value_t *newval,
247 val_value_t *curval);
248
249
288typedef status_t
289 (*agt_cb_hook_t) (ses_cb_t *scb,
290 rpc_msg_t *msg,
292 op_editop_t editop,
293 val_value_t *newval,
294 val_value_t *curval);
295
296
297
325typedef uint8
327 op_editop_t editop,
328 val_value_t *newval,
329 val_value_t *curval,
330 status_t *res);
331
332
333
347typedef status_t
349
350
351
368typedef status_t
369 (*agt_cb_sa_trans_start_t) (const xmlChar *transaction_id,
370 boolean isvalidate,
371 boolean isrollback,
372 boolean isrunning);
373
374
375
388typedef void
390
391
392
404typedef void
405 (*agt_cb_sa_trans_complete_t) (const xmlChar *transaction_id_val);
406
407
408
427typedef status_t
429 rpc_msg_t *msg,
430 cfg_template_t *source_config,
431 cfg_template_t *target_config);
432
433
434
455typedef status_t
457 rpc_msg_t *msg,
458 val_value_t *candidate,
459 val_value_t *running);
460
461
462
478typedef status_t
479 (*agt_cb_sa_validate_complete_t) (const xmlChar *transaction_id);
480
481
482
503typedef status_t
505 rpc_msg_t *msg,
506 val_value_t *candidate,
507 val_value_t *running);
508
509
510
526typedef status_t
527 (*agt_cb_sa_apply_complete_t) (const xmlChar *transaction_id);
528
529
530
551typedef status_t
553 rpc_msg_t *msg,
554 val_value_t *candidate,
555 val_value_t *running);
556
557
558
574typedef status_t
575 (*agt_cb_sa_rollback_complete_t) (const xmlChar *transaction_id);
576
577
578
595typedef status_t
596 (*agt_cb_sa_commit_complete_t) (const xmlChar *transaction_id,
597 agt_commit_type_t commit_type);
598
599
600
619typedef void
621 rpc_msg_t *msg,
622 const xmlChar *command_modname,
623 const xmlChar *command_name);
624
625
626
638typedef void
639 (*agt_cb_shutdown_t) (void);
640
641
654typedef void
656 const ses_cb_t *scb);
657
658
701typedef status_t
702 (*agt_cb_sa_hook_t) (ses_cb_t *scb,
703 rpc_msg_t *msg,
704 op_editop_t editop,
705 val_value_t *newval,
706 val_value_t *curval,
707 const xmlChar *transaction_id,
708 boolean isvalidate,
709 boolean isload,
710 boolean isrunning);
711
712
740typedef status_t
742 ses_cb_t *scb,
743 rpc_msg_t *msg,
744 val_value_t *source,
745 val_value_t *target);
746
747
748
749
750
767typedef status_t
769 const xmlChar *transaction_id);
770
771
772
773
778typedef struct agt_cb_fnset_t_ {
786 uint8 flags;
787
788#ifdef WITH_YCONTROL
789 /* used ony by SIL-SA */
793
794 dlq_hdr_t subsysQ;
795#endif
796} YPACK agt_cb_fnset_t;
797
798
802/********************************************************************
803* *
804* F U N C T I O N S *
805* *
806*********************************************************************/
807
808
825extern status_t
826 agt_cb_init (void);
827
828
834extern void
835 agt_cb_cleanup (void);
836
837
855extern status_t
856 agt_cb_register_callback (const xmlChar *modname,
857 const xmlChar *defpath,
858 const xmlChar *version,
859 agt_cb_fn_t cbfn);
860
861
884extern status_t
885 agt_cb_register_edit2_callback (const xmlChar *modname,
886 const xmlChar *defpath,
887 const xmlChar *version,
888 agt_cb_fn_t cbfn);
889
890
909extern status_t
910 agt_cb_register_xpath_callback (const xmlChar *modname,
911 const xmlChar *defpath,
912 const xmlChar *version,
914
915
922extern void
923 agt_cb_unregister_callbacks (const xmlChar *modname,
924 const xmlChar *defpath);
925
926
927
945extern status_t
946 agt_cb_register_get_callback (const xmlChar *modname,
947 const xmlChar *defpath,
948 const xmlChar *version,
949 getcb_fn2_t get_cbfn);
950
951
963extern status_t
964 agt_cb_hook_register (const xmlChar *defpath,
965 agt_hook_fmt_t format,
966 agt_hook_type_t type,
967 agt_cb_hook_t cbfn);
968
969
978extern void
979 agt_cb_hook_unregister (const xmlChar *defpath);
980
981
994extern status_t
995 agt_cb_order_hook_register (const xmlChar *defpath,
997
998
1007extern void
1008 agt_cb_order_hook_unregister (const xmlChar *defpath);
1009
1010
1021extern status_t
1023
1024
1034extern status_t
1036
1037
1045extern void
1047
1048
1056extern void
1058
1059
1076extern status_t
1079 boolean isvalidate,
1080 boolean isrollback,
1081 boolean isrunning,
1082 boolean no_silsa_cb);
1083
1084
1094extern void
1096
1097
1109extern status_t
1111
1112
1123extern status_t
1125
1126
1135extern void
1137
1138
1147extern void
1149
1150
1151#ifdef WITH_YCONTROL
1167extern status_t
1168 agt_cb_invoke_trans_start_cb (const xmlChar *transaction_id,
1169 boolean isvalidate,
1170 boolean isrollback,
1171 boolean isrunning);
1172
1173
1184extern void
1185 agt_cb_invoke_trans_complete (const xmlChar *transaction_id);
1186
1187
1197extern void
1198 agt_cb_sa_run_trans_complete (const xmlChar *transaction_id);
1199
1200
1201
1220extern status_t
1221 agt_cb_register_subsys_callback (const xmlChar *modname,
1222 const xmlChar *defpath,
1223 const xmlChar *version,
1224 const xmlChar *subsys_id,
1225 agt_cb_calltype_t calltype);
1226
1227
1228
1237extern void
1238 agt_cb_unregister_subsys_callback (const xmlChar *subsys_id,
1239 const xmlChar *modname,
1240 const xmlChar *defpath,
1241 const xmlChar *revision);
1242
1243#endif // WITH_YCONTROL
1244
1245
1271extern status_t
1273 val_value_t *request_val,
1274 obj_template_t *register_obj,
1275 obj_template_t *module_obj,
1276 obj_template_t *revision_obj,
1277 obj_template_t *path_obj,
1278 obj_template_t *get_path_obj,
1279 obj_template_t *rpc_name_obj,
1280 obj_template_t *action_path_obj,
1281 obj_template_t *post_sethook_path_obj,
1282 obj_template_t *sethook_list,
1283 obj_template_t *txhook_list,
1284 obj_template_t *edit2_path_obj,
1285 boolean *any_rw_objs);
1286
1287
1294extern boolean
1296
1297
1304extern boolean
1306
1307
1316extern status_t
1317 agt_cb_skip_leafref_validation (const xmlChar *defpath);
1318
1319
1328extern status_t
1329 agt_cb_set_sil_priority (const xmlChar *defpath,
1330 uint8 sil_priority);
1331
1332
1343extern status_t
1345
1346
1356extern status_t
1358
1359
1367extern void
1369
1370
1378extern void
1380
1381
1392extern status_t
1394
1395
1403extern void
1405
1406
1419extern status_t
1421
1422
1430extern void
1432
1433
1451extern status_t
1453 rpc_msg_t *msg,
1454 val_value_t *candidate,
1455 val_value_t *running,
1456 boolean epc_only);
1457
1458
1473extern status_t
1475 rpc_msg_t *msg,
1476 cfg_template_t *source_config,
1477 cfg_template_t *target_config);
1478
1479
1497extern status_t
1499 rpc_msg_t *msg,
1500 val_value_t *candidate,
1501 val_value_t *running,
1502 boolean epc_only);
1503
1504
1522extern status_t
1524 rpc_msg_t *msg,
1525 val_value_t *candidate,
1526 val_value_t *running,
1527 boolean epc_only);
1528
1529
1538extern status_t
1540
1541
1553extern void
1555 rpc_msg_t *msg,
1556 const xmlChar *command_modname,
1557 const xmlChar *command_name);
1558
1559
1567extern void
1569
1570
1579extern status_t
1581
1582
1590extern void
1592
1593
1600extern void
1601 agt_cb_run_shutdown (void);
1602
1603
1612extern status_t
1613 agt_cb_post_sethook_register (const xmlChar *defpath,
1614 agt_cb_hook_t cbfn);
1615
1616
1623extern void
1624 agt_cb_post_sethook_unregister (const xmlChar *defpath);
1625
1626
1635extern status_t
1637
1638
1646extern void
1648
1649
1658extern void
1660 const ses_cb_t *scb);
1661
1662
1673extern status_t
1674 agt_cb_def_hook_register (const xmlChar *defpath,
1675 ncx_def_hook_cbfn_t cbfn);
1676
1677
1683extern void
1684 agt_cb_def_hook_unregister (const xmlChar *defpath);
1685
1686
1697extern status_t
1698 agt_cb_sa_hook_register (const xmlChar *defpath,
1699 agt_hook_fmt_t format,
1700 agt_hook_type_t type,
1701 agt_cb_sa_hook_t cbfn);
1702
1703
1712extern void
1713 agt_cb_sa_hook_unregister (const xmlChar *defpath);
1714
1715
1724extern status_t
1725 agt_cb_sa_post_sethook_register (const xmlChar *defpath,
1726 agt_cb_sa_hook_t cbfn);
1727
1728
1735extern void
1736 agt_cb_sa_post_sethook_unregister (const xmlChar *defpath);
1737
1738
1745extern void
1746 agt_cb_unload_module (const xmlChar *modname);
1747
1748
1759extern status_t
1761
1762
1769extern void
1771
1772
1783extern status_t
1785
1786
1793extern void
1795
1796
1807extern status_t
1809
1810
1817extern void
1819
1820
1831extern status_t
1833
1834
1841extern void
1843
1844
1845#ifdef WITH_YCONTROL
1861extern status_t
1862 agt_cb_sa_run_commit_completeness_cb (const xmlChar *transaction_id,
1863 agt_cbtyp_t cbtyp,
1864 agt_commit_type_t commit_type);
1865#endif // WITH_YCONTROL
1866
1867
1868
1879extern status_t
1881
1882
1890extern void
1892
1893
1904extern status_t
1906
1907
1914extern void
1916
1917
1918
1924extern boolean
1926
1939extern status_t
1941 rpc_msg_t *msg,
1942 val_value_t *source,
1943 val_value_t *target);
1944
1945
1948#ifdef __cplusplus
1949} /* end extern 'C' */
1950#endif
1951
1952#endif /* _H_agt_cb */
Multi-Protocol Network Management Server.
Manage Server configuration edit transactions.
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:1465
void agt_cb_sa_trans_complete_unregister(agt_cb_sa_trans_complete_t cbfn)
Uregister a Transaction Complete callback.
Definition: agt_cb.c:2566
void agt_cb_unregister_callbacks(const xmlChar *modname, const xmlChar *defpath)
Unregister all EDIT callback functions for a specific object.
Definition: agt_cb.c:2329
status_t agt_cb_rollback_complete_register(agt_cb_rollback_complete_t cbfn)
Register a Rollback Complete callback.
Definition: agt_cb.c:4774
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:1887
void agt_cb_def_hook_unregister(const xmlChar *defpath)
Unregister Dynamic Default callback functions for a specific object.
Definition: agt_cb.c:5891
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:5198
void agt_cb_session_hook_unregister(agt_cb_session_hook_t cbfn)
Unregister a Session Hook callback.
Definition: agt_cb.c:5732
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:3121
void agt_cb_run_shutdown(void)
Run Shutdown callbacks.
Definition: agt_cb.c:5504
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:6877
void agt_cb_command_complete_unregister(agt_cb_command_complete_t cbfn)
Unregister a Command Complete callback.
Definition: agt_cb.c:5345
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:1710
void agt_cb_hook_unregister(const xmlChar *defpath)
Unregister a Hook callback.
Definition: agt_cb.c:1811
void agt_cb_shutdown_unregister(agt_cb_shutdown_t cbfn)
Unregister a Shutdown callback.
Definition: agt_cb.c:5472
void agt_cb_trans_start_unregister(agt_cb_trans_start_t cbfn)
Unregister a Transaction Start callback.
Definition: agt_cb.c:2123
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:4409
void agt_cb_invoke_trans_complete(const xmlChar *transaction_id)
Invoke Transaction Complete callbacks.
Definition: agt_cb.c:2657
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:6653
void agt_cb_edit_phase_complete_unregister(agt_cb_edit_phase_complete_t cbfn)
Unregister an Edit Phase Complete callback.
Definition: agt_cb.c:6916
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:1610
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:2693
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, boolean *any_rw_objs)
Make a subsystem register message.
Definition: agt_cb.c:3937
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:5931
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:2197
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:6541
void agt_cb_startup_hook_unregister(agt_cb_startup_hook_t cbfn)
Unregister a Startup Hook callback.
Definition: agt_cb.c:4573
void agt_cb_validate_complete_unregister(agt_cb_validate_complete_t cbfn)
Unregister a Validate Complete callback.
Definition: agt_cb.c:4658
void agt_cb_order_hook_unregister(const xmlChar *defpath)
Unregister a Set-Order-Hook callback.
Definition: agt_cb.c:1963
void agt_cb_trans_complete_unregister(agt_cb_trans_complete_t cbfn)
Unregister a Transaction Complete callback.
Definition: agt_cb.c:2156
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:6576
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:4386
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:6695
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:5768
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:6969
void agt_cb_apply_complete_unregister(agt_cb_apply_complete_t cbfn)
Unregister a Apply Complete callback.
Definition: agt_cb.c:4739
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:4914
status_t agt_cb_startup_hook_register(agt_cb_startup_hook_t cbfn)
Register a Startup Hook callback.
Definition: agt_cb.c:4518
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:4436
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:5545
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:5815
status_t agt_cb_sa_trans_start_register(agt_cb_sa_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2439
void agt_cb_post_sethook_unregister(const xmlChar *defpath)
Unregister a Post Set Hook callback.
Definition: agt_cb.c:5613
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:6739
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:1503
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:2899
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:6284
void agt_cb_sa_trans_start_unregister(agt_cb_sa_trans_start_t cbfn)
Uregister a Transaction Start callback.
Definition: agt_cb.c:2535
status_t agt_cb_trans_start_register(agt_cb_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2036
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:6378
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:1420
void agt_cb_sa_post_sethook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Post Set Hook callback.
Definition: agt_cb.c:6207
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:6413
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:5138
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:4474
void agt_cb_sa_hook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Hook SIL-SA callback.
Definition: agt_cb.c:6041
status_t agt_cb_command_complete_register(agt_cb_command_complete_t cbfn)
Register a Command Complete callback.
Definition: agt_cb.c:5289
status_t agt_cb_sa_trans_complete_register(agt_cb_sa_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2488
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:6126
status_t agt_cb_init(void)
Init the server callback module.
Definition: agt_cb.c:1315
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:6331
boolean agt_cb_any_edit_phase_complete(void)
Return true if any edit phase complete callbacks registered.
Definition: agt_cb.c:6938
status_t agt_cb_trans_complete_register(agt_cb_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2080
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:5381
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:5025
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:6623
void agt_cb_cleanup(void)
Cleanup the server callback module.
Definition: agt_cb.c:1360
void agt_cb_run_trans_complete(agt_cfg_transaction_t *txcb)
Run Transaction Complete callbacks.
Definition: agt_cb.c:2286
status_t agt_cb_validate_complete_register(agt_cb_validate_complete_t cbfn)
Register a Validate Complete callback.
Definition: agt_cb.c:4610
void agt_cb_rollback_complete_unregister(agt_cb_rollback_complete_t cbfn)
Unregister a Rollback Complete callback.
Definition: agt_cb.c:4821
status_t agt_cb_shutdown_register(agt_cb_shutdown_t cbfn)
Register a Shutdown callback.
Definition: agt_cb.c:5425
status_t agt_cb_session_hook_register(agt_cb_session_hook_t cbfn)
Register a Session Hook callback.
Definition: agt_cb.c:5686
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:2604
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:6459
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:6494
status_t agt_cb_apply_complete_register(agt_cb_apply_complete_t cbfn)
Register a Apply Complete callback.
Definition: agt_cb.c:4693
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:289
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:527
void(* agt_cb_trans_complete_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_complete callback.
Definition: agt_cb.h:389
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:575
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:596
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:428
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:702
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)
Callback function for server object handler.
Definition: agt_cb.h:242
status_t(* agt_cb_trans_start_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_start callback.
Definition: agt_cb.h:348
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:620
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:741
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:369
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:479
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:456
void(* agt_cb_sa_trans_complete_t)(const xmlChar *transaction_id_val)
Typedef of the sa_trans_complete callback.
Definition: agt_cb.h:405
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:504
void(* agt_cb_shutdown_t)(void)
Typedef of the agt_cb_shutdown_t callback.
Definition: agt_cb.h:639
agt_cb_calltype_t
different data node callback types for SIL and SIL-SA to register
Definition: agt_cb.h:192
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:552
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:768
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:326
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:655
@ AGT_CB_CALLTYPE_GET
GET2 callback.
Definition: agt_cb.h:196
@ AGT_CB_CALLTYPE_NONE
not set
Definition: agt_cb.h:193
@ AGT_CB_CALLTYPE_EDIT
EDIT1 callback.
Definition: agt_cb.h:194
@ AGT_CB_CALLTYPE_EDIT2
EDIT2 callback.
Definition: agt_cb.h:195
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:721
agt_hook_type_t
Hook types enumeration to specify Hook type.
Definition: agt.h:786
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:695
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:518
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:1725
ncx_ses_event_t
internal enumerations for session event types
Definition: ncxtypes.h:1689
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:778
getcb_fn2_t get_cbfn
GET-2.
Definition: agt_cb.h:780
agt_cb_sa_hook_t sa_post_set_hook_cbfn
SIL-SA Post Set Hook.
Definition: agt_cb.h:791
agt_cb_hook_t post_set_hook_cbfn
Post Set Hook.
Definition: agt_cb.h:783
dlq_hdr_t subsysQ
Q of agt_cb_subsys_t.
Definition: agt_cb.h:794
agt_cb_hook_t trans_hook_cbfn
Transaction Hook.
Definition: agt_cb.h:784
agt_cb_order_hook_t order_hook_cbfn
Set Order Hook.
Definition: agt_cb.h:781
agt_cb_fn_t cbfn
EDIT-1 or EDIT-2.
Definition: agt_cb.h:779
xpath_bool_eval_fn_t xpath_cbfn
XPath Callback.
Definition: agt_cb.h:785
agt_cb_sa_hook_t sa_set_hook_cbfn
SIL-SA Set Hook.
Definition: agt_cb.h:790
agt_cb_hook_t set_hook_cbfn
Set Hook.
Definition: agt_cb.h:782
agt_cb_sa_hook_t sa_trans_hook_cbfn
SIL-SA Transaction Hook.
Definition: agt_cb.h:792
uint8 flags
internal flags
Definition: agt_cb.h:786
header for 1 subsystem that has a SIL-SA callback function registered for the data node in the agt_cb...
Definition: agt_cb.h:204
dlq_hdr_t qhdr
queue header
Definition: agt_cb.h:206
status_t res
status used by GET only
Definition: agt_cb.h:217
const xmlChar * subsys_id
backptr to agt_sil_state->subsys_id
Definition: agt_cb.h:209
uint8 flags
EDIT, EDIT2, GET, or both get and edit; BUT cannot be EDIT2 and EDIT1 at the same time.
Definition: agt_cb.h:214
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:1184
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.