This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: DHCP patch...
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Robert Chenault <robertchenault at yahoo dot com>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Tue, 9 Mar 2004 09:01:47 +0100
- Subject: Re: DHCP patch...
- References: <20040228000823.7866.qmail@web60510.mail.yahoo.com>
On Fri, Feb 27, 2004 at 04:08:23PM -0800, Robert Chenault wrote:
> Please know I tried to make the patch file cleaner, but was unable to
> ignore white-space differences. My only additions were to make an h
> file (net.h) accessible, and add the CYGHWR_NET_DHCP_MIN_RETRY_TIME cdl
> option. The cdl entry contains a description. Thank you and please let
> me know if I can answer any questions.
Thanks.
Here is what i committed.
Andrew
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/ChangeLog,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- ChangeLog 19 Feb 2004 10:42:00 -0000 1.55
+++ ChangeLog 9 Mar 2004 08:00:12 -0000 1.56
@@ -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
Index: cdl/net.cdl
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/cdl/net.cdl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- cdl/net.cdl 24 Nov 2003 14:09:25 -0000 1.13
+++ cdl/net.cdl 9 Mar 2004 08:00:12 -0000 1.14
@@ -313,6 +313,28 @@
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 {
Index: src/dhcp_prot.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/src/dhcp_prot.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- src/dhcp_prot.c 19 Feb 2004 10:42:00 -0000 1.14
+++ src/dhcp_prot.c 9 Mar 2004 08:00:12 -0000 1.15
@@ -407,7 +407,8 @@
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;
}
// ------------------------------------------------------------------------