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