diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2010-07-08 03:04:04 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2010-07-08 03:04:04 +0000 |
commit | 5dd13c4a485c97c4eb0d5ae06f8bf000c8dc00bb (patch) | |
tree | 784ff66319cd865b705195c928524cfee4db9fb3 /nuttx/include/net | |
parent | 8eebc02c02583cc2500838c3ab1e4a8e3d30bf7e (diff) |
More IGMP logic
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@2779 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include/net')
-rw-r--r-- | nuttx/include/net/uip/uip-arch.h | 2 | ||||
-rwxr-xr-x | nuttx/include/net/uip/uip-igmp.h | 16 |
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 3184ac0f7c..939c60450d 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 56c6a17b30..4b7db8fc19 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) */ }; |