netifd: Add old style vlan devices to device list
[project/netifd.git] / device.h
index cddb340..3001f10 100644 (file)
--- a/device.h
+++ b/device.h
 struct device;
 struct device_user;
 struct device_hotplug_ops;
+struct interface;
 
 typedef int (*device_state_cb)(struct device *, bool up);
 
 enum {
        DEV_ATTR_TYPE,
-       DEV_ATTR_IFNAME,
        DEV_ATTR_MTU,
        DEV_ATTR_MACADDR,
        DEV_ATTR_TXQUEUELEN,
@@ -38,6 +38,8 @@ enum {
        DEV_ATTR_IGMPVERSION,
        DEV_ATTR_MLDVERSION,
        DEV_ATTR_NEIGHREACHABLETIME,
+       DEV_ATTR_RPS,
+       DEV_ATTR_XPS,
        __DEV_ATTR_MAX,
 };
 
@@ -76,6 +78,8 @@ enum {
        DEV_OPT_IGMPVERSION             = (1 << 7),
        DEV_OPT_MLDVERSION              = (1 << 8),
        DEV_OPT_NEIGHREACHABLETIME      = (1 << 9),
+       DEV_OPT_RPS                     = (1 << 10),
+       DEV_OPT_XPS                     = (1 << 11),
 };
 
 /* events broadcasted to all users of a device */
@@ -129,6 +133,8 @@ struct device_settings {
        unsigned int mldversion;
        unsigned int neigh4reachabletime;
        unsigned int neigh6reachabletime;
+       bool rps;
+       bool xps;
 };
 
 /*
@@ -158,9 +164,12 @@ struct device {
        bool hidden;
 
        bool current_config;
+       bool iface_config;
        bool default_config;
        bool wireless;
 
+       struct interface *config_iface;
+
        /* set interface up or down */
        device_state_cb set_state;
 
@@ -199,6 +208,7 @@ device_apply_config(struct device *dev, const struct device_type *type,
 
 void device_reset_config(void);
 void device_reset_old(void);
+void device_set_default_ps(bool state);
 
 void device_init_virtual(struct device *dev, const struct device_type *type, const char *name);
 int device_init(struct device *iface, const struct device_type *type, const char *ifname);