X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev-provider.h;h=1442367db76f6ef6bd2cc8489b9c206766ebc362;hb=2c57a420432de88b8a6f9ee54642c3841577ad7b;hp=910ff589552ddd33e3278030ec59b371af06d785;hpb=275707c33f8f5463154bc3e2f561181a2060ab57;p=sliver-openvswitch.git diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 910ff5895..1442367db 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -19,8 +19,6 @@ /* Generic interface to network devices. */ -#include - #include "netdev.h" #include "list.h" #include "shash.h" @@ -55,7 +53,7 @@ void netdev_dev_get_devices(const struct netdev_class *, static inline void netdev_dev_assert_class(const struct netdev_dev *netdev_dev, const struct netdev_class *class_) { - assert(netdev_dev->netdev_class == class_); + ovs_assert(netdev_dev->netdev_class == class_); } /* A instance of an open network device. @@ -139,6 +137,13 @@ struct netdev_class { * pointer. */ int (*set_config)(struct netdev_dev *netdev_dev, const struct smap *args); + /* Returns the tunnel configuration of 'netdev_dev'. If 'netdev_dev' is + * not a tunnel, returns null. + * + * If this function would always return null, it may be null instead. */ + const struct netdev_tunnel_config * + (*get_tunnel_config)(const struct netdev_dev *netdev_dev); + /* Attempts to open a network device. On success, sets 'netdevp' * to the new network device. */ int (*open)(struct netdev_dev *netdev_dev, struct netdev **netdevp); @@ -600,6 +605,9 @@ extern const struct netdev_class netdev_tap_class; extern const struct netdev_class netdev_bsd_class; #endif +extern const struct netdev_class netdev_tunnel_class; +extern const struct netdev_class netdev_pltap_class; + #ifdef __cplusplus } #endif