1 #ifndef __INTERFACE_IP_H
2 #define __INTERFACE_IP_H
4 enum device_addr_flags {
5 /* address family for routes and addresses */
6 DEVADDR_INET4 = (0 << 0),
7 DEVADDR_INET6 = (1 << 0),
8 DEVADDR_FAMILY = DEVADDR_INET4 | DEVADDR_INET6,
10 /* device route (no gateway) */
11 DEVADDR_DEVICE = (1 << 1),
13 /* externally added address */
14 DEVADDR_EXTERNAL = (1 << 2),
23 struct vlist_node node;
25 enum device_addr_flags flags;
33 struct vlist_node node;
35 enum device_addr_flags flags;
38 union if_addr nexthop;
39 struct device *device;
47 struct list_head list;
52 struct dns_search_domain {
53 struct list_head list;
57 void interface_ip_init(struct interface *iface);
58 void interface_add_dns_server(struct interface *iface, const char *str);
59 void interface_add_dns_server_list(struct interface *iface, struct blob_attr *list);
60 void interface_clear_dns(struct interface *iface);
61 void interface_write_resolv_conf(void);
63 void interface_ip_update_start(struct interface *iface);
64 void interface_ip_update_complete(struct interface *iface);