summaryrefslogtreecommitdiff
path: root/interface.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-23 15:25:39 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-03-23 15:45:28 +0200
commit76d5b041afff56375bb88a18eff33e50acceb1d8 (patch)
treee2b7fe20ab497c4ea971141b3c1b323604a52492 /interface.h
parentb7d1c27b752df3e6c5dfe6a5b789d6cb0c87d0f6 (diff)
downloadnetifd-76d5b041afff56375bb88a18eff33e50acceb1d8.tar.gz
add support for attaching arbitrary state data to interfaces
Diffstat (limited to 'interface.h')
-rw-r--r--interface.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/interface.h b/interface.h
index b2ecd23..5e3f383 100644
--- a/interface.h
+++ b/interface.h
@@ -51,6 +51,11 @@ struct interface_ip_settings {
struct vlist_simple_tree dns_search;
};
+struct interface_data {
+ struct avl_node node;
+ struct blob_attr data[];
+};
+
/*
* interface configuration
*/
@@ -92,6 +97,9 @@ struct interface {
/* errors/warnings while trying to bring up the interface */
struct list_head errors;
+ /* extra data provided by protocol handlers or modules */
+ struct avl_tree data;
+
struct uloop_timeout remove_timer;
struct ubus_object ubus;
};
@@ -123,6 +131,8 @@ int interface_remove_link(struct interface *iface, struct device *dev);
void interface_add_error(struct interface *iface, const char *subsystem,
const char *code, const char **data, int n_data);
+int interface_add_data(struct interface *iface, const struct blob_attr *data);
+
void interface_update_start(struct interface *iface);
void interface_update_complete(struct interface *iface);