mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-08-06 18:24:41 +08:00
Update libslirp network interface API and +TCP submodule pointer (#1062)
* Update posix demo for +TCP update. * Update Libslirp name & +TCP submodule pointer * Update manifest --------- Co-authored-by: Monika Singh <moninom@amazon.com>
This commit is contained in:
@ -41,10 +41,24 @@
|
|||||||
extern void vLoggingPrintf( const char * pcFormatString,
|
extern void vLoggingPrintf( const char * pcFormatString,
|
||||||
... );
|
... );
|
||||||
|
|
||||||
|
/* Set to 1 to enable IPv4. */
|
||||||
|
#define ipconfigUSE_IPv4 ( 1 )
|
||||||
|
|
||||||
|
/* Set to 1 to enable IPv6. */
|
||||||
|
#define ipconfigUSE_IPv6 ( 1 )
|
||||||
|
|
||||||
|
/* Set to 0 to disable backward compatible. */
|
||||||
|
#define ipconfigIPv4_BACKWARD_COMPATIBLE 0
|
||||||
|
|
||||||
|
/* Set to 0 to disable compatible for multiple end-points/interfaces.
|
||||||
|
* Only one interface/end-point is allowed to use when ipconfigCOMPATIBLE_WITH_SINGLE
|
||||||
|
* is set to 1. */
|
||||||
|
#define ipconfigCOMPATIBLE_WITH_SINGLE 0
|
||||||
|
|
||||||
/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to
|
/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to
|
||||||
* 1 then FreeRTOS_debug_printf should be defined to the function used to print
|
* 1 then FreeRTOS_debug_printf should be defined to the function used to print
|
||||||
* out the debugging messages. */
|
* out the debugging messages. */
|
||||||
#define ipconfigHAS_DEBUG_PRINTF 1
|
#define ipconfigHAS_DEBUG_PRINTF 1
|
||||||
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
|
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
|
||||||
#define FreeRTOS_debug_printf( X ) vLoggingPrintf X
|
#define FreeRTOS_debug_printf( X ) vLoggingPrintf X
|
||||||
#endif
|
#endif
|
||||||
|
@ -215,7 +215,7 @@
|
|||||||
pcTransmittedString[ strlen( pcTransmittedString ) ] = '-';
|
pcTransmittedString[ strlen( pcTransmittedString ) ] = '-';
|
||||||
ulTxCount++;
|
ulTxCount++;
|
||||||
|
|
||||||
printf( "\n\tSending %d bytes of data to the echo server\n", lStringLength );
|
printf( "\n\tSending %ld bytes of data to the echo server\n", lStringLength );
|
||||||
/* Send the string to the socket. */
|
/* Send the string to the socket. */
|
||||||
lTransmitted = FreeRTOS_send( xSocket, /* The socket being sent to. */
|
lTransmitted = FreeRTOS_send( xSocket, /* The socket being sent to. */
|
||||||
( void * ) pcTransmittedString, /* The data being sent. */
|
( void * ) pcTransmittedString, /* The data being sent. */
|
||||||
|
@ -161,9 +161,9 @@ void main_tcp_echo_client_tasks( void )
|
|||||||
|
|
||||||
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
||||||
|
|
||||||
extern NetworkInterface_t * pxFillInterfaceDescriptor( BaseType_t xEMACIndex,
|
extern NetworkInterface_t * pxLibslirp_FillInterfaceDescriptor( BaseType_t xEMACIndex,
|
||||||
NetworkInterface_t * pxInterface );
|
NetworkInterface_t * pxInterface );
|
||||||
pxFillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
pxLibslirp_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
||||||
|
|
||||||
/* === End-point 0 === */
|
/* === End-point 0 === */
|
||||||
FreeRTOS_FillEndPoint( &( xInterfaces[ 0 ] ), &( xEndPoints [ 0 ] ), ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
|
FreeRTOS_FillEndPoint( &( xInterfaces[ 0 ] ), &( xEndPoints [ 0 ] ), ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
|
||||||
@ -202,7 +202,7 @@ void main_tcp_echo_client_tasks( void )
|
|||||||
* events are only received if implemented in the MAC driver. */
|
* events are only received if implemented in the MAC driver. */
|
||||||
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
||||||
void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,
|
void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,
|
||||||
struct xNetworkEndPoint * pxEndPoint )
|
struct xNetworkEndPoint * pxEndPoint )
|
||||||
#else
|
#else
|
||||||
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent )
|
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent )
|
||||||
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
|
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
|
||||||
@ -279,6 +279,7 @@ static void prvMiscInitialisation( void )
|
|||||||
{
|
{
|
||||||
time_t xTimeNow;
|
time_t xTimeNow;
|
||||||
uint32_t ulRandomNumbers[ 4 ];
|
uint32_t ulRandomNumbers[ 4 ];
|
||||||
|
|
||||||
/* Seed the random number generator. */
|
/* Seed the random number generator. */
|
||||||
time( &xTimeNow );
|
time( &xTimeNow );
|
||||||
FreeRTOS_debug_printf( ( "Seed for randomiser: %lu\n", xTimeNow ) );
|
FreeRTOS_debug_printf( ( "Seed for randomiser: %lu\n", xTimeNow ) );
|
||||||
@ -313,10 +314,10 @@ static void prvMiscInitialisation( void )
|
|||||||
|
|
||||||
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
||||||
BaseType_t xApplicationDNSQueryHook_Multi( struct xNetworkEndPoint * pxEndPoint,
|
BaseType_t xApplicationDNSQueryHook_Multi( struct xNetworkEndPoint * pxEndPoint,
|
||||||
const char * pcName )
|
const char * pcName )
|
||||||
#else
|
#else
|
||||||
BaseType_t xApplicationDNSQueryHook( const char * pcName )
|
BaseType_t xApplicationDNSQueryHook( const char * pcName )
|
||||||
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
|
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
|
||||||
{
|
{
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
|
|
||||||
|
@ -170,9 +170,9 @@ int main( void )
|
|||||||
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
||||||
|
|
||||||
#ifdef ipconfigUSE_LIBSLIRP
|
#ifdef ipconfigUSE_LIBSLIRP
|
||||||
extern NetworkInterface_t* pxFillInterfaceDescriptor(BaseType_t xEMACIndex,
|
extern NetworkInterface_t* pxLibslirp_FillInterfaceDescriptor(BaseType_t xEMACIndex,
|
||||||
NetworkInterface_t * pxInterface);
|
NetworkInterface_t * pxInterface);
|
||||||
pxFillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
pxLibslirp_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
||||||
#else
|
#else
|
||||||
pxWinPcap_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
pxWinPcap_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
||||||
#endif
|
#endif
|
||||||
|
Submodule FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP updated: 67b9e1c281...40c16fef7b
@ -205,9 +205,9 @@ void vPlatformInitIpStack( void )
|
|||||||
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
||||||
/* Initialise the interface descriptor for WinPCap. */
|
/* Initialise the interface descriptor for WinPCap. */
|
||||||
#ifdef ipconfigUSE_LIBSLIRP
|
#ifdef ipconfigUSE_LIBSLIRP
|
||||||
extern NetworkInterface_t* pxFillInterfaceDescriptor(BaseType_t xEMACIndex,
|
extern NetworkInterface_t* pxLibslirp_FillInterfaceDescriptor(BaseType_t xEMACIndex,
|
||||||
NetworkInterface_t * pxInterface);
|
NetworkInterface_t * pxInterface);
|
||||||
pxFillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
pxLibslirp_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
||||||
#else
|
#else
|
||||||
pxWinPcap_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
pxWinPcap_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,7 +11,7 @@ dependencies:
|
|||||||
path: "FreeRTOS/Source"
|
path: "FreeRTOS/Source"
|
||||||
|
|
||||||
- name: "FreeRTOS-Plus-TCP"
|
- name: "FreeRTOS-Plus-TCP"
|
||||||
version: "67b9e1c"
|
version: "40c16fe"
|
||||||
repository:
|
repository:
|
||||||
type: "git"
|
type: "git"
|
||||||
url: "https://github.com/FreeRTOS/FreeRTOS-Plus-TCP.git"
|
url: "https://github.com/FreeRTOS/FreeRTOS-Plus-TCP.git"
|
||||||
|
Reference in New Issue
Block a user