2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

unixctl: Allow passing auxiliary data to unixctl commands.

This will allow users of unixctl to avoid using global variables, leading
to cleaner code.
This commit is contained in:
Ben Pfaff
2009-10-29 15:20:21 -07:00
parent dc81071d9f
commit 8ca79daaa0
6 changed files with 57 additions and 39 deletions

View File

@@ -35,9 +35,10 @@ const char *unixctl_client_target(const struct unixctl_client *);
/* Command registration. */
struct unixctl_conn;
typedef void unixctl_cb_func(struct unixctl_conn *,
const char *args, void *aux);
void unixctl_command_register(const char *name,
void (*cb)(struct unixctl_conn *,
const char *args));
unixctl_cb_func *cb, void *aux);
void unixctl_command_reply(struct unixctl_conn *, int code,
const char *body);