FreeRTOS+TCP offers this flexibility “at runtime” as follows: the DHCP driver can call a user-defined function xApplicationDHCPHook(), in which the application may decide to return either of:
    eDHCPContinue,      /**< Continue the DHCP process */
    eDHCPUseDefaults,   /**< Stop DHCP and use the static defaults. */
    eDHCPStopNoChanges, /**< Stop DHCP and continue with current settings. */
The application hook is only called if ipconfigUSE_DHCP_HOOK is defined as 1.