FreeRTOS+TCP DHCP Hook Request

Hello Hein and Richard,

I have a question regarding your thoughts about adding another application hook to the DHCP Client code.

It would be nice to be able to grab some additional parameters(options) from the DHCP server. In my particular case, I have OPTION 66 (Boot Server) being sent by the DHCP Server, and I would like to be able to capture that value and use it to retrieve some configuration information.

I’ve looked for a way to do this elegantly without breaking the ability to upgrade FreeRTOS Source code in the future, but I don’t see a good way.

What’s your general feeling toward adding a xApplicationDHCPOptionsHook() call (and ipconfigUSE_DHCP_OPTIONS_HOOK #define) to the prvProcessDHCPReplies() function?

Alternatively, if I’ve completely missed something that would allow me to grab these, a pointer in the right directly would be great!

Pilot, at this moment it will not be possible to get this extra information, unless you start hacking the module.
I would also think of two new application hooks like you mention. I hope that it can be realised without adding too much code to FreeRTOS_DHCP.c


That’s what I assumed. If I add the hooks, would you be interested in including the changes in the main source tree? One of my goals is to maintain the base FreeRTOS without any custom modifications, as this makes future kernel and plus-tcp upgrades more challenging.


@Pilot Feel free to open a feature request github issue or submit a pull request with your proposed changes and the team will be happy to review them.

Thanks Paul, I’ll submit a request once I finalize the change. It’s fairly low on my to-do list, so it may be a few weeks, but I appreciate the followup!