yumapro  20.10-12
YumaPro SDK
yumaworks-event-stream.h
Go to the documentation of this file.
1 
2 #ifndef _H_yumaworks_event_stream
3 #define _H_yumaworks_event_stream
4 /*
5  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
6  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
7  *
8  * Unless required by applicable law or agreed to in writing,
9  * software distributed under the License is distributed on an
10  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
11  * KIND, either express or implied. See the License for the
12  * specific language governing permissions and limitations
13  * under the License.
14  *
15 
16 *** Generated by yangdump-sdk tomcat-integ-2021-01-26.11.14-M
17 
18  Combined SIL header
19  module yumaworks-event-stream
20  revision 2021-01-25
21  prefix ywes
22  namespace http://yumaworks.com/ns/yumaworks-event-stream
23  organization YumaWorks, Inc.
24  Created: 2021-01-26T21:18:44Z
25  CLI parameters:
26  format h
27  indent 4
28  module yumaworks-event-stream
29  output yumaworks-event-stream.h
30  sil-edit2
31  sil-get2
32  unified true
33 
34  */
35 
36 
43 #include <xmlstring.h>
44 
45 #include "procdefs.h"
46 #include "dlq.h"
47 #include "ncxtypes.h"
48 #include "op.h"
49 #include "status.h"
50 #include "val.h"
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 #define y_ywes_M_ywes (const xmlChar *)"yumaworks-event-stream"
57 
58 #define y_ywes_R_ywes (const xmlChar *)"2021-05-15"
59 
60 #define y_ywes_N_clear_eventlog (const xmlChar *)"clear-eventlog"
61 #define y_ywes_N_event_stream (const xmlChar *)"event-stream"
62 #define y_ywes_N_event_streams (const xmlChar *)"event-streams"
63 #define y_ywes_N_eventlog_size (const xmlChar *)"eventlog-size"
64 #define y_ywes_N_module_map (const xmlChar *)"module-map"
65 #define y_ywes_N_module_name (const xmlChar *)"module-name"
66 #define y_ywes_N_name (const xmlChar *)"name"
67 #define y_ywes_N_stream_name (const xmlChar *)"stream-name"
68 
69 
70 #if 0 // NOT USED
71 
72 /* list /event-streams/event-stream */
73 typedef struct y_ywes_T_event_stream_ {
74  dlq_hdr_t qhdr;
75  xmlChar *v_name;
76  uint32 v_eventlog_size;
77 } y_ywes_T_event_stream;
78 
79 /* list /event-streams/module-map */
80 typedef struct y_ywes_T_module_map_ {
81  dlq_hdr_t qhdr;
82  xmlChar *v_module_name;
83  xmlChar *v_stream_name;
84 } y_ywes_T_module_map;
85 
86 /* container /event-streams */
87 typedef struct y_ywes_T_event_streams_ {
88  dlq_hdr_t v_event_stream;
89  dlq_hdr_t v_module_map;
90 } y_ywes_T_event_streams;
91 
92 /* container /clear-eventlog/input */
93 typedef struct y_ywes_T_input_ {
94  xmlChar *v_stream_name;
95 } y_ywes_T_input;
96 
97 /* container /clear-eventlog/output */
98 typedef struct y_ywes_T_output_ {
99 } y_ywes_T_output;
100 
101 /* rpc /clear-eventlog */
102 typedef struct y_ywes_T_clear_eventlog_ {
103  y_ywes_T_input v_input;
104  y_ywes_T_output v_output;
105 } y_ywes_T_clear_eventlog;
106 
107 #endif // 0 NOT USED
108 
109 
132 extern status_t y_yumaworks_event_stream_init (
133  const xmlChar *modname,
134  const xmlChar *revision);
135 
136 
137 
143 extern void y_yumaworks_event_stream_cleanup (void);
144 
145 
149 #ifdef __cplusplus
150 } /* end extern 'C' */
151 #endif
152 
153 #endif
agt_cfg_next_child_edit
agt_cfg_undo_rec_t * agt_cfg_next_child_edit(agt_cfg_undo_rec_t *curedit)
Get the next child node edit record for a given transaction.
Definition: agt_cfg.c:2596
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
cfg.h
ncx_feature.h
NCX Module Library YANG Feature Utility Functions.
OP_EDITOP_CREATE
@ OP_EDITOP_CREATE
edit op is create
Definition: op.h:126
agt_util.h
Utility Functions for NCX Server method routines.
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
y_yumaworks_event_stream_init
status_t y_yumaworks_event_stream_init(const xmlChar *modname, const xmlChar *revision)
initialize the yumaworks-event-filter server instrumentation library
Definition: yumaworks-event-stream.c:803
OP_EDITOP_REPLACE
@ OP_EDITOP_REPLACE
edit op is replace
Definition: op.h:125
agt_use_notifications
boolean agt_use_notifications(void)
Check if notifications currently enabled.
Definition: agt.c:4867
OP_EDITOP_NONE
@ OP_EDITOP_NONE
not set
Definition: op.h:123
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
VAL_STRING
#define VAL_STRING(V)
Access the value as a string ONLY if typ_is_string(typdef) is true.
Definition: val.h:414
ERR_NCX_DEF_NOT_FOUND
@ ERR_NCX_DEF_NOT_FOUND
250
Definition: status_enum.h:289
val.h
Value Node Basic Support.
VAL_UINT32
#define VAL_UINT32(V)
Access the value as an uint32 ONLY if NCX_BT_UINT32.
Definition: val.h:497
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
NCX_LAYER_OPERATION
@ NCX_LAYER_OPERATION
protocol operation layer
Definition: ncxtypes.h:346
agt_action.h
NETCONF Server YANG action handler.
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_cb_unregister_callbacks
void agt_cb_unregister_callbacks(const xmlChar *modname, const xmlChar *defpath)
Unregister all EDIT callback functions for a specific object.
Definition: agt_cb.c:1965
ERR_NCX_WRONG_VERSION
@ ERR_NCX_WRONG_VERSION
314
Definition: status_enum.h:357
ERR_NCX_DUP_ENTRY
@ ERR_NCX_DUP_ENTRY
224
Definition: status_enum.h:263
op.h
NETCONF protocol operations.
ncxmod.h
NCX Module Load Manager.
agt_not.h
NETCONF Notifications DM module support.
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
agt_cb.h
NETCONF Server Data Model callback handler.
OP_EDITOP_MERGE
@ OP_EDITOP_MERGE
edit op is merge
Definition: op.h:124
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_cbtype_name
const xmlChar * agt_cbtype_name(agt_cbtyp_t cbtyp)
Get the string for the server callback phase.
Definition: agt.c:4247
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.
agt_val.h
NETCONF Server database callback handler.
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xml_val.h
Utility functions for creating value structs.
yumaworks-event-stream.h
SIL callbacks for the yumaworks-event-stream module.
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_get_key_value
val_value_t * agt_get_key_value(val_value_t *startval, val_value_t **lastkey)
Get the next expected key value in the ancestor chain.
Definition: agt_util.c:4762
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_cfg_first_child_edit
agt_cfg_undo_rec_t * agt_cfg_first_child_edit(agt_cfg_transaction_t *txcb, val_value_t *newnode, val_value_t *curnode)
Get the first child node edit record for a given transaction.
Definition: agt_cfg.c:2519
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
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
OP_EDITOP_DELETE
@ OP_EDITOP_DELETE
edit op is delete
Definition: op.h:127
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
val_util.h
Value Node Utilities.
agt_get_savedevQ
dlq_hdr_t * agt_get_savedevQ(void)
Get the agt_savedevQ pointer.
Definition: agt.c:4747
agt_sil_lib.h
Server Instrumentation Library Support.
log_debug_append
void void void void void void void void log_debug_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG log entry.
AGT_CB_VALIDATE
@ AGT_CB_VALIDATE
P1: write operation validate.
Definition: agt.h:620
rpc.h
NETCONF protocol remote procedure call common definitions.
val_child.h
Value Node Child Access Support.
ERR_INTERNAL_INIT_SEQ
@ ERR_INTERNAL_INIT_SEQ
007
Definition: status_enum.h:197
agt_get_error_count
uint32 agt_get_error_count(rpc_msg_t *msg)
Get the current number of errors in the rpc msg Q.
Definition: agt_util.c:6460
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.h
Multi-Protocol Network Management Server.
op_editop_name
const xmlChar * op_editop_name(op_editop_t ed_id)
Get the keyword for the specified op_editop_t enumeration.
Definition: op.c:106
ERR_NCX_NOT_FOUND
@ ERR_NCX_NOT_FOUND
225
Definition: status_enum.h:264
AGT_DEF_EVENTLOG_SIZE
#define AGT_DEF_EVENTLOG_SIZE
default –eventlog-size value
Definition: agt.h:240
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
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
OP_EDITOP_LOAD
@ OP_EDITOP_LOAD
load, internal enum
Definition: op.h:128
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
y_yumaworks_event_stream_cleanup
void y_yumaworks_event_stream_cleanup(void)
cleanup the server instrumentation library
Definition: yumaworks-event-stream.c:914
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.
ERR_NCX_UNKNOWN_MODULE
@ ERR_NCX_UNKNOWN_MODULE
356
Definition: status_enum.h:399
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
NCX_NT_VAL
@ NCX_NT_VAL
val_value_t
Definition: ncxtypes.h:276
agt_cb_register_edit2_callback
status_t agt_cb_register_edit2_callback(const xmlChar *modname, const xmlChar *defpath, const xmlChar *version, agt_cb_fn_t cbfn)
Register an object specific edit2 callback function.
Definition: agt_cb.c:1224
agt_cfg.h
Manage Server configuration edit transactions.
agt_cfg_child_edit_fields
void agt_cfg_child_edit_fields(agt_cfg_undo_rec_t *child_undo, op_editop_t *editop, val_value_t **newval, val_value_t **curval)
Get the child edit fields from the undo record.
Definition: agt_cfg.c:2647
NCX_NT_NONE
@ NCX_NT_NONE
not set
Definition: ncxtypes.h:273
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_CB_ROLLBACK
@ AGT_CB_ROLLBACK
P3-neg: write operation rollback.
Definition: agt.h:623
agt_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
NCX_LAYER_CONTENT
@ NCX_LAYER_CONTENT
application layer
Definition: ncxtypes.h:347
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
ncx.h
YANG module utility functions.
AGT_CB_COMMIT
@ AGT_CB_COMMIT
P3-pos: write operation commit.
Definition: agt.h:622
obj.h
Data Object Support.
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
agt_get_rpc_input
val_value_t * agt_get_rpc_input(rpc_msg_t *msg)
Get the rpc input value node.
Definition: agt_util.c:6487
agt_timer.h
Handle timer services for the server.
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
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
status.h
Global error messages for status code enumerations.
dlq.h
dlq provides general double-linked list and queue support:
AGT_CB_APPLY
@ AGT_CB_APPLY
P2: write operation apply.
Definition: agt.h:621