summaryrefslogtreecommitdiff
path: root/nuttx/examples/igmp/igmp.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-07-13 03:43:06 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-07-13 03:43:06 +0000
commit7569e53f92cc6c313c8642a8cc53dfacea63382b (patch)
tree50917f724a6a70b33050502c1b4bc395528fd460 /nuttx/examples/igmp/igmp.c
parent35a4b3030e7548e6aace209ef8e92a5e2b495d1e (diff)
downloadpx4-nuttx-7569e53f92cc6c313c8642a8cc53dfacea63382b.tar.gz
px4-nuttx-7569e53f92cc6c313c8642a8cc53dfacea63382b.tar.bz2
px4-nuttx-7569e53f92cc6c313c8642a8cc53dfacea63382b.zip
IGMP debug fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2791 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/igmp/igmp.c')
-rwxr-xr-xnuttx/examples/igmp/igmp.c14
1 files changed, 14 insertions, 0 deletions
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
****************************************************************************/