X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=interface-ip.h;h=23782ad686d535ee046a8c974f4e911eff0d01ee;hp=92667278096da88f4c8f41b4ea03f807c89a0307;hb=5d4ed8a855022394bc002c42f42b1656c2cba06f;hpb=69b2dcb92b8402b9c6df4d6a041a890fe6468e18 diff --git a/interface-ip.h b/interface-ip.h index 9266727..23782ad 100644 --- a/interface-ip.h +++ b/interface-ip.h @@ -3,12 +3,15 @@ enum device_addr_flags { /* address family for routes and addresses */ - DEVADDR_INET4 = (0 << 0), - DEVADDR_INET6 = (1 << 0), - DEVADDR_FAMILY = DEVADDR_INET4 | DEVADDR_INET6, + DEVADDR_INET4 = (0 << 0), + DEVADDR_INET6 = (1 << 0), + DEVADDR_FAMILY = DEVADDR_INET4 | DEVADDR_INET6, /* device route (no gateway) */ - DEVADDR_DEVICE = (1 << 1), + DEVADDR_DEVICE = (1 << 1), + + /* externally added address */ + DEVADDR_EXTERNAL = (1 << 2), }; union if_addr { @@ -21,6 +24,7 @@ struct device_addr { enum device_addr_flags flags; + /* must be last */ unsigned int mask; union if_addr addr; }; @@ -31,11 +35,27 @@ struct device_route { enum device_addr_flags flags; bool keep; + union if_addr nexthop; + struct device *device; + + /* must be last */ unsigned int mask; union if_addr addr; - union if_addr nexthop; +}; + +struct dns_server { + struct list_head list; + int af; + union if_addr addr; +}; + +struct dns_search_domain { + struct list_head list; + char name[]; }; void interface_ip_init(struct interface *iface); +void interface_clear_dns(struct interface *iface); +void interface_write_resolv_conf(void); #endif