ovsdb-idl: Fix memory leak writing synthetic rows in ovsdb_idl_txn_write().
[sliver-openvswitch.git] / lib / unixctl.h
index 24a9d8c..8eb190b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2011 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
 
 #ifndef UNIXCTL_H
 #define UNIXCTL_H 1
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
@@ -39,12 +39,14 @@ const char *unixctl_client_target(const struct unixctl_client *);
 
 /* Command registration. */
 struct unixctl_conn;
-void unixctl_command_register(const char *name,
-                              void (*cb)(struct unixctl_conn *,
-                                         const char *args));
+typedef void unixctl_cb_func(struct unixctl_conn *,
+                             int argc, const char *argv[], void *aux);
+void unixctl_command_register(const char *name, const char *usage,
+                              int min_args, int max_args,
+                              unixctl_cb_func *cb, void *aux);
 void unixctl_command_reply(struct unixctl_conn *, int code,
                            const char *body);
+
 #ifdef  __cplusplus
 }
 #endif