7 int system_bridge_addbr(struct device
*bridge
)
9 DPRINTF("brctl addbr %s\n", bridge
->ifname
);
13 int system_bridge_delbr(struct device
*bridge
)
15 DPRINTF("brctl delbr %s\n", bridge
->ifname
);
19 int system_bridge_addif(struct device
*bridge
, struct device
*dev
)
21 DPRINTF("brctl addif %s %s\n", bridge
->ifname
, dev
->ifname
);
25 int system_bridge_delif(struct device
*bridge
, struct device
*dev
)
27 DPRINTF("brctl delif %s %s\n", bridge
->ifname
, dev
->ifname
);
31 int system_vlan_add(struct device
*dev
, int id
)
33 DPRINTF("vconfig add %s %d\n", dev
->ifname
, id
);
37 int system_vlan_del(struct device
*dev
)
39 DPRINTF("vconfig rem %s\n", dev
->ifname
);
43 int system_if_up(struct device
*dev
)
45 DPRINTF("ifconfig %s up\n", dev
->ifname
);
49 int system_if_down(struct device
*dev
)
51 DPRINTF("ifconfig %s down\n", dev
->ifname
);
55 int system_if_check(struct device
*dev
)
59 if (!strcmp(dev
->ifname
, "eth0"))
60 set_device_present(dev
, true);
65 int system_add_address(struct device
*dev
, struct device_addr
*addr
)
67 uint8_t *a
= (uint8_t *) &addr
->addr
.in
;
69 if ((addr
->flags
& DEVADDR_FAMILY
) == DEVADDR_INET4
) {
70 DPRINTF("ifconfig %s add %d.%d.%d.%d/%d\n",
71 dev
->ifname
, a
[0], a
[1], a
[2], a
[3], addr
->mask
);
79 int system_del_address(struct device
*dev
, struct device_addr
*addr
)
81 uint8_t *a
= (uint8_t *) &addr
->addr
.in
;
83 if ((addr
->flags
& DEVADDR_FAMILY
) == DEVADDR_INET4
) {
84 DPRINTF("ifconfig %s del %d.%d.%d.%d\n",
85 dev
->ifname
, a
[0], a
[1], a
[2], a
[3]);