[En-Nut-Discussion] DHCP fix for requesting Gateway and DNS

Damian Slee damian at commtech.com.au
Wed Jan 14 05:22:01 CET 2004


Hi,
this fixes a problem I was having with ethernut and Win2k DHCP Server, not getting the gateway setting.  Hopefully this change can be added to CVS.

I used Ethereal to look at what a Win2k client sent.  In the DHCP_DISCOVER and DHCP_REQUEST packets a Win2k client was sending a parameter request option.  In the parameter request option, were the parameters Gateway(3), DNS(6) and net mask(1), as well as many others like NetBIOS which we won't worry about.

I added this parameter request option to ethernut's Discover and Request functions.

So I have added to the header file dhcp.h
#define DHCPOPT_PARAMREQUEST 55

Add/Change to dhcpc.c, see attached.  About 12lines of code added.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcpcfix.c
Type: application/octet-stream
Size: 2606 bytes
Desc: dhcpcfix.c
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20040114/0eef4914/attachment-0001.obj>


More information about the En-Nut-Discussion mailing list