X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetdev-provider.h;h=7bb4eac8386322ed95aeda2fb4e0e39a2c38bd62;hb=264ecd63860eaf705669edac1bdc7292d8da0843;hp=67690143ccad7dc015514bfde8678ba180411f26;hpb=943e5afe0b450fc665a4a162fe1bacafd34d18e8;p=openvswitch diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 67690143..7bb4eac8 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -52,6 +52,8 @@ const char *netdev_dev_get_name(const struct netdev_dev *); struct netdev_dev *netdev_dev_from_name(const char *name); void netdev_dev_get_devices(const struct netdev_class *, struct shash *device_list); +bool netdev_dev_args_equal(const struct netdev_dev *netdev_dev, + const struct shash *args); static inline void netdev_dev_assert_class(const struct netdev_dev *netdev_dev, const struct netdev_class *class_) @@ -135,6 +137,15 @@ struct netdev_class { */ int (*set_config)(struct netdev_dev *netdev_dev, const struct shash *args); + /* Returns true if 'args' is equivalent to the "args" field in + * 'netdev_dev', otherwise false. + * + * If no special processing needs to be done beyond a simple + * shash comparison, this may be a null pointer. + */ + bool (*config_equal)(const struct netdev_dev *netdev_dev, + const struct shash *args); + /* Attempts to open a network device. On success, sets 'netdevp' * to the new network device. *