Feature: implement DHCP options provider and parser #1244
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Here is a sample code:
Please refer to dhcp-options(5) http://linux.die.net/man/5/dhcp-options chapter "Defining New Options" for an example on how to provide custom options with isc-dhcp server. Other DHCP servers should have similar support.