This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RedBoot -- more complete DHCP request.
- From: David Vrabel <dvrabel at arcom dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Mon, 08 Sep 2003 16:17:10 +0100
- Subject: RedBoot -- more complete DHCP request.
- Organization: Arcom Control Systems Ltd
Hi,
The attached patch adds Option 55 (Parameter Request List) to RedBoot's
DHCP request. Subnet Mask, Router and Domain Name Server are requested.
It appears that certain DHCP servers require this option to provide the
gateway (Router) address.
2003-09-08 David Vrabel <dvrabel@arcom.com>
* src/net/bootp.c (__bootp_find_local_ip): Adds Option 55 Parameter
Request List) to the DHCP request (requests: Subnet Mask; Router;
Domain Name server).
David Vrabel
--
David Vrabel, Design Engineer
Arcom Tel: +44 (0)1223 411200 ext. 3233
Clifton Road Fax: +44 (0)1223 403400
Cambridge CB1 7EA E-mail: dvrabel@arcom.com
UK Web: http://www.arcom.com/
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
Index: packages/redboot/current/src//net/bootp.c
===================================================================
RCS file: /var/cvs/ecos/packages/redboot/current/src/net/bootp.c,v
retrieving revision 1.1.1.2
diff -u -B -p -r1.1.1.2 bootp.c
--- packages/redboot/current/src//net/bootp.c 29 Aug 2003 10:11:35 -0000 1.1.1.2
+++ packages/redboot/current/src//net/bootp.c 8 Sep 2003 14:57:39 -0000
@@ -71,6 +71,7 @@ static bootp_header_t *bp_info;
static const unsigned char dhcpCookie[] = {99,130,83,99};
static const unsigned char dhcpEndOption[] = {255};
static const unsigned char dhcpDiscoverOption[] = {53,1,1};
+static const unsigned char dhcpParamRequestList[] = {55,3,1,3,6};
#endif
static void
@@ -171,6 +172,7 @@ __bootp_find_local_ip(bootp_header_t *in
AddOption(p,dhcpCookie);
AddOption(p,dhcpDiscoverOption);
+ AddOption(p,dhcpParamRequestList);
AddOption(p,dhcpEndOption);
// Some servers insist on a minimum amount of "vendor" data