12 int interface_add_address(struct interface *iface, struct interface_addr *addr)
16 if (addr->flags & IFADDR_INET6)
21 list_add(&addr->list, &iface->address);
22 return system_add_address(iface->l3_iface->dev, family, &addr->addr.in, addr->mask);
25 void interface_del_address(struct interface *iface, struct interface_addr *addr)
29 if (addr->flags & IFADDR_INET6)
34 list_del(&addr->list);
35 system_del_address(iface->l3_iface->dev, family, &addr->addr.in);
38 void interface_del_ctx_addr(struct interface *iface, void *ctx)
40 struct interface_addr *addr, *tmp;
42 list_for_each_entry_safe(addr, tmp, &iface->address, list) {
46 interface_del_address(iface, addr);