Mercurial > ecos
changeset 1531:cbea1375c6da
* cdl/net.cdl:
* src/dhcp_prot.c: Added CYGNUM_NET_DHCP_MIN_RETRY_TIME
| author | asl |
|---|---|
| date | Tue, 09 Mar 2004 08:00:12 +0000 |
| parents | 5d84d6804721 |
| children | d1185a575d2f |
| files | packages/net/common/current/ChangeLog packages/net/common/current/cdl/net.cdl packages/net/common/current/src/dhcp_prot.c |
| diffstat | 3 files changed, 29 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/common/current/ChangeLog +++ b/packages/net/common/current/ChangeLog @@ -1,3 +1,8 @@ +2004-02-27 Robert Chenault <robertchenault@yahoo.com> + + * cdl/net.cdl: + * src/dhcp_prot.c: Added CYGNUM_NET_DHCP_MIN_RETRY_TIME + 2004-02-17 Matt Jerdonek <maj1224@yahoo.com> * src/dhcp_prot.c: Fix initialization of DHCP sec field
--- a/packages/net/common/current/cdl/net.cdl +++ b/packages/net/common/current/cdl/net.cdl @@ -313,6 +313,28 @@ cdl_package CYGPKG_NET { This option adds the TAG_DHCP_CLIENTID option to the DHCP/BOOTP requests. It uses the interface MAC address for the identifier." } + + cdl_option CYGNUM_NET_DHCP_MIN_RETRY_TIME { + display "DHCP minimum retry time" + flavor data + legal_values 0 to 100 + default_value 100 + description " + This option allows the application to specify the + minimum number of seconds for DHCP discovery. If DHCP + discovery fails, the action to be taken is application + specific. Multiple discovery attempts are made during + the time specified with each subsequent attempt having + a longer timeout. Attempts begin at approximately 1, 5, + 15, 35, and 65 seconds with the last attempt timing out + after the total of 125 seconds. A new attempt will not + begin if the minimum time has been reached. Although, + an attempt in progress will run past the minimum time + specified. For example: Specifying 30 seconds would + timeout at 35 seconds. Specifying 70 seconds has the + same effect as specifying 100 seconds where it would + run for the total of 125 seconds." + } } cdl_component CYGPKG_NET_IPV6_ROUTING {
--- a/packages/net/common/current/src/dhcp_prot.c +++ b/packages/net/common/current/src/dhcp_prot.c @@ -407,7 +407,8 @@ static inline int next_timeout( struct t pstate->countdown = 2; // later fast retries ptv->tv_sec = 0; } - return pstate->secs < 100; // If longer, too many tries... + // If longer, too many tries... + return pstate->secs < CYGNUM_NET_DHCP_MIN_RETRY_TIME; } // ------------------------------------------------------------------------
