mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-06 18:41:30 +00:00
patch #6463 (IGMP - Adding Random Delay): added define LWIP_RAND() for lwip-wide randomization (to be defined in cc.h)
This commit is contained in:
parent
aa7dd9a8ad
commit
d85a18752f
@ -19,6 +19,10 @@ HISTORY
|
|||||||
|
|
||||||
++ New features:
|
++ New features:
|
||||||
|
|
||||||
|
2010-01-10: Simon Goldschmidt
|
||||||
|
* init.c, igmp.c: patch #6463 (IGMP - Adding Random Delay): added define
|
||||||
|
LWIP_RAND() for lwip-wide randomization (to be defined in cc.h)
|
||||||
|
|
||||||
2009-12-31: Simon Goldschmidt
|
2009-12-31: Simon Goldschmidt
|
||||||
* tcpip.c, init.c, memp.c, sys.c, memp_std.h, sys.h, tcpip.h
|
* tcpip.c, init.c, memp.c, sys.c, memp_std.h, sys.h, tcpip.h
|
||||||
added timers.c/.h: Separated timer implementation from semaphore/mbox
|
added timers.c/.h: Separated timer implementation from semaphore/mbox
|
||||||
|
@ -145,7 +145,7 @@
|
|||||||
#error "One and exactly one of LWIP_EVENT_API and LWIP_CALLBACK_API has to be enabled in your lwipopts.h"
|
#error "One and exactly one of LWIP_EVENT_API and LWIP_CALLBACK_API has to be enabled in your lwipopts.h"
|
||||||
#endif
|
#endif
|
||||||
/* There must be sufficient timeouts, taking into account requirements of the subsystems. */
|
/* There must be sufficient timeouts, taking into account requirements of the subsystems. */
|
||||||
#if ((NO_SYS==0) && (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT)))
|
#if (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT))
|
||||||
#error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts"
|
#error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts"
|
||||||
#endif
|
#endif
|
||||||
#if (IP_REASSEMBLY && (MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS))
|
#if (IP_REASSEMBLY && (MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS))
|
||||||
@ -172,6 +172,9 @@
|
|||||||
#if !LWIP_ETHERNET && (LWIP_ARP || PPPOE_SUPPORT)
|
#if !LWIP_ETHERNET && (LWIP_ARP || PPPOE_SUPPORT)
|
||||||
#error "LWIP_ETHERNET needs to be turned on for LWIP_ARP or PPPOE_SUPPORT"
|
#error "LWIP_ETHERNET needs to be turned on for LWIP_ARP or PPPOE_SUPPORT"
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef LWIP_RAND
|
||||||
|
#error "LWIP_RAND() needs to be defined to a random-function returning an u32_t random value"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Compile-time checks for deprecated options.
|
/* Compile-time checks for deprecated options.
|
||||||
|
@ -641,10 +641,7 @@ igmp_timeout(struct igmp_group *group)
|
|||||||
void
|
void
|
||||||
igmp_start_timer(struct igmp_group *group, u8_t max_time)
|
igmp_start_timer(struct igmp_group *group, u8_t max_time)
|
||||||
{
|
{
|
||||||
/**
|
group->timer = LWIP_RAND() % max_time;
|
||||||
* @todo Important !! this should be random 0 -> max_time. Find out how to do this
|
|
||||||
*/
|
|
||||||
group->timer = max_time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user