diff options
author | Damjan Marion <damarion@cisco.com> | 2017-12-04 20:03:37 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-12-08 19:33:49 +0000 |
commit | 2df39094d20ae60d2e04316f4ec058f81778cf64 (patch) | |
tree | 94db0b2286ac490bf412e6de117faa7e0eda2d00 /src/vnet/ethernet/ethernet.h | |
parent | 20ec7165007bd38359ea516fe5389e9e828a9d62 (diff) |
tapv2: multiple improvements
- change interface naming scheme
- rework netlink code
- add option to set link address, namespace
Change-Id: Icf667babb3077a07617b0b87c45c957e345cb4d1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/ethernet/ethernet.h')
-rw-r--r-- | src/vnet/ethernet/ethernet.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h index 2a3383a9eaa..9a97817262c 100644 --- a/src/vnet/ethernet/ethernet.h +++ b/src/vnet/ethernet/ethernet.h @@ -61,6 +61,12 @@ ethernet_mac_address_is_multicast_u64 (u64 a) return (a & (1ULL << (5 * 8))) != 0; } +static inline int +ethernet_mac_address_is_zero (u8 * mac) +{ + return ((*((u32 *) mac) == 0) && (*((u16 *) (mac + 4)) == 0)); +} + static_always_inline int ethernet_frame_is_tagged (u16 type) { |