diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-12-15 11:56:54 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-12-15 11:56:56 +0100 |
commit | e911dd3a798a543d40b93fe8dcb0824bd011c621 (patch) | |
tree | dcd34a7db7c8f54fedeb4a9d1e5f1788df9bef04 | |
parent | 988b5f74dab89f285e3bb59196b4cc880cfa51c7 (diff) |
interface-ip: move struct device_addr below struct device_route
This is needed to embed the subnet route in struct device_addr
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | interface-ip.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/interface-ip.h b/interface-ip.h index c0a3b92..f24b0ec 100644 --- a/interface-ip.h +++ b/interface-ip.h @@ -81,48 +81,48 @@ struct device_prefix { char pclass[]; }; -struct device_addr { +struct device_route { struct vlist_node node; + struct interface *iface; + bool enabled; + bool keep; bool failed; - unsigned int policy_table; - - /* ipv4 only */ - uint32_t broadcast; - uint32_t point_to_point; - /* ipv6 only */ + union if_addr nexthop; + int mtu; + unsigned int type; time_t valid_until; - time_t preferred_until; - char *pclass; /* must be last */ enum device_addr_flags flags; + int metric; // there can be multiple routes to the same target + unsigned int table; unsigned int mask; + unsigned int sourcemask; union if_addr addr; + union if_addr source; }; -struct device_route { +struct device_addr { struct vlist_node node; - struct interface *iface; - bool enabled; - bool keep; bool failed; + unsigned int policy_table; - union if_addr nexthop; - int mtu; - unsigned int type; + /* ipv4 only */ + uint32_t broadcast; + uint32_t point_to_point; + + /* ipv6 only */ time_t valid_until; + time_t preferred_until; + char *pclass; /* must be last */ enum device_addr_flags flags; - int metric; // there can be multiple routes to the same target - unsigned int table; unsigned int mask; - unsigned int sourcemask; union if_addr addr; - union if_addr source; }; struct device_source_table { |