yumapro  20.10-12
YumaPro SDK
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 
34 date init comment
35 ----------------------------------------------------------------------
36 16-apr-07 abb Begun; split out from agt_ps.h
37 01-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 
48 #ifndef _H_agt_cfg
49 #include "agt_cfg.h"
50 #endif
51 
52 #ifndef _H_agt_hook_util
53 #include "agt_hook_util.h"
54 #endif
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 
61 /* Header only */
62 
85 /********************************************************************
86 * *
87 * C O N S T A N T S *
88 * *
89 *********************************************************************/
90 
91 
93 #define FORALL TRUE
94 
96 #define FORONE FALSE
97 
101 #define AGT_CB_FL_EDIT bit0
102 
104 #define AGT_CB_FL_GET bit1
105 
107 #define AGT_CB_FL_EDIT2 bit2
108 
109 
111 #define AGT_CB_FL_PSHOOK bit3
112 #define AGT_CB_FL_SHOOK bit4
113 #define AGT_CB_FL_TXHOOK bit5
117 #define AGT_CB_FL_SETHOOK_TREE bit0
118 #define AGT_CB_FL_TRANSHOOK_TREE bit1
119 #define AGT_CB_FL_SKIP_SETHOOK bit2
120 #define AGT_CB_FL_SKIP_TRANSHOOK bit3
124 #define AGT_CB_FL_PSETHOOK bit4
125 
127 #define AGT_CB_FL_SETHOOK bit5
128 
130 #define AGT_CB_FL_TRANSHOOK bit6
131 
133 #define AGT_CB_SUBSYS_HAS_EDIT(S) ((S)->flags & AGT_CB_FL_EDIT)
134 
136 #define AGT_CB_SUBSYS_HAS_GET(S) ((S)->flags & AGT_CB_FL_GET)
137 
139 #define AGT_CB_SUBSYS_HAS_EDIT2(S) ((S)->flags & AGT_CB_FL_EDIT2)
140 
141 
145 #define AGT_CB_SUBSYS_HAS_PSHOOK(S) ((S)->flags & AGT_CB_FL_PSHOOK)
146 
148 #define AGT_CB_SUBSYS_HAS_SHOOK(S) ((S)->flags & AGT_CB_FL_SHOOK)
149 
151 #define AGT_CB_SUBSYS_HAS_TXHOOK(S) ((S)->flags & AGT_CB_FL_TXHOOK)
152 
154 #define AGT_CB_SUBSYS_SET_PSHOOK(S) (S)->flags |= AGT_CB_FL_PSHOOK
155 
157 #define AGT_CB_SUBSYS_SET_SHOOK(S) (S)->flags |= AGT_CB_FL_SHOOK
158 
160 #define AGT_CB_SUBSYS_SET_TXHOOK(S) (S)->flags |= AGT_CB_FL_TXHOOK
161 
162 
166 #define AGT_CB_HAS_REMOTE_PSHOOK(C) ((C)->flags & AGT_CB_FL_PSETHOOK)
167 
169 #define AGT_CB_HAS_REMOTE_SHOOK(C) ((C)->flags & AGT_CB_FL_SETHOOK)
170 
172 #define AGT_CB_HAS_REMOTE_TXHOOK(C) ((C)->flags & AGT_CB_FL_TRANSHOOK)
173 
175 #define AGT_CB_SET_REMOTE_PSHOOK(C) (C)->flags |= AGT_CB_FL_PSETHOOK
176 
178 #define AGT_CB_SET_REMOTE_SHOOK(C) (C)->flags |= AGT_CB_FL_SETHOOK
179 
181 #define AGT_CB_SET_REMOTE_TXHOOK(C) (C)->flags |= AGT_CB_FL_TRANSHOOK
182 
183 
184 /********************************************************************
185 * *
186 * T Y P E S *
187 * *
188 *********************************************************************/
189 
191 typedef enum agt_cb_calltype_t_ {
196 } YPACK agt_cb_calltype_t;
197 
198 
203 typedef struct agt_cb_subsys_t_ {
205  dlq_hdr_t qhdr;
206 
208  const xmlChar *subsys_id;
209 
213  uint8 flags;
214 
216  status_t res;
217 } YPACK agt_cb_subsys_t;
218 
219 
240 typedef status_t
241  (*agt_cb_fn_t) (ses_cb_t *scb,
242  rpc_msg_t *msg,
243  agt_cbtyp_t cbtyp,
244  op_editop_t editop,
245  val_value_t *newval,
246  val_value_t *curval);
247 
248 
287 typedef status_t
288  (*agt_cb_hook_t) (ses_cb_t *scb,
289  rpc_msg_t *msg,
290  agt_cfg_transaction_t *txcb,
291  op_editop_t editop,
292  val_value_t *newval,
293  val_value_t *curval);
294 
295 
296 
324 typedef uint8
325  (*agt_cb_order_hook_t) (agt_cfg_transaction_t *txcb,
326  op_editop_t editop,
327  val_value_t *newval,
328  val_value_t *curval,
329  status_t *res);
330 
331 
332 
346 typedef status_t
347  (*agt_cb_trans_start_t) (agt_cfg_transaction_t *txcb);
348 
349 
350 
367 typedef status_t
368  (*agt_cb_sa_trans_start_t) (const xmlChar *transaction_id,
369  boolean isvalidate,
370  boolean isrollback,
371  boolean isrunning);
372 
373 
374 
386 typedef void
387  (*agt_cb_sa_trans_complete_t) (const xmlChar *transaction_id_val);
388 
389 
390 
403 typedef void
404  (*agt_cb_trans_complete_t) (agt_cfg_transaction_t *txcb);
405 
406 
407 
428 typedef status_t
429  (*agt_cb_validate_complete_t) (ses_cb_t *scb,
430  rpc_msg_t *msg,
431  val_value_t *candidate,
432  val_value_t *running);
433 
434 
435 
454 typedef status_t
455  (*agt_cb_startup_hook_t) (ses_cb_t *scb,
456  rpc_msg_t *msg,
457  cfg_template_t *source_config,
458  cfg_template_t *target_config);
459 
460 
461 
482 typedef status_t
483  (*agt_cb_apply_complete_t) (ses_cb_t *scb,
484  rpc_msg_t *msg,
485  val_value_t *candidate,
486  val_value_t *running);
487 
488 
489 
510 typedef status_t
511  (*agt_cb_rollback_complete_t) (ses_cb_t *scb,
512  rpc_msg_t *msg,
513  val_value_t *candidate,
514  val_value_t *running);
515 
516 
517 
536 typedef void
537  (*agt_cb_command_complete_t) (ses_cb_t *scb,
538  rpc_msg_t *msg,
539  const xmlChar *command_modname,
540  const xmlChar *command_name);
541 
542 
543 
555 typedef void
556  (*agt_cb_shutdown_t) (void);
557 
558 
571 typedef void
572  (*agt_cb_session_hook_t) (ncx_ses_event_t ses_event,
573  const ses_cb_t *scb);
574 
575 
618 typedef status_t
619  (*agt_cb_sa_hook_t) (ses_cb_t *scb,
620  rpc_msg_t *msg,
621  op_editop_t editop,
622  val_value_t *newval,
623  val_value_t *curval,
624  const xmlChar *transaction_id,
625  boolean isvalidate,
626  boolean isload,
627  boolean isrunning);
628 
629 
634 typedef struct agt_cb_fnset_t_ {
641  uint8 flags;
642 
643 #ifdef WITH_YCONTROL
644  /* used ony by SIL-SA */
648 
649  dlq_hdr_t subsysQ;
650 #endif
651 } YPACK agt_cb_fnset_t;
652 
653 
657 /********************************************************************
658 * *
659 * F U N C T I O N S *
660 * *
661 *********************************************************************/
662 
663 
680 extern status_t
681  agt_cb_init (void);
682 
683 
689 extern void
690  agt_cb_cleanup (void);
691 
692 
710 extern status_t
711  agt_cb_register_callback (const xmlChar *modname,
712  const xmlChar *defpath,
713  const xmlChar *version,
714  agt_cb_fn_t cbfn);
715 
716 
739 extern status_t
740  agt_cb_register_edit2_callback (const xmlChar *modname,
741  const xmlChar *defpath,
742  const xmlChar *version,
743  agt_cb_fn_t cbfn);
744 
745 
752 extern void
753  agt_cb_unregister_callbacks (const xmlChar *modname,
754  const xmlChar *defpath);
755 
756 
757 
775 extern status_t
776  agt_cb_register_get_callback (const xmlChar *modname,
777  const xmlChar *defpath,
778  const xmlChar *version,
779  getcb_fn2_t get_cbfn);
780 
781 
793 extern status_t
794  agt_cb_hook_register (const xmlChar *defpath,
795  agt_hook_fmt_t format,
796  agt_hook_type_t type,
797  agt_cb_hook_t cbfn);
798 
799 
808 extern void
809  agt_cb_hook_unregister (const xmlChar *defpath);
810 
811 
824 extern status_t
825  agt_cb_order_hook_register (const xmlChar *defpath,
826  agt_cb_order_hook_t cbfn);
827 
828 
837 extern void
838  agt_cb_order_hook_unregister (const xmlChar *defpath);
839 
840 
851 extern status_t
853 
854 
864 extern status_t
866 
867 
875 extern void
877 
878 
886 extern void
888 
889 
906 extern status_t
907  agt_cb_run_trans_start (ses_cb_t *scb,
908  agt_cfg_transaction_t *txcb,
909  boolean isvalidate,
910  boolean isrollback,
911  boolean isrunning,
912  boolean no_silsa_cb);
913 
914 
924 extern void
925  agt_cb_run_trans_complete (agt_cfg_transaction_t *txcb);
926 
927 
939 extern status_t
941 
942 
953 extern status_t
955 
956 
965 extern void
967 
968 
977 extern void
979 
980 
981 #ifdef WITH_YCONTROL
982 
997 extern status_t
998  agt_cb_invoke_trans_start_cb (const xmlChar *transaction_id,
999  boolean isvalidate,
1000  boolean isrollback,
1001  boolean isrunning);
1002 
1003 
1015 extern void
1016  agt_cb_invoke_trans_complete (const xmlChar *transaction_id);
1017 
1018 
1029 extern void
1030  agt_cb_sa_run_trans_complete (const xmlChar *transaction_id);
1031 
1032 
1033 
1052 extern status_t
1053  agt_cb_register_subsys_callback (const xmlChar *modname,
1054  const xmlChar *defpath,
1055  const xmlChar *version,
1056  const xmlChar *subsys_id,
1057  agt_cb_calltype_t calltype);
1058 
1059 
1060 
1068 extern void
1069  agt_cb_unregister_subsys_callback (const xmlChar *subsys_id,
1070  const xmlChar *modname,
1071  const xmlChar *defpath);
1072 
1073 #endif // WITH_YCONTROL
1074 
1075 
1101 extern status_t
1102  agt_cb_make_register_msg (val_value_t *request_val,
1103  obj_template_t *register_obj,
1104  obj_template_t *module_obj,
1105  obj_template_t *path_obj,
1106  obj_template_t *get_path_obj,
1107  obj_template_t *rpc_name_obj,
1108  obj_template_t *action_path_obj,
1109  obj_template_t *transaction_start_obj,
1110  obj_template_t *transaction_complete_obj,
1111  obj_template_t *post_sethook_path_obj,
1112  obj_template_t *sethook_list,
1113  obj_template_t *txhook_list,
1114  obj_template_t *edit2_path_obj,
1115  boolean *any_rw_objs);
1116 
1117 
1124 extern boolean
1125  agt_cb_obj_has_edit_callback (obj_template_t *obj);
1126 
1127 
1134 extern boolean
1135  agt_cb_obj_has_get_callback (obj_template_t *obj);
1136 
1137 
1146 extern status_t
1147  agt_cb_skip_leafref_validation (const xmlChar *defpath);
1148 
1149 
1158 extern status_t
1159  agt_cb_set_sil_priority (const xmlChar *defpath,
1160  uint8 sil_priority);
1161 
1162 
1173 extern status_t
1175 
1176 
1186 extern status_t
1188 
1189 
1198 extern void
1200 
1201 
1209 extern void
1211 
1212 
1223 extern status_t
1225 
1226 
1234 extern void
1236 
1237 
1250 extern status_t
1252 
1253 
1261 extern void
1263 
1264 
1281 extern status_t
1282  agt_cb_run_validate_complete (ses_cb_t *scb,
1283  rpc_msg_t *msg,
1284  val_value_t *candidate,
1285  val_value_t *running);
1286 
1287 
1302 extern status_t
1303  agt_cb_run_startup_hook (ses_cb_t *scb,
1304  rpc_msg_t *msg,
1305  cfg_template_t *source_config,
1306  cfg_template_t *target_config);
1307 
1308 
1325 extern status_t
1326  agt_cb_run_apply_complete (ses_cb_t *scb,
1327  rpc_msg_t *msg,
1328  val_value_t *candidate,
1329  val_value_t *running);
1330 
1331 
1348 extern status_t
1349  agt_cb_run_rollback_complete (ses_cb_t *scb,
1350  rpc_msg_t *msg,
1351  val_value_t *candidate,
1352  val_value_t *running);
1353 
1354 
1363 extern status_t
1365 
1366 
1378 extern void
1379  agt_cb_run_command_complete (ses_cb_t *scb,
1380  rpc_msg_t *msg,
1381  const xmlChar *command_modname,
1382  const xmlChar *command_name);
1383 
1384 
1392 extern void
1394 
1395 
1404 extern status_t
1406 
1407 
1415 extern void
1417 
1418 
1425 extern void
1426  agt_cb_run_shutdown (void);
1427 
1428 
1437 extern status_t
1438  agt_cb_post_sethook_register (const xmlChar *defpath,
1439  agt_cb_hook_t cbfn);
1440 
1441 
1448 extern void
1449  agt_cb_post_sethook_unregister (const xmlChar *defpath);
1450 
1451 
1460 extern status_t
1462 
1463 
1471 extern void
1473 
1474 
1483 extern void
1484  agt_cb_run_session_hook (ncx_ses_event_t ses_event,
1485  const ses_cb_t *scb);
1486 
1487 
1498 extern status_t
1499  agt_cb_def_hook_register (const xmlChar *defpath,
1500  ncx_def_hook_cbfn_t cbfn);
1501 
1502 
1508 extern void
1509  agt_cb_def_hook_unregister (const xmlChar *defpath);
1510 
1511 
1522 extern status_t
1523  agt_cb_sa_hook_register (const xmlChar *defpath,
1524  agt_hook_fmt_t format,
1525  agt_hook_type_t type,
1526  agt_cb_sa_hook_t cbfn);
1527 
1528 
1537 extern void
1538  agt_cb_sa_hook_unregister (const xmlChar *defpath);
1539 
1540 
1549 extern status_t
1550  agt_cb_sa_post_sethook_register (const xmlChar *defpath,
1551  agt_cb_sa_hook_t cbfn);
1552 
1553 
1560 extern void
1561  agt_cb_sa_post_sethook_unregister (const xmlChar *defpath);
1562 
1563 
1574 extern void
1575  agt_cb_unload_module (const xmlChar *modname);
1576 
1577 
1578 #ifdef __cplusplus
1579 } /* end extern 'C' */
1580 #endif
1581 
1582 #endif /* _H_agt_cb */
agt_cb_command_complete_unregister
void agt_cb_command_complete_unregister(agt_cb_command_complete_t cbfn)
Unregister a Command Complete callback.
Definition: agt_cb.c:4336
AGT_HOOK_TYPE_SETHOOK
@ AGT_HOOK_TYPE_SETHOOK
Set-Hook.
Definition: agt.h:712
ses.h
NETCONF Session Common definitions module.
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
SET_MOD_SILSA_DONE
#define SET_MOD_SILSA_DONE(M)
set flag used by agt_cb.c to make sure a <load-event> on SIL-SA does not cause a module to be registe...
Definition: ncxtypes.h:93
agt_hook_fmt_valid
boolean agt_hook_fmt_valid(agt_hook_fmt_t format)
Verify that the hook format is valid.
Definition: agt_hook_util.c:188
agt_cb_hook_unregister
void agt_cb_hook_unregister(const xmlChar *defpath)
Unregister a Hook callback.
Definition: agt_cb.c:1447
agt_cb_fnset_t_::post_set_hook_cbfn
agt_cb_hook_t post_set_hook_cbfn
Post Set Hook.
Definition: agt_cb.h:639
agt_sil_handle_remote_trans_start
status_t agt_sil_handle_remote_trans_start(ses_cb_t *client_scb, const xmlChar *client_txid, boolean isvalidate, boolean isrollback, boolean isrunning)
Handle a remote transaction.
Definition: agt_sil.c:9640
OBJ_TYP_LIST
@ OBJ_TYP_LIST
list: last real database object
Definition: obj.h:617
agt_cb_startup_hook_t
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:455
agt_hooks_callback_set
boolean agt_hooks_callback_set(obj_template_t *obj)
Check if an any Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:496
agt_util.h
Utility Functions for NCX Server method routines.
agt_cb_run_rollback_complete
status_t agt_cb_run_rollback_complete(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running)
Run Rollback Complete callbacks.
Definition: agt_cb.c:4234
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
agt_cb_def_hook_unregister
void agt_cb_def_hook_unregister(const xmlChar *defpath)
Unregister Dynamic Default callback functions for a specific object.
Definition: agt_cb.c:4859
agt_cb_fn_t
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:241
ncx_find_backptr
ncx_backptr_t * ncx_find_backptr(const dlq_hdr_t *que, void *node)
Find the specified back pointer struct.
Definition: ncx.c:11609
val_find_child
val_value_t * val_find_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname)
Find the first instance of the specified child node.
Definition: val.c:8560
agt_cb_session_hook_unregister
void agt_cb_session_hook_unregister(agt_cb_session_hook_t cbfn)
Unregister a Session Hook callback.
Definition: agt_cb.c:4708
AGT_CB_FL_EDIT2
#define AGT_CB_FL_EDIT2
EDIT2 callbacks for this subsystem.
Definition: agt_cb.h:107
agt_cb_apply_complete_unregister
void agt_cb_apply_complete_unregister(agt_cb_apply_complete_t cbfn)
Unregister a Apply Complete callback.
Definition: agt_cb.c:3895
agt_cb_fnset_t_::trans_hook_cbfn
agt_cb_hook_t trans_hook_cbfn
Transaction Hook.
Definition: agt_cb.h:640
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
agt_cb_calltype_t_
agt_cb_calltype_t_
different data node callback types for SIL and SIL-SA to register
Definition: agt_cb.h:191
agt_cb_fnset_t_::sa_trans_hook_cbfn
agt_cb_sa_hook_t sa_trans_hook_cbfn
SIL-SA Transaction Hook.
Definition: agt_cb.h:647
agt_cb_subsys_t_
header for 1 subsystem that has a SIL-SA callback function registered for the data node in the agt_cb...
Definition: agt_cb.h:203
agt_cb_sa_run_trans_complete
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:2305
val.h
Value Node Basic Support.
ncx_get_first_module
ncx_module_t * ncx_get_first_module(void)
Get the first module in the ncx_modQ.
Definition: ncx.c:4729
val_make_simval_obj
val_value_t * val_make_simval_obj(obj_template_t *obj, const xmlChar *valstr, status_t *res)
Create and set a val_value_t as a simple type from an object template instead of individual fields Ca...
Definition: val_util.c:4389
getcb.h
GET1 and GET2 Callback Support.
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
agt_cb_validate_complete_unregister
void agt_cb_validate_complete_unregister(agt_cb_validate_complete_t cbfn)
Unregister a Validate Complete callback.
Definition: agt_cb.c:3810
ncx_set_sethook_registered
void ncx_set_sethook_registered(boolean val)
Set the sethook_registered value.
Definition: ncx.c:14664
agt_action_callback_is_regdone
boolean agt_action_callback_is_regdone(obj_template_t *obj)
Set the ACTION as register done.
Definition: agt_action.c:540
status_enum.h
global error status code enumerations
agt_get2_wrapper
status_t agt_get2_wrapper(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 WRAPPER.
Definition: agt_get2.c:648
ncx_clean_backptrQ
void ncx_clean_backptrQ(dlq_hdr_t *backptrQ)
Clean an entire Q of ncx_backptr_t structs.
Definition: ncx.c:11470
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
agt_action.h
NETCONF Server YANG action handler.
obj_next_child_deep
obj_template_t * obj_next_child_deep(obj_template_t *obj)
Get the next child object if the specified object has any children.
Definition: obj.c:7138
agt_cb_run_shutdown
void agt_cb_run_shutdown(void)
Run Shutdown callbacks.
Definition: agt_cb.c:4498
agt_cb_session_hook_register
status_t agt_cb_session_hook_register(agt_cb_session_hook_t cbfn)
Register a Session Hook callback.
Definition: agt_cb.c:4665
ncx_def_hook_cbfn_t
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:1445
agt_cb_sa_post_sethook_register
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:5079
agt_cb_hook_register
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:1350
agt_cb_unregister_subsys_callback
void agt_cb_unregister_subsys_callback(const xmlChar *subsys_id, const xmlChar *modname, const xmlChar *defpath)
Unregister remote subsystem callback for a specific object.
Definition: agt_cb.c:2486
agt_cb_sa_hook_register
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:4893
agt_cb_unregister_callbacks
void agt_cb_unregister_callbacks(const xmlChar *modname, const xmlChar *defpath)
Unregister all EDIT callback functions for a specific object.
Definition: agt_cb.c:1965
AGT_CB_CALLTYPE_NONE
@ AGT_CB_CALLTYPE_NONE
not set
Definition: agt_cb.h:196
ncx_next_backptr
ncx_backptr_t * ncx_next_backptr(ncx_backptr_t *curptr)
Get next back pointer struct.
Definition: ncx.c:11545
agt_cb_run_startup_hook
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:4175
agt_cb_fnset_t_::set_hook_cbfn
agt_cb_hook_t set_hook_cbfn
Set Hook.
Definition: agt_cb.h:638
ERR_NCX_DUP_ENTRY
@ ERR_NCX_DUP_ENTRY
224
Definition: status_enum.h:263
AGT_CB_FL_TRANSHOOK_TREE
#define AGT_CB_FL_TRANSHOOK_TREE
transaction hook tree
Definition: agt_cb.h:118
agt_cb_trans_start_t
status_t(* agt_cb_trans_start_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_start callback.
Definition: agt_cb.h:347
op.h
NETCONF protocol operations.
ncx_clear_load_callback
void ncx_clear_load_callback(ncx_load_cbfn_t cbfn)
Clear the callback function for a load-module event.
Definition: ncx.c:8510
agt_cb_apply_complete_t
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_apply_complete_cb_t callback.
Definition: agt_cb.h:483
agt_cb_sa_trans_complete_register
status_t agt_cb_sa_trans_complete_register(agt_cb_sa_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:2098
agt_rpc_callback_regdone
void agt_rpc_callback_regdone(obj_template_t *obj)
Set the RPC as register done.
Definition: agt_rpc.c:4125
agt_cb_sa_hook_unregister
void agt_cb_sa_hook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Hook SIL-SA callback.
Definition: agt_cb.c:4999
agt_cb_run_validate_complete
status_t agt_cb_run_validate_complete(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running)
Run Validate Complete callbacks.
Definition: agt_cb.c:4021
OBJ_TYP_CONTAINER
@ OBJ_TYP_CONTAINER
container
Definition: obj.h:614
agt_cb_fnset_t_::sa_post_set_hook_cbfn
agt_cb_sa_hook_t sa_post_set_hook_cbfn
SIL-SA Post Set Hook.
Definition: agt_cb.h:646
agt_cb_post_sethook_register
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:4539
agt_cb.h
NETCONF Server Data Model callback handler.
agt_cb_skip_leafref_validation
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:3586
obj_is_list
boolean obj_is_list(const obj_template_t *obj)
Check if object is a YANG list.
Definition: obj.c:13349
obj_is_action
boolean obj_is_action(const obj_template_t *obj)
Check if the object is a YANG 1.1 action.
Definition: obj.c:14028
dlq_insertAhead
void dlq_insertAhead(void *newP, void *nodeP)
insert the new queue entry before the current entry
Definition: dlq.c:447
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
ERR_NCX_ENTRY_EXISTS
@ ERR_NCX_ENTRY_EXISTS
223
Definition: status_enum.h:262
agt_cb_fnset_t_::get_cbfn
getcb_fn2_t get_cbfn
GET-2.
Definition: agt_cb.h:636
log_debug2
void void void void void void void void void log_debug2(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG2 log entry.
obj_is_notif
boolean obj_is_notif(const obj_template_t *obj)
Check if the object is a notification.
Definition: obj.c:14083
obj_is_leafy
boolean obj_is_leafy(const obj_template_t *obj)
Check if object is a proper leaf or leaflist.
Definition: obj.c:13478
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xpath.h
Schema and data model Xpath search support.
agt_cb_run_trans_start
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:1833
agt_cb_set_sil_priority
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:3621
AGT_HOOK_TYPE_TRANSACTION
@ AGT_HOOK_TYPE_TRANSACTION
Transaction Hook.
Definition: agt.h:713
agt_cb_command_complete_t
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:537
agt_cb_def_hook_register
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:4787
agt_cb_cleanup
void agt_cb_cleanup(void)
Cleanup the server callback module.
Definition: agt_cb.c:1125
AGT_CB_CALLTYPE_EDIT2
@ AGT_CB_CALLTYPE_EDIT2
EDIT2 callback.
Definition: agt_cb.h:198
agt_cb_trans_start_register
status_t agt_cb_trans_start_register(agt_cb_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:1660
agt_post_sethook_callback_set
boolean agt_post_sethook_callback_set(obj_template_t *obj)
Check if an Post Set Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:534
AGT_CB_CALLTYPE_EDIT
@ AGT_CB_CALLTYPE_EDIT
EDIT1 callback.
Definition: agt_cb.h:197
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
agt_sil.h
SIL Transaction APIs.
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
agt_cb_shutdown_t
void(* agt_cb_shutdown_t)(void)
Typedef of the agt_shutdown_cb_t callback.
Definition: agt_cb.h:556
val_gen_index_chain
status_t val_gen_index_chain(const obj_template_t *obj, val_value_t *val)
Create an index chain for the just-parsed table or container struct.
Definition: val_util.c:2632
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
log_warn
void void void log_warn(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_WARN log entry.
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
agt_hook_obj_ok
status_t agt_hook_obj_ok(obj_template_t *obj, agt_hook_fmt_t format, agt_hook_type_t type, const xmlChar *defpath)
Check if format of the callback is acceptable for the object.
Definition: agt_hook_util.c:333
dlq_remove
void dlq_remove(void *nodeP)
remove the queue entry from its queue list entry MUST have been enqueued somehow before this function...
Definition: dlq.c:519
val_child_add
status_t val_child_add(val_value_t *child, val_value_t *parent)
Add a child value node to a parent value node.
Definition: val_child.c:1542
agt_cb_session_hook_t
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:572
agt_cb_run_command_complete
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:4373
agt_not_any_unregistered
boolean agt_not_any_unregistered(const xmlChar *modname)
Check if any entries are still unregistered for a subsystem building a register-request.
Definition: agt_not.c:9181
OBJ_TYP_ANYDATA
@ OBJ_TYP_ANYDATA
anydata: YANG 1.1 only
Definition: obj.h:626
ncx_set_load_callback
status_t ncx_set_load_callback(ncx_load_cbfn_t cbfn)
Set the callback function for a load-module event.
Definition: ncx.c:8472
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
AGT_CB_FL_EDIT
#define AGT_CB_FL_EDIT
begin 3 flags for the agt_cb_subsys_t.flags field edit flag indicates EDIT1 callbacks for this subsys...
Definition: agt_cb.h:101
agt_cb_hook_t
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:288
agt_cb_subsys_t_::subsys_id
const xmlChar * subsys_id
backptr to agt_sil_state->subsys_id
Definition: agt_cb.h:208
rpc.h
NETCONF protocol remote procedure call common definitions.
agt_cb_unload_module
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:5229
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
agt_cb_fnset_t_
set of server object callback functions back pointer to this struct stored in obj_template_t Shared b...
Definition: agt_cb.h:634
agt_sil_transaction_complete_cb
status_t agt_sil_transaction_complete_cb(const xmlChar *txid_str)
SIL transaction complete callback.
Definition: agt_sil.c:9498
val_child.h
Value Node Child Access Support.
ERR_INTERNAL_INIT_SEQ
@ ERR_INTERNAL_INIT_SEQ
007
Definition: status_enum.h:197
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
agt_cb_trans_complete_t
void(* agt_cb_trans_complete_t)(agt_cfg_transaction_t *txcb)
Typedef of the trans_complete callback.
Definition: agt_cb.h:404
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
yang.h
YANG Module parser utilities.
agt_hook_type_valid
boolean agt_hook_type_valid(agt_hook_type_t type)
Verify that the hook TYPE is valid.
Definition: agt_hook_util.c:156
agt_cb_order_hook_t
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:325
log_debug
void void void void void void void log_debug(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG log entry.
agt_cb_fnset_t_::subsysQ
dlq_hdr_t subsysQ
Q of agt_cb_subsys_t.
Definition: agt_cb.h:649
dlq_count
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:994
agt_cb_validate_complete_t
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_validate_complete_cb_t callback.
Definition: agt_cb.h:429
AGT_CB_SUBSYS_HAS_GET
#define AGT_CB_SUBSYS_HAS_GET(S)
check subsystem has a GET2 callback
Definition: agt_cb.h:136
LOGINFO
#define LOGINFO
Check if at least log-level=info.
Definition: log.h:279
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
obj_set_sil_priority
void obj_set_sil_priority(obj_template_t *obj, uint8 prio)
Set the SIL priority field.
Definition: obj.c:17169
agt_cb_startup_hook_unregister
void agt_cb_startup_hook_unregister(agt_cb_startup_hook_t cbfn)
Unregister a Startup Hook callback.
Definition: agt_cb.c:3724
agt.h
Multi-Protocol Network Management Server.
agt_cb_shutdown_unregister
void agt_cb_shutdown_unregister(agt_cb_shutdown_t cbfn)
Unregister a Shutdown callback.
Definition: agt_cb.c:4466
OBJ_TYP_LEAF_LIST
@ OBJ_TYP_LEAF_LIST
leaf-list
Definition: obj.h:616
obj_gen_object_id_prefix
status_t obj_gen_object_id_prefix(const obj_template_t *obj, xmlChar **buff)
Malloc and Generate the object ID for an object node Use the prefix in every node.
Definition: obj.c:10034
agt_cb_sa_trans_complete_t
void(* agt_cb_sa_trans_complete_t)(const xmlChar *transaction_id_val)
Typedef of the sa_trans_complete callback.
Definition: agt_cb.h:387
agt_cb_post_sethook_unregister
void agt_cb_post_sethook_unregister(const xmlChar *defpath)
Unregister a Post Set Hook callback.
Definition: agt_cb.c:4597
agt_hook_util.h
NETCONF Server Set/Transaction Hook utility functions.
AGT_CB_SUBSYS_HAS_EDIT2
#define AGT_CB_SUBSYS_HAS_EDIT2(S)
check subsystem has an EDIT2 callback
Definition: agt_cb.h:139
ERR_NCX_OPERATION_NOT_SUPPORTED
@ ERR_NCX_OPERATION_NOT_SUPPORTED
273
Definition: status_enum.h:314
agt_cb_sa_hook_t
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:619
ncx_first_backptr
ncx_backptr_t * ncx_first_backptr(dlq_hdr_t *que)
Get first back pointer struct.
Definition: ncx.c:11513
obj_is_container
boolean obj_is_container(const obj_template_t *obj)
Check if object is a YANG container.
Definition: obj.c:13405
agt_cb_register_subsys_callback
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:2344
OBJ_TYP_ANYXML
@ OBJ_TYP_ANYXML
anyxml
Definition: obj.h:613
ncx_get_next_object
obj_template_t * ncx_get_next_object(ncx_module_t *mod, obj_template_t *curobj)
Get the next object in the specified module.
Definition: ncx.c:5048
agt_cb_register_get_callback
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:1267
obj_find_child
obj_template_t * obj_find_child(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6116
agt_cb_init
status_t agt_cb_init(void)
Init the server callback module.
Definition: agt_cb.c:1088
agt_cb_subsys_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: agt_cb.h:205
agt_cb_sa_trans_start_t
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:368
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
AGT_CFG_GET_SKIP_SIL
#define AGT_CFG_GET_SKIP_SIL(C)
check the skip SIL callback flag
Definition: agt_cfg.h:118
agt_cb_validate_complete_register
status_t agt_cb_validate_complete_register(agt_cb_validate_complete_t cbfn)
Register a Validate Complete callback.
Definition: agt_cb.c:3761
AGT_CB_CALLTYPE_GET
@ AGT_CB_CALLTYPE_GET
GET2 callback.
Definition: agt_cb.h:199
agt_hook_post_sethook_obj_ok
status_t agt_hook_post_sethook_obj_ok(obj_template_t *obj, const xmlChar *defpath)
Check if format of the callback is acceptable for the object.
Definition: agt_hook_util.c:442
agt_get2.h
2nd generation GET support
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
agt_hook_subtree_format
boolean agt_hook_subtree_format(obj_template_t *obj)
Check if an Transaction Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:642
agt_cb_obj_has_get_callback
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:3562
agt_cb_shutdown_register
status_t agt_cb_shutdown_register(agt_cb_shutdown_t cbfn)
Register a Shutdown callback.
Definition: agt_cb.c:4418
agt_action_callback_set
boolean agt_action_callback_set(obj_template_t *obj)
Check if an ACTION callback is registered for this object for SIL-SA usage.
Definition: agt_action.c:479
agt_not_check_register_add
status_t agt_not_check_register_add(const xmlChar *modname, val_value_t *request_val)
Check if a "<stream-callback>" container needs to be added to the "<register>" list entry.
Definition: agt_not.c:9070
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
agt_cb_sa_trans_complete_unregister
void agt_cb_sa_trans_complete_unregister(agt_cb_sa_trans_complete_t cbfn)
Uregister a Transaction Complete callback.
Definition: agt_cb.c:2178
agt_cb_sa_trans_start_register
status_t agt_cb_sa_trans_start_register(agt_cb_sa_trans_start_t cbfn)
Register a Transaction Start callback.
Definition: agt_cb.c:2047
agt_cb_rollback_complete_t
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_rollback_complete_cb_t callback.
Definition: agt_cb.h:511
agt_rpc_callback_is_regdone
boolean agt_rpc_callback_is_regdone(obj_template_t *obj)
Set the RPC as register done.
Definition: agt_rpc.c:4154
agt_cb_register_edit2_callback
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:1224
agt_cfg.h
Manage Server configuration edit transactions.
agt_make_boolean_leaf
val_value_t * agt_make_boolean_leaf(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, boolean boolval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list (NCX_BT_BOOL)
Definition: agt_util.c:5900
agt_cb_fnset_t_::flags
uint8 flags
internal flags
Definition: agt_cb.h:641
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
agt_cb_rollback_complete_unregister
void agt_cb_rollback_complete_unregister(agt_cb_rollback_complete_t cbfn)
Unregister a Rollback Complete callback.
Definition: agt_cb.c:3980
agt_cb_command_complete_register
status_t agt_cb_command_complete_register(agt_cb_command_complete_t cbfn)
Register a Command Complete callback.
Definition: agt_cb.c:4290
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
agt_cb_order_hook_unregister
void agt_cb_order_hook_unregister(const xmlChar *defpath)
Unregister a Set-Order-Hook callback.
Definition: agt_cb.c:1591
agt_cb_fnset_t_::sa_set_hook_cbfn
agt_cb_sa_hook_t sa_set_hook_cbfn
SIL-SA Set Hook.
Definition: agt_cb.h:645
agt_cb_run_apply_complete
status_t agt_cb_run_apply_complete(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *candidate, val_value_t *running)
Run Apply Complete callbacks.
Definition: agt_cb.c:4097
agt_cb_trans_complete_register
status_t agt_cb_trans_complete_register(agt_cb_trans_complete_t cbfn)
Register a Transaction Complete callback.
Definition: agt_cb.c:1710
log_debug2_append
void void void void void void void void void void log_debug2_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG2 log entry.
agt_cb_invoke_trans_complete
void agt_cb_invoke_trans_complete(const xmlChar *transaction_id)
Invoke Transaction Complete callbacks.
Definition: agt_cb.c:2269
agt_cb_run_session_hook
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:4742
obj_is_enabled
boolean obj_is_enabled(obj_template_t *obj)
Check any if-feature statement that may cause the specified object to be invisible.
Definition: obj.c:14527
GET_MOD_NO_SIL_CODE
#define GET_MOD_NO_SIL_CODE(M)
check flag used by SIL-SA to know fi register-request really needed
Definition: ncxtypes.h:87
obj_first_child_deep
obj_template_t * obj_first_child_deep(obj_template_t *obj)
Get the first child object if the specified object has any children.
Definition: obj.c:7084
ncx_get_backptr_node
void * ncx_get_backptr_node(ncx_backptr_t *backptr)
Get the back pointer node pointer.
Definition: ncx.c:11577
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
val_new_value
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
agt_cb_startup_hook_register
status_t agt_cb_startup_hook_register(agt_cb_startup_hook_t cbfn)
Register a Startup Hook callback.
Definition: agt_cb.c:3663
agt_cb_fnset_t_::cbfn
agt_cb_fn_t cbfn
EDIT-1 or EDIT-2.
Definition: agt_cb.h:635
agt_cb_fnset_t_::order_hook_cbfn
agt_cb_order_hook_t order_hook_cbfn
Set Order Hook.
Definition: agt_cb.h:637
getcb_fn2_t
status_t(* getcb_fn2_t)(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 PRODUCER FUNCTION.
Definition: getcb.h:607
obj.h
Data Object Support.
AGT_CB_FL_GET
#define AGT_CB_FL_GET
GET2 callbacks for this subsystem.
Definition: agt_cb.h:104
agt_cb_subsys_t_::res
status_t res
status used by GET only
Definition: agt_cb.h:216
agt_action_callback_regdone
void agt_action_callback_regdone(obj_template_t *obj)
Set the ACTION as register done.
Definition: agt_action.c:511
agt_sethook_callback_set
boolean agt_sethook_callback_set(obj_template_t *obj)
Check if an Set Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:570
agt_cb_sa_post_sethook_unregister
void agt_cb_sa_post_sethook_unregister(const xmlChar *defpath)
Unregister a SIL-SA Post Set Hook callback.
Definition: agt_cb.c:5156
val_init_from_template
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
agt_cb_obj_has_edit_callback
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:3542
agt_cb_invoke_trans_start_cb
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:2216
xpath_find_schema_target_int
status_t xpath_find_schema_target_int(const xmlChar *target, obj_template_t **targobj)
@
Definition: xpath.c:2475
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
agt_cb_trans_complete_unregister
void agt_cb_trans_complete_unregister(agt_cb_trans_complete_t cbfn)
Unregister a Transaction Complete callback.
Definition: agt_cb.c:1792
agt_txhook_callback_set
boolean agt_txhook_callback_set(obj_template_t *obj)
Check if an Transaction Hook callback is registered for this object for SIL-SA usage.
Definition: agt_hook_util.c:606
agt_rpc_callback_set
boolean agt_rpc_callback_set(obj_template_t *obj)
Check if an RPC callback is registered for this object for SIL-SA usage.
Definition: agt_rpc.c:4093
obj_is_data_db
boolean obj_is_data_db(const obj_template_t *obj)
Check if the object is some sort of data Constrained to only check the config DB objects,...
Definition: obj.c:13788
agt_cb_make_register_msg
status_t agt_cb_make_register_msg(val_value_t *request_val, obj_template_t *register_obj, obj_template_t *module_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 *transaction_start_obj, obj_template_t *transaction_complete_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:3068
GET_MOD_SILSA_DONE
#define GET_MOD_SILSA_DONE(M)
check flag used by agt_cb.c to make sure a <load-event> on SIL-SA
Definition: ncxtypes.h:96
ncx_get_next_module
ncx_module_t * ncx_get_next_module(const ncx_module_t *mod)
Get the next module in the ncx_modQ.
Definition: ncx.c:4751
agt_cb_sa_trans_start_unregister
void agt_cb_sa_trans_start_unregister(agt_cb_sa_trans_start_t cbfn)
Uregister a Transaction Start callback.
Definition: agt_cb.c:2147
ncx_find_module
ncx_module_t * ncx_find_module(const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3227
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
AGT_CB_FL_SETHOOK_TREE
#define AGT_CB_FL_SETHOOK_TREE
4 flags for the agt_cb_fnset_t.flags field
Definition: agt_cb.h:117
agt_cb_register_callback
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:1177
OBJ_TYP_LEAF
@ OBJ_TYP_LEAF
leaf
Definition: obj.h:615
AGT_HOOKFMT_SUBTREE
@ AGT_HOOKFMT_SUBTREE
subtree mode
Definition: agt_hook_util.h:107
agt_cb_trans_start_unregister
void agt_cb_trans_start_unregister(agt_cb_trans_start_t cbfn)
Unregister a Transaction Start callback.
Definition: agt_cb.c:1759
ncx_free_backptr
void ncx_free_backptr(ncx_backptr_t *ptr)
Free an ncx_backptr_t struct.
Definition: ncx.c:11433
agt_cb_rollback_complete_register
status_t agt_cb_rollback_complete_register(agt_cb_rollback_complete_t cbfn)
Register a Rollback Complete callback.
Definition: agt_cb.c:3932
agt_cb_order_hook_register
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:1519
ncx_get_first_object
obj_template_t * ncx_get_first_object(ncx_module_t *mod)
Get the first object in the datadefQs for the specified module.
Definition: ncx.c:4957
obj_get_typestr
const xmlChar * obj_get_typestr(const obj_template_t *obj)
Get the name of the object type.
Definition: obj.c:11392
val_free_value
void val_free_value(val_value_t *val)
Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct it...
Definition: val.c:2842
agt_cb_subsys_t_::flags
uint8 flags
EDIT, EDIT2, GET, or both get and edit; BUT cannot be EDIT2 and EDIT1 at the same time.
Definition: agt_cb.h:213
agt_cb_run_trans_complete
void agt_cb_run_trans_complete(agt_cfg_transaction_t *txcb)
Run Transaction Complete callbacks.
Definition: agt_cb.c:1922
agt_hook_order_obj_ok
status_t agt_hook_order_obj_ok(obj_template_t *obj, const xmlChar *defpath)
Check if format of the callback is acceptable for the object.
Definition: agt_hook_util.c:393
ncx_new_backptr
ncx_backptr_t * ncx_new_backptr(void *node)
Malloc and initialize a new ncx_backptr_t struct.
Definition: ncx.c:11412
agt_cb_apply_complete_register
status_t agt_cb_apply_complete_register(agt_cb_apply_complete_t cbfn)
Register a Apply Complete callback.
Definition: agt_cb.c:3847
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297