yumapro  20.10-12
YumaPro SDK
agt_push.h
Go to the documentation of this file.
1 #ifdef WITH_YANG_PUSH
2 /*
3  * Copyright (c) 2019 - 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_push
13 #define _H_agt_push
14 
15 /* FILE: agt_push.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
28 /*********************************************************************
29 * *
30 * C H A N G E H I S T O R Y *
31 * *
32 *********************************************************************
33 
34 date init comment
35 ----------------------------------------------------------------------
36 23-nov-19 abb Begun
37 */
38 
39 #ifndef _H_agt_cfg
40 #include "agt_cfg.h"
41 #endif
42 
43 #ifndef _H_agt_not
44 #include "agt_not.h"
45 #endif
46 
47 #ifndef _H_rpc
48 #include "rpc.h"
49 #endif
50 
51 #ifndef _H_ses
52 #include "ses.h"
53 #endif
54 
55 #ifndef _H_status_enum
56 #include "status_enum.h"
57 #endif
58 
59 #ifndef _H_val
60 #include "val.h"
61 #endif
62 
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 
82 /********************************************************************
83 * *
84 * C O N S T A N T S *
85 * *
86 *********************************************************************/
87 
88 
89 
90 /********* agt_push_change_t flags fields *************/
91 
100 #define AGT_PUSH_FL_CREATE bit0
101 
103 #define AGT_PUSH_FL_DELETE bit1
104 
106 #define AGT_PUSH_FL_INSERT bit2
107 
109 #define AGT_PUSH_FL_MOVE bit3
110 
112 #define AGT_PUSH_FL_REPLACE bit4
113 
117 #define AGT_PUSH_DEF_INCLUDED_CHANGES 0x1f
118 
120 #define AGT_PUSH_SET_CREATE_FLAG(F) (F) |= AGT_PUSH_FL_CREATE
121 
123 #define AGT_PUSH_GET_CREATE_FLAG(F) ((F) & AGT_PUSH_FL_CREATE)
124 
126 #define AGT_PUSH_SET_DELETE_FLAG(F) (F) |= AGT_PUSH_FL_DELETE
127 
129 #define AGT_PUSH_GET_DELETE_FLAG(F) ((F) & AGT_PUSH_FL_DELETE)
130 
132 #define AGT_PUSH_SET_INSERT_FLAG(F) (F) |= AGT_PUSH_FL_INSERT
133 
135 #define AGT_PUSH_GET_INSERT_FLAG(F) ((F) & AGT_PUSH_FL_INSERT)
136 
138 #define AGT_PUSH_SET_MOVE_FLAG(F) (F) |= AGT_PUSH_FL_MOVE
139 
141 #define AGT_PUSH_GET_MOVE_FLAG(F) ((F) & AGT_PUSH_FL_MOVE)
142 
144 #define AGT_PUSH_SET_REPLACE_FLAG(F) (F) |= AGT_PUSH_FL_REPLACE
145 
147 #define AGT_PUSH_GET_REPLACE_FLAG(F) ((F) & AGT_PUSH_FL_REPLACE)
148 
149 
150 
151 
152 /********************************************************************
153 * *
154 * T Y P E S *
155 * *
156 *********************************************************************/
157 
161 typedef enum agt_push_dserr_t_ {
164 
167 
170 
173 
176 
179 
182 
185 
188 
191 
194 
197 
200 
203 
206 } agt_push_dserr_t;
207 
208 
209 /********************************************************************
210 * *
211 * F U N C T I O N S *
212 * *
213 *********************************************************************/
214 
215 
227 extern status_t
228  agt_push_init (obj_template_t *update_obj,
229  obj_template_t *change_obj);
230 
231 
240 extern status_t
241  agt_push_init2 (void);
242 
243 
250 extern void
251  agt_push_cleanup (void);
252 
253 
282 extern status_t
284  ses_cb_t *scb,
285  ncx_nmda_ds_t datastore_id,
286  const xmlChar *selection_filter_ref,
287  const val_value_t *datastore_subtree_filter,
288  const val_value_t *datastore_xpath_filter,
289  const xmlChar *stop_time,
290  val_value_t *encoding,
291  boolean periodic,
292  uint32 period,
293  const xmlChar *anchor_time,
294  boolean on_change,
295  uint32 dampening_period,
296  boolean sync_on_start,
297  uint32 included_changes,
298  agt_not_subid_t *subid,
299  agt_push_dserr_t *errnum);
300 
301 
302 
328 extern status_t
330  ses_cb_t *scb,
331  agt_not_subid_t cur_subid,
332  ncx_nmda_ds_t datastore_id,
333  const xmlChar *selection_filter_ref,
334  const val_value_t *datastore_subtree_filter,
335  const val_value_t *datastore_xpath_filter,
336  const xmlChar *stop_time,
337  boolean periodic,
338  uint32 period,
339  const xmlChar *anchor_time,
340  boolean on_change,
341  boolean dampening_set,
342  uint32 dampening_period,
343  agt_push_dserr_t *errnum);
344 
345 
352 extern status_t
354 
355 
362 extern void
363  agt_push_config_update (rpc_msg_t *msg,
364  agt_cfg_transaction_t *txcb);
365 
366 
370 #ifdef __cplusplus
371 } /* end extern 'C' */
372 #endif
373 
374 #endif /* _H_agt_push */
375 #endif // WITH_YANG_PUSH
AGT_PUSH_DSERR_PERIODIC
@ AGT_PUSH_DSERR_PERIODIC
periodic parameter
Definition: agt_push.h:188
AGT_NOT_STERR_NONE
@ AGT_NOT_STERR_NONE
not set
Definition: agt_not.h:192
ses.h
NETCONF Session Common definitions module.
AGT_PUSH_DSERR_ANCHOR_TIME
@ AGT_PUSH_DSERR_ANCHOR_TIME
anchor-time parameter
Definition: agt_push.h:194
AGT_NOT_TERM_FILTER_UNAVAILABLE
@ AGT_NOT_TERM_FILTER_UNAVAILABLE
filter unavailable
Definition: agt_not.h:247
cfg.h
AGT_NOT_TERM_UNCHANGING_SELECTION
@ AGT_NOT_TERM_UNCHANGING_SELECTION
unchanging selection
Definition: agt_not.h:262
ncx_nmda_get_ds_str
const xmlChar * ncx_nmda_get_ds_str(ncx_nmda_ds_t ds_enum)
Get the standard datastore string for the enum.
Definition: ncx_nmda.c:230
ncx_file_remove
status_t ncx_file_remove(const xmlChar *filespec, boolean do_warn)
Close a file; check result.
Definition: ncx.c:13262
agt_util.h
Utility Functions for NCX Server method routines.
agt_push_establish_subscription
status_t agt_push_establish_subscription(ses_cb_t *scb, ncx_nmda_ds_t datastore_id, const xmlChar *selection_filter_ref, const val_value_t *datastore_subtree_filter, const val_value_t *datastore_xpath_filter, const xmlChar *stop_time, val_value_t *encoding, boolean periodic, uint32 period, const xmlChar *anchor_time, boolean on_change, uint32 dampening_period, boolean sync_on_start, uint32 included_changes, agt_not_subid_t *subid, agt_push_dserr_t *errnum)
Set the YANG-Push datastore parameters and start a YANG push subscription.
Definition: agt_push.c:3002
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
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
val_get_xpathpcb
xpath_pcb_t * val_get_xpathpcb(val_value_t *val)
Get the XPath parser control block in the specified value struct.
Definition: val_util.c:4264
AGT_PUSH_DSERR_ON_CHANGE
@ AGT_PUSH_DSERR_ON_CHANGE
on-change parameter
Definition: agt_push.h:197
AGT_PUSH_DSERR_DATASTORE
@ AGT_PUSH_DSERR_DATASTORE
datastore parameter
Definition: agt_push.h:170
ERR_NCX_DEF_NOT_FOUND
@ ERR_NCX_DEF_NOT_FOUND
250
Definition: status_enum.h:289
ERR_NCX_PUSH_NO_SUCH_RESYNC
@ ERR_NCX_PUSH_NO_SUCH_RESYNC
431
Definition: status_enum.h:478
yang_patch_free_cb
void yang_patch_free_cb(yang_patch_cb_t *pcb)
Free a YANG Patch control block.
Definition: yang_patch.c:214
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
val.h
Value Node Basic Support.
AGT_NOT_FILTER_NONE
@ AGT_NOT_FILTER_NONE
not set
Definition: agt_not.h:172
agt_tree.h
Server subtree filter processing for <filter> element in <get> and <get-config> operations.
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
status_enum.h
global error status code enumerations
AGT_PUSH_DSERR_STOP_TIME
@ AGT_PUSH_DSERR_STOP_TIME
stop-time parameter
Definition: agt_push.h:182
obj_get_mod
ncx_module_t * obj_get_mod(obj_template_t *obj)
Get the module pointer for this object.
Definition: obj.c:12218
agt_validate_filter_nmda
status_t agt_validate_filter_nmda(rpc_msg_t *msg, val_value_t *filter, boolean is_subtree)
Validate the <filter> parameter; FOR NMDA ONLY.
Definition: agt_util.c:2511
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_STERR_STOP_TIME
@ AGT_NOT_STERR_STOP_TIME
stop-time
Definition: agt_not.h:198
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
ncx_nmda_get_cfg_id
ncx_cfg_t ncx_nmda_get_cfg_id(ncx_nmda_ds_t ds_enum)
Get the cfg datastore ID for the NMDA datastore ID.
Definition: ncx_nmda.c:342
dlq_lastEntry
#define dlq_lastEntry(listP)
get the last entry in the queue list
Definition: dlq.h:352
RPC_DATA_YANG
@ RPC_DATA_YANG
STD is used by YANG rpc or action stmts; no extra <data> container will be added to the <rpc-reply> c...
Definition: rpc.h:167
AGT_NOT_FILTER_XPATH
@ AGT_NOT_FILTER_XPATH
XPath filter.
Definition: agt_not.h:184
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
ncxconst.h
Contains NCX constants.
ncxmod.h
NCX Module Load Manager.
agt_not.h
NETCONF Notifications DM module support.
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_PUSH_DSERR_FILTER_REF
@ AGT_PUSH_DSERR_FILTER_REF
filter ref parameter
Definition: agt_push.h:173
agt_push_sync_subscription
status_t agt_push_sync_subscription(agt_not_subid_t subid)
Request a sync for the YANG-Push datastore subscription.
Definition: agt_push.c:3130
ERR_NCX_NOTIF_NO_SUCH_SUBSCRIPTION
@ ERR_NCX_NOTIF_NO_SUCH_SUBSCRIPTION
426
Definition: status_enum.h:471
ses_id_t
uint32 ses_id_t
Session ID.
Definition: ses.h:306
AGT_NOT_FILTER_SUBTREE
@ AGT_NOT_FILTER_SUBTREE
subtree filter
Definition: agt_not.h:181
obj_is_list
boolean obj_is_list(const obj_template_t *obj)
Check if object is a YANG list.
Definition: obj.c:13349
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
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
AGT_NOT_STERR_XPATH_FILTER
@ AGT_NOT_STERR_XPATH_FILTER
xpath-filter
Definition: agt_not.h:195
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.
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
SES_MY_USERNAME
#define SES_MY_USERNAME(S)
get username
Definition: ses.h:111
AGT_NOT_STERR_FILTER_REF
@ AGT_NOT_STERR_FILTER_REF
filter-ref
Definition: agt_not.h:193
NC_MODULE
#define NC_MODULE
Internal NETCONF YANG module.
Definition: ncxconst.h:71
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
AGT_PUSH_DSERR_ENCODING
@ AGT_PUSH_DSERR_ENCODING
encoding parameter
Definition: agt_push.h:185
agt_tree_cvt_subtree_xpath
status_t agt_tree_cvt_subtree_xpath(ses_cb_t *scb, rpc_msg_t *msg, const cfg_template_t *cfg, boolean getop, val_value_t *filter, boolean *skiptop, xmlChar **xpathstr)
Convert a subtree filter to an XPath filter.
Definition: agt_tree.c:3954
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.
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
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
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.
ERR_NCX_PUSH_DATASTORE_NOT_SUBSCRIBABLE
@ ERR_NCX_PUSH_DATASTORE_NOT_SUBSCRIBABLE
430
Definition: status_enum.h:477
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
agt_make_leaf2
val_value_t * agt_make_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, const xmlChar *leafstrval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:5545
agt_check_included_changes
boolean agt_check_included_changes(agt_cfg_transaction_t *txcb, uint32 included_changes, obj_template_t *targobj)
Check an edit transaction to see if it has any edits that match the included_changes bitmask paramete...
Definition: agt_util.c:7256
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_PUSH_GET_DELETE_FLAG
#define AGT_PUSH_GET_DELETE_FLAG(F)
Get the PUSH Delete flag.
Definition: agt_push.h:129
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
xpath_find_data_target_pcb
status_t xpath_find_data_target_pcb(xpath_pcb_t *pcb, obj_template_t **targobj)
Find schema target for a datastore node.
Definition: xpath.c:2560
val_child.h
Value Node Child Access Support.
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
ERR_NCX_PUSH_PERIOD_UNSUPPORTED
@ ERR_NCX_PUSH_PERIOD_UNSUPPORTED
434
Definition: status_enum.h:481
AGT_PUSH_GET_REPLACE_FLAG
#define AGT_PUSH_GET_REPLACE_FLAG(F)
Get the PUSH Replace flag.
Definition: agt_push.h:147
log_debug
void void void void void void void log_debug(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG log entry.
AGT_PUSH_GET_MOVE_FLAG
#define AGT_PUSH_GET_MOVE_FLAG(F)
Get the PUSH Move flag.
Definition: agt_push.h:141
dlq_count
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:994
agt_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
obj_get_config_flag
boolean obj_get_config_flag(const obj_template_t *obj)
Get the config flag for an obj_template_t Return the explicit value or the inherited value Also retur...
Definition: obj.c:11174
ERR_NCX_NOTIF_FILTER_UNAVAILABLE
@ ERR_NCX_NOTIF_FILTER_UNAVAILABLE
423
Definition: status_enum.h:468
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
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_NOT_FOUND
@ ERR_NCX_NOT_FOUND
225
Definition: status_enum.h:264
AGT_NOT_STERR_ENCODING
@ AGT_NOT_STERR_ENCODING
encoding
Definition: agt_not.h:199
ncx_nmda_new_params
ncx_nmda_params_t * ncx_nmda_new_params(void)
Malloc a new ncx_nmda_params_t.
Definition: ncx_nmda.c:153
AGT_PUSH_DSERR_XPATH_FILTER
@ AGT_PUSH_DSERR_XPATH_FILTER
xpath filter parameter
Definition: agt_push.h:179
AGT_NOT_STERR_SUBTREE_FILTER
@ AGT_NOT_STERR_SUBTREE_FILTER
subtree-filter
Definition: agt_not.h:194
agt_make_yang_patch_cb_targobj
yang_patch_cb_t * agt_make_yang_patch_cb_targobj(const xmlChar *patch_id, const xmlChar *the_comment, const xmlChar *patch_root, agt_cfg_transaction_t *txcb, uint32 included_changes, obj_template_t *targobj)
Make a yang_patch_cb for a YANG Patch conventional datastore on-change update for a target object.
Definition: agt_util.c:7078
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
obj_is_container
boolean obj_is_container(const obj_template_t *obj)
Check if object is a YANG container.
Definition: obj.c:13405
ncx_nmda.h
NMDA Data Support.
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
ncx_find_rpc
obj_template_t * ncx_find_rpc(const ncx_module_t *mod, const xmlChar *rpcname)
Check if a rpc_template_t in the mod->rpcQ.
Definition: ncx.c:3775
agt_not_get_modified_obj
obj_template_t * agt_not_get_modified_obj(void)
Get subscription-modified object.
Definition: agt_not.c:8465
XML_MSG_NMDA_PARAMS
#define XML_MSG_NMDA_PARAMS(M)
NMDA params.
Definition: xml_msg.h:316
agt_not_subid_t
uint32 agt_not_subid_t
subscription-id parameter
Definition: agt_not.h:123
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
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
agt_rpc_new_dummy_msg
rpc_msg_t * agt_rpc_new_dummy_msg(void)
Create a dummy rpc_msg_t.
Definition: agt_rpc.c:4060
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
NCX_NMDA_DS_OPERATIONAL
@ NCX_NMDA_DS_OPERATIONAL
operational datastore
Definition: ncxtypes.h:1343
agt_push.h
Server PUSH support.
AGT_PUSH_DSERR_SUBTREE_FILTER
@ AGT_PUSH_DSERR_SUBTREE_FILTER
subtree filter parameter
Definition: agt_push.h:176
cfg_ok_to_read
status_t cfg_ok_to_read(const cfg_template_t *cfg)
Check if the specified config can be read right now.
Definition: cfg.c:2226
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
AGT_PUSH_GET_INSERT_FLAG
#define AGT_PUSH_GET_INSERT_FLAG(F)
Get the PUSH Insert flag.
Definition: agt_push.h:135
ERR_NCX_CFG_NOT_FOUND
@ ERR_NCX_CFG_NOT_FOUND
307
Definition: status_enum.h:350
agt_cfg.h
Manage Server configuration edit transactions.
AGT_PUSH_DSERR_ID
@ AGT_PUSH_DSERR_ID
subscription ID parameter
Definition: agt_push.h:209
agt_make_boolean_leaf
val_value_t * agt_make_boolean_leaf(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, boolean boolval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list (NCX_BT_BOOL)
Definition: agt_util.c:5900
ERR_NCX_PUSH_UNCHANGING_SELECTION
@ ERR_NCX_PUSH_UNCHANGING_SELECTION
437
Definition: status_enum.h:484
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
agt_make_yang_patch_cb_file
yang_patch_cb_t * agt_make_yang_patch_cb_file(const xmlChar *patch_id, const xmlChar *the_comment, const xmlChar *patch_root, const xmlChar *filespec)
Make a yang_patch_cb for a Simulated Operational On-Change subscription update from a data file.
Definition: agt_util.c:7163
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.
rpc_free_msg
void rpc_free_msg(rpc_msg_t *msg)
Free all the memory used by the specified rpc_msg_t.
Definition: rpc.c:152
ERR_NCX_NOTIF_FILTER_UNSUPPORTED
@ ERR_NCX_NOTIF_FILTER_UNSUPPORTED
424
Definition: status_enum.h:469
agt_push_dserr_t_
agt_push_dserr_t_
datastore error parameter numbers Used internally to identify error objects for <rpc-error>
Definition: agt_push.h:161
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
xml_msg_set_cfgid
void xml_msg_set_cfgid(xml_msg_hdr_t *msg, ncx_cfg_t cfgid)
Set the config ID in the message.
Definition: xml_msg.c:1248
NCX_NMDA_DS_NONE
@ NCX_NMDA_DS_NONE
not set
Definition: ncxtypes.h:1338
AGT_PUSH_DSERR_DAMPENING_PERIOD
@ AGT_PUSH_DSERR_DAMPENING_PERIOD
dampening-period parameter
Definition: agt_push.h:200
agt_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
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
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
ERR_NCX_ACCESS_DENIED
@ ERR_NCX_ACCESS_DENIED
267
Definition: status_enum.h:308
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
ncx.h
YANG module utility functions.
agt_push_modify_subscription
status_t agt_push_modify_subscription(ses_cb_t *scb, agt_not_subid_t cur_subid, ncx_nmda_ds_t datastore_id, const xmlChar *selection_filter_ref, const val_value_t *datastore_subtree_filter, const val_value_t *datastore_xpath_filter, const xmlChar *stop_time, boolean periodic, uint32 period, const xmlChar *anchor_time, boolean on_change, boolean dampening_set, uint32 dampening_period, agt_push_dserr_t *errnum)
Set the YANG-Push datastore parameters and start a YANG push subscription.
Definition: agt_push.c:3075
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
NCX_NMDA_DS_STARTUP
@ NCX_NMDA_DS_STARTUP
startup datastore
Definition: ncxtypes.h:1341
SES_MY_SID
#define SES_MY_SID(S)
get session-id
Definition: ses.h:105
ERR_NCX_IN_USE
@ ERR_NCX_IN_USE
match netconf errors (257 - 275)
Definition: status_enum.h:298
agt_push_cleanup
void agt_push_cleanup(void)
Cleanup the PUSH Module.
Definition: agt_push.c:2323
ERR_NCX_NOTIF_INSUFFICIENT_RESOURCES
@ ERR_NCX_NOTIF_INSUFFICIENT_RESOURCES
425
Definition: status_enum.h:470
AGT_PUSH_DSERR_SYNC_ON_START
@ AGT_PUSH_DSERR_SYNC_ON_START
sync-on-start parameter
Definition: agt_push.h:203
xpath_find_schema_target_int
status_t xpath_find_schema_target_int(const xmlChar *target, obj_template_t **targobj)
@
Definition: xpath.c:2475
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
AGT_PUSH_DEF_INCLUDED_CHANGES
#define AGT_PUSH_DEF_INCLUDED_CHANGES
the excluded-changeds leaf-list set is stored as an inverted uint8 bitset
Definition: agt_push.h:117
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_timer.h
Handle timer services for the server.
xpath_expr_has_predicates
boolean xpath_expr_has_predicates(xpath_pcb_t *pcb)
Check if any predicates parsed in the expression.
Definition: xpath.c:4897
ncx_find_module
ncx_module_t * ncx_find_module(const xmlChar *modname, const xmlChar *revision)
Find a ncx_module_t in the ncx_sesmodQ.
Definition: ncx.c:3227
AGT_PUSH_DSERR_NONE
@ AGT_PUSH_DSERR_NONE
not set
Definition: agt_push.h:167
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
agt_timer_get_centi_timenow
void agt_timer_get_centi_timenow(uint64 *tnow)
Get the current time using the system or monotonic clock.
Definition: agt_timer.c:514
cfg_get_config_name
const xmlChar * cfg_get_config_name(ncx_cfg_t cfgid)
Get the config name from its ID.
Definition: cfg.c:1493
ERR_NCX_EXTRA_PARM
@ ERR_NCX_EXTRA_PARM
234
Definition: status_enum.h:273
AGT_PUSH_DSERR_PERIOD
@ AGT_PUSH_DSERR_PERIOD
period parameter
Definition: agt_push.h:191
AGT_PUSH_DSERR_EXCLUDED_CHANGE
@ AGT_PUSH_DSERR_EXCLUDED_CHANGE
excluded-change parameter
Definition: agt_push.h:206
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
ERR_NCX_PUSH_CANT_EXCLUDE
@ ERR_NCX_PUSH_CANT_EXCLUDE
ietf-yang-push errors (429 - 437)
Definition: status_enum.h:476
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
status.h
Global error messages for status code enumerations.
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_push_config_update
void agt_push_config_update(rpc_msg_t *msg, agt_cfg_transaction_t *txcb)
Do a config update for YANG Push subscriptions if needed.
Definition: agt_push.c:3160
agt_push_init
status_t agt_push_init(obj_template_t *update_obj, obj_template_t *change_obj)
Initialize the PUSH modules.
Definition: agt_push.c:2271
AGT_PUSH_GET_CREATE_FLAG
#define AGT_PUSH_GET_CREATE_FLAG(F)
Get the PUSH Create flag.
Definition: agt_push.h:123
AGT_CFG_GET_COMMENT
#define AGT_CFG_GET_COMMENT(C)
get the transaction comment
Definition: agt_cfg.h:133
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
agt_push_init2
status_t agt_push_init2(void)
PUSH init phase 2.
Definition: agt_push.c:2301
agt_make_object2
val_value_t * agt_make_object2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *objname, status_t *res)
make a val_value_t struct for a specified node
Definition: agt_util.c:5968