interface: warn if ip6hint is truncated
[project/netifd.git] / system-dummy.c
index 11c8cccb0c53ed21d8e9b054d439d9fefebab929..58fd2d07937fc38d936c8b4c748108f85e95e88a 100644 (file)
@@ -181,6 +181,26 @@ static int system_route_msg(struct device *dev, struct device_route *route, cons
        return 0;
 }
 
+static int system_neighbor_msg(struct device *dev, struct device_neighbor *neighbor, const char *type)
+{
+       char addr[64];
+       int af = system_get_addr_family(neighbor->flags);
+       inet_ntop(af, &neighbor->addr.in , addr, sizeof(addr));
+
+       D(SYSTEM, "neigh %s %s%s%s %s\n", type, addr, neighbor->proxy ? "proxy " : "",
+               (neighbor->flags & DEVNEIGH_MAC) ? format_macaddr(neighbor->macaddr) : "",
+               neighbor->router ? "router": "");
+}
+int system_add_neighbor(struct device *dev, struct device_neighbor *neighbor)
+{
+       return system_neighbor_msg(dev, neighbor, "add");
+}
+
+int system_del_neighbor(struct device *dev, struct device_neighbor *neighbor)
+{
+       return system_neighbor_msg(dev, neighbor, "del");
+}
+
 int system_add_route(struct device *dev, struct device_route *route)
 {
        return system_route_msg(dev, route, "add");