+struct device_settings {
+ unsigned int flags;
+ unsigned int valid_flags;
+ unsigned int mtu;
+ unsigned int mtu6;
+ unsigned int txqueuelen;
+ uint8_t macaddr[6];
+ bool ipv6;
+ bool promisc;
+ unsigned int rpfilter;
+ bool acceptlocal;
+ unsigned int igmpversion;
+ unsigned int mldversion;
+ unsigned int neigh4reachabletime;
+ unsigned int neigh6reachabletime;
+ bool rps;
+ bool xps;
+ unsigned int dadtransmits;
+ bool multicast_to_unicast;
+ unsigned int multicast_router;
+};
+
+/*
+ * 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 safe_list users;
+ struct safe_list aliases;
+
+ char ifname[IFNAMSIZ + 1];
+ int ifindex;
+
+ struct blob_attr *config;
+ bool config_pending;
+ bool sys_present;
+ /* DEV_EVENT_ADD */
+ bool present;
+ /* DEV_EVENT_UP */
+ int active;
+ /* DEV_EVENT_LINK_UP */
+ bool link_active;
+
+ bool external;
+ bool disabled;
+ bool deferred;
+ bool hidden;
+
+ bool current_config;
+ bool iface_config;
+ bool default_config;
+ bool wireless;
+ bool wireless_ap;
+ bool wireless_isolate;
+
+ struct interface *config_iface;
+
+ /* 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;
+};
+