diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2014-02-11 08:30:20 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-02-27 12:15:24 +0100 |
commit | 3d26347d0042313be3c9347f8d82c4ccea67fe68 (patch) | |
tree | a0afcc0ec93e1cac9b4a905d76dfac884e9e6e25 /device.h | |
parent | 4d09244bc73a3b8bc8168366526e4ddded41057e (diff) |
netifd: Link layer state awareness support on device level
Device layer is informed by netlink events regarding the link layer status. Link
layer status change results in a DEV_EVENT_LINK_UP/DEV_EVENT_LINK_DOWN broadcast
event for a given device.
Depends on uloop error callback patch.
Solves issue reported in https://dev.openwrt.org/ticket/14590
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Acked-by: Karl Vogel <karl.vogel@gmail.com>
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -68,6 +68,7 @@ enum device_event { DEV_EVENT_REMOVE, DEV_EVENT_UPDATE_IFNAME, + DEV_EVENT_UPDATE_IFINDEX, DEV_EVENT_SETUP, DEV_EVENT_TEARDOWN, @@ -122,6 +123,7 @@ struct device { bool sys_present; bool present; int active; + bool link_active; bool external; bool disabled; @@ -178,6 +180,8 @@ void device_remove_user(struct device_user *dep); void device_broadcast_event(struct device *dev, enum device_event ev); void device_set_present(struct device *dev, bool state); +void device_set_link(struct device *dev, bool state); +void device_set_ifindex(struct device *dev, int ifindex); void device_refresh_present(struct device *dev); int device_claim(struct device_user *dep); void device_release(struct device_user *dep); |