yumapro  23.10T-12
YumaPro SDK
Loading...
Searching...
No Matches
agt_not.h File Reference

NETCONF Notifications DM module support. More...

#include <xmlstring.h>
#include "dlq.h"
#include "ncxtypes.h"
#include "obj.h"
#include "ses.h"
#include "status.h"
#include "tstamp.h"
#include "val.h"
#include "yang_patch.h"
Include dependency graph for agt_not.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  agt_not_msg_t
 one notification message that will be sent to all subscriptions in the stream and kept in the replay buffer for that stream (notificationQ) More...
 

Macros

#define AGT_NOT_MODULE1   (const xmlChar *)"notifications"
 RFC 5277 notifications operations module.
 
#define AGT_NOT_MODULE2   (const xmlChar *)"nc-notifications"
 RFC 5277 notification <streams> container for monitoring.
 

Typedefs

typedef uint32 agt_not_subid_t
 subscription-id parameter
 
typedef 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. More...
 
typedef void(* agt_not_delete_subscription_cbfn_t) (agt_not_subid_t subid, boolean kill_pending)
 Delete Subscription Callback. More...
 
typedef void(* agt_not_check_push_cbfn_t) (ses_id_t sid)
 Check Push Callback. More...
 
typedef void(* agt_not_module_removed_cbfn_t) (const ncx_module_t *mod)
 Remove Module Callback. More...
 
typedef void(* agt_not_stream_cbfn_t) (const xmlChar *event_stream, agt_not_subevent_t subevent, void *cookie)
 Event Stream Callback. More...
 

Enumerations

enum  agt_not_subevent_t {
  AGT_NOT_SUBEV_NONE ,
  AGT_NOT_SUBEV_ACTIVE ,
  AGT_NOT_SUBEV_INACTIVE
}
 event-stream sub-event types More...
 
enum  agt_not_filtertyp_t {
  AGT_NOT_FILTER_NONE ,
  AGT_NOT_FILTER_EMPTY ,
  AGT_NOT_FILTER_SUBTREE ,
  AGT_NOT_FILTER_XPATH
}
 server supported filter types More...
 
enum  agt_not_sterr_t {
  AGT_NOT_STERR_NONE ,
  AGT_NOT_STERR_FILTER_REF ,
  AGT_NOT_STERR_SUBTREE_FILTER ,
  AGT_NOT_STERR_XPATH_FILTER ,
  AGT_NOT_STERR_STREAM ,
  AGT_NOT_STERR_START_TIME ,
  AGT_NOT_STERR_STOP_TIME ,
  AGT_NOT_STERR_ENCODING ,
  AGT_NOT_STERR_ID
}
 stream error parameter numbers used internally for error reporting More...
 
enum  agt_not_push_change_t {
  AGT_NOT_PUSH_CHANGE_NONE ,
  AGT_NOT_PUSH_CHANGE_CREATE ,
  AGT_NOT_PUSH_CHANGE_DELETE ,
  AGT_NOT_PUSH_CHANGE_INSERT ,
  AGT_NOT_PUSH_CHANGE_MOVE ,
  AGT_NOT_PUSH_CHANGE_REPLACE
}
 PUSH change type enums used by agt_val anf agt_push. More...
 
enum  agt_not_suspend_reason_t {
  AGT_NOT_SUSPEND_NONE ,
  AGT_NOT_SUSPEND_INSUFFICIENT_RESOURCES ,
  AGT_NOT_SUSPEND_UNSUPPORTABLE_VOLUME ,
  AGT_NOT_SUSPEND_PERIOD_UNSUPPORTED ,
  AGT_NOT_SUSPEND_UPDATE_TOO_BIG ,
  AGT_NOT_SUSPEND_SYNC_TOO_BIG
}
 Suspend subscription reasons Used internally instead of finding YANG identities. More...
 
enum  agt_not_term_reason_t {
  AGT_NOT_TERM_NONE ,
  AGT_NOT_TERM_FILTER_UNAVAILABLE ,
  AGT_NOT_TERM_NO_SUCH_SUBSCRIPTION ,
  AGT_NOT_TERM_STREAM_UNAVAILABLE ,
  AGT_NOT_TERM_SUSPENSION_TIMEOUT ,
  AGT_NOT_TERM_DATASTORE_NOT_SUBSCRIBABLE ,
  AGT_NOT_TERM_UNCHANGING_SELECTION
}
 Terminate subscription reasons. More...
 

Functions

status_t agt_not_init (void)
 INIT 1: Initialize the server notification module data structures. More...
 
status_t agt_not_init_sil_sa (void)
 INIT 1: Initialize the server notification module data structures. More...
 
status_t agt_not_init2 (void)
 INIT 2: Initialize the monitoring data structures This must be done after the <running> config is loaded. More...
 
void agt_not_cleanup (void)
 Cleanup the module data structures. More...
 
void agt_not_cleanup_sil_sa (void)
 Cleanup the module data structures. More...
 
uint32 agt_not_send_notifications (thd_tcb_t *tcb)
 Send notifications (PTHREADS VERSION) More...
 
void agt_not_remove_subscription (ses_id_t sid)
 Remove and expire a subscription with the specified session ID. More...
 
agt_not_msg_tagt_not_new_notification (obj_template_t *eventType)
 Malloc and initialize the fields in an agt_not_msg_t. More...
 
agt_not_msg_tagt_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) More...
 
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 struct itself. More...
 
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. More...
 
void agt_not_add_key (agt_not_msg_t *notif, val_value_t *val)
 Queue the specified value node into the keyQ for the specified notification. More...
 
void agt_not_queue_notification (agt_not_msg_t *notif)
 Queue the specified notification in the replay log. More...
 
void agt_not_queue_notification_stream (const xmlChar *stream_name, agt_not_msg_t *notif)
 Queue the specified notification in the replay log. More...
 
boolean agt_not_is_replay_event (const obj_template_t *notifobj)
 Check if the specified notfication is the replayComplete or notificationComplete notification events. More...
 
void agt_not_cancel_subscription (ses_id_t sid)
 Cancel any notification subscription for the specified session. More...
 
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. More...
 
void agt_not_go_active (void)
 Enable active notification subscriptions. More...
 
void agt_not_go_standby (void)
 Exit active notification subscription mode and disable notifications. More...
 
status_t agt_not_init_yangpush (obj_template_t *streams_obj)
 Init the yang-push related streams and data structures. More...
 
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. More...
 
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. More...
 
status_t agt_not_delete_filter (const xmlChar *name, ncx_nmda_filtyp_t nmda_filtyp)
 Delete an existing filter entry. More...
 
status_t agt_not_delete_all_filters (boolean force)
 Delete all existing filter entries. More...
 
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. More...
 
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. More...
 
status_t agt_not_delete_dynamic_subscription (ses_id_t sid, agt_not_subid_t subid)
 Terminate your own RFC 8639 subscription. More...
 
status_t agt_not_kill_dynamic_subscription (agt_not_subid_t subid)
 Terminate any session's RFC 8639 subscription. More...
 
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, boolean *isbinary)
 Create a RFC 8641 YANG Push subscription. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void agt_not_resume_push_subscription (agt_not_subid_t subid)
 Resume a YANG Push Subscription. More...
 
void agt_not_kill_push_subscription (agt_not_subid_t subid, agt_not_term_reason_t term_reason)
 Kill a YANG Push Subscription. More...
 
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. More...
 
void agt_not_remove_module_filters (const ncx_module_t *mod)
 Invoke Module Removed Callback. More...
 
obj_template_tagt_not_get_modified_obj (void)
 Get subscription-modified object. More...
 
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. More...
 
status_t agt_not_create_event_stream (const xmlChar *name, uint32 eventlog_size, const xmlChar *description)
 Create an event-stream from a YANG module interface. More...
 
status_t agt_not_delete_event_stream (ses_cb_t *scb, const xmlChar *name)
 Delete an event-stream from a YANG module interface. More...
 
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. More...
 
status_t agt_not_delete_module_map (const xmlChar *modname)
 Delete a module map from a YANG module interface. More...
 
boolean agt_not_event_stream_exists (const xmlChar *stream_name)
 Check if the specified event stream is configured. More...
 
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. More...
 
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. More...
 
void agt_not_unregister_stream_cbfn (const xmlChar *modname, agt_not_stream_cbfn_t cbfn)
 Unregister a SIL event-stream callback function. More...
 
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. More...
 
void agt_not_unregister_stream_cbfn_subsys (const xmlChar *subsys_id, const xmlChar *modname)
 Unregister a SIL event-stream callback function. More...
 
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. More...
 
boolean agt_not_any_unregistered (const xmlChar *modname)
 Check if any entries are still unregistered for a subsystem building a register-request. More...
 
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. More...
 
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. More...
 
void agt_not_unload_module (const xmlChar *modname)
 Unload any remote stream callbacks when a module is unloaded. More...
 
status_t agt_not_set_notif_mpid (agt_not_msg_t *msg, const ncx_sm_mpid_t *mpid)
 Set the MPID to use for sending the schema-mounted notification. More...
 
status_t agt_not_init_restconf_streams (val_value_t *streamsval, obj_template_t *streamobj)
 Initialize the monitoring data structures for restconf This must be done after the <running> config is loaded. More...
 

Detailed Description

NETCONF Notifications DM module support.