rework includes
[project/netifd.git] / system-dummy.c
1 #include <stdio.h>
2 #include <string.h>
3
4 #include "netifd.h"
5 #include "device.h"
6
7 int system_bridge_addbr(struct device *bridge)
8 {
9 DPRINTF("brctl addbr %s\n", bridge->ifname);
10 return 0;
11 }
12
13 int system_bridge_delbr(struct device *bridge)
14 {
15 DPRINTF("brctl delbr %s\n", bridge->ifname);
16 return 0;
17 }
18
19 int system_bridge_addif(struct device *bridge, struct device *dev)
20 {
21 DPRINTF("brctl addif %s %s\n", bridge->ifname, dev->ifname);
22 return 0;
23 }
24
25 int system_bridge_delif(struct device *bridge, struct device *dev)
26 {
27 DPRINTF("brctl delif %s %s\n", bridge->ifname, dev->ifname);
28 return 0;
29 }
30
31 int system_vlan_add(struct device *dev, int id)
32 {
33 DPRINTF("vconfig add %s %d\n", dev->ifname, id);
34 return 0;
35 }
36
37 int system_vlan_del(struct device *dev)
38 {
39 DPRINTF("vconfig rem %s\n", dev->ifname);
40 return 0;
41 }
42
43 int system_if_up(struct device *dev)
44 {
45 DPRINTF("ifconfig %s up\n", dev->ifname);
46 return 0;
47 }
48
49 int system_if_down(struct device *dev)
50 {
51 DPRINTF("ifconfig %s down\n", dev->ifname);
52 return 0;
53 }
54
55 int system_if_check(struct device *dev)
56 {
57 dev->ifindex = 0;
58
59 if (!strcmp(dev->ifname, "eth0"))
60 set_device_present(dev, true);
61
62 return 0;
63 }