bridge: make learning and unicast-flood configurable per bridge port
[project/netifd.git] / device.h
index 37814c8..4a88c05 100644 (file)
--- a/device.h
+++ b/device.h
@@ -44,6 +44,9 @@ enum {
        DEV_ATTR_DADTRANSMITS,
        DEV_ATTR_MULTICAST_TO_UNICAST,
        DEV_ATTR_MULTICAST_ROUTER,
+       DEV_ATTR_MULTICAST,
+       DEV_ATTR_LEARNING,
+       DEV_ATTR_UNICAST_FLOOD,
        __DEV_ATTR_MAX,
 };
 
@@ -58,8 +61,6 @@ struct device_type {
        struct list_head list;
        const char *name;
 
-       bool keep_link_status;
-
        const struct uci_blob_param_list *config_params;
 
        struct device *(*create)(const char *name, struct blob_attr *attr);
@@ -88,6 +89,9 @@ enum {
        DEV_OPT_DADTRANSMITS            = (1 << 13),
        DEV_OPT_MULTICAST_TO_UNICAST    = (1 << 14),
        DEV_OPT_MULTICAST_ROUTER        = (1 << 15),
+       DEV_OPT_MULTICAST               = (1 << 16),
+       DEV_OPT_LEARNING                = (1 << 17),
+       DEV_OPT_UNICAST_FLOOD           = (1 << 18),
 };
 
 /* events broadcasted to all users of a device */
@@ -130,6 +134,7 @@ struct device_user {
 
 struct device_settings {
        unsigned int flags;
+       unsigned int valid_flags;
        unsigned int mtu;
        unsigned int mtu6;
        unsigned int txqueuelen;
@@ -147,6 +152,9 @@ struct device_settings {
        unsigned int dadtransmits;
        bool multicast_to_unicast;
        unsigned int multicast_router;
+       bool multicast;
+       bool learning;
+       bool unicast_flood;
 };
 
 /*