X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=interface-ip.h;h=68bfdf647360a4aba319653f2ecc3adf9ec3437a;hp=13cd10cf9dab7eb302de3cdc5c2110d346ee3d35;hb=257bfc6392bf8a1c215f0bd6889db4694a405c1d;hpb=33a44b9c7d5e8c87303b8126fe9e01f8979f48e5 diff --git a/interface-ip.h b/interface-ip.h index 13cd10c..68bfdf6 100644 --- a/interface-ip.h +++ b/interface-ip.h @@ -9,11 +9,11 @@ enum device_addr_flags { DEVADDR_INET6 = (1 << 0), DEVADDR_FAMILY = DEVADDR_INET4 | DEVADDR_INET6, - /* device route (no gateway) */ - DEVADDR_DEVICE = (1 << 1), - /* externally added address */ DEVADDR_EXTERNAL = (1 << 2), + + /* route overrides the default interface metric */ + DEVROUTE_METRIC = (1 << 3) }; union if_addr { @@ -27,7 +27,8 @@ struct device_addr { enum device_addr_flags flags; bool enabled; - struct device *device; + /* ipv4 only */ + uint32_t broadcast; /* must be last */ unsigned int mask; @@ -42,7 +43,6 @@ struct device_route { bool keep; union if_addr nexthop; - struct device *device; int metric; int mtu; @@ -52,16 +52,18 @@ struct device_route { }; struct dns_server { - struct list_head list; + struct vlist_simple_node node; int af; union if_addr addr; }; struct dns_search_domain { - struct list_head list; + struct vlist_simple_node node; char name[]; }; +extern const struct config_param_list route_attr_list; + void interface_ip_init(struct interface_ip_settings *ip, struct interface *iface); void interface_add_dns_server(struct interface_ip_settings *ip, const char *str); void interface_add_dns_server_list(struct interface_ip_settings *ip, struct blob_attr *list);