+struct device_settings {
+ unsigned int flags;
+ unsigned int mtu;
+ unsigned int txqueuelen;
+ uint8_t macaddr[6];
+};
+
+/*
+ * link layer device. typically represents a linux network device.
+ * can be used to support VLANs as well
+ */
+struct device {
+ const struct device_type *type;
+
+ struct avl_node avl;
+ struct list_head users;
+ struct list_head aliases;
+
+ char ifname[IFNAMSIZ + 1];
+ int ifindex;
+
+ struct blob_attr *config;
+ bool config_pending;
+ bool sys_present;
+ bool present;
+ int active;
+
+ bool external;
+ bool disabled;
+ bool deferred;
+ bool hidden;
+
+ bool current_config;
+ bool default_config;
+
+ /* set interface up or down */
+ device_state_cb set_state;
+
+ const struct device_hotplug_ops *hotplug_ops;
+
+ struct device_user parent;
+
+ struct device_settings orig_settings;
+ struct device_settings settings;
+};
+