Added proc socket and text proto rpc
This commit is contained in:
parent
68371d4fc5
commit
94c6bd9c49
9 changed files with 214 additions and 290 deletions
|
|
@ -46,6 +46,7 @@
|
|||
Note that its contents is different dependending on if invoked from a
|
||||
cli/backend/netconf or other plugin. But this is hidden under-the-hood.
|
||||
*/
|
||||
typedef void *clixon_handle;
|
||||
typedef void *clicon_handle;
|
||||
|
||||
/* The dynamicically loadable plugin object handle (should be in clixon_plugin.h) */
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ typedef int (proc_cb_t)(clicon_handle h, process_entry_t *pe, char **operation);
|
|||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
int clixon_proc_run(char **argv, void (outcb)(char *), int doerr);
|
||||
int clixon_proc_socket(char **argv, pid_t *pid, int *fdin, int *fdout);
|
||||
int clixon_proc_socket_close(pid_t pid, int fdin, int fdout);
|
||||
int clixon_proc_background(char **argv, const char *netns, pid_t *pid);
|
||||
int clixon_proc_daemon(char **argv, pid_t *pid);
|
||||
int clixon_process_register(clicon_handle h, const char *name, const char *netns, proc_cb_t *callback, char **argv, int argc);
|
||||
int clixon_process_delete_all(clicon_handle h);
|
||||
int clixon_process_operation(clicon_handle h, const char *name, char *op, const int wrapit, uint32_t *pid);
|
||||
|
|
|
|||
|
|
@ -83,12 +83,18 @@ int clicon_rpc_connect_inet(clicon_handle h,
|
|||
uint16_t port,
|
||||
int *sock0);
|
||||
|
||||
int clicon_rpc(int s, struct clicon_msg *msg, char **xret);
|
||||
int clicon_rpc(int fdin, int fdout, struct clicon_msg *msg, char **xret);
|
||||
|
||||
int clicon_rpc1(int fdin, int fdout, cbuf *msgin, cbuf *msgret);
|
||||
|
||||
int clicon_msg_send(int s, struct clicon_msg *msg);
|
||||
|
||||
int clicon_msg_send1(int s, cbuf *cb);
|
||||
|
||||
int clicon_msg_rcv(int s, struct clicon_msg **msg, int *eof);
|
||||
|
||||
int clicon_msg_rcv1(int s, cbuf *cb, int *eof);
|
||||
|
||||
int send_msg_notify_xml(clicon_handle h, int s, cxobj *xev);
|
||||
|
||||
int send_msg_reply(int s, char *data, uint32_t datalen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue