X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=interface-ip.h;h=bbef62ceb305f5f82ba8c1ffa2591ba39a92b3bb;hp=7c4a8aeacf3b506f66e2570237bf72fb2ce8777d;hb=418f63b98f8cc9a4316f7dce4889400afd6ca3aa;hpb=0b0e5e2fc5b065092644a5c4717c0a03a9098dcf diff --git a/interface-ip.h b/interface-ip.h index 7c4a8ae..bbef62c 100644 --- a/interface-ip.h +++ b/interface-ip.h @@ -81,47 +81,50 @@ struct device_prefix { char pclass[]; }; -struct device_addr { +struct device_route { struct vlist_node node; + struct interface *iface; + bool enabled; + bool keep; bool failed; - /* 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; + struct device_route subnet; + + /* 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 {