From 5d1fff7af6f77c9bf0d46572c7af563cd9fc55b3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 19 Feb 2011 15:21:52 +0100 Subject: Initial import --- system-dummy.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 system-dummy.c (limited to 'system-dummy.c') 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 +#include + +#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; +} -- cgit v1.2.3