80#define SUBSYS_BUFFLEN 32000
83#define SUBSYS_TRACE1(cb, fmt, ...) if (cb->traceLevel && cb->errfile) \
85 fprintf(cb->errfile, fmt, ##__VA_ARGS__); \
86 fflush(cb->errfile); \
90#define SUBSYS_TRACE2(cb, fmt, ...) if (cb->traceLevel > 1 && cb->errfile) \
92 fprintf(cb->errfile, fmt, ##__VA_ARGS__); \
93 fflush(cb->errfile); \
97#define SUBSYS_TRACE3(cb, fmt, ...) if (cb->traceLevel > 2 && cb->errfile) \
99 fprintf(cb->errfile, fmt, ##__VA_ARGS__); \
100 fflush(cb->errfile); \
106#define XML_START_MSG ((const xmlChar *)\
107 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
117typedef enum proto_id_t_ {
273 const char *subsys_id);
296 const char *subsys_id,
297 const char *server_id,
298 const char *server_addr,
status_t
global error return code
Definition: status_enum.h:210
status_t init_subsystem_ycontrol_ha(int trace_level, const char *subsys_id, const char *server_id, const char *server_addr, uint16 server_port)
@
Definition: subsystem.c:1297
int run_subsystem_full(proto_id_t protocol_id, int trace_level, int argc, char **argv, char **envp, subsys_stdin_fn_t stdin_fn, subsys_stdout_fn_t stdout_fn, int32 stdin_len)
Run the subsystem : entry point (full)
Definition: subsystem.c:1187
status_t check_subsystem_io(void)
Check if any input ready to transfer.
Definition: subsystem.c:1404
status_t connect_subsystem_ycontrol(int *retfd)
Connect the subsystem for YControl.
Definition: subsystem.c:1343
proto_id_t
the type of protocol starting the subsystem
Definition: subsystem.h:117
int run_subsystem(proto_id_t protocol_id, int trace_level, int argc, char **argv)
Run the subsystem : entry point.
Definition: subsystem.c:1117
status_t connect_subsystem_srid(const char *server_root, int *retfd)
Connect the subsystem for YControl using a server root.
Definition: subsystem.c:1365
void cleanup_subsystem_ycontrol(status_t res)
Cleanup the subsystem variables.
Definition: subsystem.c:1424
int run_subsystem_ex(proto_id_t protocol_id, int trace_level, int argc, char **argv, char **envp, subsys_stdin_fn_t stdin_fn, subsys_stdout_fn_t stdout_fn, int32 stdin_len)
Run the subsystem : entry point (extended)
Definition: subsystem.c:1149
status_t(* subsys_stdout_fn_t)(const char *buff, size_t bufflen)
STDOUT FUNCTION TEMPLATE subsys_stdout_fn_t.
Definition: subsystem.h:149
ssize_t(* subsys_stdin_fn_t)(char *buff, size_t bufflen)
STDIN FUNCTION TEMPLATE subsys_stdin_fn_t.
Definition: subsystem.h:162
status_t init_subsystem_ycontrol(int trace_level, const char *subsys_id)
@
Definition: subsystem.c:1269
@ PROTO_ID_NONE
not set
Definition: subsystem.h:119
@ PROTO_ID_WEBUI
WebUI.
Definition: subsystem.h:131
@ PROTO_ID_NETCONF
NETCONF.
Definition: subsystem.h:122
@ PROTO_ID_RESTCONF
RESTCONF.
Definition: subsystem.h:137
@ PROTO_ID_YANGAPI
YANG-API.
Definition: subsystem.h:125
@ PROTO_ID_YCONTROL
YControl subsystem.
Definition: subsystem.h:134
global error status code enumerations