summaryrefslogtreecommitdiffstats
path: root/nuttx/include/net
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2010-07-10 17:02:52 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2010-07-10 17:02:52 +0000
commit9aedb88a827c4d4925c37a9682d5e1c90b9a6de5 (patch)
tree60fc2d19e0d4f1f306ac20f144da5fa493e96e31 /nuttx/include/net
parent85ad871a647eb560ee5f76d9a4c3f345fa3ee37c (diff)
More IGMP logic
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@2781 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include/net')
-rwxr-xr-xnuttx/include/net/uip/uip-igmp.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/nuttx/include/net/uip/uip-igmp.h b/nuttx/include/net/uip/uip-igmp.h
index dd540d9030..00c0173727 100755
--- a/nuttx/include/net/uip/uip-igmp.h
+++ b/nuttx/include/net/uip/uip-igmp.h
@@ -50,6 +50,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include <semaphore.h>
#include <netinet/in.h>
@@ -89,21 +90,25 @@
#define IGMP_LASTREPORT (1 << 1)
#define IGMP_IDLEMEMBER (1 << 2)
#define IGMP_SCHEDMSG (1 << 3)
+#define IGMP_WAITMSG (1 << 4)
#define SET_PREALLOCATED(f) do { (f) |= IGMP_PREALLOCATED; } while (0)
#define SET_LASTREPORT(f) do { (f) |= IGMP_LASTREPORT; } while (0)
#define SET_IDLEMEMBER(f) do { (f) |= IGMP_IDLEMEMBER; } while (0)
-#define SET_SCHEDMSG(f) do { (f) |= IGMP_IDLEMEMBER; } while (0)
+#define SET_SCHEDMSG(f) do { (f) |= IGMP_SCHEDMSG; } while (0)
+#define SET_WAITMSG(f) do { (f) |= IGMP_WAITMSG; } while (0)
#define CLR_PREALLOCATED(f) do { (f) &= ~IGMP_PREALLOCATED; } while (0)
#define CLR_LASTREPORT(f) do { (f) &= ~IGMP_LASTREPORT; } while (0)
-#define CLR_IDLEMEMBER(f) do { (f) &= ~IGMP_LASTREPORT; } while (0)
-#define CLR_SCHEDMSG(f) do { (f) &= ~IGMP_LASTREPORT; } while (0)
+#define CLR_IDLEMEMBER(f) do { (f) &= ~IGMP_IDLEMEMBER; } while (0)
+#define CLR_SCHEDMSG(f) do { (f) &= ~IGMP_SCHEDMSG; } while (0)
+#define CLR_WAITMSG(f) do { (f) &= ~IGMP_WAITMSG; } while (0)
#define IS_PREALLOCATED(f) (((f) & IGMP_PREALLOCATED) != 0)
#define IS_LASTREPORT(f) (((f) & IGMP_LASTREPORT) != 0)
-#define IS_IDLEMEMBER(f) (((f) & IGMP_LASTREPORT) != 0)
-#define IS_SCHEDMSG(f) (((f) & IGMP_LASTREPORT) != 0)
+#define IS_IDLEMEMBER(f) (((f) & IGMP_IDLEMEMBER) != 0)
+#define IS_SCHEDMSG(f) (((f) & IGMP_SCHEDMSG) != 0)
+#define IS_WAITMSG(f) (((f) & IGMP_WAITMSG) != 0)
#define IGMP_TTL 1
@@ -175,6 +180,7 @@ struct uip_igmp_stats_s
uint32_t chksum_errors;
uint32_t v1_received;
uint32_t joins;
+ uint32_t leaves;
uint32_t leave_sched;
uint32_t report_sched;
uint32_t poll_send;
@@ -202,7 +208,8 @@ 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 */
- uint8_t flags; /* See IGMP_ flags definitions */
+ sem_t sem; /* Used to wait for message transmission */
+ volatile uint8_t flags; /* See IGMP_ flags definitions */
uint8_t msgid; /* Pending message ID (if non-zero) */
};