X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetdev-provider.h;h=a6c0fd894c88526eda7f7978bfd2e2d498751f99;hb=987ae961590b56f1526a17d3bb15c38fd5e9caf9;hp=4148c6cfda96732465de3f921ab0a28581a2cf5d;hpb=149f577a25508779b756515be1f1bdcefa3710fa;p=openvswitch diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 4148c6cf..a6c0fd89 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -25,6 +25,11 @@ #include "list.h" #include "shash.h" +struct arg { + char *key; + char *value; +}; + /* A network device (e.g. an Ethernet device). * * This structure should be treated as opaque by network device @@ -34,7 +39,8 @@ struct netdev_dev { const struct netdev_class *class; /* Functions to control this device. */ int ref_cnt; /* Times this devices was opened. */ struct shash_node *node; /* Pointer to element in global map. */ - uint32_t args_hash; /* Hash of arguments for the device. */ + struct arg *args; /* Argument list from last config. */ + int n_args; /* Number of arguments in 'args'. */ }; void netdev_dev_init(struct netdev_dev *, const char *name, @@ -42,6 +48,9 @@ void netdev_dev_init(struct netdev_dev *, const char *name, void netdev_dev_uninit(struct netdev_dev *, bool destroy); const char *netdev_dev_get_type(const struct netdev_dev *); 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); static inline void netdev_dev_assert_class(const struct netdev_dev *netdev_dev, const struct netdev_class *class)