aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet/packet.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-10-05 12:26:47 +0000
committerDamjan Marion <dmarion@me.com>2020-10-08 06:11:07 +0000
commit21fb4f71ee3824c8f177045f21fea258ece602a9 (patch)
tree8ef415f172df0de141a11169cfbbd87072a0aa54 /src/vnet/ethernet/packet.h
parent27c35e30569c3904e977e7f841b8bc56f16aeb9f (diff)
fib: Register multicast MAC with interface for accepting interfaces
Type: fix Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ic6c76b65e2dcc08916373153944507a297c962c0
Diffstat (limited to 'src/vnet/ethernet/packet.h')
-rw-r--r--src/vnet/ethernet/packet.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/ethernet/packet.h b/src/vnet/ethernet/packet.h
index 13d7dafabfc..e1e42badd06 100644
--- a/src/vnet/ethernet/packet.h
+++ b/src/vnet/ethernet/packet.h
@@ -64,20 +64,20 @@ typedef struct
/* I/G bit: individual (unicast)/group (broadcast/multicast). */
always_inline uword
-ethernet_address_cast (u8 * a)
+ethernet_address_cast (const u8 * a)
{
return (a[0] >> 0) & 1;
}
always_inline int
-ethernet_address_is_broadcast (u8 * a)
+ethernet_address_is_broadcast (const u8 * a)
{
return clib_mem_unaligned (a, u32) == 0xffffffff &&
clib_mem_unaligned (a + 4, u16) == 0xffff;
}
always_inline uword
-ethernet_address_is_locally_administered (u8 * a)
+ethernet_address_is_locally_administered (const u8 * a)
{
return (a[0] >> 1) & 1;
}
@@ -89,7 +89,7 @@ ethernet_address_set_locally_administered (u8 * a)
}
always_inline int
-eh_dst_addr_to_rx_ctype (ethernet_header_t * eh)
+eh_dst_addr_to_rx_ctype (const ethernet_header_t * eh)
{
if (PREDICT_TRUE (ethernet_address_cast (eh->dst_address) ==
ETHERNET_ADDRESS_UNICAST))
@@ -107,7 +107,7 @@ eh_dst_addr_to_rx_ctype (ethernet_header_t * eh)
}
always_inline int
-eh_dst_addr_to_tx_ctype (ethernet_header_t * eh)
+eh_dst_addr_to_tx_ctype (const ethernet_header_t * eh)
{
if (PREDICT_TRUE (ethernet_address_cast (eh->dst_address) ==
ETHERNET_ADDRESS_UNICAST))