Ethernet: using DHCP to configure board at runtime

Hello everyone,

To let you know I have implemented a feature to allow Ethernet library user to supply and read DHCP options.

This functionality is very useful when you need to provide run-time configuration to the Arduino board. Since objective of DHCP is "host configuration" it is an ideal choice to use to pass parameters to the board. This commit also allows board to send additional options as part of the request. In my case, for example, it was necessary to provide additional Vendor Class Identifier (option 60) for the DHCP server to answer.

The sample code is available at GitHub at the link below. To summarize - you'll need to implement one or two additional functions in your sketch code and update a call to Ethernet.begin(...).

The code is pending a pull request now at Feature: implement DHCP options provider and parser by valentinalexeev · Pull Request #1244 · arduino/Arduino · GitHub. Feel free to use, comment and blame!

V.