X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdpif-provider.h;h=74120cda82e822be54a09c894e2ed206d3870611;hb=0aeaabc8dbccef7593dc19e891a3f5bbef1991cd;hp=bc1894292135f567d45909c098af52252a8d3980;hpb=78a2d59c1c7fd057e1ca888c92f2f86efcf8b53a;p=sliver-openvswitch.git diff --git a/lib/dpif-provider.h b/lib/dpif-provider.h index bc1894292..74120cda8 100644 --- a/lib/dpif-provider.h +++ b/lib/dpif-provider.h @@ -80,6 +80,17 @@ struct dpif_class { * case this function may be a null pointer. */ int (*enumerate)(struct sset *all_dps); + /* Returns the type to pass to netdev_open() when a dpif of class + * 'dpif_class' has a port of type 'type', for a few special cases + * when a netdev type differs from a port type. For example, when + * using the userspace datapath, a port of type "internal" needs to + * be opened as "tap". + * + * Returns either 'type' itself or a string literal, which must not + * be freed. */ + const char *(*port_open_type)(const struct dpif_class *dpif_class, + const char *type); + /* Attempts to open an existing dpif called 'name', if 'create' is false, * or to open an existing dpif or create a new one, if 'create' is true. *