This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
DHCP patch...
- From: Robert Chenault <robertchenault at yahoo dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Fri, 27 Feb 2004 16:08:23 -0800 (PST)
- Subject: DHCP patch...
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.
Code on,
Robert Chenault
PS - I'll be on vacation next week 3/1 - 3/5.
=====
...STAND FOR SOMETHING, OR YOU'LL FALL FOR EVERYTHING...
? dhcpmintimepatch.txt
Index: net/common/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/ChangeLog,v
retrieving revision 1.55
diff -u -r1.55 ChangeLog
--- net/common/current/ChangeLog 19 Feb 2004 10:42:00 -0000 1.55
+++ net/common/current/ChangeLog 27 Feb 2004 22:45:33 -0000
@@ -1,3 +1,7 @@
+2004-02-27 Robert Chenault <robertchenault@yahoo.com>
+
+ * src/dhcp_prot.c: Added CYGHWR_NET_DHCP_MIN_RETRY_TIME
+
2004-02-17 Matt Jerdonek <maj1224@yahoo.com>
* src/dhcp_prot.c: Fix initialization of DHCP sec field
@@ -7,21 +11,21 @@
* src/inet_ntoa.c: Add thread safe inet_ntoa_r() and change
inet_ntoa() to use it. Inspired by Matt Jerdonek.
- * include/net/netdb.h:
+ * include/net/netdb.h:
* include/arpa/inet.h: Prototype for inet_ntoa_r()
2003-11-25 Manu Sharma <manu.sharma@ascom.com>
* tests/bridge.c: Changes to enable Spanning Tree Protocol if the
corresponding CDL component is enabled.
-
+
2003-11-24 Jani Monoses <jani@iv.ro>
* cdl/net.cdl: Close quote for test list.
-
+
2003-11-22 Andrew Lunn <andrew.lunn@ascom.ch>
- * cdl/net.cdl: Added control for IPSEC
+ * cdl/net.cdl: Added control for IPSEC
* doc/ipsec.sgml: General documentation of ipsec.
2003-10-30 Gary Thomas <gary@mlbassoc.com>
@@ -30,19 +34,19 @@
2003-10-16 Jay Foster <jay@systech.com>
Andrew Lunn <andrew.lunn@ascom.ch>
-
+
* doc/tcpip.sgml: Added documentation for
- CYGOPT_NET_DHCP_OPTION_HOST_NAME,
+ CYGOPT_NET_DHCP_OPTION_HOST_NAME,
CYGNUM_NET_DHCP_OPTION_HOST_NAME_LEN,
CYGOPT_NET_DHCP_OPTION_DHCP_CLIENTID_MAC,
CYGOPT_NET_DHCP_PARM_REQ_LIST_REPLACE and
CYGOPT_NET_DHCP_PARM_REQ_LIST_ADDITIONAL.
- * cdl/net.cdl: Added legal_values definition for the
+ * cdl/net.cdl: Added legal_values definition for the
CYGNUM_NET_DHCP_OPTION_HOST_NAME_LEN option.
-
+
2003-10-21 Andrew Lunn <andrew.lunn@ascom.ch>
- * src/dhcp_prot.c (set_default_dhcp_tags):
+ * src/dhcp_prot.c (set_default_dhcp_tags):
* src/bootp_support.c (show_bootp): Added support for TAG_NTP_SERVER
2003-10-13 Jay Foster <jay@systech.com>
@@ -51,11 +55,11 @@
* src/dhcp_prot.c (set_default_dhcp_tags): Added TAG_HOST_NAME and
TAG_DHCP_CLIENTID DHCP/BOOTP option support.
* cdl/net.cdl: Added host name (CYGOPT_NET_DHCP_OPTION_HOST_NAME) and
- MAC address client ID (CYGOPT_NET_DHCP_OPTION_DHCP_CLIENTID_MAC)
+ MAC address client ID (CYGOPT_NET_DHCP_OPTION_DHCP_CLIENTID_MAC)
support.
2003-10-12 Jay Foster <jay@systech.com>
-
+
* cdl/net.cdl: Added configuration interface for
CYGOPT_NET_DHCP_PARM_REQ_LIST_REPLACE and
CYGOPT_NET_DHCP_PARM_REQ_LIST_ADDITIONAL.
@@ -65,23 +69,23 @@
* src/tftp_client.c: Changed the code so that if a packet is
received out of sequence we don't close the connection but wait
for the missing packets.
-
+
2003-10-06 Andrew Lunn <andrew.lunn@ascom.ch>
* tests/bridge.c: Build the test when we have the bridge
handler code enabled and so presumably a bridge.
2003-09-16 Jay Foster <jay@systech.com>
-
+
* src/ifaddrs.c (getifaddrs): Fix up allocation and freeing of
work buffers and data buffers.
-
+
2003-07-29 Motoya Kurotsu <kurotsu@allied-telesis.co.jp>
* src/dhcp_prot.c (do_dhcp): (re)Initialize the lease when
dhcp is (re)initialized or retried.
- Return true when the state falls into DHCPSTATE_NOTBOUND so that it
- knows the interface it still up and can later bring it down when
+ Return true when the state falls into DHCPSTATE_NOTBOUND so that it
+ knows the interface it still up and can later bring it down when
cleaning up.
2003-07-25 Andrew Lunn <andrew.lunn@ascom.ch>
@@ -100,11 +104,11 @@
file included later needs this.
2003-05-23 Andrew Lunn <andrew.lunn@ascom.ch>
-
+
* src/network_support.c (init_all_network_interfaces): Allow IPv4
or IPv6 addresses to be used when configuring a default DNS
server.
-
+
2003-05-21 Andrew Lunn <andrew.lunn@ascom.ch>
* src/getaddrinfo.c (getaddrinfo): Corrected a bad patch merge
@@ -113,7 +117,7 @@
2003-05-19 Michael Checky <Michael_Checky@ThermoKing.com>
Andrew Lunn <andrew.lunn@ascom.ch>
-
+
* src/getaddrinfo.c: Changed '#ifdef CYGPKG_NS_DNS' to
'#ifdef CYGPKG_NS_DNS_BUILD', so it would compile if this CDL
option is not selected. Changed the call to 'numeric_node_addr'
@@ -129,7 +133,7 @@
* src/ifaddrs.c (getifaddrs): Fill in flags, netmask and broadcast
addresses, for both IPv4 and IPv6 and enabled.
* src/ipv6_routing_thread.c (ipv6_start_routing_thread): Only
- start the thread once.
+ start the thread once.
2003-04-26 Andrew Lunn <andrew.lunn@ascom.ch>
@@ -149,12 +153,12 @@
2003-04-24 Andrew Lunn <andrew.lunn@ascom.ch>
- * src/tftp_client.c (tftp_client_put): Fixed compiler warning.
+ * src/tftp_client.c (tftp_client_put): Fixed compiler warning.
2003-04-21 Andrew Lunn <andrew.lunn@ascom.ch>
* src/getaddrinfo.c (getnameinfo): Fixed some endian issues with
- port numbers and a typo. Added an interface to the DNS client for
+ port numbers and a typo. Added an interface to the DNS client for
reverse lookups.
* tests/addr_test.c (net_test): Added tests for getnameinfo. Fixed
some memory leaks.
@@ -166,7 +170,7 @@
2003-04-14 Andrew Lunn <andrew.lunn@ascom.ch>
- * include/net/netdb.h: const correctness.
+ * include/net/netdb.h: const correctness.
2003-04-12 Andrew Lunn <andrew.lunn@ascom.ch>
@@ -175,7 +179,7 @@
* src/tftp_server.c (tftpd_server): Added support for IPv6 as well
as IPv4. Extended the multithreading support so that it works
- correctly when there are multiple servers on multiple ports.
+ correctly when there are multiple servers on multiple ports.
* doc/tcpip.sgml: Documentation for the changes made to the tftp
server.
@@ -211,7 +215,7 @@
independent.
* tests/tftp_client_test.c (tftp_test): Added tests which use IPv6
addresses.
-
+
2003-04-07 Andrew Lunn <andrew.lunn@ascom.ch>
* src/getaddrinfo.c (getaddrinfo): Correctly deal with node when
@@ -234,12 +238,12 @@
function to return the address of the router.
* include/network.h: Added prototype for above and
ipv6_start_routing_thread which did not have a prototype.
- * src/ipv6_routing_thread.c (cyg_rs): Only wait 2 seconds before
- sending the first solicit request rather than 10.
+ * src/ipv6_routing_thread.c (cyg_rs): Only wait 2 seconds before
+ sending the first solicit request rather than 10.
* src/dhcp_prot.c (do_dhcp_down_net): clear the if_laddrreq
- before using it. If the request fails finish the IPv4 code rather
+ before using it. If the request fails finish the IPv4 code rather
than returning,.
-
+
2003-04-02 Andrew Lunn <andrew.lunn@ascom.ch>
* tests/ping_lo_test.c: Added IPv6 ping test.
@@ -263,7 +267,7 @@
* cdl/net.cdl: Reinstated dhcp_test2 into list of tests: it was
accidentally removed in the 2003-03-14 checkin.
-
+
2003-03-20 Mark Salter <msalter@redhat.com>
* cdl/net.cdl (CYGHWR_NET_DRIVERS): Removed to io/eth.
@@ -272,11 +276,11 @@
* src/tftp_client.c: Reduce size of initial request packet
for compatibility with some tftp servers.
-
+
2003-03-14 Nick Garnett <nickg@balti.calivar.com>
* cdl/net.cdl: Added CYGDBG_NET_SHOW_MBUFS option to turn on
- accumulation and display of mbuf state information.
+ accumulation and display of mbuf state information.
2003-03-06 Gary Thomas <gary@mlbassoc.com>
@@ -322,7 +326,7 @@
* src/network_support.c (init_all_network_interfaces): Added
support for a hard coded domain name. Inspired by Motoya Kurotsu.
-
+
2003-01-09 Andrew Lunn <andrew.lunn@ascom.ch>
* src/network_support.c (init_all_network_interfaces): Added
@@ -350,7 +354,7 @@
the header file lib/libkern/libkern.h
2002-08-16 Gary Thomas <gthomas@ecoscentric.com> (on behalf of)
-2002-08-16 Louis Hamilton <hamilton@redhat.com>
+2002-08-16 Louis Hamilton <hamilton@redhat.com>
* src/ipv6_routing_thread.c: General improvements (from Red Hat)
for better compliance.
@@ -361,25 +365,25 @@
2002-08-07 Gary Thomas <gary@chez-thomas.org>
- * src/tftp_server.c:
- * src/tftp_client.c:
+ * src/tftp_server.c:
+ * src/tftp_client.c:
* include/arpa/tftp.h: Make block numbers unsigned to handle files
larger than 16MB.
2002-07-26 Gary Thomas <gary@chez-thomas.org>
2002-07-26 Ken Cox <jkc@redhat.com>
- * src/dhcp_prot.c: The IPv6 link local address would not be
- recognized if configured to use dhcp. When dhcp reconfigures
- the interface after obtaining it's info, it needs to delete
- the IPv6 link local address (as well as the IPv4) address before
+ * src/dhcp_prot.c: The IPv6 link local address would not be
+ recognized if configured to use dhcp. When dhcp reconfigures
+ the interface after obtaining it's info, it needs to delete
+ the IPv6 link local address (as well as the IPv4) address before
reconfiguring.
2002-07-10 Gary Thomas <gary@chez-thomas.org>
- * src/inet_addr.c:
- * src/getproto.c:
- * src/dhcp_prot.c:
+ * src/inet_addr.c:
+ * src/getproto.c:
+ * src/dhcp_prot.c:
* src/bootp_support.c: Pedantic - make sure "errno" is defined.
2002-07-04 Jonathan Larmour <jlarmour@redhat.com>
@@ -418,7 +422,7 @@
* src/dhcp_prot.c (do_dhcp): Suppress my_ip and server_ip fields
in all messages where they should not be set. Also be more careful
about size of messages as they are copied.
-
+
2002-05-24 Gary Thomas <gthomas@redhat.com>
* src/dhcp_prot.c (do_dhcp): Suppress my_ip and server_ip fields
@@ -446,25 +450,25 @@
2002-04-17 Gary Thomas <gthomas@redhat.com>
- * src/ipv6_routing_thread.c: New function - separate thread used to
+ * src/ipv6_routing_thread.c: New function - separate thread used to
send router soliciation messages periodically.
* cdl/net.cdl:
- * src/network_support.c (init_all_network_interfaces):
+ * src/network_support.c (init_all_network_interfaces):
Support IPv6 routing thread.
* src/getaddrinfo.c (_getaddr): Set ai_addrlen fields.
2002-04-11 Gary Thomas <gthomas@redhat.com>
- * tests/ga_server_test.c:
- * tests/nc6_test_slave.c: Fix handling of multiple sockets.
+ * tests/ga_server_test.c:
+ * tests/nc6_test_slave.c: Fix handling of multiple sockets.
2002-04-05 Gary Thomas <gthomas@redhat.com>
* tests/ga_server_test.c: Use getnameinfo().
- * include/net/netdb.h:
+ * include/net/netdb.h:
* src/getaddrinfo.c (getnameinfo): New [minimal] implementation.
2002-04-04 Gary Thomas <gthomas@redhat.com>
@@ -476,8 +480,8 @@
* tests/make.linux: Add slave tests.
- * tests/nc_test_framework.h:
- * tests/nc6_test_master.c:
+ * tests/nc_test_framework.h:
+ * tests/nc6_test_master.c:
* tests/nc6_test_slave.c: Fixing build problems on Linux & FreeBSD.
* include/machine/types.h: Added [empty to keep OpenBSD stack happy].
@@ -507,11 +511,11 @@
2002-03-20 Gary Thomas <gthomas@redhat.com>
- * tests/tcp_source.c:
+ * tests/tcp_source.c:
* tests/tcp_sink.c: Fix build problems on Linux (no sin_len).
- * tests/make.linux:
- * tests/nc6_test_slave.c:
+ * tests/make.linux:
+ * tests/nc6_test_slave.c:
* tests/nc6_test_master.c: New tests using getaddrinfo() which
can test both IPv4 and IPv6 environments.
@@ -519,12 +523,12 @@
* tests/addr_test.c: New test of getaddrinfo() functionality.
- * src/inet_ntop.c (_inet_port):
+ * src/inet_ntop.c (_inet_port):
* src/getaddrinfo.c (_getaddr): Fix some byte-order problems.
* src/network_support.c: Fix build when PCMCIA defined.
- * src/bootp_support.c (do_bootp):
+ * src/bootp_support.c (do_bootp):
* include/network.h: route_reinit renamed cyg_route_reinit.
* include/bootp.h: Clean up warnings (add prototypes, etc).
@@ -562,11 +566,11 @@
* src/inet_pton.c: Minor source code cleanups.
- * src/inet_ntop.c (_inet_ntop): Add [non-standard] functions
+ * src/inet_ntop.c (_inet_ntop): Add [non-standard] functions
which make it easier for code to be generic in the handling
of network addresses (struct sockaddr).
- * include/net/netdb.h:
+ * include/net/netdb.h:
* include/network.h: Reorg - network address functions are now
all in <net/netdb.h>
@@ -604,7 +608,7 @@
2002-02-18 Gary Thomas <gthomas@redhat.com>
- * cdl/net.cdl:
+ * cdl/net.cdl:
Add new interface CYGINT_IO_ETH_MULTICAST which is used to
insure that drivers support multicast addresses if IPv6 is used.
@@ -616,8 +620,8 @@
2002-02-16 Gary Thomas <gthomas@redhat.com>
- * src/inet_pton.c:
- New file - parse from presentation (ASCII) to network.
+ * src/inet_pton.c:
+ New file - parse from presentation (ASCII) to network.
Useful for handling IPv6 addresses.
2002-02-15 Gary Thomas <gthomas@redhat.com>
@@ -638,21 +642,21 @@
2002-02-01 Gary Thomas <gthomas@redhat.com>
- * tests/udp_lo_test.c (server):
- * tests/tcp_source.c (source_test):
- * tests/tcp_sink.c (sink_test):
- * tests/tcp_lo_test.c (server):
- * tests/tcp_lo_select.c (server):
- * tests/ping_test.c (ping_test):
- * tests/ping_lo_test.c (ping_test_loopback):
- * tests/nc_test_slave.c (do_udp_test):
- * tests/multi_lo_select.c (dummy):
- * tests/ftp_test.c (ftp_test):
- * tests/flood.c (net_test):
- * tests/dhcp_test.c (ping_test):
- * src/tftp_server.c (tftpd_write_file):
- * src/tftp_client.c (tftp_get):
- * src/network_support.c (init_loopback_interface):
+ * tests/udp_lo_test.c (server):
+ * tests/tcp_source.c (source_test):
+ * tests/tcp_sink.c (sink_test):
+ * tests/tcp_lo_test.c (server):
+ * tests/tcp_lo_select.c (server):
+ * tests/ping_test.c (ping_test):
+ * tests/ping_lo_test.c (ping_test_loopback):
+ * tests/nc_test_slave.c (do_udp_test):
+ * tests/multi_lo_select.c (dummy):
+ * tests/ftp_test.c (ftp_test):
+ * tests/flood.c (net_test):
+ * tests/dhcp_test.c (ping_test):
+ * src/tftp_server.c (tftpd_write_file):
+ * src/tftp_client.c (tftp_get):
+ * src/network_support.c (init_loopback_interface):
* src/dhcp_prot.c (bring_half_up): Need valid value for sin_len.
2002-01-31 Hugo Tyson <hmt@redhat.com>
@@ -694,55 +698,55 @@
2002-01-28 Gary Thomas <gthomas@redhat.com>
- * tests/udp_lo_test.c:
- * tests/tftp_server_test.c:
- * tests/tftp_client_test.c:
- * tests/tcp_source.c:
- * tests/tcp_sink.c:
- * tests/tcp_lo_test.c:
- * tests/tcp_lo_select.c:
- * tests/tcp_echo.c:
- * tests/socket_test.c:
- * tests/set_mac_address.c:
- * tests/server_test.c:
- * tests/ping_test.c:
- * tests/ping_lo_test.c:
- * tests/nc_test_slave.c:
- * tests/nc_test_master.c:
- * tests/nc_test_framework.h:
- * tests/multi_lo_select.c:
- * tests/mbuf_test.c:
- * tests/make.linux:
- * tests/linux_echo.c:
- * tests/ftp_test.c:
- * tests/flood.c:
- * tests/dhcp_test.c:
- * tests/bridge.c:
-
- * src/tftp_server.c:
- * src/tftp_dummy_file.c:
- * src/tftp_client.c:
- * src/network_support.c:
- * src/inet_ntoa.c:
- * src/inet_addr.c:
- * src/getserv.c:
- * src/getproto.c:
- * src/dhcp_support.c:
- * src/dhcp_prot.c:
- * src/bootp_support.c:
-
- * include/net/netdb.h:
- * include/machine/endian.h:
- * include/machine/ansi.h:
- * include/arpa/tftp.h:
- * include/arpa/telnet.h:
- * include/arpa/nameser.h:
- * include/arpa/inet.h:
- * include/arpa/ftp.h:
- * include/tftp_support.h:
- * include/network.h:
- * include/dhcp.h:
- * include/bootp.h:
+ * tests/udp_lo_test.c:
+ * tests/tftp_server_test.c:
+ * tests/tftp_client_test.c:
+ * tests/tcp_source.c:
+ * tests/tcp_sink.c:
+ * tests/tcp_lo_test.c:
+ * tests/tcp_lo_select.c:
+ * tests/tcp_echo.c:
+ * tests/socket_test.c:
+ * tests/set_mac_address.c:
+ * tests/server_test.c:
+ * tests/ping_test.c:
+ * tests/ping_lo_test.c:
+ * tests/nc_test_slave.c:
+ * tests/nc_test_master.c:
+ * tests/nc_test_framework.h:
+ * tests/multi_lo_select.c:
+ * tests/mbuf_test.c:
+ * tests/make.linux:
+ * tests/linux_echo.c:
+ * tests/ftp_test.c:
+ * tests/flood.c:
+ * tests/dhcp_test.c:
+ * tests/bridge.c:
+
+ * src/tftp_server.c:
+ * src/tftp_dummy_file.c:
+ * src/tftp_client.c:
+ * src/network_support.c:
+ * src/inet_ntoa.c:
+ * src/inet_addr.c:
+ * src/getserv.c:
+ * src/getproto.c:
+ * src/dhcp_support.c:
+ * src/dhcp_prot.c:
+ * src/bootp_support.c:
+
+ * include/net/netdb.h:
+ * include/machine/endian.h:
+ * include/machine/ansi.h:
+ * include/arpa/tftp.h:
+ * include/arpa/telnet.h:
+ * include/arpa/nameser.h:
+ * include/arpa/inet.h:
+ * include/arpa/ftp.h:
+ * include/tftp_support.h:
+ * include/network.h:
+ * include/dhcp.h:
+ * include/bootp.h:
* cdl/net.cdl: New [common] networking package. Actual stacks
are implementations provided alongside this package.
Index: net/common/current/cdl/net.cdl
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/cdl/net.cdl,v
retrieving revision 1.13
diff -u -r1.13 net.cdl
--- net/common/current/cdl/net.cdl 24 Nov 2003 14:09:25 -0000 1.13
+++ net/common/current/cdl/net.cdl 27 Feb 2004 22:45:39 -0000
@@ -63,6 +63,9 @@
define_proc {
puts $::cdl_header "#include <pkgconf/system.h>"
puts $::cdl_header "#include CYGDAT_NET_STACK_CFG"
+ puts $::cdl_system_header "/***** net proc output start *****/"
+ puts $::cdl_system_header "#define CYGDAT_NET_HEADER <pkgconf/net.h>"
+ puts $::cdl_system_header "/***** net proc output end *****/"
}
cdl_interface CYGPKG_NET_STACK_INET {
@@ -258,6 +261,26 @@
management thread. It should be high enough that it can run
when necessary, but it does not need to be as high as the
network thread itself."
+ }
+
+ cdl_option CYGHWR_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 60 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 in this case it would run for a
+ total of 125 seconds."
}
cdl_option CYGOPT_NET_DHCP_PARM_REQ_LIST_REPLACE {
Index: net/common/current/src/dhcp_prot.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/src/dhcp_prot.c,v
retrieving revision 1.14
diff -u -r1.14 dhcp_prot.c
--- net/common/current/src/dhcp_prot.c 19 Feb 2004 10:42:00 -0000 1.14
+++ net/common/current/src/dhcp_prot.c 27 Feb 2004 22:45:40 -0000
@@ -407,7 +407,7 @@
pstate->countdown = 2; // later fast retries
ptv->tv_sec = 0;
}
- return pstate->secs < 100; // If longer, too many tries...
+ return pstate->secs < CYGHWR_NET_DHCP_MIN_RETRY_TIME; // If longer, too many tries...
}
// ------------------------------------------------------------------------