+/* events broadcasted to all users of a device */
+enum device_event {
+ DEV_EVENT_ADD,
+ DEV_EVENT_REMOVE,
+
+ DEV_EVENT_UPDATE_IFNAME,
+ DEV_EVENT_UPDATE_IFINDEX,
+
+ DEV_EVENT_SETUP,
+ DEV_EVENT_TEARDOWN,
+ DEV_EVENT_UP,
+ DEV_EVENT_DOWN,
+
+ DEV_EVENT_LINK_UP,
+ DEV_EVENT_LINK_DOWN,
+
+ /* Topology changed (i.e. bridge member added) */
+ DEV_EVENT_TOPO_CHANGE,
+
+ __DEV_EVENT_MAX
+};
+
+/*
+ * device dependency with callbacks
+ */
+struct device_user {
+ struct safe_list list;
+
+ bool claimed;
+ bool hotplug;
+ bool alias;
+
+ uint8_t ev_idx[__DEV_EVENT_MAX];
+
+ struct device *dev;
+ void (*cb)(struct device_user *, enum device_event);
+};
+
+struct device_settings {
+ unsigned int flags;
+ unsigned int mtu;
+ 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;
+};
+
+/*