summaryrefslogtreecommitdiffhomepage
path: root/device.h
diff options
context:
space:
mode:
authorArne Kappen <akappen@inet.tu-berlin.de>2016-08-18 11:35:29 +0200
committerFelix Fietkau <nbd@nbd.name>2016-08-26 10:38:50 +0200
commit8bf5df1d052a853579c0474dabc87af2d113fb53 (patch)
treecece5a620676a437299aff688a2a6294deda5dd8 /device.h
parentf56a7fbaa6f155c654e7d01b5c4c0594f21239d6 (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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/device.h b/device.h
index d28ec70..ef8d9a8 100644
--- a/device.h
+++ b/device.h
@@ -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);