Skip to content

Commit

Permalink
Fix build issue in FreeRTOS+TCP QEMU demo when DHCP enabled (FreeRTOS…
Browse files Browse the repository at this point in the history
…#1092)

* Fix build issue in QEMU demo when DHCP enabled
  • Loading branch information
kar-rahul-aws authored Oct 4, 2023
1 parent 1026977 commit f1472b1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
/*-----------------------------------------------------------*/
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Original file line number Diff line number Diff line change
Expand Up @@ -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 === */
Expand Down

0 comments on commit f1472b1

Please sign in to comment.