aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip4_packet.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-04-02 15:02:16 +0000
committerOle Trøan <otroan@employees.org>2020-04-14 09:40:48 +0000
commitd724e4f43b1d143a3f35492bce72fdc3e8af553e (patch)
treeb458929e250006e18a7e0615a573e68b6e1a8178 /src/vnet/ip/ip4_packet.h
parentdc3e9664858df680accca7324299b633bf60397d (diff)
urpf: Unicast reverse Path Forwarding (plugin)
Type: feature - move the IP4 code to plugin - add ip6 support - add suport for uRPF on TX - add tests Change-Id: I074c2debc486d3e79c12fad4b8dbd72c41e841a0 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip4_packet.h')
-rw-r--r--src/vnet/ip/ip4_packet.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/ip/ip4_packet.h b/src/vnet/ip/ip4_packet.h
index 3872ccdd465..362805c8529 100644
--- a/src/vnet/ip/ip4_packet.h
+++ b/src/vnet/ip/ip4_packet.h
@@ -384,6 +384,12 @@ ip4_address_is_multicast (const ip4_address_t * a)
return (a->data[0] & 0xf0) == 0xe0;
}
+always_inline uword
+ip4_address_is_global_broadcast (const ip4_address_t * a)
+{
+ return (a->as_u32) == 0xffffffff;
+}
+
always_inline void
ip4_multicast_address_set_for_group (ip4_address_t * a,
ip_multicast_group_t g)