diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/TCPEchoClient_SingleTasks.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/TCPEchoClient_SingleTasks.c index 6c11240f71a..b354ad9bdc4 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/TCPEchoClient_SingleTasks.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/TCPEchoClient_SingleTasks.c @@ -399,22 +399,22 @@ return xReturn; } -#endif /* ipconfigUSE_TCP */ + #if ( ipconfigUSE_DHCP_HOOK != 0 ) + + #if ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) + eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t eDHCPPhase, + uint32_t ulIPAddress ) + #else /* ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) */ + eDHCPCallbackAnswer_t xApplicationDHCPHook_Multi( eDHCPCallbackPhase_t eDHCPPhase, + struct xNetworkEndPoint * pxEndPoint, + IP_Address_t * pxIPAddress ) + #endif /* ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) */ + { + /* Provide a stub for this function. */ + return eDHCPContinue; + } -#if ( ( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_DHCP_HOOK != 0 ) ) + #endif /* if ( ipconfigUSE_DHCP_HOOK != 0 ) */ - #if ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) - eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t eDHCPPhase, - uint32_t ulIPAddress ) - #else /* ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) */ - eDHCPCallbackAnswer_t xApplicationDHCPHook_Multi( eDHCPCallbackPhase_t eDHCPPhase, - struct xNetworkEndPoint * pxEndPoint, - IP_Address_t * pxIPAddress ) - #endif /* ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) */ - { - /* Provide a stub for this function. */ - return eDHCPContinue; - } - -#endif /* if ( ( ipconfigUSE_TCP == 1 ) && ( ipconfigUSE_DHCP_HOOK != 0 ) ) */ +#endif /* ipconfigUSE_TCP */ /*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c index b80d3de09dc..968e044e36e 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c @@ -395,4 +395,22 @@ return xReturn; } + + #if ( ipconfigUSE_DHCP_HOOK != 0 ) + + #if ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) + eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t eDHCPPhase, + uint32_t ulIPAddress ) + #else /* ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) */ + eDHCPCallbackAnswer_t xApplicationDHCPHook_Multi( eDHCPCallbackPhase_t eDHCPPhase, + struct xNetworkEndPoint * pxEndPoint, + IP_Address_t * pxIPAddress ) + #endif /* ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) */ + { + /* Provide a stub for this function. */ + return eDHCPContinue; + } + + #endif /* if ( ipconfigUSE_DHCP_HOOK != 0 )*/ + #endif /* ipconfigUSE_TCP */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c index 2936325395e..2c6ab1d853c 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c @@ -164,6 +164,8 @@ void main_tcp_echo_client_tasks( void ) #if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) /* Initialise the interface descriptor for WinPCap. */ + extern NetworkInterface_t * pxMPS2_FillInterfaceDescriptor( BaseType_t xEMACIndex, + NetworkInterface_t * pxInterface ); pxMPS2_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) ); /* === End-point 0 === */