diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-02-19 15:21:52 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-03-27 01:42:33 +0100 |
commit | 5d1fff7af6f77c9bf0d46572c7af563cd9fc55b3 (patch) | |
tree | 76d080e6b59f9235cd47b0e047f662c1f0a6ce00 /system-dummy.c |
Initial import
Diffstat (limited to 'system-dummy.c')
-rw-r--r-- | system-dummy.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/system-dummy.c b/system-dummy.c new file mode 100644 index 0000000..e143d8b --- /dev/null +++ b/system-dummy.c @@ -0,0 +1,62 @@ +#include <stdio.h> +#include <string.h> + +#include "netifd.h" + +int system_bridge_addbr(struct device *bridge) +{ + DPRINTF("brctl addbr %s\n", bridge->ifname); + return 0; +} + +int system_bridge_delbr(struct device *bridge) +{ + DPRINTF("brctl delbr %s\n", bridge->ifname); + return 0; +} + +int system_bridge_addif(struct device *bridge, struct device *dev) +{ + DPRINTF("brctl addif %s %s\n", bridge->ifname, dev->ifname); + return 0; +} + +int system_bridge_delif(struct device *bridge, struct device *dev) +{ + DPRINTF("brctl delif %s %s\n", bridge->ifname, dev->ifname); + return 0; +} + +int system_vlan_add(struct device *dev, int id) +{ + DPRINTF("vconfig add %s %d\n", dev->ifname, id); + return 0; +} + +int system_vlan_del(struct device *dev) +{ + DPRINTF("vconfig rem %s\n", dev->ifname); + return 0; +} + +int system_if_up(struct device *dev) +{ + DPRINTF("ifconfig %s up\n", dev->ifname); + return 0; +} + +int system_if_down(struct device *dev) +{ + DPRINTF("ifconfig %s down\n", dev->ifname); + return 0; +} + +int system_if_check(struct device *dev) +{ + dev->ifindex = 0; + + if (!strcmp(dev->ifname, "eth0")) + set_device_present(dev, true); + + return 0; +} |