summaryrefslogtreecommitdiff
path: root/interface.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-02 22:18:39 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-02 22:18:39 +0200
commitb9f116ece5ca85c38105a8e33f0d9cc818a05694 (patch)
treeac3bfc3c6dfef72ba6490c92b087b8ac1bcdcd83 /interface.h
parent3c024e7b3170bd2d3869a404b08bc20345bc6f81 (diff)
downloadnetifd-b9f116ece5ca85c38105a8e33f0d9cc818a05694.tar.gz
add some code for properly tearing down, reloading and removing interfaces
Diffstat (limited to 'interface.h')
-rw-r--r--interface.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/interface.h b/interface.h
index 1e8ef44..9a9b211 100644
--- a/interface.h
+++ b/interface.h
@@ -19,6 +19,12 @@ enum interface_state {
IFS_DOWN,
};
+enum interface_config_state {
+ IFC_NORMAL,
+ IFC_RELOAD,
+ IFC_REMOVE
+};
+
struct interface_error {
struct list_head list;
@@ -34,11 +40,14 @@ struct interface {
struct vlist_node node;
char name[IFNAMSIZ];
+ const char *ifname;
bool available;
bool autostart;
+ bool config_autostart;
enum interface_state state;
+ enum interface_config_state config_state;
/* main interface that the interface is bound to */
struct device_user main_dev;
@@ -58,9 +67,11 @@ struct interface {
/* errors/warnings while trying to bring up the interface */
struct list_head errors;
+ struct uloop_timeout remove_timer;
struct ubus_object ubus;
};
+extern struct vlist_tree interfaces;
extern const struct config_param_list interface_attr_list;
void interface_init(struct interface *iface, const char *name,