summaryrefslogtreecommitdiffhomepage
path: root/system.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-10-03 16:50:51 +0200
committerFelix Fietkau <nbd@openwrt.org>2013-10-03 16:51:05 +0200
commit5dd87fd8ad3a42c71d90a8fecc893af973e552bf (patch)
treee0255fd31ccfa52e96df6c6f9ca2a02d3b7d4702 /system.h
parent9585227f1141d9da5a3186df5e10c4521e65083e (diff)
device: add macvlan support
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'system.h')
-rw-r--r--system.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/system.h b/system.h
index e50201a..ad74156 100644
--- a/system.h
+++ b/system.h
@@ -54,6 +54,17 @@ struct bridge_config {
int max_age;
};
+enum macvlan_opt {
+ MACVLAN_OPT_MACADDR = (1 << 0),
+};
+
+struct macvlan_config {
+ const char *mode;
+
+ enum macvlan_opt flags;
+ unsigned char macaddr[6];
+};
+
static inline int system_get_addr_family(unsigned int flags)
{
if ((flags & DEVADDR_FAMILY) == DEVADDR_INET6)
@@ -77,6 +88,9 @@ int system_bridge_delbr(struct device *bridge);
int system_bridge_addif(struct device *bridge, struct device *dev);
int system_bridge_delif(struct device *bridge, struct device *dev);
+int system_macvlan_add(struct device *macvlan, struct device *dev, struct macvlan_config *cfg);
+int system_macvlan_del(struct device *macvlan);
+
int system_vlan_add(struct device *dev, int id);
int system_vlan_del(struct device *dev);