-int interface_add_address(struct interface *iface, struct device_addr *addr);
-void interface_del_address(struct interface *iface, struct device_addr *addr);
-void interface_del_ctx_addr(struct interface *iface, void *ctx);
+struct device_source_table {
+ struct list_head head;
+ uint32_t table;
+ uint16_t refcount;
+ uint8_t v6;
+ uint8_t mask;
+ union if_addr addr;
+};
+
+struct dns_server {
+ struct vlist_simple_node node;
+ int af;
+ union if_addr addr;
+};
+
+struct dns_search_domain {
+ struct vlist_simple_node node;
+ char name[];
+};
+
+extern const struct uci_blob_param_list route_attr_list;
+extern const struct uci_blob_param_list neighbor_attr_list;
+extern struct list_head prefixes;
+
+void interface_ip_init(struct interface *iface);
+void interface_add_dns_server_list(struct interface_ip_settings *ip, struct blob_attr *list);
+void interface_add_dns_search_list(struct interface_ip_settings *ip, struct blob_attr *list);
+void interface_write_resolv_conf(const char *jail);
+
+void interface_ip_add_route(struct interface *iface, struct blob_attr *attr, bool v6);
+void interface_ip_add_neighbor(struct interface *iface, struct blob_attr *attr, bool v6);
+void interface_ip_update_start(struct interface_ip_settings *ip);
+void interface_ip_update_complete(struct interface_ip_settings *ip);
+void interface_ip_flush(struct interface_ip_settings *ip);
+void interface_ip_set_enabled(struct interface_ip_settings *ip, bool enabled);
+void interface_ip_update_metric(struct interface_ip_settings *ip, int metric);
+
+struct interface *interface_ip_add_target_route(union if_addr *addr, bool v6, struct interface *iface,
+ bool exclude);