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),
20 struct list_head list;
23 enum device_addr_flags flags;
30 struct list_head list;
33 enum device_addr_flags flags;
38 union if_addr nexthop;
41 int interface_add_address(struct interface *iface, struct device_addr *addr);
42 void interface_del_address(struct interface *iface, struct device_addr *addr);
43 void interface_del_ctx_addr(struct interface *iface, void *ctx);
45 int interface_add_route(struct interface *iface, struct device_route *route);
46 void interface_del_route(struct interface *iface, struct device_route *route);
47 void interface_del_all_routes(struct interface *iface);