summaryrefslogtreecommitdiff
path: root/lib/dpif-provider.h
diff options
context:
space:
mode:
authorDaniele Di Proietto <diproiettod@vmware.com>2015-04-10 19:09:49 +0100
committerEthan Jackson <ethan@nicira.com>2015-04-14 12:30:11 -0700
commitc8973eb634a8efff7593d2a2c160e2b8c09a8c3f (patch)
tree0264a0f63d26b57faa8f1977259eedd92ff4c938 /lib/dpif-provider.h
parent55e3ca97d1cb8ee7de496381ef48ff248f527787 (diff)
downloadopenvswitch-c8973eb634a8efff7593d2a2c160e2b8c09a8c3f.tar.gz
dpif-provider: Add class init function.
This init function is called when the dpif class is registered. It will be used by following commits Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/dpif-provider.h')
-rw-r--r--lib/dpif-provider.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/dpif-provider.h b/lib/dpif-provider.h
index 7b4878eb5..28ea86f48 100644
--- a/lib/dpif-provider.h
+++ b/lib/dpif-provider.h
@@ -90,6 +90,14 @@ struct dpif_class {
* the type assumed if no type is specified when opening a dpif. */
const char *type;
+ /* Called when the dpif provider is registered, typically at program
+ * startup. Returning an error from this function will prevent any
+ * datapath with this class from being created.
+ *
+ * This function may be set to null if a datapath class needs no
+ * initialization at registration time. */
+ int (*init)(void);
+
/* Enumerates the names of all known created datapaths (of class
* 'dpif_class'), if possible, into 'all_dps'. The caller has already
* initialized 'all_dps' and other dpif classes might already have added