diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-11-26 06:07:11 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-26 23:53:10 (GMT) |
commit | 27c0b1a850cdea6298f573d835782f3337be913c (patch) | |
tree | 447d5db320dfa2d558a73f841c76b04b975e6ee0 /include | |
parent | 618e1b7482f7a8a4c6c6e8ccbe140e4c331df4e9 (diff) | |
download | linux-fsl-qoriq-27c0b1a850cdea6298f573d835782f3337be913c.tar.xz |
macvlan: export macvlan mode through netlink
In order to support all three modes of macvlan at
runtime, extend the existing netlink protocol
to allow choosing the mode per macvlan slave
interface.
This depends on a matching patch to iproute2
in order to become accessible in user land.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_link.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 1d3b242..6674791 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h @@ -181,4 +181,19 @@ struct ifla_vlan_qos_mapping { __u32 to; }; +/* MACVLAN section */ +enum { + IFLA_MACVLAN_UNSPEC, + IFLA_MACVLAN_MODE, + __IFLA_MACVLAN_MAX, +}; + +#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1) + +enum macvlan_mode { + MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */ + MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ + MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ +}; + #endif /* _LINUX_IF_LINK_H */ |