+/* Iterates over all of 'netdev''s queues, calling 'cb' with the queue's ID,
+ * its statistics, and the 'aux' specified by the caller. The order of
+ * iteration is unspecified, but (when successful) each queue is visited
+ * exactly once.
+ *
+ * Calling this function may be more efficient than calling
+ * netdev_get_queue_stats() for every queue.
+ *
+ * 'cb' must not modify or free the statistics passed in.
+ *
+ * Returns 0 if successful, otherwise a positive errno value. On error, some
+ * configured queues may not have been included in the iteration. */
+int
+netdev_dump_queue_stats(const struct netdev *netdev,
+ netdev_dump_queue_stats_cb *cb, void *aux)
+{
+ const struct netdev_class *class = netdev_get_dev(netdev)->netdev_class;
+ return (class->dump_queue_stats
+ ? class->dump_queue_stats(netdev, cb, aux)
+ : EOPNOTSUPP);
+}
+
+/* Returns a sequence number which indicates changes in one of 'netdev''s
+ * properties. The returned sequence will be nonzero so that callers have a
+ * value which they may use as a reset when tracking 'netdev'.
+ *
+ * The returned sequence number will change whenever 'netdev''s flags,
+ * features, ethernet address, or carrier changes. It may change for other
+ * reasons as well, or no reason at all. */
+unsigned int
+netdev_change_seq(const struct netdev *netdev)
+{
+ return netdev_get_dev(netdev)->netdev_class->change_seq(netdev);
+}
+\f
+/* Initializes 'netdev_dev' as a netdev device named 'name' of the specified
+ * 'netdev_class'. This function is ordinarily called from a netdev provider's
+ * 'create' function.
+ *
+ * This function adds 'netdev_dev' to a netdev-owned shash, so it is
+ * very important that 'netdev_dev' only be freed after calling
+ * the refcount drops to zero. */
+void
+netdev_dev_init(struct netdev_dev *netdev_dev, const char *name,
+ const struct netdev_class *netdev_class)