Update: This has been blogged about on the Makezine Blog – excellent! Thanks to John Park for making this happen.
Well, I now have a version of the Arduino DHCP library that I feel moderately comfortable releasing to the wild. If you're interested in the background story, check out these posts.
Download here: Arduino DHCP Library v0.1
I've tested it with an Arduino Duemilanove (ATMega168), but I'm positive that there will be bugs in the code and that for some (hopefully not many) people it will just plain not work. If you do try to use it and find that it doesn't work, try using Wireshark to see what packets (if any) are flying across the wire. Even if you can't figure it out, sending Wireshark capture logs to me will be helpful for me to debug.
In order to use the library, you need to drop the contents of the zip file into your "Arduino\hardware\libraries\Ethernet" folder. There is a sample in the zip file called "WebClientWithDHCP" that is a modification of the standard Ethernet "WebClient" example. There are the basic steps to get it working.
1) Add "#include "Dhcp.h" to the beginning of your Arduino sketch
2) Declare a variable of type Dhcp (e.g. "Dhcp dhcp;")
3) Call the beginWithDHCP() method, while providing it a MAC address
It has been a challenge writing this library, and I've just scratched the surface. I don't have IP lease renewal, retry, cable detection, or even much error handling/reporting. I'm just interested in getting feedback from the Arduino community to see if they find this useful and where to take the library next.