X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=system-dummy.c;h=7e009ba4fc50a6b77efa31fd96b14d9f446fe69d;hp=e143d8b1fd01e13244170075b5a168f88db0127c;hb=fd4efb1bbfe5a502a802f43871cfae9944c8d75f;hpb=5d1fff7af6f77c9bf0d46572c7af563cd9fc55b3 diff --git a/system-dummy.c b/system-dummy.c index e143d8b..7e009ba 100644 --- a/system-dummy.c +++ b/system-dummy.c @@ -2,6 +2,7 @@ #include #include "netifd.h" +#include "device.h" int system_bridge_addbr(struct device *bridge) { @@ -60,3 +61,31 @@ int system_if_check(struct device *dev) return 0; } + +int system_add_address(struct device *dev, int family, void *addr, int prefixlen) +{ + uint8_t *a = addr; + + if (family == AF_INET) { + DPRINTF("ifconfig %s add %d.%d.%d.%d/%d\n", + dev->ifname, a[0], a[1], a[2], a[3], prefixlen); + } else { + return -1; + } + + return 0; +} + +int system_del_address(struct device *dev, int family, void *addr) +{ + uint8_t *a = addr; + + if (family == AF_INET) { + DPRINTF("ifconfig %s del %d.%d.%d.%d\n", + dev->ifname, a[0], a[1], a[2], a[3]); + } else { + return -1; + } + + return 0; +}