X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetdev-provider.h;h=eb62cc18b8f24135f365db6f2785c7cb71f513d8;hb=7103dec49eb569c3196239da6c178a29c3003e2b;hp=5ec14d73694cdeb722eeddcb25170f4fe24d9f40;hpb=4c0f178060b740faac9a5aec915a24dc3b61770c;p=openvswitch diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 5ec14d73..eb62cc18 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.