yumapro  20.10-13
YumaPro SDK
Collaboration diagram for Data Structures:

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...
 

Detailed Description

Supports original notifications (RFC 5277) using the <create-subscription> operation.

Supports new notifications (RFC 8639) using the <establish-subscription> operation.

Typedef Documentation

◆ agt_not_check_push_cbfn_t

typedef void(* agt_not_check_push_cbfn_t) (ses_id_t sid)

Check Push Callback.

Used by YANG Push to check periodic and simulated operational

Parameters
sidsession ID to process (if PTHREADS version)
== 0 to process all sessions

◆ agt_not_delete_subscription_cbfn_t

typedef void(* agt_not_delete_subscription_cbfn_t) (agt_not_subid_t subid, boolean kill_pending)

Delete Subscription Callback.

If the user invokes <delete-subscription> or <kill-subscription> then this callback will be invoked to remove the resources for the subscription

Parameters
subidsubscription ID
kill_pendingTRUE if a kill-subscription ot delete-subscription is still pending
FALSE if subscription being deleted and all messages already done

◆ agt_not_modify_filter_cbfn_t

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.

If a YANG Push subscription uses a filter-ref and that filter is modified, then this callback will be invoked. A configured filter is not allowed to be deleted if any subscriptions are using it

If the filter is not acceptable the subscription is expected to suspend or terminate itself

Parameters
scbsession owning the subscription to use for access control
subidsubscription ID
filtypnew filter type
new_filternew filter value (NULL if AGT_NOT_FILTER_EMPTY)

◆ agt_not_module_removed_cbfn_t

typedef void(* agt_not_module_removed_cbfn_t) (const ncx_module_t *mod)

Remove Module Callback.

Used by YANG Push to suspend subscriptions if they use a filter that has a target objct in this module

Parameters
modmodule getting removed

◆ agt_not_stream_cbfn_t

typedef void(* agt_not_stream_cbfn_t) (const xmlChar *event_stream, agt_not_subevent_t subevent, void *cookie)

Event Stream Callback.

Used by SIL code to determine if events should be generated or not. The server will invoke the callback with an event stream sub-event type.

  • active : the event-stream is now active. There is a client subscribing to this event stream.
  • inactive : the event-stream is now inactive; There are no clients subscribing to this event stream

It is possible that subscription filters prevent specific events from reaching the subscriber. These corner-cases are ignored for this callback. Only subscriptions are tracked, not the actual notifications delivered on each subscription.

There will be one callback per event-stream so if multiple event streams are modified at once then these callbacks will be serialized, one per event-stream.

It is possible a callback will receive a redundant event, e.g., two 'active' events in a row. This is normal as the server does not maintain an event history for each callback, This can happen if the yumaworks-event-stream module is used to edit the stream configuration.

Note that the replay-buffer is not considered when determining if an event-stream is active or not. The replay feature is rarely used. This callback is used to determine if active client sessions are subscribed to the event-stream. The notification generator SHOULD NOT use this callback if the replay buffer is considered make the event-stream be active.

The callbacks done will depend on the registration parameters. For the modname parameter:

  • this parameter is mandatory. The callback must be associated with a real module, even if that module is never removed.
  • normal SIL mode and only SIL-SA mode will set the module name that contains the notifications being generated.
  • The server will use this module name to track the event stream that the module is mapped into at the moment.
  • If the yumaworks-event-stream module is used and the module mapping changes, then the new event stream will be used. For the stream_name parameter:
  • If used then only events for this stream will be done
  • The module name will be ignored if event stream is set.
  • This mode is intended to support the vendor hard-wired event-stream configuration, and the SIL code uses the agt_not_queue_notification_stream API
Parameters
event_streamevent-stream name the event is for.
  • Normally the callback can ignore this parameter.
  • If the callback is registering for all event streams instead of one, then this parameter may be useful.
subeventsub-event type being reported.
  • AGT_NOT_SUBEV_ACTIVE : stream is active
  • AGT_NOT_SUBEV_INACTIVE : stream is inactive
cookiethe cookie passed to the registration function

Enumeration Type Documentation

◆ agt_not_filtertyp_t_

server supported filter types

Enumerator
AGT_NOT_FILTER_NONE 

not set

AGT_NOT_FILTER_EMPTY 

the filters configuration allows an empty filter to exist that just has a name in it; treat this an valid but it will not do anything

AGT_NOT_FILTER_SUBTREE 

subtree filter

AGT_NOT_FILTER_XPATH 

XPath filter.

◆ agt_not_push_change_t_

PUSH change type enums used by agt_val anf agt_push.

Enumerator
AGT_NOT_PUSH_CHANGE_NONE 

not set

AGT_NOT_PUSH_CHANGE_CREATE 

create edit

AGT_NOT_PUSH_CHANGE_DELETE 

delete edit

AGT_NOT_PUSH_CHANGE_INSERT 

insert edit

AGT_NOT_PUSH_CHANGE_MOVE 

move edit

AGT_NOT_PUSH_CHANGE_REPLACE 

replace edit

◆ agt_not_sterr_t_

stream error parameter numbers used internally for error reporting

Enumerator
AGT_NOT_STERR_NONE 

not set

AGT_NOT_STERR_FILTER_REF 

filter-ref

AGT_NOT_STERR_SUBTREE_FILTER 

subtree-filter

AGT_NOT_STERR_XPATH_FILTER 

xpath-filter

AGT_NOT_STERR_STREAM 

stream name

AGT_NOT_STERR_START_TIME 

start-time

AGT_NOT_STERR_STOP_TIME 

stop-time

AGT_NOT_STERR_ENCODING 

encoding

AGT_NOT_STERR_ID 

modify only

◆ agt_not_subevent_t_

event-stream sub-event types

Enumerator
AGT_NOT_SUBEV_NONE 

not set

AGT_NOT_SUBEV_ACTIVE 

active sub-event

AGT_NOT_SUBEV_INACTIVE 

inactive sub-event

◆ agt_not_suspend_reason_t_

Suspend subscription reasons Used internally instead of finding YANG identities.

Enumerator
AGT_NOT_SUSPEND_NONE 

not set

AGT_NOT_SUSPEND_INSUFFICIENT_RESOURCES 

insufficient resources

AGT_NOT_SUSPEND_UNSUPPORTABLE_VOLUME 

unsupported volume

AGT_NOT_SUSPEND_PERIOD_UNSUPPORTED 

period unsupported

AGT_NOT_SUSPEND_UPDATE_TOO_BIG 

update too big

AGT_NOT_SUSPEND_SYNC_TOO_BIG 

sync too big

◆ agt_not_term_reason_t_

Terminate subscription reasons.

Used internally instead of finding YANG identities

Enumerator
AGT_NOT_TERM_NONE 

not set

AGT_NOT_TERM_FILTER_UNAVAILABLE 

filter unavailable

AGT_NOT_TERM_NO_SUCH_SUBSCRIPTION 

no such subscription

AGT_NOT_TERM_STREAM_UNAVAILABLE 

stream unavailable

AGT_NOT_TERM_SUSPENSION_TIMEOUT 

suspension timeout

AGT_NOT_TERM_DATASTORE_NOT_SUBSCRIBABLE 

datastore not subscribable

AGT_NOT_TERM_UNCHANGING_SELECTION 

unchanging selection