summaryrefslogtreecommitdiff
path: root/interface.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-07 18:51:55 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-07 18:51:55 +0200
commit2152229c45f470a14dee33507b331ac38055e062 (patch)
treee23c22759d6dfa0edd1300aa77e7a6c283300139 /interface.h
parented1bbf2f3c9933e7088299704d9b6e9dd61f027d (diff)
downloadnetifd-2152229c45f470a14dee33507b331ac38055e062.tar.gz
add support for calls to a hotplug script on interface state changes
Diffstat (limited to 'interface.h')
-rw-r--r--interface.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/interface.h b/interface.h
index 9a9b211..4d53c83 100644
--- a/interface.h
+++ b/interface.h
@@ -8,8 +8,8 @@ struct interface;
struct interface_proto_state;
enum interface_event {
- IFEV_UP,
IFEV_DOWN,
+ IFEV_UP,
};
enum interface_state {
@@ -38,6 +38,8 @@ struct interface_error {
*/
struct interface {
struct vlist_node node;
+ struct list_head hotplug_list;
+ enum interface_event hotplug_ev;
char name[IFNAMSIZ];
const char *ifname;
@@ -91,6 +93,9 @@ void interface_remove_link(struct interface *iface, struct device *llif);
void interface_add_error(struct interface *iface, const char *subsystem,
const char *code, const char **data, int n_data);
+void interface_queue_event(struct interface *iface, enum interface_event ev);
+void interface_dequeue_event(struct interface *iface);
+
void interface_start_pending(void);
#endif