diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-07-10 17:02:52 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-07-10 17:02:52 +0000 |
commit | c4680a4704fd377f4c89e0b8f6149f3aec8b39fb (patch) | |
tree | 60fc2d19e0d4f1f306ac20f144da5fa493e96e31 /nuttx/include | |
parent | a87d861c4e0a60e1dc163f58c1b51eec13ababf3 (diff) | |
download | px4-nuttx-c4680a4704fd377f4c89e0b8f6149f3aec8b39fb.tar.gz px4-nuttx-c4680a4704fd377f4c89e0b8f6149f3aec8b39fb.tar.bz2 px4-nuttx-c4680a4704fd377f4c89e0b8f6149f3aec8b39fb.zip |
More IGMP logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2781 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rwxr-xr-x | nuttx/include/net/uip/uip-igmp.h | 19 |
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 dd540d903..00c017372 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) */ }; |