remove a bogus return statement
[project/netifd.git] / system.h
1 #ifndef __NETIFD_SYSTEM_H
2 #define __NETIFD_SYSTEM_H
3
4 #include <sys/socket.h>
5 #include "device.h"
6 #include "interface-ip.h"
7
8 enum bridge_opt {
9         /* stp and forward delay always set */
10         BRIDGE_OPT_AGEING_TIME = (1 << 0),
11         BRIDGE_OPT_HELLO_TIME  = (1 << 1),
12         BRIDGE_OPT_MAX_AGE     = (1 << 2),
13 };
14
15 struct bridge_config {
16         enum bridge_opt flags;
17         bool stp;
18         int forward_delay;
19
20         int ageing_time;
21         int hello_time;
22         int max_age;
23 };
24
25 int system_init(void);
26
27 int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg);
28 int system_bridge_delbr(struct device *bridge);
29 int system_bridge_addif(struct device *bridge, struct device *dev);
30 int system_bridge_delif(struct device *bridge, struct device *dev);
31
32 int system_vlan_add(struct device *dev, int id);
33 int system_vlan_del(struct device *dev);
34
35 void system_if_clear_state(struct device *dev);
36 int system_if_up(struct device *dev);
37 int system_if_down(struct device *dev);
38 int system_if_check(struct device *dev);
39
40 int system_add_address(struct device *dev, struct device_addr *addr);
41 int system_del_address(struct device *dev, struct device_addr *addr);
42
43 int system_add_route(struct device *dev, struct device_route *route);
44 int system_del_route(struct device *dev, struct device_route *route);
45
46 #endif