Clean up IGMP naming

This commit is contained in:
Gregory Nutt
2014-06-25 09:52:36 -06:00
parent 92d3075ae0
commit f57024406a
29 changed files with 340 additions and 160 deletions
+14 -13
View File
@@ -53,6 +53,7 @@
#include <nuttx/net/igmp.h>
#include "uip/uip.h"
#include "igmp/igmp.h"
#ifdef CONFIG_NET_IGMP
@@ -99,7 +100,7 @@
****************************************************************************/
/****************************************************************************
* Name: uip_igmptimeout
* Name: igmp_timeout
*
* Description:
* Timeout watchdog handler.
@@ -110,7 +111,7 @@
*
****************************************************************************/
static void uip_igmptimeout(int argc, uint32_t arg, ...)
static void igmp_timeout(int argc, uint32_t arg, ...)
{
FAR struct igmp_group_s *group;
@@ -134,7 +135,7 @@ static void uip_igmptimeout(int argc, uint32_t arg, ...)
*/
IGMP_STATINCR(uip_stat.igmp.report_sched);
uip_igmpschedmsg(group, IGMPv2_MEMBERSHIP_REPORT);
igmp_schedmsg(group, IGMPv2_MEMBERSHIP_REPORT);
/* Also note: The Membership Report is sent at most two times becasue
* the timer is not reset here. Hmm.. does this mean that the group
@@ -151,7 +152,7 @@ static void uip_igmptimeout(int argc, uint32_t arg, ...)
****************************************************************************/
/****************************************************************************
* Name: uip_igmpstarttimer
* Name: igmp_starttimer
*
* Description:
* Start the IGMP timer.
@@ -161,7 +162,7 @@ static void uip_igmptimeout(int argc, uint32_t arg, ...)
*
****************************************************************************/
int uip_decisec2tick(int decisecs)
int igmp_decisec2tick(int decisecs)
{
/* Convert the deci-second comparison value to clock ticks. The CLK_TCK
* value is the number of clock ticks per second; decisecs argument is the
@@ -173,7 +174,7 @@ int uip_decisec2tick(int decisecs)
}
/****************************************************************************
* Name: uip_igmpstartticks and uip_igmpstarttimer
* Name: igmp_startticks and igmp_starttimer
*
* Description:
* Start the IGMP timer with differing time units (ticks or deciseconds).
@@ -183,7 +184,7 @@ int uip_decisec2tick(int decisecs)
*
****************************************************************************/
void uip_igmpstartticks(FAR struct igmp_group_s *group, int ticks)
void igmp_startticks(FAR struct igmp_group_s *group, int ticks)
{
int ret;
@@ -191,24 +192,24 @@ void uip_igmpstartticks(FAR struct igmp_group_s *group, int ticks)
gtmrlldbg("ticks: %d\n", ticks);
ret = wd_start(group->wdog, ticks, uip_igmptimeout, 1, (uint32_t)group);
ret = wd_start(group->wdog, ticks, igmp_timeout, 1, (uint32_t)group);
DEBUGASSERT(ret == OK);
UNUSED(ret);
}
void uip_igmpstarttimer(FAR struct igmp_group_s *group, uint8_t decisecs)
void igmp_starttimer(FAR struct igmp_group_s *group, uint8_t decisecs)
{
/* Convert the decisec value to system clock ticks and start the timer.
* Important!! this should be a random timer from 0 to decisecs
*/
gtmrdbg("decisecs: %d\n", decisecs);
uip_igmpstartticks(group, uip_decisec2tick(decisecs));
igmp_startticks(group, igmp_decisec2tick(decisecs));
}
/****************************************************************************
* Name: uip_igmpcmptimer
* Name: igmp_cmptimer
*
* Description:
* Compare the timer remaining on the watching timer to the deci-second
@@ -217,11 +218,11 @@ void uip_igmpstarttimer(FAR struct igmp_group_s *group, uint8_t decisecs)
*
* Assumptions:
* This function may be called from most any context. If true is returned
* then the caller must call uip_igmpstartticks() to restart the timer
* then the caller must call igmp_startticks() to restart the timer
*
****************************************************************************/
bool uip_igmpcmptimer(FAR struct igmp_group_s *group, int maxticks)
bool igmp_cmptimer(FAR struct igmp_group_s *group, int maxticks)
{
uip_lock_t flags;
int remaining;