X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=system-dummy.c;h=7e009ba4fc50a6b77efa31fd96b14d9f446fe69d;hp=aadb64fc0b0f4a09727c6c84058704e1d67a7a35;hb=3e22e5b6bddce74aa7b3ca92ff0f089ac9b59ccb;hpb=aa76c9ee78146f97512f96524d3abb94210040a5;ds=sidebyside diff --git a/system-dummy.c b/system-dummy.c index aadb64f..7e009ba 100644 --- a/system-dummy.c +++ b/system-dummy.c @@ -61,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; +}