summaryrefslogtreecommitdiff
path: root/nuttx/include/net
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-07-08 03:04:04 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-07-08 03:04:04 +0000
commita69ce203b81d4903167141ee1c60a643b10fcce4 (patch)
tree784ff66319cd865b705195c928524cfee4db9fb3 /nuttx/include/net
parentce7156b6079b4fb0a639f12919a88897c6fddac1 (diff)
downloadpx4-nuttx-a69ce203b81d4903167141ee1c60a643b10fcce4.tar.gz
px4-nuttx-a69ce203b81d4903167141ee1c60a643b10fcce4.tar.bz2
px4-nuttx-a69ce203b81d4903167141ee1c60a643b10fcce4.zip
More IGMP logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2779 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/net')
-rw-r--r--nuttx/include/net/uip/uip-arch.h2
-rwxr-xr-xnuttx/include/net/uip/uip-igmp.h16
2 files changed, 16 insertions, 2 deletions
diff --git a/nuttx/include/net/uip/uip-arch.h b/nuttx/include/net/uip/uip-arch.h
index 3184ac0f7..939c60450 100644
--- a/nuttx/include/net/uip/uip-arch.h
+++ b/nuttx/include/net/uip/uip-arch.h
@@ -176,7 +176,7 @@ struct uip_driver_s
/* IGMP group list */
#ifdef CONFIG_NET_IGMP
- FAR struct igmp_group_s *grplist;
+ sq_queue_t grplist;
#endif
/* Driver callbacks */
diff --git a/nuttx/include/net/uip/uip-igmp.h b/nuttx/include/net/uip/uip-igmp.h
index 56c6a17b3..4b7db8fc1 100755
--- a/nuttx/include/net/uip/uip-igmp.h
+++ b/nuttx/include/net/uip/uip-igmp.h
@@ -90,6 +90,20 @@
#define IGMP_DELAYING_MEMBER 1
#define IGMP_IDLE_MEMBER 2
+/* Group flags */
+
+#define IGMP_PREALLOCATED 1
+#define IGMP_LASTREPORT 2
+
+#define SET_PREALLOCATED(f) do { (f) |= IGMP_PREALLOCATED; } while (0)
+#define SET_LASTREPORT(f) do { (f) |= IGMP_LASTREPORT; } while (0)
+
+#define CLR_PREALLOCATED(f) do { (f) &= ~IGMP_PREALLOCATED; } while (0)
+#define CLR_LASTREPORT(f) do { (f) &= ~IGMP_LASTREPORT; } while (0)
+
+#define IS_PREALLOCATED(f) (((f) & IGMP_PREALLOCATED) != 0)
+#define IS_LASTREPORT(f) (((f) & IGMP_LASTREPORT) != 0)
+
/****************************************************************************
* Public Types
****************************************************************************/
@@ -174,7 +188,7 @@ struct igmp_group_s
struct igmp_group_s *next; /* Implements a singly-linked list */
uip_ipaddr_t grpaddr; /* Group IP address */
WDOG_ID wdog; /* WDOG used to detect timeouts */
- bool lastrpt; /* Indicates the last to report */
+ uint8_t flags; /* See IGMP_ flags definitions */
uint8_t state; /* State of the group */
uint8_t msgid; /* Pending message ID (if non-zero) */
};