yumapro  20.10-12
YumaPro SDK
agt_not.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_not
13 #define _H_agt_not
14 /* FILE: agt_not.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
27 /*********************************************************************
28 * *
29 * C H A N G E H I S T O R Y *
30 * *
31 *********************************************************************
32 
33 date init comment
34 ----------------------------------------------------------------------
35 30-may-09 abb Begun.
36 */
37 
38 #include <xmlstring.h>
39 
40 #ifndef _H_dlq
41 #include "dlq.h"
42 #endif
43 
44 #ifndef _H_ncxtypes
45 #include "ncxtypes.h"
46 #endif
47 
48 #ifndef _H_obj
49 #include "obj.h"
50 #endif
51 
52 #ifndef _H_ses
53 #include "ses.h"
54 #endif
55 
56 #ifndef _H_status
57 #include "status.h"
58 #endif
59 
60 #ifndef _H_tstamp
61 #include "tstamp.h"
62 #endif
63 
64 #ifndef _H_val
65 #include "val.h"
66 #endif
67 
68 #ifndef _H_yang_patch
69 #include "yang_patch.h"
70 #endif
71 
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
75 
76 /* header only */
77 
78 
103 /********************************************************************
104 * *
105 * C O N S T A N T S *
106 * *
107 *********************************************************************/
108 
110 #define AGT_NOT_MODULE1 (const xmlChar *)"notifications"
111 
113 #define AGT_NOT_MODULE2 (const xmlChar *)"nc-notifications"
114 
115 
116 /********************************************************************
117 * *
118 * T Y P E S *
119 * *
120 *********************************************************************/
121 
123 typedef uint32 agt_not_subid_t;
124 
125 
127 typedef enum agt_not_subevent_t_ {
130 
133 
136 } agt_not_subevent_t;
137 
138 
143 typedef struct agt_not_msg_t_ {
145  dlq_hdr_t qhdr;
146 
148  obj_template_t *notobj;
149 
150  /* payload set by caller: Q of val_value_t */
151  dlq_hdr_t payloadQ;
152 
154  uint32 msgid;
155 
158 
160  val_value_t *msg;
161 
163  val_value_t *event;
164 
166  boolean usemsgid;
167 } agt_not_msg_t;
168 
169 
171 typedef enum agt_not_filtertyp_t_ {
179 
182 
185 } agt_not_filtertyp_t;
186 
187 
191 typedef enum agt_not_sterr_t_ {
201 } agt_not_sterr_t;
202 
203 
212 } agt_not_push_change_t;
213 
214 
221 
224 
227 
230 
233 
236 } agt_not_suspend_reason_t;
237 
238 
245 
248 
251 
254 
257 
260 
263 
264 } agt_not_term_reason_t;
265 
266 
283 typedef void
284  (*agt_not_modify_filter_cbfn_t) (ses_cb_t *scb,
285  agt_not_subid_t subid,
286  agt_not_filtertyp_t filtyp,
287  const val_value_t *new_filter);
288 
289 
303 typedef void
305  boolean kill_pending);
306 
307 
308 
317 typedef void
319 
320 
329 typedef void
330  (*agt_not_module_removed_cbfn_t) (const ncx_module_t *mod);
331 
332 
333 
395 typedef void
396  (*agt_not_stream_cbfn_t) (const xmlChar *event_stream,
397  agt_not_subevent_t subevent,
398  void *cookie);
399 
400 
404 /********************************************************************
405 * *
406 * F U N C T I O N S *
407 * *
408 *********************************************************************/
409 
410 
451 extern status_t
452  agt_not_init (void);
453 
454 
462 extern status_t
463  agt_not_init_sil_sa (void);
464 
465 
473 extern status_t
474  agt_not_init2 (void);
475 
476 
482 extern void
483  agt_not_cleanup (void);
484 
485 
492 extern void
493  agt_not_cleanup_sil_sa (void);
494 
495 
496 
497 #ifdef PTHREADS
498 
516 extern uint32
517  agt_not_send_notifications (thd_tcb_t *tcb);
518 
519 #else
520 
536 extern uint32
538 
539 #endif // PTHREADS
540 
541 
548 extern void
549  agt_not_clean_eventlog (void);
550 
551 
559 extern void
561 
562 
569 extern agt_not_msg_t *
570  agt_not_new_notification (obj_template_t *eventType);
571 
572 
581 extern agt_not_msg_t *
582  agt_not_new_notification_ex (obj_template_t *eventType,
583  const xmlChar *eventTime);
584 
585 
595 extern void
596  agt_not_free_notification (agt_not_msg_t *notif);
597 
598 
617 extern void
618  agt_not_add_to_payload (agt_not_msg_t *notif,
619  val_value_t *val);
620 
621 
638 extern void
639  agt_not_queue_notification (agt_not_msg_t *notif);
640 
641 
666 extern void
667  agt_not_queue_notification_stream (const xmlChar *stream_name,
668  agt_not_msg_t *notif);
669 
670 
681 extern boolean
682  agt_not_is_replay_event (const obj_template_t *notifobj);
683 
684 
690 extern void
692 
693 
714 extern status_t
715  agt_not_start_subscription (ses_cb_t *scb,
716  const xmlChar *stream,
717  xmlChar *startTime,
718  xmlChar *stopTime,
719  boolean futurestop,
720  op_filtertyp_t filtertype,
721  val_value_t *filterval,
722  val_value_t *selectval);
723 
724 
725 #ifdef WITH_YP_HA
726 
731 extern void
732  agt_not_go_active (void);
733 #endif // WITH_YP_HA
734 
735 #ifdef WITH_YP_HA
736 
741 extern void
742  agt_not_go_standby (void);
743 #endif // WITH_YP_HA
744 
745 
746 #ifdef WITH_YANG_PUSH
747 
753 extern status_t
754  agt_not_init_yangpush (obj_template_t *streams_obj);
755 #endif // WITH_YANG_PUSH
756 
757 
767 extern status_t
768  agt_not_set_filter (const xmlChar *name,
769  ncx_nmda_filtyp_t nmda_filtyp,
770  agt_not_filtertyp_t filtyp,
771  const val_value_t *filval);
772 
773 
774 
788 extern status_t
789  agt_not_clone_filter (ncx_nmda_filtyp_t nmda_filtyp,
790  const xmlChar *name,
791  agt_not_filtertyp_t *filtyp,
792  val_value_t **filval);
793 
794 
802 extern status_t
803  agt_not_delete_filter (const xmlChar *name,
804  ncx_nmda_filtyp_t nmda_filtyp);
805 
806 
807 
816 extern status_t
817  agt_not_delete_all_filters (boolean force);
818 
819 
848 extern status_t
850  ses_cb_t *scb,
851  const xmlChar *stream_filter_name,
852  const val_value_t *stream_subtree_filter,
853  const val_value_t *stream_xpath_filter,
854  const xmlChar *stream,
855  const xmlChar *replay_start_time,
856  const xmlChar *stop_time,
857  const val_value_t *encoding,
858  agt_not_subid_t *subid,
859  agt_not_sterr_t *errnum);
860 
861 
897 status_t
899  ses_cb_t *scb,
900  agt_not_subid_t subid,
901  const xmlChar *stream_filter_name,
902  const val_value_t *stream_subtree_filter,
903  const val_value_t *stream_xpath_filter,
904  const xmlChar *stop_time,
905  agt_not_sterr_t *errnum);
906 
907 
919 extern status_t
921  agt_not_subid_t subid);
922 
923 
933 extern status_t
935 
936 
937 #ifdef WITH_YANG_PUSH
938 
957 extern status_t
959  ses_cb_t *scb,
960  const xmlChar *selection_filter_ref,
961  const xmlChar *stop_time,
962  const val_value_t *encoding,
963  agt_not_modify_filter_cbfn_t modify_cbfn,
965  agt_not_subid_t *subid,
966  agt_not_sterr_t *errnum);
967 
968 
984 extern status_t
986  ses_id_t sid,
987  agt_not_subid_t cur_subid,
988  const xmlChar *selection_filter_ref,
989  const xmlChar *stop_time,
990  agt_not_sterr_t *errnum);
991 
992 
1000 extern status_t
1003 
1004 
1020 extern status_t
1021  agt_not_register_notif_objs (obj_template_t *replay_completed,
1022  obj_template_t *subscription_completed,
1023  obj_template_t *subscription_modified,
1024  obj_template_t *subscription_resumed,
1025  obj_template_t *subscription_started,
1026  obj_template_t *subscription_suspended,
1027  obj_template_t *subscription_terminated);
1028 
1029 
1041 extern status_t
1043  ses_id_t sid,
1044  obj_template_t *notif_obj,
1045  rpc_msg_t *msg,
1046  boolean *subscription_deleted);
1047 
1048 
1068 extern status_t
1070  ses_id_t sid,
1071  const xmlChar *filespec,
1072  rpc_msg_t *msg,
1073  boolean *subscription_deleted,
1074  uint32 *checksum,
1075  uint32 *bytecnt);
1076 
1077 
1093 extern status_t
1095  ses_id_t sid,
1096  const xmlChar *filespec,
1097  rpc_msg_t *msg,
1098  obj_template_t *notif_obj,
1099  boolean *subscription_deleted);
1100 
1101 
1110 extern void
1112  agt_not_suspend_reason_t reason);
1113 
1114 
1115 
1124 extern void
1126 
1127 
1137 extern void
1139  agt_not_term_reason_t term_reason);
1140 
1141 
1152 extern status_t
1154  ses_id_t sid,
1155  obj_template_t *notif_obj,
1156  yang_patch_cb_t *pcb,
1157  boolean *subscription_deleted);
1158 
1159 
1160 #endif // WITH_YANG_PUSH
1161 
1162 
1172 extern void
1173  agt_not_remove_module_filters (const ncx_module_t *mod);
1174 
1175 
1176 #ifdef WITH_YANG_PUSH
1177 
1184 extern obj_template_t *
1185  agt_not_get_modified_obj (void);
1186 
1187 
1195 extern status_t
1197  agt_not_msg_t *notif);
1198 
1199 #endif // WITH_YANG_PUSH
1200 
1201 
1209 extern status_t
1210  agt_not_create_event_stream (const xmlChar *name,
1211  uint32 eventlog_size);
1212 
1213 
1221 extern status_t
1222  agt_not_delete_event_stream (ses_cb_t *scb,
1223  const xmlChar *name);
1224 
1225 
1234 extern status_t
1235  agt_not_edit_module_map (const xmlChar *modname,
1236  const xmlChar *stream_name,
1237  boolean is_create);
1238 
1239 
1246 extern status_t
1247  agt_not_delete_module_map (const xmlChar *modname);
1248 
1249 
1256 extern boolean
1257  agt_not_event_stream_exists (const xmlChar *stream_name);
1258 
1259 
1271 extern status_t
1272  agt_not_clear_event_stream_log (const xmlChar *stream_name);
1273 
1274 
1275 
1329 extern status_t
1330  agt_not_register_stream_cbfn (const xmlChar *modname,
1331  const xmlChar *stream_name,
1332  boolean all_streams,
1333  agt_not_stream_cbfn_t cbfn,
1334  void *cookie);
1335 
1336 
1348 extern void
1349  agt_not_unregister_stream_cbfn (const xmlChar *modname,
1350  agt_not_stream_cbfn_t cbfn);
1351 
1352 
1353 
1354 
1355 #ifdef WITH_YCONTROL
1356 
1391 extern status_t
1392  agt_not_register_stream_cbfn_subsys (const xmlChar *subsys_id,
1393  const xmlChar *modname,
1394  const xmlChar *stream_name,
1395  boolean all_streams);
1396 
1397 
1406 extern void
1407  agt_not_unregister_stream_cbfn_subsys (const xmlChar *subsys_id,
1408  const xmlChar *modname);
1409 
1410 
1411 
1412 
1423 extern status_t
1424  agt_not_check_register_add (const xmlChar *modname,
1425  val_value_t *request_val);
1426 
1427 
1437 extern boolean
1438  agt_not_any_unregistered (const xmlChar *modname);
1439 
1440 
1441 
1452 extern void
1453  agt_not_subsys_gone (const xmlChar *subsys_id);
1454 
1455 
1473 extern status_t
1474  agt_not_stream_callback_subsys (const xmlChar *stream_name,
1475  agt_not_subevent_t subevent,
1476  const xmlChar *modname,
1477  boolean all_streams);
1478 
1479 
1480 #endif // WITH_YCONTROL
1481 
1482 
1483 
1498 extern void
1499  agt_not_unload_module (const xmlChar *modname);
1500 
1501 
1502 
1503 
1507 #ifdef __cplusplus
1508 } /* end extern 'C' */
1509 #endif
1510 
1511 #endif /* _H_agt_not */
AGT_NOT_SUSPEND_INSUFFICIENT_RESOURCES
@ AGT_NOT_SUSPEND_INSUFFICIENT_RESOURCES
insufficient resources
Definition: agt_not.h:223
AGT_NOT_STERR_NONE
@ AGT_NOT_STERR_NONE
not set
Definition: agt_not.h:192
ses.h
NETCONF Session Common definitions module.
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
agt_not_delete_all_filters
status_t agt_not_delete_all_filters(boolean force)
Delete all existing filter entries.
Definition: agt_not.c:7128
ses_finish_checksum
uint32 ses_finish_checksum(ses_cb_t *scb, uint32 *checksum_cnt)
Stop checksum mode and return the final checksum.
Definition: ses.c:4966
AGT_NOT_TERM_FILTER_UNAVAILABLE
@ AGT_NOT_TERM_FILTER_UNAVAILABLE
filter unavailable
Definition: agt_not.h:247
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
agt_ypsnmp.h
Yuma Interface to net-snmp data structures. Agent interface.
NCX_NT_STRING
@ NCX_NT_STRING
xmlChar *, error only
Definition: ncxtypes.h:279
agt_not_create_event_stream
status_t agt_not_create_event_stream(const xmlChar *name, uint32 eventlog_size)
Create an event-stream from a YANG module interface.
Definition: agt_not.c:8516
agt_cap.h
NETCONF Server capabilities handler.
cfg.h
AGT_NOT_TERM_DATASTORE_NOT_SUBSCRIBABLE
@ AGT_NOT_TERM_DATASTORE_NOT_SUBSCRIBABLE
datastore not subscribable
Definition: agt_not.h:259
AGT_NOT_SUBEV_INACTIVE
@ AGT_NOT_SUBEV_INACTIVE
inactive sub-event
Definition: agt_not.h:135
AGT_NOT_TERM_UNCHANGING_SELECTION
@ AGT_NOT_TERM_UNCHANGING_SELECTION
unchanging selection
Definition: agt_not.h:262
xml_strncpy
uint32 xml_strncpy(xmlChar *copyTo, const xmlChar *copyFrom, uint32 maxlen)
String copy for xmlChar – checks for buffer overflow.
Definition: xml_util.c:1518
ses_finish_msg
void ses_finish_msg(ses_cb_t *scb)
Finish an outbound message on the specified session.
Definition: ses.c:3013
agt_not_go_active
void agt_not_go_active(void)
Enable active notification subscriptions.
Definition: agt_not.c:6511
xml_msg_clean_hdr
void xml_msg_clean_hdr(xml_msg_hdr_t *msg)
Clean all the memory used by the specified xml_msg_hdr_t but do not free the struct itself.
Definition: xml_msg.c:438
agt_not_subevent_t_
agt_not_subevent_t_
event-stream sub-event types
Definition: agt_not.h:127
agt_ses.h
Server Session Management.
agt_util.h
Utility Functions for NCX Server method routines.
ses_new_indent_count
int32 ses_new_indent_count(boolean indent_in, int32 indent, int32 indent_amount)
Get the new indent count from the current and indent_amount.
Definition: ses.c:4148
agt_rpc_register_method
status_t agt_rpc_register_method(const xmlChar *module, const xmlChar *method_name, agt_rpc_phase_t phase, agt_rpc_method_t method)
add callback for 1 phase of RPC processing
Definition: agt_rpc.c:2557
agt_acm_notif_allowed
boolean agt_acm_notif_allowed(const xmlChar *user, const obj_template_t *notifobj)
Check if the specified user is allowed to receive a notification event.
Definition: agt_acm.c:408
agt_use_notifications
boolean agt_use_notifications(void)
Check if notifications currently enabled.
Definition: agt.c:4867
tstamp.h
Timestamp utilities.
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
agt_not_msg_t_
one notification message that will be sent to all subscriptions in the stream and kept in the replay ...
Definition: agt_not.h:143
cfg_rwlock_acquire_single_wrlock
status_t cfg_rwlock_acquire_single_wrlock(thd_tcb_t *tcb, cfg_template_t *cfg)
Acquire a single RWLOCK for write access.
Definition: cfg.c:978
val_child_remove
void val_child_remove(val_value_t *child)
Remove a child value node from its parent value node.
Definition: val_child.c:2133
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
ERR_NCX_BAD_ELEMENT
@ ERR_NCX_BAD_ELEMENT
264
Definition: status_enum.h:305
VAL_STRING
#define VAL_STRING(V)
Access the value as a string ONLY if typ_is_string(typdef) is true.
Definition: val.h:414
agt_not_stream_callback_subsys
status_t agt_not_stream_callback_subsys(const xmlChar *stream_name, agt_not_subevent_t subevent, const xmlChar *modname, boolean all_streams)
Invoke a stream callback function on the SIL-SA subsystem.
Definition: agt_not.c:9280
ses_start_msg_mode
void ses_start_msg_mode(ses_cb_t *scb)
Set the message output mode to active.
Definition: ses.c:2932
tstamp_convert_to_utctime
xmlChar * tstamp_convert_to_utctime(const xmlChar *timestr, boolean *isNegative, status_t *res)
Check if the specified string is a valid dateTime or date-and-time string is valid and if so,...
Definition: tstamp.c:298
ERR_NCX_NOTIF_STREAM_UNAVAILABLE
@ ERR_NCX_NOTIF_STREAM_UNAVAILABLE
428
Definition: status_enum.h:473
ERR_NCX_DEF_NOT_FOUND
@ ERR_NCX_DEF_NOT_FOUND
250
Definition: status_enum.h:289
SES_ST_IDLE
@ SES_ST_IDLE
adble to accept requests
Definition: ses.h:358
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
agt_not_cancel_subscription
void agt_not_cancel_subscription(ses_id_t sid)
Cancel any notification subscription for the specified session.
Definition: agt_not.c:6298
NCX_MSG_ENCODING_XML
@ NCX_MSG_ENCODING_XML
XML message encoding.
Definition: ncxtypes.h:477
val.h
Value Node Basic Support.
agt_not_subsys_gone
void agt_not_subsys_gone(const xmlChar *subsys_id)
Unload any remote stream callbacks when a subsystem session is lost and subsys-gone event handled.
Definition: agt_not.c:9223
xml_util.h
XML Utilities.
AGT_NOT_FILTER_NONE
@ AGT_NOT_FILTER_NONE
not set
Definition: agt_not.h:172
agt_not_is_replay_event
boolean agt_not_is_replay_event(const obj_template_t *notifobj)
Check if the specified notfication is the replayComplete or notificationComplete notification events.
Definition: agt_not.c:6267
agt_tree.h
Server subtree filter processing for <filter> element in <get> and <get-config> operations.
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
agt_not_term_reason_t_
agt_not_term_reason_t_
Terminate subscription reasons.
Definition: agt_not.h:242
getcb.h
GET1 and GET2 Callback Support.
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
AGT_RPC_PH_VALIDATE
@ AGT_RPC_PH_VALIDATE
(2) cb after the input is parsed
Definition: agt_rpc.h:115
val_child_find
val_value_t * val_child_find(const val_value_t *parent, const xmlChar *child_modname, const xmlChar *child_name)
Find the child node for the specified child name and modname.
Definition: val_child.c:1707
NCX_LAYER_OPERATION
@ NCX_LAYER_OPERATION
protocol operation layer
Definition: ncxtypes.h:346
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.
xml_wr.h
XML Write functions.
val_get_mod_name
const xmlChar * val_get_mod_name(const val_value_t *val)
Get the module name associated with this value node.
Definition: val.c:12223
agt_not_setup_push_subscription
status_t agt_not_setup_push_subscription(ses_cb_t *scb, const xmlChar *selection_filter_ref, const xmlChar *stop_time, const val_value_t *encoding, agt_not_modify_filter_cbfn_t modify_cbfn, agt_not_delete_subscription_cbfn_t delete_cbfn, agt_not_subid_t *subid, agt_not_sterr_t *errnum)
Create a RFC 8641 YANG Push subscription.
Definition: agt_not.c:7759
AGT_NOT_TERM_NO_SUCH_SUBSCRIPTION
@ AGT_NOT_TERM_NO_SUCH_SUBSCRIPTION
no such subscription
Definition: agt_not.h:250
agt_not_check_push_cbfn_t
void(* agt_not_check_push_cbfn_t)(ses_id_t sid)
Check Push Callback.
Definition: agt_not.h:318
AGT_NOT_STERR_STOP_TIME
@ AGT_NOT_STERR_STOP_TIME
stop-time
Definition: agt_not.h:198
agt_make_virtual_leaf
val_value_t * agt_make_virtual_leaf(obj_template_t *parentobj, const xmlChar *leafname, getcb_fn_t callbackfn, status_t *res)
make a val_value_t struct for a specified virtual leaf or leaf-list
Definition: agt_util.c:3872
AGT_NOT_SUSPEND_UPDATE_TOO_BIG
@ AGT_NOT_SUSPEND_UPDATE_TOO_BIG
update too big
Definition: agt_not.h:232
agt_not_send_simop_update
status_t agt_not_send_simop_update(agt_not_subid_t subid, ses_id_t sid, const xmlChar *filespec, rpc_msg_t *msg, obj_template_t *notif_obj, boolean *subscription_deleted)
Use the file contents to send an Simulated Operational on-change update to the client session.
Definition: agt_not.c:8211
VAL_IDREF_NAME
#define VAL_IDREF_NAME(V)
Access the name string value as an identityref ONLY if NCX_BT_IDREF.
Definition: val.h:476
SES_TYP_SNMP
@ SES_TYP_SNMP
RESTCONF over SNMP.
Definition: ses.h:324
agt_not_remove_module_filters
void agt_not_remove_module_filters(const ncx_module_t *mod)
Invoke Module Removed Callback.
Definition: agt_not.c:8432
val_compare
int32 val_compare(const val_value_t *val1, const val_value_t *val2)
Compare 2 val_value_t struct value contents.
Definition: val.c:9456
AGT_NOT_PUSH_CHANGE_REPLACE
@ AGT_NOT_PUSH_CHANGE_REPLACE
replace edit
Definition: agt_not.h:211
ncx_next_backptr
ncx_backptr_t * ncx_next_backptr(ncx_backptr_t *curptr)
Get next back pointer struct.
Definition: ncx.c:11545
AGT_NOT_SUBEV_NONE
@ AGT_NOT_SUBEV_NONE
not set
Definition: agt_not.h:129
dlq_lastEntry
#define dlq_lastEntry(listP)
get the last entry in the queue list
Definition: dlq.h:352
agt_not_set_filter
status_t agt_not_set_filter(const xmlChar *name, ncx_nmda_filtyp_t nmda_filtyp, agt_not_filtertyp_t filtyp, const val_value_t *filval)
Add or Modify a filter entry.
Definition: agt_not.c:6857
ERR_NCX_DUP_ENTRY
@ ERR_NCX_DUP_ENTRY
224
Definition: status_enum.h:263
AGT_NOT_SUSPEND_PERIOD_UNSUPPORTED
@ AGT_NOT_SUSPEND_PERIOD_UNSUPPORTED
period unsupported
Definition: agt_not.h:229
agt_not_register_notif_objs
status_t agt_not_register_notif_objs(obj_template_t *replay_completed, obj_template_t *subscription_completed, obj_template_t *subscription_modified, obj_template_t *subscription_resumed, obj_template_t *subscription_started, obj_template_t *subscription_suspended, obj_template_t *subscription_terminated)
Register Notification Objects.
Definition: agt_not.c:8025
agt_not_init2
status_t agt_not_init2(void)
INIT 2: Initialize the monitoring data structures This must be done after the <running> config is loa...
Definition: agt_not.c:4911
AGT_NOT_FILTER_XPATH
@ AGT_NOT_FILTER_XPATH
XPath filter.
Definition: agt_not.h:184
agt_not_init_sil_sa
status_t agt_not_init_sil_sa(void)
INIT 1: Initialize the server notification module data structures.
Definition: agt_not.c:4880
OP_FILTER_SUBTREE
@ OP_FILTER_SUBTREE
subtree filter
Definition: op.h:116
agt_not_modify_push_subscription
status_t agt_not_modify_push_subscription(ses_id_t sid, agt_not_subid_t cur_subid, const xmlChar *selection_filter_ref, const xmlChar *stop_time, agt_not_sterr_t *errnum)
Modify a RFC 8641 YANG Push subscription.
Definition: agt_not.c:7938
VAL_NAME
#define VAL_NAME(V)
Access the value name.
Definition: val.h:399
agt_not_register_stream_cbfn_subsys
status_t agt_not_register_stream_cbfn_subsys(const xmlChar *subsys_id, const xmlChar *modname, const xmlChar *stream_name, boolean all_streams)
Register a SIL event-stream callback function.
Definition: agt_not.c:8928
ncxmod.h
NCX Module Load Manager.
agt_not.h
NETCONF Notifications DM module support.
AGT_NOT_SUSPEND_UNSUPPORTABLE_VOLUME
@ AGT_NOT_SUSPEND_UNSUPPORTABLE_VOLUME
unsupported volume
Definition: agt_not.h:226
agt_not_suspend_push_subscription
void agt_not_suspend_push_subscription(agt_not_subid_t subid, agt_not_suspend_reason_t reason)
Suspend a subscription and stop sending notifications to it.
Definition: agt_not.c:8257
agt_not_edit_module_map
status_t agt_not_edit_module_map(const xmlChar *modname, const xmlChar *stream_name, boolean is_create)
Create or modify a module map from a YANG module interface.
Definition: agt_not.c:8590
obj_notif_log_drops
boolean obj_notif_log_drops(const obj_template_t *obj)
Check if the event drops for the notification object is enabled.
Definition: obj.c:17011
agt_yangapi.h
Yuma REST API Message Handler.
ERR_NCX_NOTIF_NO_SUCH_SUBSCRIPTION
@ ERR_NCX_NOTIF_NO_SUCH_SUBSCRIPTION
426
Definition: status_enum.h:471
AGT_NOT_SUSPEND_NONE
@ AGT_NOT_SUSPEND_NONE
not set
Definition: agt_not.h:220
ses_set_file_override
status_t ses_set_file_override(ses_cb_t *scb, const xmlChar *filespec)
Setup the session in file write override mode.
Definition: ses.c:4881
AGT_NOT_SUBEV_ACTIVE
@ AGT_NOT_SUBEV_ACTIVE
active sub-event
Definition: agt_not.h:132
xml_wr_begin_elem
void xml_wr_begin_elem(ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, int32 indent)
Write a start XML tag to the specified session without attributes.
Definition: xml_wr.c:3040
ses_msg.h
NETCONF Session Message Common definitions module.
cfg_get_root
val_value_t * cfg_get_root(ncx_cfg_t cfgid)
Get the config root for the specified config.
Definition: cfg.c:3240
ses_id_t
uint32 ses_id_t
Session ID.
Definition: ses.h:306
AGT_NOT_TERM_SUSPENSION_TIMEOUT
@ AGT_NOT_TERM_SUSPENSION_TIMEOUT
suspension timeout
Definition: agt_not.h:256
agt_cb.h
NETCONF Server Data Model callback handler.
AGT_NOT_FILTER_SUBTREE
@ AGT_NOT_FILTER_SUBTREE
subtree filter
Definition: agt_not.h:181
agt_not_delete_filter
status_t agt_not_delete_filter(const xmlChar *name, ncx_nmda_filtyp_t nmda_filtyp)
Delete an existing filter entry.
Definition: agt_not.c:7054
dlq_insertAhead
void dlq_insertAhead(void *newP, void *nodeP)
insert the new queue entry before the current entry
Definition: dlq.c:447
agt_output_filter
status_t agt_output_filter(ses_cb_t *scb, rpc_msg_t *msg, int32 indent)
output the proper data for the get or get-config operation generate the data that matched the subtree...
Definition: agt_util.c:2890
agt_not_unregister_stream_cbfn
void agt_not_unregister_stream_cbfn(const xmlChar *modname, agt_not_stream_cbfn_t cbfn)
Unregister a SIL event-stream callback function.
Definition: agt_not.c:8836
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
xmlns_id_t
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
AGT_NOT_PUSH_CHANGE_DELETE
@ AGT_NOT_PUSH_CHANGE_DELETE
delete edit
Definition: agt_not.h:208
OP_FILTER_XPATH
@ OP_FILTER_XPATH
XPath filter.
Definition: op.h:117
agt_record_error
void agt_record_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:1942
AGT_NOT_STERR_XPATH_FILTER
@ AGT_NOT_STERR_XPATH_FILTER
xpath-filter
Definition: agt_not.h:195
val_remove_child
void val_remove_child(val_value_t *child)
Remove a child value node from its parent value node.
Definition: val.c:8316
agt_rpc_unregister_method
void agt_rpc_unregister_method(const xmlChar *module, const xmlChar *method_name)
remove the callback functions for all phases of RPC or Action processing for the specified RPC method...
Definition: agt_rpc.c:2759
ERR_NCX_MISSING_PARM
@ ERR_NCX_MISSING_PARM
233
Definition: status_enum.h:272
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.
xml_wr_uint32_elem
void xml_wr_uint32_elem(ses_cb_t *scb, xml_msg_hdr_t *msg, uint32 num, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, const dlq_hdr_t *attrQ, boolean isattrq, int32 indent)
Write a start tag, simple uint32 content, and an end tag to the specified session.
Definition: xml_wr.c:3181
agt_not_kill_dynamic_subscription
status_t agt_not_kill_dynamic_subscription(agt_not_subid_t subid)
Terminate any session's RFC 8639 subscription.
Definition: agt_not.c:7722
agt_not_establish_subscription
status_t agt_not_establish_subscription(ses_cb_t *scb, const xmlChar *stream_filter_name, const val_value_t *stream_subtree_filter, const val_value_t *stream_xpath_filter, const xmlChar *stream, const xmlChar *replay_start_time, const xmlChar *stop_time, const val_value_t *encoding, agt_not_subid_t *subid, agt_not_sterr_t *errnum)
Create a RFC 8639 stream subscription.
Definition: agt_not.c:7529
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
AGT_NOT_STERR_FILTER_REF
@ AGT_NOT_STERR_FILTER_REF
filter-ref
Definition: agt_not.h:193
agt_not_send_periodic_update
status_t agt_not_send_periodic_update(agt_not_subid_t subid, ses_id_t sid, obj_template_t *notif_obj, rpc_msg_t *msg, boolean *subscription_deleted)
Used by YANG Push to send a periodic update to 1 session.
Definition: agt_not.c:8065
xml_strndup
xmlChar * xml_strndup(const xmlChar *copyFrom, uint32 maxlen)
String duplicate for max N xmlChars.
Definition: xml_util.c:1663
val_dump_value
void val_dump_value(val_value_t *val, int32 startindent, log_debug_t lvl)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5688
agt_xpath.h
Server XPath filter processing for select attribute in <filter> element in <get> and <get-config> ope...
AGT_NOT_STERR_START_TIME
@ AGT_NOT_STERR_START_TIME
start-time
Definition: agt_not.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.
AGT_NOT_MODULE1
#define AGT_NOT_MODULE1
RFC 5277 notifications operations module.
Definition: agt_not.h:110
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_not_delete_event_stream
status_t agt_not_delete_event_stream(ses_cb_t *scb, const xmlChar *name)
Delete an event-stream from a YANG module interface.
Definition: agt_not.c:8550
obj_ban_nolock_get
void obj_ban_nolock_get(obj_template_t *obj)
Ban nolock-get for the object.
Definition: obj.c:18640
cfg_rwlock_release_all_locks
status_t cfg_rwlock_release_all_locks(thd_tcb_t *tcb)
Release all RWLOCKs recorded in TCB lock state structure.
Definition: cfg.c:675
ses_message_indent_count
int32 ses_message_indent_count(const ses_cb_t *scb)
Get the message indent count for this session.
Definition: ses.c:2822
agt_sil.h
SIL Transaction APIs.
ncx_find_object
obj_template_t * ncx_find_object(ncx_module_t *mod, const xmlChar *objname)
Find a top level module object.
Definition: ncx.c:4345
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
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_NOT_PUSH_CHANGE_NONE
@ AGT_NOT_PUSH_CHANGE_NONE
not set
Definition: agt_not.h:206
agt_not_push_change_t_
agt_not_push_change_t_
PUSH change type enums used by agt_val anf agt_push.
Definition: agt_not.h:205
agt_not_go_standby
void agt_not_go_standby(void)
Exit active notification subscription mode and disable notifications.
Definition: agt_not.c:6525
ses_get_total_stats
ses_total_stats_t * ses_get_total_stats(void)
Get a r/w pointer to the the session totals stats.
Definition: ses.c:3560
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
AGT_NOT_FILTER_EMPTY
@ AGT_NOT_FILTER_EMPTY
the filters configuration allows an empty filter to exist that just has a name in it; treat this an v...
Definition: agt_not.h:178
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
val_util.h
Value Node Utilities.
SES_NOTIF_ACTIVE
#define SES_NOTIF_ACTIVE(S)
check if notifications are active
Definition: ses.h:216
agt_get_savedevQ
dlq_hdr_t * agt_get_savedevQ(void)
Get the agt_savedevQ pointer.
Definition: agt.c:4747
ses_indent_count
int32 ses_indent_count(const ses_cb_t *scb)
Get the logging indent count for this session.
Definition: ses.c:2801
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
agt_not_stream_cbfn_t
void(* agt_not_stream_cbfn_t)(const xmlChar *event_stream, agt_not_subevent_t subevent, void *cookie)
Event Stream Callback.
Definition: agt_not.h:396
AGT_NOT_PUSH_CHANGE_INSERT
@ AGT_NOT_PUSH_CHANGE_INSERT
insert edit
Definition: agt_not.h:209
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
agt_sil_lib.h
Server Instrumentation Library Support.
AGT_NOT_PUSH_CHANGE_CREATE
@ AGT_NOT_PUSH_CHANGE_CREATE
create edit
Definition: agt_not.h:207
agt_ypsnmp_notification_handler
status_t agt_ypsnmp_notification_handler(agt_not_msg_t *notif)
Handler called for sending a notification.
Definition: agt_ypsnmp.c:3646
rpc.h
NETCONF protocol remote procedure call common definitions.
agt_not_send_push_notif
status_t agt_not_send_push_notif(agt_not_subid_t subid, agt_not_msg_t *notif)
Send the notification directly to the specified push subscription ID.
Definition: agt_not.c:8487
AGT_NOT_TERM_NONE
@ AGT_NOT_TERM_NONE
not set
Definition: agt_not.h:244
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
val_clone
val_value_t * val_clone(const val_value_t *val)
Clone a specified val_value_t struct and sub-trees.
Definition: val.c:7836
val_child.h
Value Node Child Access Support.
xml_wr_end_elem
void xml_wr_end_elem(ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t nsid, const xmlChar *elname, int32 indent)
Write an end tag to the specified session.
Definition: xml_wr.c:3114
val_child_add_force_last
status_t val_child_add_force_last(val_value_t *child, val_value_t *parent)
Add a child value node as last node to a parent value node Force if tree insertion fails.
Definition: val_child.c:1665
agt_not_init
status_t agt_not_init(void)
INIT 1: Initialize the server notification module data structures.
Definition: agt_not.c:4727
ERR_INTERNAL_INIT_SEQ
@ ERR_INTERNAL_INIT_SEQ
007
Definition: status_enum.h:197
AGT_NOT_STERR_STREAM
@ AGT_NOT_STERR_STREAM
stream name
Definition: agt_not.h:196
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_not_modify_subscription
status_t agt_not_modify_subscription(ses_cb_t *scb, agt_not_subid_t subid, const xmlChar *stream_filter_name, const val_value_t *stream_subtree_filter, const val_value_t *stream_xpath_filter, const xmlChar *stop_time, agt_not_sterr_t *errnum)
Modify a RFC 8639 stream subscription.
Definition: agt_not.c:7599
ERR_INTERNAL_PTR
@ ERR_INTERNAL_PTR
002
Definition: status_enum.h:192
tstamp_time2datetime
void tstamp_time2datetime(time_t *timerec, xmlChar *buff)
Convert the specified time_t to a YANG data-and-time format.
Definition: tstamp.c:457
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.
ses_put_extern2
status_t ses_put_extern2(ses_cb_t *scb, const xmlChar *fname)
write the contents of a file to the session
Definition: ses.c:3527
NCX_CFGID_RUNNING
@ NCX_CFGID_RUNNING
running datastore (no value for not set!)
Definition: ncxtypes.h:384
yangconst.h
Contains YANG constants separated to prevent H file include loops.
agt_not_clean_eventlog
void agt_not_clean_eventlog(void)
Remove any delivered notifications when the replay buffer size is set to zero.
Definition: agt_not.c:5869
agt_not_get_simop_update
status_t agt_not_get_simop_update(agt_not_subid_t subid, ses_id_t sid, const xmlChar *filespec, rpc_msg_t *msg, boolean *subscription_deleted, uint32 *checksum, uint32 *bytecnt)
Used by YANG Push to get the candidate Simuated Operational On-Change subscription.
Definition: agt_not.c:8127
ncx_is_with_snmp
boolean ncx_is_with_snmp(void)
Get the with_snmp value.
Definition: ncx.c:13958
xml_wr_full_val
void xml_wr_full_val(ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 indent)
Generate entire val_value_t.
Definition: xml_wr.c:3650
ERR_NCX_NOTIF_FILTER_UNAVAILABLE
@ ERR_NCX_NOTIF_FILTER_UNAVAILABLE
423
Definition: status_enum.h:468
obj_notif_enabled
boolean obj_notif_enabled(const obj_template_t *obj)
Check if the notification object is enabled.
Definition: obj.c:16995
agt_validate_filter_ex
status_t agt_validate_filter_ex(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *filter)
Validate the <filter> parameter if present (extended)
Definition: agt_util.c:2450
yang_patch.h
YANG Patch Media Type.
obj_find_template_top
obj_template_t * obj_find_template_top(ncx_module_t *mod, const xmlChar *modname, const xmlChar *objname)
Check if an obj_template_t in the mod->datadefQ or any of the include files visible to this module.
Definition: obj.c:5826
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
ERR_NCX_NOTIF_ENCODING_UNSUPPORTED
@ ERR_NCX_NOTIF_ENCODING_UNSUPPORTED
422
Definition: status_enum.h:467
ses_stop_msg_mode
void ses_stop_msg_mode(ses_cb_t *scb)
Set the message output mode to inactive.
Definition: ses.c:2950
agt.h
Multi-Protocol Network Management Server.
agt_make_leaf
val_value_t * agt_make_leaf(obj_template_t *parentobj, const xmlChar *leafname, const xmlChar *leafstrval, status_t *res)
make a string val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:3683
agt_not_add_to_payload
void agt_not_add_to_payload(agt_not_msg_t *notif, val_value_t *val)
Queue the specified value node into the payloadQ for the specified notification.
Definition: agt_not.c:6000
ERR_NCX_RESOURCE_DENIED
@ ERR_NCX_RESOURCE_DENIED
269
Definition: status_enum.h:310
agt_not_suspend_reason_t_
agt_not_suspend_reason_t_
Suspend subscription reasons Used internally instead of finding YANG identities.
Definition: agt_not.h:218
GETCB_GET_VALUE
@ GETCB_GET_VALUE
GET request.
Definition: getcb.h:247
agt_not_queue_notification_stream
void agt_not_queue_notification_stream(const xmlChar *stream_name, agt_not_msg_t *notif)
Queue the specified notification in the replay log.
Definition: agt_not.c:6242
agt_not_register_stream_cbfn
status_t agt_not_register_stream_cbfn(const xmlChar *modname, const xmlChar *stream_name, boolean all_streams, agt_not_stream_cbfn_t cbfn, void *cookie)
Register a SIL event-stream callback function.
Definition: agt_not.c:8768
ERR_NCX_NOT_FOUND
@ ERR_NCX_NOT_FOUND
225
Definition: status_enum.h:264
yang_patch_to_value
val_value_t * yang_patch_to_value(obj_template_t *patch_obj, yang_patch_cb_t *pcb, status_t *res)
Convert a YANG Patch control block to a val_value_t tree.
Definition: yang_patch.c:846
AGT_NOT_STERR_ENCODING
@ AGT_NOT_STERR_ENCODING
encoding
Definition: agt_not.h:199
ses_clear_file_override
void ses_clear_file_override(ses_cb_t *scb)
Cleanup the session in file write override mode Does not delete the file, just closes it!
Definition: ses.c:4915
AGT_NOT_STERR_SUBTREE_FILTER
@ AGT_NOT_STERR_SUBTREE_FILTER
subtree-filter
Definition: agt_not.h:194
ERR_NCX_OPERATION_NOT_SUPPORTED
@ ERR_NCX_OPERATION_NOT_SUPPORTED
273
Definition: status_enum.h:314
NCX_MAX_NUMLEN
#define NCX_MAX_NUMLEN
max number len to use for static buffer allocation only
Definition: ncxconst.h:136
xml_msg_init_hdr
void xml_msg_init_hdr(xml_msg_hdr_t *msg)
Initialize a new xml_msg_hdr_t struct.
Definition: xml_msg.c:393
AGT_NOT_MODULE2
#define AGT_NOT_MODULE2
RFC 5277 notification <streams> container for monitoring.
Definition: agt_not.h:113
ncx_first_backptr
ncx_backptr_t * ncx_first_backptr(dlq_hdr_t *que)
Get first back pointer struct.
Definition: ncx.c:11513
xml_wr_string_elem
void xml_wr_string_elem(ses_cb_t *scb, xml_msg_hdr_t *msg, const xmlChar *str, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, const dlq_hdr_t *attrQ, boolean isattrq, int32 indent)
Write a start tag, simple string content, and an end tag to the specified session.
Definition: xml_wr.c:3235
agt_not_sterr_t_
agt_not_sterr_t_
stream error parameter numbers used internally for error reporting
Definition: agt_not.h:191
agt_make_uint_leaf
val_value_t * agt_make_uint_leaf(obj_template_t *parentobj, const xmlChar *leafname, uint32 leafval, status_t *res)
make a uint32 val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:3702
agt_not_get_modified_obj
obj_template_t * agt_not_get_modified_obj(void)
Get subscription-modified object.
Definition: agt_not.c:8465
agt_acm_clear_msg_cache
void agt_acm_clear_msg_cache(xml_msg_hdr_t *msg)
Clear an agt_acm_cache_t struct attached to the specified message.
Definition: agt_acm.c:734
log_debug4_append
void void void void void void void void void void void void void void log_debug4_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG4 log entry.
obj_get_mod_name
const xmlChar * obj_get_mod_name(const obj_template_t *obj)
Get the module name for this object.
Definition: obj.c:12176
agt_not_start_subscription
status_t agt_not_start_subscription(ses_cb_t *scb, const xmlChar *stream, xmlChar *startTime, xmlChar *stopTime, boolean futurestop, op_filtertyp_t filtertype, val_value_t *filterval, val_value_t *selectval)
Malloc and fill in a new subscription control block.
Definition: agt_not.c:6477
agt_not_event_stream_exists
boolean agt_not_event_stream_exists(const xmlChar *stream_name)
Check if the specified event stream is configured.
Definition: agt_not.c:8678
agt_not_msg_t_::event
val_value_t * event
ptr inside msg for filter
Definition: agt_not.h:163
EMPTY_STRING
#define EMPTY_STRING
empty string used to get const xmlChar * cast
Definition: ncxconst.h:289
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
NCX_NT_OBJ
@ NCX_NT_OBJ
obj_template_t
Definition: ncxtypes.h:277
agt_not_subid_t
uint32 agt_not_subid_t
subscription-id parameter
Definition: agt_not.h:123
tstamp_datetime
void tstamp_datetime(xmlChar *buff)
Set the current date and time in an XML dateTime string format.
Definition: tstamp.c:160
agt_not_new_notification
agt_not_msg_t * agt_not_new_notification(obj_template_t *eventType)
Malloc and initialize the fields in an agt_not_msg_t.
Definition: agt_not.c:5910
agt_not_msg_t_::eventTime
xmlChar eventTime[TSTAMP_MIN_SIZE]
event received timestamp
Definition: agt_not.h:157
AGT_NOT_TERM_STREAM_UNAVAILABLE
@ AGT_NOT_TERM_STREAM_UNAVAILABLE
stream unavailable
Definition: agt_not.h:253
AGT_NOT_STERR_ID
@ AGT_NOT_STERR_ID
modify only
Definition: agt_not.h:200
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
val_get_next_child
val_value_t * val_get_next_child(const val_value_t *curchild)
Get the next child node.
Definition: val.c:8496
ncxmod_load_module
status_t ncxmod_load_module(const xmlChar *modname, const xmlChar *revision, dlq_hdr_t *savedevQ, ncx_module_t **retmod)
Determine the location of the specified module and then load it into the system, if not already loade...
Definition: ncxmod.c:4342
agt_xpath_test_filter
boolean agt_xpath_test_filter(xml_msg_hdr_t *msghdr, ses_cb_t *scb, val_value_t *selectval, val_value_t *val)
Test an XPath filter for a notification.
Definition: agt_xpath.c:2361
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
log.h
NCX System Logging Manager.
AGT_RPC_PH_INVOKE
@ AGT_RPC_PH_INVOKE
(3) cb to invoke the requested method
Definition: agt_rpc.h:118
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
agt_not_unregister_stream_cbfn_subsys
void agt_not_unregister_stream_cbfn_subsys(const xmlChar *subsys_id, const xmlChar *modname)
Unregister a SIL event-stream callback function.
Definition: agt_not.c:8998
ERR_MUTEX_ERR
@ ERR_MUTEX_ERR
015
Definition: status_enum.h:205
agt_cli.h
NETCONF Server Command Line Interface handler.
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
xml_wr_empty_elem
void xml_wr_empty_elem(ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, xmlns_id_t nsid, const xmlChar *elname, int32 indent)
Write an empty XML tag to the specified session without attributes.
Definition: xml_wr.c:3076
OP_FILTER_NONE
@ OP_FILTER_NONE
not set
Definition: op.h:115
ERR_NCX_CFG_NOT_FOUND
@ ERR_NCX_CFG_NOT_FOUND
307
Definition: status_enum.h:350
NCX_NT_VAL
@ NCX_NT_VAL
val_value_t
Definition: ncxtypes.h:276
SES_STATE
#define SES_STATE(S)
get the session state
Definition: ses.h:177
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
val_get_first_child
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
NCX_NT_NONE
@ NCX_NT_NONE
not set
Definition: ncxtypes.h:273
agt_not_msg_t_::msg
val_value_t * msg
the /notification element
Definition: agt_not.h:160
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
agt_acm.h
NETCONF Server Access Control Entry Points.
agt_not_init_yangpush
status_t agt_not_init_yangpush(obj_template_t *streams_obj)
Init the yang-push related streams and data structures.
Definition: agt_not.c:6562
thd.h
Thread support (for now limited to netconfd)
xml_strcpy
uint32 xml_strcpy(xmlChar *copyTo, const xmlChar *copyFrom)
String copy for xmlChar.
Definition: xml_util.c:1486
ERR_NCX_MISSING_ELEMENT
@ ERR_NCX_MISSING_ELEMENT
263
Definition: status_enum.h:304
agt_not_module_removed_cbfn_t
void(* agt_not_module_removed_cbfn_t)(const ncx_module_t *mod)
Remove Module Callback.
Definition: agt_not.h:330
agt_not_msg_t_::qhdr
dlq_hdr_t qhdr
queue header
Definition: agt_not.h:145
SES_RFC8639_NOTIF_COUNT
#define SES_RFC8639_NOTIF_COUNT(S)
get the notification count
Definition: ses.h:219
agt_not_send_onchange_update
status_t agt_not_send_onchange_update(agt_not_subid_t subid, ses_id_t sid, obj_template_t *notif_obj, yang_patch_cb_t *pcb, boolean *subscription_deleted)
Used by YANG Push to send an on-change update to 1 session.
Definition: agt_not.c:8379
agt_ses_get_session_for_id
ses_cb_t * agt_ses_get_session_for_id(ses_id_t sid)
get the session for the supplied sid
Definition: agt_ses.c:2252
agt_not_msg_t_::usemsgid
boolean usemsgid
internal field to use or change msgid
Definition: agt_not.h:166
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_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
AGT_NOT_PUSH_CHANGE_MOVE
@ AGT_NOT_PUSH_CHANGE_MOVE
move edit
Definition: agt_not.h:210
agt_not_modify_filter_cbfn_t
void(* agt_not_modify_filter_cbfn_t)(ses_cb_t *scb, agt_not_subid_t subid, agt_not_filtertyp_t filtyp, const val_value_t *new_filter)
Modify Filter Callback.
Definition: agt_not.h:284
agt_not_msg_t_::msgid
uint32 msgid
messsage ID assigned to this notification
Definition: agt_not.h:154
agt_not_delete_dynamic_subscription
status_t agt_not_delete_dynamic_subscription(ses_id_t sid, agt_not_subid_t subid)
Terminate your own RFC 8639 subscription.
Definition: agt_not.c:7703
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_not_delete_subscription_cbfn_t
void(* agt_not_delete_subscription_cbfn_t)(agt_not_subid_t subid, boolean kill_pending)
Delete Subscription Callback.
Definition: agt_not.h:304
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
agt_yp_ha.h
YumaPro High Availability module (YP-HA)
obj.h
Data Object Support.
cfg_get_config_id
cfg_template_t * cfg_get_config_id(ncx_cfg_t cfgid)
Get the config struct from its ID.
Definition: cfg.c:1530
agt_sil_send_stream_callback_event
status_t agt_sil_send_stream_callback_event(const xmlChar *subsys_id, const xmlChar *modname, const xmlChar *stream_name, boolean all_streams, agt_not_subevent_t subevent)
Send a "<stream-callback-event>" message to one subsystem.
Definition: agt_sil.c:8533
TSTAMP_MIN_SIZE
#define TSTAMP_MIN_SIZE
normal minimum buffer size for a tstamp buffer
Definition: tstamp.h:67
ses_start_msg
status_t ses_start_msg(ses_cb_t *scb)
Start a new outbound message on the specified session.
Definition: ses.c:2970
SES_MY_SID
#define SES_MY_SID(S)
get session-id
Definition: ses.h:105
AGT_NOT_SUSPEND_SYNC_TOO_BIG
@ AGT_NOT_SUSPEND_SYNC_TOO_BIG
sync too big
Definition: agt_not.h:235
agt_not_new_notification_ex
agt_not_msg_t * agt_not_new_notification_ex(obj_template_t *eventType, const xmlChar *eventTime)
@ brief Malloc and initialize the fields in an agt_not_msg_t Use provided eventTime (extended)
Definition: agt_not.c:5931
ERR_NCX_IN_USE
@ ERR_NCX_IN_USE
match netconf errors (257 - 275)
Definition: status_enum.h:298
agt_not_send_notifications
uint32 agt_not_send_notifications(thd_tcb_t *tcb)
Send notifications (PTHREADS VERSION)
Definition: agt_not.c:5715
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.
ses_start_checksum
void ses_start_checksum(ses_cb_t *scb)
Clear the checksum field and start checksum mode.
Definition: ses.c:4939
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_not_clear_event_stream_log
status_t agt_not_clear_event_stream_log(const xmlChar *stream_name)
Remove all the stored notifications in the eventlog for the specified event stream.
Definition: agt_not.c:8706
val_child_next_same
val_value_t * val_child_next_same(val_value_t *curnode)
Get the next node of the same type.
Definition: val_child.c:2359
agt_tree_test_filter
boolean agt_tree_test_filter(xml_msg_hdr_t *msghdr, ses_cb_t *scb, val_value_t *filter, val_value_t *topval)
notification filter evaluation
Definition: agt_tree.c:3204
VAL_STR
#define VAL_STR(V)
Access the value as a string ONLY if typ_is_string() is true.
Definition: val.h:464
agt_not_register_yang_push
status_t agt_not_register_yang_push(agt_not_check_push_cbfn_t cbfn, agt_not_module_removed_cbfn_t mod_cbfn)
Used by YANG Push to check periodic and simulated operational.
Definition: agt_not.c:7992
agt_not_resume_push_subscription
void agt_not_resume_push_subscription(agt_not_subid_t subid)
Resume a YANG Push Subscription.
Definition: agt_not.c:8293
agt_not_cleanup
void agt_not_cleanup(void)
Cleanup the module data structures.
Definition: agt_not.c:5049
agt_not_cleanup_sil_sa
void agt_not_cleanup_sil_sa(void)
Cleanup the module data structures.
Definition: agt_not.c:5120
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
NEED_EXIT
#define NEED_EXIT(res)
used in parser routines to decide if processing can continue does not return, just evaluates to TRUE ...
Definition: yangconst.h:234
ERR_NCX_EXTRA_PARM
@ ERR_NCX_EXTRA_PARM
234
Definition: status_enum.h:273
agt_not_msg_t_::notobj
obj_template_t * notobj
notification event object for this message
Definition: agt_not.h:148
agt_not_free_notification
void agt_not_free_notification(agt_not_msg_t *notif)
Scrub the memory in an agt_not_template_t by freeing all the sub-fields and then freeing the entire s...
Definition: agt_not.c:5953
agt_not_delete_module_map
status_t agt_not_delete_module_map(const xmlChar *modname)
Delete a module map from a YANG module interface.
Definition: agt_not.c:8648
val_child_add_force
status_t val_child_add_force(val_value_t *child, val_value_t *parent)
Add a child value node to a parent value node Force add even if Tree Insersion fails.
Definition: val_child.c:1624
ncx_free_backptr
void ncx_free_backptr(ncx_backptr_t *ptr)
Free an ncx_backptr_t struct.
Definition: ncx.c:11433
agt_not_filtertyp_t_
agt_not_filtertyp_t_
server supported filter types
Definition: agt_not.h:171
agt_not_remove_subscription
void agt_not_remove_subscription(ses_id_t sid)
Remove and expire a subscription with the specified session ID.
Definition: agt_not.c:5889
xmlns.h
XML namespace support.
agt_not_kill_push_subscription
void agt_not_kill_push_subscription(agt_not_subid_t subid, agt_not_term_reason_t term_reason)
Kill a YANG Push Subscription.
Definition: agt_not.c:8337
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_cli_get_valset
val_value_t * agt_cli_get_valset(void)
Retrieve the command line parameter set from boot time.
Definition: agt_cli.c:3427
status.h
Global error messages for status code enumerations.
agt_not_queue_notification
void agt_not_queue_notification(agt_not_msg_t *notif)
Queue the specified notification in the replay log.
Definition: agt_not.c:6034
obj_get_nsid
xmlns_id_t obj_get_nsid(const obj_template_t *obj)
Get the namespace ID for this object.
Definition: obj.c:12395
dlq.h
dlq provides general double-linked list and queue support:
val_get_const_xpathpcb
const xpath_pcb_t * val_get_const_xpathpcb(const val_value_t *val)
Get the XPath parser control block in the specified value struct.
Definition: val_util.c:4351
agt_not_unload_module
void agt_not_unload_module(const xmlChar *modname)
Unload any remote stream callbacks when a module is unloaded.
Definition: agt_not.c:9342
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_acm_init_msg_cache
status_t agt_acm_init_msg_cache(ses_cb_t *scb, xml_msg_hdr_t *msg)
Malloc and initialize an agt_acm_cache_t struct and attach it to the incoming message.
Definition: agt_acm.c:686
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
agt_not_clone_filter
status_t agt_not_clone_filter(ncx_nmda_filtyp_t nmda_filtyp, const xmlChar *name, agt_not_filtertyp_t *filtyp, val_value_t **filval)
Find a filter entry and clone it.
Definition: agt_not.c:6895
thd_find_tcb_by_sid
thd_tcb_t * thd_find_tcb_by_sid(ses_id_t sid, boolean strict)
Lookup TCB by session ID.
Definition: thd.c:704
NCX_DEF_INDENT
#define NCX_DEF_INDENT
default indent amount for nesting XML or other structured output
Definition: ncxconst.h:441