[ovs-dev] [PATCH 03/18] packet: Add function ip_is_local_multicast()
Flavio Leitner
fbl at redhat.com
Fri Apr 11 21:34:08 UTC 2014
RFC4541- IGMP and MLD Snooping Switches Considerations
recommends to have different actions for local and
non-local multicast traffic.
Acked-by: Daniel Borkmann <dborkman at redhat.com>
Signed-off-by: Thomas Graf <tgraf at redhat.com>
Signed-off-by: Flavio Leitner <fbl at redhat.com>
---
lib/packets.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/packets.h b/lib/packets.h
index 675dcc4..07695f6 100644
--- a/lib/packets.h
+++ b/lib/packets.h
@@ -444,6 +444,11 @@ ip_is_multicast(ovs_be32 ip)
{
return (ip & htonl(0xf0000000)) == htonl(0xe0000000);
}
+static inline bool
+ip_is_local_multicast(ovs_be32 ip)
+{
+ return (ip & htonl(0xffffff00)) == htonl(0xe0000000);
+}
int ip_count_cidr_bits(ovs_be32 netmask);
void ip_format_masked(ovs_be32 ip, ovs_be32 mask, struct ds *);
--
1.9.0
More information about the dev
mailing list