diff options
author | Arne Kappen <akappen@inet.tu-berlin.de> | 2016-08-18 11:35:29 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-08-26 10:38:50 +0200 |
commit | 8bf5df1d052a853579c0474dabc87af2d113fb53 (patch) | |
tree | cece5a620676a437299aff688a2a6294deda5dd8 /device.h | |
parent | f56a7fbaa6f155c654e7d01b5c4c0594f21239d6 (diff) |
device: add device handler list
Device handlers now also declare if they have bridge capabilities and include
a string to prefix device names for their types.
Signed-off-by: Arne Kappen <akappen@inet.tu-berlin.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup/fixes]
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -19,6 +19,7 @@ #include <netinet/in.h> struct device; +struct device_type; struct device_user; struct device_hotplug_ops; struct interface; @@ -62,6 +63,9 @@ struct device_type { struct list_head list; const char *name; + bool bridge_capability; + const char *name_prefix; + const struct uci_blob_param_list *config_params; struct device *(*create)(const char *name, struct device_type *devtype, @@ -227,6 +231,8 @@ extern struct device_type vlandev_device_type; void device_lock(void); void device_unlock(void); +int device_type_add(struct device_type *devtype); +struct device_type *device_type_get(const char *tname); struct device *device_create(const char *name, struct device_type *type, struct blob_attr *config); void device_init_settings(struct device *dev, struct blob_attr **tb); |