yumapro  20.10-12
YumaPro SDK
yumaworks-callhome.h
Go to the documentation of this file.
1 #ifdef WITH_CALLHOME
2 #ifndef _H_yumaworks_callhome
3 #define _H_yumaworks_callhome
4 /*
5  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
6  * Copyright (c) 2012 - 2020, 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 wildcat-integ-2020-10-13.16.05-M
17 
18  Combined SIL header
19  module yumaworks-callhome
20  revision 2020-10-17
21  namespace http://yumaworks.com/ns/yumaworks-callhome
22  organization YumaWorks, Inc.
23  Created: 2020-10-17T22:47:43Z
24  CLI parameters:
25  format h
26  indent 4
27  module yumaworks-callhome
28  output yumaworks-callhome.h
29  sil-edit2
30  unified true
31 
32  */
33 
40 #include <xmlstring.h>
41 
42 #include "dlq.h"
43 #include "ncxtypes.h"
44 #include "op.h"
45 #include "status.h"
46 #include "val.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 #define y_yumaworks_callhome_M_yumaworks_callhome (const xmlChar *)"yumaworks-callhome"
53 
54 #define y_yumaworks_callhome_R_yumaworks_callhome (const xmlChar *)"2020-10-17"
55 
56 #define y_yumaworks_callhome_N_address (const xmlChar *)"address"
57 #define y_yumaworks_callhome_N_callhome (const xmlChar *)"callhome"
58 #define y_yumaworks_callhome_N_name (const xmlChar *)"name"
59 #define y_yumaworks_callhome_N_port (const xmlChar *)"port"
60 #define y_yumaworks_callhome_N_protocol (const xmlChar *)"protocol"
61 #define y_yumaworks_callhome_N_server (const xmlChar *)"server"
62 
63 
64 #if 0 // NOT USED
65 /* list /callhome/server */
66 typedef struct y_yumaworks_callhome_T_callhome_server_ {
67  dlq_hdr_t qhdr;
68  xmlChar *v_name;
69  val_value_t *v_address;
70  uint16 v_port;
71  xmlChar *v_protocol;
72 } y_yumaworks_callhome_T_callhome_server;
73 
74 /* container /callhome */
75 typedef struct y_yumaworks_callhome_T_callhome_ {
76  dlq_hdr_t v_server;
77 } y_yumaworks_callhome_T_callhome;
78 #endif // 0 NOT USED
79 
80 
81 /* group defined in agt_callhome.h */
82 
83 
96 extern status_t y_yumaworks_callhome_init (
97  const xmlChar *modname,
98  const xmlChar *revision);
99 
100 
108 extern status_t y_yumaworks_callhome_init2 (void);
109 
110 
116 extern void y_yumaworks_callhome_cleanup (void);
117 
118 
122 #ifdef __cplusplus
123 } /* end extern 'C' */
124 #endif
125 
126 #endif // _H_yumaworks_callhome
127 
128 #endif // WITH_CALLHOME
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
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.
OP_EDITOP_REPLACE
@ OP_EDITOP_REPLACE
edit op is replace
Definition: op.h:125
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.
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
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
y_yumaworks_callhome_cleanup
void y_yumaworks_callhome_cleanup(void)
cleanup the server instrumentation library
Definition: yumaworks-callhome.c:557
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
VAL_UINT16
#define VAL_UINT16(V)
Access the value as an uint16 ONLY if NCX_BT_UINT16.
Definition: val.h:491
ERR_NCX_WRONG_VERSION
@ ERR_NCX_WRONG_VERSION
314
Definition: status_enum.h:357
agt_callhome_remove_server
status_t agt_callhome_remove_server(const xmlChar *ch_name)
Remove a CallHome server entry added from a YANG module at run-time.
Definition: agt_callhome.c:1027
op.h
NETCONF protocol operations.
ncxmod.h
NCX Module Load Manager.
agt_cb.h
NETCONF Server Data Model callback handler.
OP_EDITOP_MERGE
@ OP_EDITOP_MERGE
edit op is merge
Definition: op.h:124
VAL_ENUM_NAME
#define VAL_ENUM_NAME(V)
Access the enum name in the value ONLY if BCX_NT_ENUM This is the macro used to check values in SIL c...
Definition: val.h:434
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_CH_PROTO_NETCONF_TLS
@ AGT_CH_PROTO_NETCONF_TLS
netconf-over-tls callhome
Definition: agt.h:695
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.
y_yumaworks_callhome_init2
status_t y_yumaworks_callhome_init2(void)
SIL init phase 2: non-config data structures.
Definition: yumaworks-callhome.c:534
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xml_val.h
Utility functions for creating value structs.
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
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
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
agt_sil_lib.h
Server Instrumentation Library Support.
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
agt_callhome_remove_all_servers
status_t agt_callhome_remove_all_servers(void)
Remove all CallHome server entries added from a YANG module at run-time.
Definition: agt_callhome.c:1067
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
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
agt_callhome_add_server
status_t agt_callhome_add_server(const xmlChar *ch_name, const xmlChar *ch_addr, uint16 ch_port, agt_ch_proto_t ch_proto, boolean start_now)
Add a CallHome server entry from a YANG module at run-time.
Definition: agt_callhome.c:920
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_CH_PROTO_NETCONF_SSH
@ AGT_CH_PROTO_NETCONF_SSH
netconf-over-ssh callhome
Definition: agt.h:694
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.
y_yumaworks_callhome_init
status_t y_yumaworks_callhome_init(const xmlChar *modname, const xmlChar *revision)
initialize the yumaworks-event-filter server instrumentation library
Definition: yumaworks-callhome.c:455
AGT_CB_COMMIT
@ AGT_CB_COMMIT
P3-pos: write operation commit.
Definition: agt.h:622
obj.h
Data Object Support.
agt_timer.h
Handle timer services for the server.
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
yumaworks-callhome.h
SIL callbacks for yumaworks-callhome module.
status.h
Global error messages for status code enumerations.
dlq.h
dlq provides general double-linked list and queue support:
AGT_CH_PROTO_NONE
@ AGT_CH_PROTO_NONE
not set
Definition: agt.h:693
agt_callhome.h
IETF CallHome reverse connection support.
AGT_CB_APPLY
@ AGT_CB_APPLY
P2: write operation apply.
Definition: agt.h:621