yumapro  20.10-12
YumaPro SDK
sil_sa.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 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_sil_sa
13 #define _H_sil_sa
14 
15 /* FILE: sil_sa.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 15-mar-14 abb Begun
37 */
38 
39 #include <xmlstring.h>
40 
41 #ifndef _H_agt_not
42 #include "agt_not.h"
43 #endif
44 
45 #ifndef _H_rpc
46 #include "rpc.h"
47 #endif
48 
49 #ifndef _H_val
50 #include "val.h"
51 #endif
52 
53 #ifndef _H_sil_sa_types
54 #include "sil_sa_types.h"
55 #endif
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 
62 
63 
88 /********************************************************************
89 * *
90 * C O N S T A N T S *
91 * *
92 *********************************************************************/
93 
95 #define SIL_SA (const xmlChar *)"sil-sa"
96 
98 #define SIL_SA_MOD (const xmlChar *)"yumaworks-sil-sa"
99 
101 #define SIL_SA_OBJ (const xmlChar *)"sil-sa"
102 
104 #define SIL_REQ_OK(ST) (ST >= SIL_SA_ST_READY)
105 
106 
107 /********************************************************************
108 * *
109 * T Y P E S *
110 * *
111 *********************************************************************/
112 
113 
114 /********************************************************************
115 * *
116 * F U N C T I O N S *
117 * *
118 *********************************************************************/
119 
120 
128 extern status_t
130 
131 
139 extern val_value_t *
140  sil_sa_get_key (rpc_msg_t *msg,
141  uint32 keynum);
142 
143 
151 extern val_value_t *
152  sil_sa_get_action_key (rpc_msg_t *msg,
153  uint32 keynum);
154 
155 
163 extern void
164  sil_sa_queue_notification (agt_not_msg_t *notif);
165 
166 
179 extern void
180  sil_sa_queue_notification_stream (const xmlChar *stream_name,
181  agt_not_msg_t *notif);
182 
183 
195 extern void
196  sil_sa_notif_test (int8 N1,
197  int16 N2,
198  const xmlChar *N3);
199 
200 
201 
210 extern status_t
211  sil_sa_add_library_parm (const xmlChar *libstr);
212 
213 
222 extern boolean
224 
225 
232 extern boolean
233  sil_sa_find_library_parm (const xmlChar *libstr);
234 
235 
244 const xmlChar*
245  sil_sa_get_username (void);
246 
247 
257 extern const xmlChar *
258  sil_sa_get_client_addr (void);
259 
260 
270 const xmlChar *
271  sil_sa_get_rpc_msg_id (rpc_msg_t *msg);
272 
273 
282 extern void sil_sa_term_msg_test (uint32 count);
283 
284 
331 extern status_t
332  sil_sa_add_edit (const xmlChar *defpath,
333  val_value_t *edit_value,
334  const xmlChar *edit_operation,
335  const xmlChar *insert_where,
336  const xmlChar *insert_point,
337  boolean skip_cb);
338 
339 
354 extern val_value_t *
355  sil_sa_get_data (ncx_cfg_t cfg_id,
356  const xmlChar *defpath,
357  status_t *retres);
358 
359 
371 extern sil_sa_child_edit_t *
372  sil_sa_first_child_edit (rpc_msg_t *msg);
373 
374 
387 extern sil_sa_child_edit_t *
388  sil_sa_next_child_edit (sil_sa_child_edit_t *curedit);
389 
390 
407 extern void
408  sil_sa_child_edit_fields (sil_sa_child_edit_t *child_edit,
409  op_editop_t *editop,
410  val_value_t **newval,
411  val_value_t **curval);
412 
413 
417 #ifdef __cplusplus
418 } /* end extern 'C' */
419 #endif
420 
421 #endif /* _H_sil_sa */
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
sil_sa_first_child_edit
sil_sa_child_edit_t * sil_sa_first_child_edit(rpc_msg_t *msg)
Get the first child edit from the transaction control block.
Definition: sil_sa.c:3993
xml_strlen
uint32 xml_strlen(const xmlChar *str)
Get the String len for xmlChar.
Definition: xml_util.c:1406
ycontrol_get_service_object
obj_template_t * ycontrol_get_service_object(const xmlChar *service_name)
Get the service object from the payload container.
Definition: ycontrol.c:1088
val_child_add_last
status_t val_child_add_last(val_value_t *child, val_value_t *parent)
Add a child value node as last node to a parent value node.
Definition: val_child.c:1583
sil_sa_any_library_parms
boolean sil_sa_any_library_parms(void)
Check if any library parms are set.
Definition: sil_sa.c:3616
AGT_NOT_SUBEV_INACTIVE
@ AGT_NOT_SUBEV_INACTIVE
inactive sub-event
Definition: agt_not.h:135
xml_msg_clean_hdr
void xml_msg_clean_hdr(xml_msg_hdr_t *msg)
Clean all the memory used by the specified xml_msg_hdr_t but do not free the struct itself.
Definition: xml_msg.c:438
YCONTROL_MSG_SERVER_REQUEST
@ YCONTROL_MSG_SERVER_REQUEST
server-request sent from server to subsystem
Definition: ycontrol_types.h:72
agt_util.h
Utility Functions for NCX Server method routines.
agt_sil_lib_call_init2
status_t agt_sil_lib_call_init2(void)
Call the available SIL init2 callbacks.
Definition: agt_sil_lib.c:844
xml_strdup
xmlChar * xml_strdup(const xmlChar *copyFrom)
String duplicate for xmlChar.
Definition: xml_util.c:1553
sil_sa_queue_notification
void sil_sa_queue_notification(agt_not_msg_t *notif)
Send a notification-event to the main server for queing by the agt_not module.
Definition: sil_sa.c:3245
sil_sa_hooks_send_get_request
status_t sil_sa_hooks_send_get_request(sil_sa_cb_t *sil_sa_cb, ncx_cfg_t cfg_id, const xmlChar *defpath)
Send the <hook-get-request> message.
Definition: sil_sa_hooks.c:650
SIL_SA_ST_ERROR
@ SIL_SA_ST_ERROR
SIL-SA service in some error state.
Definition: sil_sa_types.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
agt_not_stream_callback_subsys
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:9280
sil_sa_hooks_clean_added_edits
void sil_sa_hooks_clean_added_edits(dlq_hdr_t *added_editQ)
Clean the added edits from the profile.
Definition: sil_sa_hooks.c:407
ERR_NCX_DEF_NOT_FOUND
@ ERR_NCX_DEF_NOT_FOUND
250
Definition: status_enum.h:289
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
sil_sa_get_client_addr
const xmlChar * sil_sa_get_client_addr(void)
Get the client address (client_addr value from the message header)
Definition: sil_sa.c:3686
agt_make_int_leaf2
val_value_t * agt_make_int_leaf2(obj_template_t *parentobj, const xmlChar *modname, const xmlChar *leafname, int32 leafval, status_t *res)
make a val_value_t struct for a specified leaf or leaf-list
Definition: agt_util.c:5683
ycontrol_send_error
status_t ycontrol_send_error(const xmlChar *service_id, uint32 *msgid, status_t msg_status, uint32 error_index, const xmlChar *error_message, const xmlChar *txid_str)
Send a YControl <error> message.
Definition: ycontrol.c:1238
val.h
Value Node Basic Support.
val_make_simval_obj
val_value_t * val_make_simval_obj(obj_template_t *obj, const xmlChar *valstr, status_t *res)
Create and set a val_value_t as a simple type from an object template instead of individual fields Ca...
Definition: val_util.c:4389
ycontrol_send_ex
status_t ycontrol_send_ex(const xmlChar *service_id, uint32 *msgid, ycontrol_msgtype_t msgtype, val_value_t *service_payload, status_t msg_status, const xmlChar *txid_str)
Send a YControl message (extended)
Definition: ycontrol.c:1153
sil_call_load_one
status_t sil_call_load_one(sil_sa_cb_t *cb, const xmlChar *name, boolean is_module)
Load the SIL-SA library code for one module or bundle.
Definition: sil_call.c:1017
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
sil_sa_profile.h
Agent Profile handler for SIL-SA.
YCONTROL_MSGBODY_ERROR
@ YCONTROL_MSGBODY_ERROR
error message
Definition: ycontrol_types.h:96
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
YCONTROL_MSG_SUBSYS_REQUEST
@ YCONTROL_MSG_SUBSYS_REQUEST
subsystem-request sent from subsystem to server
Definition: ycontrol_types.h:81
agt_init_term_msg_module
status_t agt_init_term_msg_module(void)
Init the term-msg module and object backptr.
Definition: agt.c:5392
sil_sa_hooks_add_edit
status_t sil_sa_hooks_add_edit(sil_sa_cb_t *sil_sa_cb, const xmlChar *defpath, val_value_t *edit_value, const xmlChar *edit_operation, const xmlChar *insert_where, const xmlChar *insert_point, boolean skip_cb)
Add an edit to the current transaction from SIL-SA.
Definition: sil_sa_hooks.c:566
ncx_clean_mbackptrQ
void ncx_clean_mbackptrQ(dlq_hdr_t *backptrQ)
Clean an entire Q of ncx_backptr_t structs Use ncx_free_mbackptr to free node pointers.
Definition: ncx.c:11492
ncx_next_backptr
ncx_backptr_t * ncx_next_backptr(ncx_backptr_t *curptr)
Get next back pointer struct.
Definition: ncx.c:11545
sil_sa_child_edit_fields
void sil_sa_child_edit_fields(sil_sa_child_edit_t *child_edit, op_editop_t *editop, val_value_t **newval, val_value_t **curval)
Get the child edit fields.
Definition: sil_sa.c:4064
YCONTROL_MSGBODY_OK
@ YCONTROL_MSGBODY_OK
OK message.
Definition: ycontrol_types.h:90
AGT_NOT_SUBEV_NONE
@ AGT_NOT_SUBEV_NONE
not set
Definition: agt_not.h:129
op.h
NETCONF protocol operations.
ncxmod.h
NCX Module Load Manager.
agt_not.h
NETCONF Notifications DM module support.
ycontrol_register_service
status_t ycontrol_register_service(const xmlChar *service_name, ycontrol_service_start_t service_start, ycontrol_service_stop_t service_stop, ycontrol_service_msg_rcvr_t service_rcvr, ycontrol_service_shutdown_t service_shut)
Register a specific service with the YumaPro control message manager.
Definition: ycontrol.c:951
sil_sa_hooks_make_added_edit_payload
val_value_t * sil_sa_hooks_make_added_edit_payload(sil_sa_cb_t *sacb, status_t *res)
Make the <transaction-response> message return-value.
Definition: sil_sa_hooks.c:438
AGT_NOT_SUBEV_ACTIVE
@ AGT_NOT_SUBEV_ACTIVE
active sub-event
Definition: agt_not.h:132
ERR_NCX_UNKNOWN_PARM
@ ERR_NCX_UNKNOWN_PARM
227
Definition: status_enum.h:266
agt_cb.h
NETCONF Server Data Model callback handler.
agt_unload_sil_code
status_t agt_unload_sil_code(const xmlChar *modname)
Unload the Server Instrumentation Library for the specified module.
Definition: agt_sil_lib.c:681
val_find_next_child
val_value_t * val_find_next_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname, const val_value_t *curchild)
Find the next instance of the specified child node.
Definition: val.c:8748
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
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
val_remove_child
void val_remove_child(val_value_t *child)
Remove a child value node from its parent value node.
Definition: val.c:8316
ERR_NCX_MISSING_PARM
@ ERR_NCX_MISSING_PARM
233
Definition: status_enum.h:272
agt_init2_sil_sa
status_t agt_init2_sil_sa(void)
Initialize the Server Library for SIL-SA.
Definition: agt.c:4046
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.
sil_sa.h
Server Instrumentation Library for Sub Agents (SIL-SA)
ncx_set_bestmatch
status_t ncx_set_bestmatch(void)
Setup the bestmatch module versions, if enabled.
Definition: ncx.c:14060
sil_sa_register_service
status_t sil_sa_register_service(void)
Register the SIL-SA service with the YControl layer.
Definition: sil_sa.c:3101
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
val_add_child
void val_add_child(val_value_t *child, val_value_t *parent)
Add a child (deprecated: use val_child_add instead)
Definition: val.c:8231
xml_val.h
Utility functions for creating value structs.
sil_sa_term_msg_test
void sil_sa_term_msg_test(uint32 count)
Send a <term-msg> test notification.
Definition: sil_sa.c:3733
ERR_NCX_MOD_NOT_FOUND
@ ERR_NCX_MOD_NOT_FOUND
236
Definition: status_enum.h:275
agt_cb_cleanup
void agt_cb_cleanup(void)
Cleanup the server callback module.
Definition: agt_cb.c:1125
sil_sa_profile_cvt_value
status_t sil_sa_profile_cvt_value(val_value_t *val, agt_profile_t *profile)
Convert the specified val_value_t tree into the fields of the specified agt_profile struct.
Definition: sil_sa_profile.c:83
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
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
sil_sa_add_library_parm
status_t sil_sa_add_library_parm(const xmlChar *libstr)
Add a library parameter so the SIL-SA libraries will be restricted to just these libraries instead of...
Definition: sil_sa.c:3581
SIL_SA_ST_WAIT_COMMIT
@ SIL_SA_ST_WAIT_COMMIT
edit transaction in progress and is waiting for commit phase
Definition: sil_sa_types.h:138
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
log_warn
void void void log_warn(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_WARN log entry.
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
val_add_datapath_attr
status_t val_add_datapath_attr(val_value_t *val, obj_template_t *obj)
Add the ye:datapath attribute to a node that is tagged as an ywx:datapath node.
Definition: val_util.c:7041
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
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.
agt_use_nmda
boolean agt_use_nmda(void)
Check if NMDA is enabled.
Definition: agt.c:5424
sil_sa_get_username
const xmlChar * sil_sa_get_username(void)
Get the user_id value from the message header.
Definition: sil_sa.c:3666
sil_sa_get_action_key
val_value_t * sil_sa_get_action_key(rpc_msg_t *msg, uint32 keynum)
Get the key value node for the specified key for ACTION ONLY.
Definition: sil_sa.c:3207
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_sil_lib.h
Server Instrumentation Library Support.
SIL_SA_ST_READY
@ SIL_SA_ST_READY
SIL-SA is idle ready for requests.
Definition: sil_sa_types.h:132
AGT_CB_VALIDATE
@ AGT_CB_VALIDATE
P1: write operation validate.
Definition: agt.h:620
rpc.h
NETCONF protocol remote procedure call common definitions.
agt_cb_unload_module
void agt_cb_unload_module(const xmlChar *modname)
Remove the modhdr for the specified module since it is being unloaded from the server or subsystem.
Definition: agt_cb.c:5229
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
val_child.h
Value Node Child Access Support.
ycontrol_set_timer_handler
void ycontrol_set_timer_handler(ycontrol_timer_handler_t timer_handler)
Set the timer callback handler.
Definition: ycontrol.c:1424
ERR_INTERNAL_INIT_SEQ
@ ERR_INTERNAL_INIT_SEQ
007
Definition: status_enum.h:197
sil_call_free_bundle_cb
void sil_call_free_bundle_cb(sil_sa_bundle_t *buncb)
Clean and free a bundle control block.
Definition: sil_call.c:1177
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
agt_notifications_enabled
boolean agt_notifications_enabled(void)
Check if notifications are enabled.
Definition: agt_util.c:5523
sil_sa_types.h
Data structures for the SIL-SA subsystem.
getcb_free_get2cb
void getcb_free_get2cb(getcb_get2_t *get2cb)
Clean and free a malloced GET2 control block.
Definition: getcb.c:5694
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.
SIL_SA_ST_WAIT_HOOK_GETDATA
@ SIL_SA_ST_WAIT_HOOK_GETDATA
waiting for a Get-Data Hook response from the server, interrupting an edit transaction
Definition: sil_sa_types.h:143
sil_call_init
void sil_call_init(void)
Init the module.
Definition: sil_call.c:1147
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
sil_sa_next_child_edit
sil_sa_child_edit_t * sil_sa_next_child_edit(sil_sa_child_edit_t *curedit)
Get the next child edit from the transaction control block.
Definition: sil_sa.c:4033
ERR_NCX_NOT_FOUND
@ ERR_NCX_NOT_FOUND
225
Definition: status_enum.h:264
sil_call_clean_profile
void sil_call_clean_profile(sil_sa_cb_t *cb)
Clean the module-specific data from the profile.
Definition: sil_call.c:1128
ycontrol_send_ok
status_t ycontrol_send_ok(const xmlChar *service_id, uint32 *msgid, const xmlChar *txid_str)
Send a YControl <ok> message.
Definition: ycontrol.c:1273
sil_call_load_code
status_t sil_call_load_code(sil_sa_cb_t *cb)
Load the SIL-SA library code for the modules and bundles in the <register-repsonse> message.
Definition: sil_call.c:884
getcb_request_val_to_get2cb
getcb_get2_t * getcb_request_val_to_get2cb(val_value_t *get_request_val, boolean preserve_data, status_t *res)
Convert a <get-request> value tree into a get2cb struct.
Definition: getcb.c:6797
ERR_NCX_OPERATION_NOT_SUPPORTED
@ ERR_NCX_OPERATION_NOT_SUPPORTED
273
Definition: status_enum.h:314
xml_msg_init_hdr
void xml_msg_init_hdr(xml_msg_hdr_t *msg)
Initialize a new xml_msg_hdr_t struct.
Definition: xml_msg.c:393
ncx_first_backptr
ncx_backptr_t * ncx_first_backptr(dlq_hdr_t *que)
Get first back pointer struct.
Definition: ncx.c:11513
agt_cleanup_sil_sa
void agt_cleanup_sil_sa(void)
Cleanup the Server Library for SIL-SA usage.
Definition: agt.c:4100
ncx_nmda.h
NMDA Data Support.
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
YCONTROL_MSG_SERVER_RESPONSE
@ YCONTROL_MSG_SERVER_RESPONSE
server-response sent from server to subsystem
Definition: ycontrol_types.h:75
obj_get_mod_name
const xmlChar * obj_get_mod_name(const obj_template_t *obj)
Get the module name for this object.
Definition: obj.c:12176
ycontrol_send
status_t ycontrol_send(const xmlChar *service_id, uint32 *msgid, ycontrol_msgtype_t msgtype, val_value_t *service_payload, status_t msg_status)
Send a YControl message.
Definition: ycontrol.c:1116
agt_timer_handler
void agt_timer_handler(void)
Handle an incoming server timer polling interval.
Definition: agt_timer.c:245
obj_find_child
obj_template_t * obj_find_child(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6116
sil_sa_hooks.h
SIL-SA Hooks Support.
agt_cb_init
status_t agt_cb_init(void)
Init the server callback module.
Definition: agt_cb.c:1088
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
sil_sa_add_edit
status_t sil_sa_add_edit(const xmlChar *defpath, val_value_t *edit_value, const xmlChar *edit_operation, const xmlChar *insert_where, const xmlChar *insert_point, boolean skip_cb)
Add an edit to the current transaction from SIL-SA.
Definition: sil_sa.c:3821
sil_call.h
Handles loading SIL-SA libraries and invoking callback functions. Handles both static SIL-SA and dyna...
YCONTROL_MSG_SERVER_EVENT
@ YCONTROL_MSG_SERVER_EVENT
server-event sent from server to subsystem
Definition: ycontrol_types.h:69
ncx_str2txid
status_t ncx_str2txid(const xmlChar *str, ncx_transaction_id_t *txid)
Convert a string to a ncx_transaction_id_t.
Definition: ncx.c:12123
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
VAL_BOOL
#define VAL_BOOL(V)
Access the value as a boolean ONLY IF btyp == NCX_BT_BOOLEAN.
Definition: val.h:405
val_get_next_child
val_value_t * val_get_next_child(const val_value_t *curchild)
Get the next child node.
Definition: val.c:8496
agt_rpc_handle_subsys_action
status_t agt_rpc_handle_subsys_action(void *sil_sa_cb, ses_cb_t *scb, const xmlChar *path, val_value_t *action_input_val, dlq_hdr_t *return_dataQ)
Handles incoming <action-request> server request messages.
Definition: agt_rpc.c:4568
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
xml_val_new_flag
val_value_t * xml_val_new_flag(const xmlChar *name, xmlns_id_t nsid)
Set up a new flag (NCX_NT_EMPTY)
Definition: xml_val.c:553
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
log.h
NCX System Logging Manager.
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
SIL_SA_ST_WAIT_CONFIG
@ SIL_SA_ST_WAIT_CONFIG
connection to server in progress, waiting for the configuration
Definition: sil_sa_types.h:126
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
SIL_SA_MOD
#define SIL_SA_MOD
SIL-SA YANG module.
Definition: sil_sa.h:98
sil_sa_get_key
val_value_t * sil_sa_get_key(rpc_msg_t *msg, uint32 keynum)
Get a key leaf from the sil_sa_cb backptr in the rpc_msg.
Definition: sil_sa.c:3164
ncx_enable_bestmatch
void ncx_enable_bestmatch(void)
Enable the bestmatch import processing feature.
Definition: ncx.c:14045
ycontrol_check_io
status_t ycontrol_check_io(void)
Check for input/output.
Definition: ycontrol.c:820
YCONTROL_MSG_SUBSYS_EVENT
@ YCONTROL_MSG_SUBSYS_EVENT
subsystem-event sent from subsystem to server
Definition: ycontrol_types.h:78
ycontrol_send_ex2
status_t ycontrol_send_ex2(const xmlChar *service_id, uint32 *msgid, ycontrol_msgtype_t msgtype, val_value_t *service_payload, status_t msg_status, boolean with_origin, const xmlChar *txid_str)
Send a YControl message (extended2)
Definition: ycontrol.c:1197
val_clean_valQ
void val_clean_valQ(dlq_hdr_t *valQ)
Clean a queue of val_value_t.
Definition: val.c:13911
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
val_get_first_child
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
SIL_SA_ST_WAIT_APPLY
@ SIL_SA_ST_WAIT_APPLY
edit transaction started and is waiting for apply phase
Definition: sil_sa_types.h:135
xml_strcpy
uint32 xml_strcpy(xmlChar *copyTo, const xmlChar *copyFrom)
String copy for xmlChar.
Definition: xml_util.c:1486
agt_make_term_msg
agt_not_msg_t * agt_make_term_msg(const xmlChar *msg, status_t *res)
Create a <term-msg> notification.
Definition: agt.c:5346
sil_call_check_bundle_duplicate
boolean sil_call_check_bundle_duplicate(sil_sa_cb_t *cb, const xmlChar *modname)
Check for a module already claimed in a bundle.
Definition: sil_call.c:1197
AGT_CB_ROLLBACK
@ AGT_CB_ROLLBACK
P3-neg: write operation rollback.
Definition: agt.h:623
agt_cb_invoke_trans_complete
void agt_cb_invoke_trans_complete(const xmlChar *transaction_id)
Invoke Transaction Complete callbacks.
Definition: agt_cb.c:2269
agt_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
sil_call_cleanup
void sil_call_cleanup(void)
Cleanup the module.
Definition: sil_call.c:1162
ncx_get_backptr_node
void * ncx_get_backptr_node(ncx_backptr_t *backptr)
Get the back pointer node pointer.
Definition: ncx.c:11577
sil_sa_queue_notification_stream
void sil_sa_queue_notification_stream(const xmlChar *stream_name, agt_not_msg_t *notif)
Send a notification-event to a specific stream, to the main server for queing by the agt_not module.
Definition: sil_sa.c:3262
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
val_new_value
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
ncx.h
YANG module utility functions.
sil_sa_notif_test
void sil_sa_notif_test(int8 N1, int16 N2, const xmlChar *N3)
Send a y_get2_test_get2_notif notification.
Definition: sil_sa.c:3476
getcb_fn2_t
status_t(* getcb_fn2_t)(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 PRODUCER FUNCTION.
Definition: getcb.h:607
AGT_CB_COMMIT
@ AGT_CB_COMMIT
P3-pos: write operation commit.
Definition: agt.h:622
obj.h
Data Object Support.
ycontrol.h
YumaPro Subsystem Control Protocol.
ncx_unload_and_free_module
void ncx_unload_and_free_module(ncx_module_t *mod)
Clear out the xmlns, def_ref, and modQ entries for a module and then delete the module.
Definition: ncx.c:12011
ERR_NCX_IN_USE
@ ERR_NCX_IN_USE
match netconf errors (257 - 275)
Definition: status_enum.h:298
sil_sa_hook_handle_get_request
status_t sil_sa_hook_handle_get_request(sil_sa_cb_t *sil_sa_cb, val_value_t *msgbody, ycontrol_msgbody_t msgbody_type)
Handles incoming <payload> from server for the <hook-get-request>
Definition: sil_sa_hooks.c:706
sil_sa_find_library_parm
boolean sil_sa_find_library_parm(const xmlChar *libstr)
Find a library parm name in the library_parmQ.
Definition: sil_sa.c:3637
agt_rpc_handle_subsys_request
status_t agt_rpc_handle_subsys_request(void *sil_sa_cb, ses_cb_t *scb, const xmlChar *modname, const xmlChar *rpcname, val_value_t *rpc_input_val, dlq_hdr_t *return_dataQ)
Handles incoming <rpc-request> server request messages from a subsystem.
Definition: agt_rpc.c:4418
val_init_from_template
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
SIL_REQ_OK
#define SIL_REQ_OK(ST)
Check if SIL-SA state is ready.
Definition: sil_sa.h:104
agt_cb_invoke_trans_start_cb
status_t agt_cb_invoke_trans_start_cb(const xmlChar *transaction_id, boolean isvalidate, boolean isrollback, boolean isrunning)
Invoke Transaction start callbacks.
Definition: agt_cb.c:2216
YCONTROL_MSG_SUBSYS_RESPONSE
@ YCONTROL_MSG_SUBSYS_RESPONSE
subsystem-response sent from subsystem to server
Definition: ycontrol_types.h:84
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
sil_sa_get_rpc_msg_id
const xmlChar * sil_sa_get_rpc_msg_id(rpc_msg_t *msg)
Get the rpc transaction id (txid_str) from the rpc_sil_sa_cb.
Definition: sil_sa.c:3711
YCONTROL_MSGBODY_PAYLOAD
@ YCONTROL_MSGBODY_PAYLOAD
payload message
Definition: ycontrol_types.h:93
sil_call_edit_phase
status_t sil_call_edit_phase(sil_sa_cb_t *cb, agt_cbtyp_t cbtyp, ses_cb_t *scb)
Invoke 1 phase of the edit procedure.
Definition: sil_call.c:1084
val_child_next_same
val_value_t * val_child_next_same(val_value_t *curnode)
Get the next node of the same type.
Definition: val_child.c:2359
agt_cb_make_register_msg
status_t agt_cb_make_register_msg(val_value_t *request_val, obj_template_t *register_obj, obj_template_t *module_obj, obj_template_t *path_obj, obj_template_t *get_path_obj, obj_template_t *rpc_name_obj, obj_template_t *action_path_obj, obj_template_t *transaction_start_obj, obj_template_t *transaction_complete_obj, obj_template_t *post_sethook_path_obj, obj_template_t *sethook_list, obj_template_t *txhook_list, obj_template_t *edit2_path_obj, boolean *any_rw_objs)
Make a subsystem register message.
Definition: agt_cb.c:3068
VAL_STR
#define VAL_STR(V)
Access the value as a string ONLY if typ_is_string() is true.
Definition: val.h:464
SIL_SA_ST_STOPPED
@ SIL_SA_ST_STOPPED
SIL-SA service is stopped.
Definition: sil_sa_types.h:120
agt_timer.h
Handle timer services for the server.
SIL_SA_ST_START
@ SIL_SA_ST_START
SIL-SA serivice is starting up.
Definition: sil_sa_types.h:117
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_init1_sil_sa
status_t agt_init1_sil_sa(void)
Initialize the Server Library: stage 1: CLI and profile.
Definition: agt.c:3273
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
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
SIL_SA_ST_WAIT_REGISTER
@ SIL_SA_ST_WAIT_REGISTER
connection to server starting with register request
Definition: sil_sa_types.h:129
SIL_SA
#define SIL_SA
YControl service name.
Definition: sil_sa.h:95
ycontrol_shutdown_requested
boolean ycontrol_shutdown_requested(void)
Check if a control message handler shutdown is in progress.
Definition: ycontrol.c:933
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.
obj_get_nsid
xmlns_id_t obj_get_nsid(const obj_template_t *obj)
Get the namespace ID for this object.
Definition: obj.c:12395
dlq.h
dlq provides general double-linked list and queue support:
getcb_get2cb_to_response_val
val_value_t * getcb_get2cb_to_response_val(getcb_get2_t *get2cb, obj_template_t *response_obj, boolean preserve_data, status_t *res)
Convert a get2cb struct to a <get-response> value tree.
Definition: getcb.c:7012
ncx_nmda_load_modules
status_t ncx_nmda_load_modules(dlq_hdr_t *devQ)
Load the ietf-datastore and ietf-origin modules.
Definition: ncx_nmda.c:559
ncx_new_backptr
ncx_backptr_t * ncx_new_backptr(void *node)
Malloc and initialize a new ncx_backptr_t struct.
Definition: ncx.c:11412
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297
sil_sa_get_data
val_value_t * sil_sa_get_data(ncx_cfg_t cfg_id, const xmlChar *defpath, status_t *retres)
Get some YANG data from the server.
Definition: sil_sa.c:3884
ncx_transaction_id_t
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:548
AGT_CB_APPLY
@ AGT_CB_APPLY
P2: write operation apply.
Definition: agt.h:621