From 7569e53f92cc6c313c8642a8cc53dfacea63382b Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 13 Jul 2010 03:43:06 +0000 Subject: IGMP debug fixes git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2791 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/examples/igmp/igmp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'nuttx/examples') diff --git a/nuttx/examples/igmp/igmp.c b/nuttx/examples/igmp/igmp.c index c341e4c1d..8bca7fa4e 100755 --- a/nuttx/examples/igmp/igmp.c +++ b/nuttx/examples/igmp/igmp.c @@ -55,6 +55,20 @@ * Definitions ****************************************************************************/ +/* Check if the destination address is a multicast address + * + * - IPv4: multicast addresses lie in the class D group -- The address range + * 224.0.0.0 to 239.255.255.255 (224.0.0.0/4) + * + * - IPv6 multicast addresses are have the high-order octet of the + * addresses=0xff (ff00::/8.) + */ + +#if ((CONFIG_EXAMPLE_IGMP_GRPADDR & 0xffff0000) < 0xe0000000ul) || \ + ((CONFIG_EXAMPLE_IGMP_GRPADDR & 0xffff0000) > 0xeffffffful) +# error "Bad range for IGMP group address" +#endif + /**************************************************************************** * Private Data ****************************************************************************/ -- cgit v1.2.3