X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev-provider.h;h=024b1fb7572b1176787611fbd959958216b69cd6;hb=2158888d8d8f3b4c00dcf979390a19fa7fcf7942;hp=927e441a29e3b7a78d847a9afb9337c6bacc0fa3;hpb=3fe8053b36da715c411b907ac125e41f9e9a28f2;p=sliver-openvswitch.git diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 927e441a2..024b1fb75 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -269,6 +269,14 @@ struct netdev_class { * (UINT64_MAX). */ int (*get_stats)(const struct netdev *netdev, struct netdev_stats *); + /* Sets the device stats for 'netdev' to 'stats'. + * + * Most network devices won't support this feature and will set this + * function pointer to NULL, which is equivalent to returning EOPNOTSUPP. + * + * Some network devices might only allow setting their stats to 0. */ + int (*set_stats)(struct netdev *netdev, const struct netdev_stats *); + /* Stores the features supported by 'netdev' into each of '*current', * '*advertised', '*supported', and '*peer'. Each value is a bitmap of * "enum ofp_port_features" bits, in host byte order. @@ -391,9 +399,8 @@ struct netdev_class { extern const struct netdev_class netdev_linux_class; extern const struct netdev_class netdev_tap_class; -extern const struct netdev_class netdev_gre_class; extern const struct netdev_class netdev_patch_class; -extern const struct netdev_class netdev_grenew_class; +extern const struct netdev_class netdev_gre_class; #ifdef __cplusplus }