Signed-off-by: Justin Pettit <jpet...@nicira.com> --- lib/dpif.c | 7 +++++++ lib/dpif.h | 1 + 2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/dpif.c b/lib/dpif.c index 952a502..0093f61 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -372,6 +372,13 @@ dpif_base_name(const struct dpif *dpif) return dpif->base_name; } +/* Returns the type of datapath 'dpif'. */ +const char * +dpif_type(const struct dpif *dpif) +{ + return dpif->dpif_class->type; +} + /* Returns the fully spelled out name for the given datapath 'type'. * * Normalized type string can be compared with strcmp(). Unnormalized type diff --git a/lib/dpif.h b/lib/dpif.h index bd6095a..7d0881f 100644 --- a/lib/dpif.h +++ b/lib/dpif.h @@ -57,6 +57,7 @@ void dpif_wait(struct dpif *); const char *dpif_name(const struct dpif *); const char *dpif_base_name(const struct dpif *); +const char *dpif_type(const struct dpif *); int dpif_delete(struct dpif *); -- 1.7.5.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev