yumapro  25.10-2
YumaPro SDK
Loading...
Searching...
No Matches
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 - 2025, 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
33date init comment
34----------------------------------------------------------------------
3530-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
73extern "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
123typedef uint32 agt_not_subid_t;
124
125
127typedef enum agt_not_subevent_t_ {
130
133
137
138
143typedef struct agt_not_msg_t_ {
145 dlq_hdr_t qhdr;
146
149
162 dlq_hdr_t keyQ;
163
164 /* payload set by caller: Q of val_value_t */
165 dlq_hdr_t payloadQ;
166
168 uint32 msgid;
169
171 xmlChar eventTime[TSTAMP_MIN_SIZE];
172
178
181
183 boolean usemsgid;
184
190
197
204
206
207
209typedef enum agt_not_filtertyp_t_ {
217
220
224
225
229typedef enum agt_not_sterr_t_ {
240
241
243typedef enum agt_not_push_change_t_ {
251
252
256typedef enum agt_not_suspend_reason_t_ {
259
262
265
268
271
275
276
280typedef enum agt_not_term_reason_t_ {
283
286
289
292
295
298
301
303
304
306typedef enum agt_not_sub_state_t_ {
309
312
315
319
320
322typedef enum agt_not_rcvr_state_t_ {
325
328
331
334
337
339
356typedef void
358 agt_not_subid_t subid,
359 agt_not_filtertyp_t filtyp,
360 const val_value_t *new_filter);
361
362
376typedef void
378 boolean kill_pending);
379
380
381
390typedef void
392
393
405typedef void
407 ses_id_t sid);
408
409
418typedef void
420
421
422
484typedef void
485 (*agt_not_stream_cbfn_t) (const xmlChar *event_stream,
486 agt_not_subevent_t subevent,
487 void *cookie);
488
489
490
491
507typedef struct agt_not_rcvrparms_t_ {
508
511
514
516 const xmlChar *name;
517
519 const xmlChar *remote_address;
520
523
526
528 const xmlChar *local_address;
529
532
535
538
541
544
547
549
550
551
563typedef struct agt_not_sub_rcvrparms_t_ {
564
567
569 uint32 id;
570
572 const xmlChar *name;
573
575 const xmlChar *name_ref;
576
578
579
580
585typedef struct agt_not_sub_modversion_t_ {
586
589
591 const xmlChar *module_name;
592
594 const xmlChar *revision;
595
597 const xmlChar *revision_label;
598
600
601
602
616typedef struct agt_not_subparms_t_ {
617
620
623
626
628 const xmlChar *filter_name;
629
632
637
642
647
649 const xmlChar *source_address;
650
652 const xmlChar *purpose;
653
658
660 uint8 dscp;
661
663 const xmlChar *stream;
664
669 //const xmlChar *replay_start_time;
670
674 const xmlChar *stop_time;
675
681
684
687
689 boolean is_periodic;
690
692 boolean period_set;
693
695 uint32 period;
696
698 const xmlChar *anchor_time;
699
701 boolean on_change;
702
705
708
711
713
714
722typedef struct agt_not_substats_t_ {
723
730
744
749 xmlChar replay_start_time[TSTAMP_MIN_SIZE];
750
761
763
764
765
773typedef struct agt_not_rcvrstats_t_ {
774
781
795
806
808
809
813/********************************************************************
814* *
815* F U N C T I O N S *
816* *
817*********************************************************************/
818
819
860extern status_t
861 agt_not_init (void);
862
863
871extern status_t
872 agt_not_init_sil_sa (void);
873
874
882extern status_t
883 agt_not_init2 (void);
884
885
891extern void
892 agt_not_cleanup (void);
893
894
901extern void
903
904
905
906#ifdef PTHREADS
925extern uint32
927
928#else
929
945extern uint32
947
948#endif // PTHREADS
949
950
951/*
952* @brief Remove any delivered notifications when the replay buffer
953* size is set to zero
954*
955* Called from periodic task or thread
956*
957* Cleanup is now done internally and this function is removed
958*
959* extern void
960* agt_not_clean_eventlog (void);
961*/
962
963
971extern void
973
974
981extern agt_not_msg_t *
983
984
993extern agt_not_msg_t *
995 const xmlChar *eventTime);
996
997
1007extern void
1009
1010
1029extern void
1031 val_value_t *val);
1032
1033
1034
1053extern void
1055 val_value_t *val);
1056
1057
1074extern void
1076
1077
1102extern void
1103 agt_not_queue_notification_stream (const xmlChar *stream_name,
1104 agt_not_msg_t *notif);
1105
1106
1117extern boolean
1118 agt_not_is_replay_event (const obj_template_t *notifobj);
1119
1120
1126extern void
1128
1129
1151extern status_t
1152 agt_not_start_subscription (ses_cb_t *scb,
1153 const xmlChar *stream,
1154 xmlChar *startTime,
1155 xmlChar *stopTime,
1156 boolean futurestop,
1157 op_filtertyp_t filtertype,
1158 val_value_t *filterval,
1159 val_value_t *selectval);
1160
1161
1162
1187extern status_t
1188 agt_not_start_subscription2 (ses_cb_t *scb,
1189 const xmlChar *stream,
1190 xmlChar *startTime,
1191 xmlChar *stopTime,
1192 boolean futurestop,
1193 op_filtertyp_t filtertype,
1194 val_value_t *filterval,
1195 val_value_t *selectval,
1196 ncx_msg_encoding_t out_encoding);
1197
1198
1209extern status_t
1211 uint32 id);
1212
1213
1214
1215
1216#ifdef WITH_YP_HA
1224extern status_t
1225 agt_not_go_active (void);
1226#endif // WITH_YP_HA
1227
1228#ifdef WITH_YP_HA
1234extern void
1235 agt_not_go_standby (void);
1236#endif // WITH_YP_HA
1237
1238
1239#ifdef WITH_YANG_PUSH
1246extern status_t
1248#endif // WITH_YANG_PUSH
1249
1250
1260extern status_t
1261 agt_not_set_filter (const xmlChar *name,
1262 ncx_nmda_filtyp_t nmda_filtyp,
1263 agt_not_filtertyp_t filtyp,
1264 const val_value_t *filval);
1265
1266
1267
1281extern status_t
1283 const xmlChar *name,
1284 agt_not_filtertyp_t *filtyp,
1285 val_value_t **filval);
1286
1287
1295extern status_t
1296 agt_not_delete_filter (const xmlChar *name,
1297 ncx_nmda_filtyp_t nmda_filtyp);
1298
1299
1300
1309extern status_t
1310 agt_not_delete_all_filters (boolean force);
1311
1312
1345extern status_t
1347 ses_cb_t *scb,
1348 const xmlChar *stream_filter_name,
1349 const val_value_t *stream_subtree_filter,
1350 const val_value_t *stream_xpath_filter,
1351 const xmlChar *stream,
1352 const xmlChar *replay_start_time,
1353 const xmlChar *stop_time,
1354 const val_value_t *encoding,
1355 const val_value_t *parentval,
1356 agt_not_subid_t *subid,
1357 agt_not_sterr_t *errnum,
1358 val_value_t **errchild);
1359
1360
1402 ses_cb_t *scb,
1403 agt_not_subid_t subid,
1404 const xmlChar *stream_filter_name,
1405 const val_value_t *stream_subtree_filter,
1406 const val_value_t *stream_xpath_filter,
1407 const xmlChar *stop_time,
1408 const val_value_t *parentval,
1409 agt_not_sterr_t *errnum,
1410 val_value_t **errchild);
1411
1412
1424extern status_t
1426 agt_not_subid_t subid);
1427
1428
1429
1437extern status_t
1439 boolean silent_kill);
1440
1441
1451extern status_t
1453
1454
1455#ifdef WITH_YANG_PUSH
1484extern status_t
1486 ses_cb_t *scb,
1487 const xmlChar *selection_filter_ref,
1488 const xmlChar *stop_time,
1489 const val_value_t *encoding,
1490 const val_value_t *parentval,
1491 agt_not_modify_filter_cbfn_t modify_cbfn,
1493 agt_not_activate_push_cbfn_t activate_cbfn,
1494 agt_not_subid_t *subid,
1495 agt_not_sterr_t *errnum,
1496 val_value_t **errchild,
1497 boolean *is_binary,
1498 boolean *is_restconf);
1499
1500
1520extern status_t
1522 ses_id_t sid,
1523 agt_not_subid_t cur_subid,
1524 const xmlChar *selection_filter_ref,
1525 const xmlChar *stop_time,
1526 const val_value_t *parentval,
1527 agt_not_sterr_t *errnum,
1528 val_value_t **errchild);
1529
1530
1538extern status_t
1541
1542
1558extern status_t
1560 obj_template_t *subscription_completed,
1561 obj_template_t *subscription_modified,
1562 obj_template_t *subscription_resumed,
1563 obj_template_t *subscription_started,
1564 obj_template_t *subscription_suspended,
1565 obj_template_t *subscription_terminated);
1566
1567
1579extern status_t
1581 ses_id_t sid,
1582 obj_template_t *notif_obj,
1583 rpc_msg_t *msg,
1584 boolean *subscription_deleted);
1585
1586
1609extern status_t
1611 ses_id_t sid,
1612 const xmlChar *filespec,
1613 rpc_msg_t *msg,
1614 boolean first_push,
1615 obj_template_t *notif_obj,
1616 boolean *subscription_deleted,
1617 uint32 *checksum,
1618 uint32 *bytecnt);
1619
1620
1636extern status_t
1638 ses_id_t sid,
1639 const xmlChar *filespec,
1640 rpc_msg_t *msg,
1641 obj_template_t *notif_obj,
1642 boolean *subscription_deleted);
1643
1644
1653extern void
1656
1657
1658
1667extern void
1669
1670
1680extern void
1682 agt_not_term_reason_t term_reason);
1683
1684
1695extern status_t
1697 ses_id_t sid,
1698 obj_template_t *notif_obj,
1699 yang_patch_cb_t *pcb,
1700 boolean *subscription_deleted);
1701
1702
1703#endif // WITH_YANG_PUSH
1704
1705
1715extern void
1717
1718
1719#ifdef WITH_YANG_PUSH
1727extern obj_template_t *
1729
1730
1738extern obj_template_t *
1740
1741
1749extern status_t
1751 agt_not_msg_t *notif);
1752
1753#endif // WITH_YANG_PUSH
1754
1755
1765extern status_t
1766 agt_not_create_event_stream (const xmlChar *name,
1767 uint32 eventlog_size,
1768 const xmlChar *description);
1769
1770
1778extern status_t
1780 const xmlChar *name);
1781
1782
1789extern status_t
1791
1792
1793
1802extern status_t
1803 agt_not_edit_module_map (const xmlChar *modname,
1804 const xmlChar *stream_name,
1805 boolean is_create);
1806
1807
1814extern status_t
1815 agt_not_delete_module_map (const xmlChar *modname);
1816
1817
1818
1825extern status_t
1827
1834extern boolean
1835 agt_not_event_stream_exists (const xmlChar *stream_name);
1836
1837
1849extern status_t
1850 agt_not_clear_event_stream_log (const xmlChar *stream_name);
1851
1852
1853
1907extern status_t
1908 agt_not_register_stream_cbfn (const xmlChar *modname,
1909 const xmlChar *stream_name,
1910 boolean all_streams,
1912 void *cookie);
1913
1914
1926extern void
1927 agt_not_unregister_stream_cbfn (const xmlChar *modname,
1929
1930
1931
1932
1933#ifdef WITH_YCONTROL
1969extern status_t
1970 agt_not_register_stream_cbfn_subsys (const xmlChar *subsys_id,
1971 const xmlChar *modname,
1972 const xmlChar *stream_name,
1973 boolean all_streams);
1974
1975
1984extern void
1985 agt_not_unregister_stream_cbfn_subsys (const xmlChar *subsys_id,
1986 const xmlChar *modname);
1987
1988
1989
1990
2001extern status_t
2002 agt_not_check_register_add (const xmlChar *modname,
2003 val_value_t *request_val);
2004
2005
2015extern boolean
2016 agt_not_any_unregistered (const xmlChar *modname);
2017
2018
2019
2030extern void
2031 agt_not_subsys_gone (const xmlChar *subsys_id);
2032
2033
2051extern status_t
2052 agt_not_stream_callback_subsys (const xmlChar *stream_name,
2053 agt_not_subevent_t subevent,
2054 const xmlChar *modname,
2055 boolean all_streams);
2056
2057
2058#endif // WITH_YCONTROL
2059
2060
2061
2076extern void
2077 agt_not_unload_module (const xmlChar *modname);
2078
2079
2080
2097extern status_t
2099 const ncx_sm_mpid_t *mpid);
2100
2101
2102#ifdef WITH_RESTCONF
2111extern status_t
2113 obj_template_t *streamobj);
2114
2115#endif // WITH_RESTCONF
2116
2117
2118#if defined(WITH_YANG_PUSH) && defined(WITH_YANG_PUSH2)
2130extern status_t
2131 agt_not_sub_receiver_edit (const agt_not_sub_rcvrparms_t *parms);
2132
2133
2134
2145extern status_t
2146 agt_not_delete_sub_receivers (uint32 id);
2147
2148
2162extern status_t
2163 agt_not_edit_subscription (const agt_not_subparms_t *parms,
2164 agt_not_sterr_t *errnum,
2165 val_value_t **errchild);
2166
2167
2177extern status_t
2178 agt_not_delete_subscriptions (void);
2179
2180
2190extern status_t
2191 agt_not_get_substats (agt_not_subid_t id,
2192 agt_not_substats_t *retstats);
2193
2194
2195
2204extern const xmlChar *
2205 agt_not_get_sub_state (agt_not_sub_state_t state);
2206
2207
2215extern status_t
2216 agt_not_delete_receivers (void);
2217
2218
2229extern status_t
2230 agt_not_edit_receiver (const agt_not_rcvrparms_t *parms);
2231
2232
2243extern status_t
2244 agt_not_delete_receiver (const xmlChar *name);
2245
2246
2247
2258extern status_t
2259 agt_not_get_rcvrstats (agt_not_subid_t id,
2260 const xmlChar *rcvr_name,
2261 agt_not_rcvrstats_t *retstats);
2262
2263
2273extern status_t
2274 agt_not_reset_rcvr (agt_not_subid_t id,
2275 const xmlChar *rcvr_name);
2276
2277
2278
2279
2288extern const xmlChar *
2289 agt_not_get_rcvr_state (agt_not_rcvr_state_t state);
2290
2291
2292
2302extern boolean
2303 agt_not_subid_ok (agt_not_subid_t id);
2304
2305
2314extern boolean
2315 agt_not_subid_in_use (agt_not_subid_t id);
2316
2317
2330extern status_t
2331 agt_not_get_publisher_ids (uint32 subid,
2332 const uint32 **retarr,
2333 uint32 *retcount);
2334
2335
2336#endif // YANG_PUSH and YANG_PUSH2
2337
2338
2342#ifdef __cplusplus
2343} /* end extern 'C' */
2344#endif
2345
2346#endif /* _H_agt_not */
dlq provides general double-linked list and queue support:
status_t agt_not_get_simop_update(agt_not_subid_t subid, ses_id_t sid, const xmlChar *filespec, rpc_msg_t *msg, boolean first_push, obj_template_t *notif_obj, boolean *subscription_deleted, uint32 *checksum, uint32 *bytecnt)
Used by YANG Push to get the candidate Simuated Operational On-Change subscription.
Definition: agt_not.c:10770
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:11015
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.
Definition: agt_not.c:8094
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:11634
status_t agt_not_start_subscription_rfc8650(ses_cb_t *scb, uint32 id)
Use a dynamic RESTCONF subscription already set up USED BY RESTCONF ONLY.
Definition: agt_not.c:8723
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.
Definition: agt_not.c:11321
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:8391
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.
Definition: agt_not.c:12268
agt_not_msg_t * agt_not_new_notification_ex(obj_template_t *eventType, const xmlChar *eventTime)
Malloc and initialize the fields in an agt_not_msg_t Use provided eventTime (extended)
Definition: agt_not.c:7990
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:6896
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:7966
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, const val_value_t *parentval, agt_not_sterr_t *errnum, val_value_t **errchild)
Modify a RFC 8641 YANG Push subscription.
Definition: agt_not.c:10532
status_t agt_not_init(void)
INIT 1: Initialize the server notification module data structures.
Definition: agt_not.c:6705
void agt_not_queue_notification(agt_not_msg_t *notif)
Queue the specified notification in the replay log.
Definition: agt_not.c:8126
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:12052
status_t agt_not_delete_all_filters(boolean force)
Delete all existing filter entries.
Definition: agt_not.c:9451
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:11095
status_t agt_not_delete_all_module_maps(ses_cb_t *scb)
Delete all configured module-maps from a YANG module interface.
Definition: agt_not.c:11515
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:10610
status_t agt_not_kill_dynamic_subscription(agt_not_subid_t subid)
Terminate any session's RFC 8639 subscription.
Definition: agt_not.c:10215
status_t agt_not_delete_configured_subscription(agt_not_subid_t subid, boolean silent_kill)
Delete a configured RFC 8639 subscription.
Definition: agt_not.c:10196
void agt_not_cleanup_sil_sa(void)
Cleanup the module data structures.
Definition: agt_not.c:7126
void agt_not_remove_module_filters(const ncx_module_t *mod)
Invoke Module Removed Callback.
Definition: agt_not.c:11210
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:10175
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:11137
status_t agt_not_delete_all_event_streams(ses_cb_t *scb)
Delete all configured event-streams from a YANG module interface.
Definition: agt_not.c:11397
boolean agt_not_event_stream_exists(const xmlChar *stream_name)
Check if the specified event stream is configured.
Definition: agt_not.c:11543
void agt_not_remove_subscription(ses_id_t sid)
Remove and expire a subscription with the specified session ID.
Definition: agt_not.c:7945
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 i...
Definition: agt_not.c:12552
obj_template_t * agt_not_get_started_obj(void)
Get subscription-started object.
Definition: agt_not.c:11265
status_t agt_not_delete_filter(const xmlChar *name, ncx_nmda_filtyp_t nmda_filtyp)
Delete an existing filter entry.
Definition: agt_not.c:9375
void agt_not_cancel_subscription(ses_id_t sid)
Cancel any notification subscription for the specified session.
Definition: agt_not.c:8452
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, const val_value_t *parentval, agt_not_subid_t *subid, agt_not_sterr_t *errnum, val_value_t **errchild)
Create a RFC 8639 stream subscription.
Definition: agt_not.c:9939
status_t agt_not_init_sil_sa(void)
INIT 1: Initialize the server notification module data structures.
Definition: agt_not.c:6861
status_t agt_not_delete_module_map(const xmlChar *modname)
Delete a module map from a YANG module interface.
Definition: agt_not.c:11486
uint32 agt_not_send_notifications(thd_tcb_t *tcb)
Send notifications (PTHREADS VERSION)
Definition: agt_not.c:7804
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:11428
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:11704
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, const val_value_t *parentval, agt_not_modify_filter_cbfn_t modify_cbfn, agt_not_delete_subscription_cbfn_t delete_cbfn, agt_not_activate_push_cbfn_t activate_cbfn, agt_not_subid_t *subid, agt_not_sterr_t *errnum, val_value_t **errchild, boolean *is_binary, boolean *is_restconf)
Create a RFC 8641 YANG Push subscription.
Definition: agt_not.c:10260
obj_template_t * agt_not_get_modified_obj(void)
Get subscription-modified object.
Definition: agt_not.c:11244
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, const val_value_t *parentval, agt_not_sterr_t *errnum, val_value_t **errchild)
Modify a RFC 8639 stream subscription.
Definition: agt_not.c:10018
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:8015
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:11359
status_t agt_not_init_yangpush(obj_template_t *streams_obj)
Init the yang-push related streams and data structures.
Definition: agt_not.c:8874
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:11796
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:10691
void agt_not_cleanup(void)
Cleanup the module data structures.
Definition: agt_not.c:7048
status_t agt_not_go_active(void)
Enable active notification subscriptions.
Definition: agt_not.c:8801
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:8068
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:11867
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:11287
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:9177
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:9217
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:12094
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:8416
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:10944
void agt_not_resume_push_subscription(agt_not_subid_t subid)
Resume a YANG Push Subscription.
Definition: agt_not.c:11051
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:12151
void agt_not_unload_module(const xmlChar *modname)
Unload any remote stream callbacks when a module is unloaded.
Definition: agt_not.c:12216
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:10647
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:11573
void agt_not_go_standby(void)
Exit active notification subscription mode and disable notifications.
Definition: agt_not.c:8837
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:11939
agt_not_rcvr_state_t
Configured Receiver state.
Definition: agt_not.h:322
agt_not_term_reason_t
Terminate subscription reasons.
Definition: agt_not.h:280
void(* agt_not_activate_push_cbfn_t)(agt_not_subid_t subid, ses_id_t sid)
Activate Push Callback.
Definition: agt_not.h:406
void(* agt_not_check_push_cbfn_t)(ses_id_t sid)
Check Push Callback.
Definition: agt_not.h:391
agt_not_sterr_t
stream error parameter numbers used internally for error reporting
Definition: agt_not.h:229
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:357
agt_not_filtertyp_t
server supported filter types
Definition: agt_not.h:209
agt_not_push_change_t
PUSH change type enums used by agt_val anf agt_push.
Definition: agt_not.h:243
agt_not_suspend_reason_t
Suspend subscription reasons Used internally instead of finding YANG identities.
Definition: agt_not.h:256
void(* agt_not_delete_subscription_cbfn_t)(agt_not_subid_t subid, boolean kill_pending)
Delete Subscription Callback.
Definition: agt_not.h:377
agt_not_sub_state_t
Configured subscription state.
Definition: agt_not.h:306
void(* agt_not_module_removed_cbfn_t)(const ncx_module_t *mod)
Remove Module Callback.
Definition: agt_not.h:419
uint32 agt_not_subid_t
subscription-id parameter
Definition: agt_not.h:123
agt_not_subevent_t
event-stream sub-event types
Definition: agt_not.h:127
void(* agt_not_stream_cbfn_t)(const xmlChar *event_stream, agt_not_subevent_t subevent, void *cookie)
Event Stream Callback.
Definition: agt_not.h:485
@ AGT_NOT_RCVRST_DISCONNECTED
disconnected
Definition: agt_not.h:336
@ AGT_NOT_RCVRST_SUSPENDED
suspended
Definition: agt_not.h:330
@ AGT_NOT_RCVRST_ACTIVE
active
Definition: agt_not.h:327
@ AGT_NOT_RCVRST_CONNECTING
connecting
Definition: agt_not.h:333
@ AGT_NOT_RCVRST_NONE
not set
Definition: agt_not.h:324
@ AGT_NOT_TERM_SUSPENSION_TIMEOUT
suspension timeout
Definition: agt_not.h:294
@ AGT_NOT_TERM_FILTER_UNAVAILABLE
filter unavailable
Definition: agt_not.h:285
@ AGT_NOT_TERM_STREAM_UNAVAILABLE
stream unavailable
Definition: agt_not.h:291
@ AGT_NOT_TERM_DATASTORE_NOT_SUBSCRIBABLE
datastore not subscribable
Definition: agt_not.h:297
@ AGT_NOT_TERM_NO_SUCH_SUBSCRIPTION
no such subscription
Definition: agt_not.h:288
@ AGT_NOT_TERM_NONE
not set
Definition: agt_not.h:282
@ AGT_NOT_TERM_UNCHANGING_SELECTION
unchanging selection
Definition: agt_not.h:300
@ AGT_NOT_STERR_XPATH_FILTER
xpath-filter
Definition: agt_not.h:233
@ AGT_NOT_STERR_STREAM
stream name
Definition: agt_not.h:234
@ AGT_NOT_STERR_SUBTREE_FILTER
subtree-filter
Definition: agt_not.h:232
@ AGT_NOT_STERR_NONE
not set
Definition: agt_not.h:230
@ AGT_NOT_STERR_START_TIME
start-time
Definition: agt_not.h:235
@ AGT_NOT_STERR_ID
modify only
Definition: agt_not.h:238
@ AGT_NOT_STERR_FILTER_REF
filter-ref
Definition: agt_not.h:231
@ AGT_NOT_STERR_ENCODING
encoding
Definition: agt_not.h:237
@ AGT_NOT_STERR_STOP_TIME
stop-time
Definition: agt_not.h:236
@ AGT_NOT_FILTER_SUBTREE
subtree filter
Definition: agt_not.h:219
@ AGT_NOT_FILTER_XPATH
XPath filter.
Definition: agt_not.h:222
@ AGT_NOT_FILTER_NONE
not set
Definition: agt_not.h:210
@ 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:216
@ AGT_NOT_PUSH_CHANGE_REPLACE
replace edit
Definition: agt_not.h:249
@ AGT_NOT_PUSH_CHANGE_DELETE
delete edit
Definition: agt_not.h:246
@ AGT_NOT_PUSH_CHANGE_INSERT
insert edit
Definition: agt_not.h:247
@ AGT_NOT_PUSH_CHANGE_CREATE
create edit
Definition: agt_not.h:245
@ AGT_NOT_PUSH_CHANGE_NONE
not set
Definition: agt_not.h:244
@ AGT_NOT_PUSH_CHANGE_MOVE
move edit
Definition: agt_not.h:248
@ AGT_NOT_SUSPEND_UNSUPPORTABLE_VOLUME
unsupported volume
Definition: agt_not.h:264
@ AGT_NOT_SUSPEND_NONE
not set
Definition: agt_not.h:258
@ AGT_NOT_SUSPEND_UPDATE_TOO_BIG
update too big
Definition: agt_not.h:270
@ AGT_NOT_SUSPEND_PERIOD_UNSUPPORTED
period unsupported
Definition: agt_not.h:267
@ AGT_NOT_SUSPEND_INSUFFICIENT_RESOURCES
insufficient resources
Definition: agt_not.h:261
@ AGT_NOT_SUSPEND_SYNC_TOO_BIG
sync too big
Definition: agt_not.h:273
@ AGT_NOT_SUBST_CONCLUDED
concluded
Definition: agt_not.h:317
@ AGT_NOT_SUBST_INVALID
invalid
Definition: agt_not.h:314
@ AGT_NOT_SUBST_NONE
not set
Definition: agt_not.h:308
@ AGT_NOT_SUBST_VALID
valid
Definition: agt_not.h:311
@ AGT_NOT_SUBEV_INACTIVE
inactive sub-event
Definition: agt_not.h:135
@ AGT_NOT_SUBEV_ACTIVE
active sub-event
Definition: agt_not.h:132
@ AGT_NOT_SUBEV_NONE
not set
Definition: agt_not.h:129
op_filtertyp_t
NETCONF protocol operation PDU filter types.
Definition: op.h:114
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:219
uint32 ses_id_t
Session ID.
Definition: ses.h:407
#define TSTAMP_MIN_SIZE
normal minimum buffer size for a tstamp buffer
Definition: tstamp.h:71
ncx_msg_encoding_t
enumeration for message encoding formats
Definition: ncxtypes.h:648
ncx_nmda_filtyp_t
internal enumerations for NMDA filter types used in the /filters container NCX_NMDA_FILTYP_STREAM == ...
Definition: ncxtypes.h:1676
ncx_nmda_ds_t
internal enumerations for standard NMDA datastores
Definition: ncxtypes.h:1612
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
NETCONF Session Common definitions module.
Global error messages for status code enumerations.
one notification message that will be sent to all subscriptions in the stream and kept in the replay ...
Definition: agt_not.h:143
boolean usemsgid
internal field to use or change msgid
Definition: agt_not.h:183
dlq_hdr_t qhdr
queue header
Definition: agt_not.h:145
status_t res
internal status for making the message to prevent a malformed notification message from being sent to...
Definition: agt_not.h:189
uint32 msgid
message ID assigned to this notification
Definition: agt_not.h:168
val_value_t * msg
the /notification element
Definition: agt_not.h:177
obj_template_t * notobj
notification event object for this message
Definition: agt_not.h:148
val_value_t * event
backptr inside msg for filter for top-level notifications
Definition: agt_not.h:180
val_value_t * treetop
internal backptr to the top of the instance hierarchy if this is a nested notification; YANG 1....
Definition: agt_not.h:196
dlq_hdr_t keyQ
notification ancestor keyQ if this is a YANG 1.1 nested notification.
Definition: agt_not.h:162
ncx_sm_mpid_t * sm_mpid
clone of the MPID to use if this is a schema-mounted notification.
Definition: agt_not.h:203
receiver instance entry parameter block used by various subscribe APIs each API will ignore unused pa...
Definition: agt_not.h:507
boolean enable_segmentation_set
make sure not to use false unless really set
Definition: agt_not.h:540
boolean remote_port_set
make sure not to use 0 unless really set
Definition: agt_not.h:525
const xmlChar * remote_address
remote-address is inet:host
Definition: agt_not.h:519
op_editop_t editop
edit operation
Definition: agt_not.h:510
uint16 local_port
optional local-port is inet:port-number
Definition: agt_not.h:531
boolean enable_segmentation
enable-segmentation leaf if udp-notif
Definition: agt_not.h:537
uint16 max_segment_size
max-segment-size if udp-notif
Definition: agt_not.h:543
uint16 remote_port
remote-port is inet:port-number
Definition: agt_not.h:522
boolean is_establish
is_establish flag to help match existing APIs
Definition: agt_not.h:513
const xmlChar * name
receiver name
Definition: agt_not.h:516
boolean local_port_set
make sure not to use 0 unless really set
Definition: agt_not.h:534
boolean max_segment_size_set
make sure not to use 0 unless really set
Definition: agt_not.h:546
const xmlChar * local_address
optional local-address is inet:host
Definition: agt_not.h:528
subscription receiver statistics
Definition: agt_not.h:773
uint64 excluded_events
excluded events is poorly defined for datastores for event streams it is incremented when there is a ...
Definition: agt_not.h:794
uint64 out_events
total notifications sent Tracks the session out-notifications leaf for a plain subscription; Total of...
Definition: agt_not.h:780
agt_not_rcvr_state_t rcvr_state
the receiver/state is an enum UDP connections almost always succeed even if the target socket is not ...
Definition: agt_not.h:805
subscription module-list entry From ietf-yang-push-revision module
Definition: agt_not.h:585
const xmlChar * module_name
module-name
Definition: agt_not.h:591
op_editop_t editop
edit operation
Definition: agt_not.h:588
const xmlChar * revision
revision date
Definition: agt_not.h:594
const xmlChar * revision_label
revision label
Definition: agt_not.h:597
subscription receiver entry parameter block used by various subscribe APIs each API will ignore unuse...
Definition: agt_not.h:563
const xmlChar * name_ref
receiver instance name ref
Definition: agt_not.h:575
uint32 id
subscription ID
Definition: agt_not.h:569
op_editop_t editop
edit operation
Definition: agt_not.h:566
const xmlChar * name
receiver name
Definition: agt_not.h:572
subscription parms parameter block used by various subscribe APIs each API will ignore unused paramet...
Definition: agt_not.h:616
boolean on_change
on-change datastore subscription flag
Definition: agt_not.h:701
const xmlChar * filter_name
filter name id a filter-ref parameter used
Definition: agt_not.h:628
const val_value_t * encoding
leaf containing the encoding parameter if set; need identityref details
Definition: agt_not.h:641
boolean configured_replay
configured-replay leaf not supported yet causes entire replay buffer to be sent to receiver Since sta...
Definition: agt_not.h:680
boolean sync_on_start
TRUE = sync-on-start requested by client (default)
Definition: agt_not.h:704
const xmlChar * source_address
source address parameter is not supported yet in server
Definition: agt_not.h:649
uint32 period
period or dampening in centiseconds
Definition: agt_not.h:695
const xmlChar * purpose
admin string saved from configured subsctiption
Definition: agt_not.h:652
boolean period_set
used for period or dampening-period
Definition: agt_not.h:692
uint8 dscp
DSCP value to use for the subscription.
Definition: agt_not.h:660
const xmlChar * anchor_time
anchor time support starting 25.10-1
Definition: agt_not.h:698
op_editop_t editop
edit operation
Definition: agt_not.h:619
const val_value_t * parentval
parentval of the parameters to handle additional unstable YANG Push 2 parameters
Definition: agt_not.h:657
uint32 included_changes
inverse of excluded-changes; all combinations supported
Definition: agt_not.h:707
boolean is_datastore
datastore subscription flag
Definition: agt_not.h:683
const val_value_t * transport
leaf containing the transport parameter if set; need identityref details
Definition: agt_not.h:646
ncx_nmda_ds_t datastore_id
NMDA datastore ID if is_datastore true.
Definition: agt_not.h:686
boolean is_establish
is_establish flag to help match existing APIs
Definition: agt_not.h:622
boolean delete_rcvrs_pending
internal fields : do not set
Definition: agt_not.h:710
const val_value_t * subtree_filter
subtree containing the subtree-filter if used
Definition: agt_not.h:631
boolean is_periodic
TRUE for periodic subscription.
Definition: agt_not.h:689
agt_not_subid_t id
subscription ID only provided if is_configured
Definition: agt_not.h:625
const xmlChar * stream
event stream subscription
Definition: agt_not.h:663
const xmlChar * stop_time
the replay-start-time is read-only when used in configured subscriptions so not present here
Definition: agt_not.h:674
const val_value_t * xpath_filter
leaf containing the XPath filter if used; need PCB from val to preserve namespace mappings from the c...
Definition: agt_not.h:636
subscription statistics
Definition: agt_not.h:722
agt_not_sub_state_t sub_state
the configured-subscription-state is an enum the server does not accept invalid parameters to start b...
Definition: agt_not.h:760
uint64 excluded_events
excluded events is poorly defined for datastores for event streams it is incremented when there is a ...
Definition: agt_not.h:743
uint64 out_events
total notifications sent Tracks the session out-notifications leaf for a plain subscription; Total of...
Definition: agt_not.h:729
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1118
Moint Point Instance This struct lives in a val_value_t.val_extra struct.
Definition: ncxtypes.h:1796
One YANG data-def-stmt.
Definition: obj.h:1284
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:185
Session Control Block.
Definition: ses.h:759
Thread control block (TCB)
Definition: thd.h:175
one value to match one type
Definition: val.h:962
One YANG Patch Request.
Definition: yang_patch.h:155
Timestamp utilities.
Value Node Basic Support.
YANG Patch Media Type.