vlandev: support bridge-vlan aliases in the vid config parameter
[project/netifd.git] / device.h
index b25d2675e2fab26e83c209c8808d4f81e36685cb..b2b18ab0cfa63c4069c4b495d33a29f5169e8bfb 100644 (file)
--- a/device.h
+++ b/device.h
@@ -16,6 +16,7 @@
 
 #include <libubox/avl.h>
 #include <libubox/safe_list.h>
+#include <libubox/kvlist.h>
 #include <netinet/in.h>
 
 struct device;
@@ -186,6 +187,7 @@ struct device {
        struct safe_list aliases;
 
        struct vlist_tree vlans;
+       struct kvlist vlan_aliases;
 
        char ifname[IFNAMSIZ + 1];
        int ifindex;
@@ -226,8 +228,8 @@ struct device {
 };
 
 struct device_hotplug_ops {
-       int (*prepare)(struct device *dev);
-       int (*add)(struct device *main, struct device *member);
+       int (*prepare)(struct device *dev, struct device **bridge_dev);
+       int (*add)(struct device *main, struct device *member, struct blob_attr *vlan);
        int (*del)(struct device *main, struct device *member);
 };
 
@@ -248,6 +250,8 @@ struct bridge_vlan {
        struct bridge_vlan_port *ports;
        int n_ports;
 
+       struct list_head hotplug_ports;
+
        uint16_t vid;
        bool local;
 };