Skip to content

Commit b1d2de4

Browse files
ActoryOumoninom1
andauthored
Update libslirp network interface API and +TCP submodule pointer (FreeRTOS#1062)
* Update posix demo for +TCP update. * Update Libslirp name & +TCP submodule pointer * Update manifest --------- Co-authored-by: Monika Singh <moninom@amazon.com>
1 parent acd5dd0 commit b1d2de4

File tree

7 files changed

+29
-14
lines changed

7 files changed

+29
-14
lines changed

FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/FreeRTOSIPConfig.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,24 @@
4141
extern void vLoggingPrintf( const char * pcFormatString,
4242
... );
4343

44+
/* Set to 1 to enable IPv4. */
45+
#define ipconfigUSE_IPv4 ( 1 )
46+
47+
/* Set to 1 to enable IPv6. */
48+
#define ipconfigUSE_IPv6 ( 1 )
49+
50+
/* Set to 0 to disable backward compatible. */
51+
#define ipconfigIPv4_BACKWARD_COMPATIBLE 0
52+
53+
/* Set to 0 to disable compatible for multiple end-points/interfaces.
54+
* Only one interface/end-point is allowed to use when ipconfigCOMPATIBLE_WITH_SINGLE
55+
* is set to 1. */
56+
#define ipconfigCOMPATIBLE_WITH_SINGLE 0
57+
4458
/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to
4559
* 1 then FreeRTOS_debug_printf should be defined to the function used to print
4660
* out the debugging messages. */
47-
#define ipconfigHAS_DEBUG_PRINTF 1
61+
#define ipconfigHAS_DEBUG_PRINTF 1
4862
#if ( ipconfigHAS_DEBUG_PRINTF == 1 )
4963
#define FreeRTOS_debug_printf( X ) vLoggingPrintf X
5064
#endif

FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/TCPEchoClient_SingleTasks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
pcTransmittedString[ strlen( pcTransmittedString ) ] = '-';
216216
ulTxCount++;
217217

218-
printf( "\n\tSending %d bytes of data to the echo server\n", lStringLength );
218+
printf( "\n\tSending %ld bytes of data to the echo server\n", lStringLength );
219219
/* Send the string to the socket. */
220220
lTransmitted = FreeRTOS_send( xSocket, /* The socket being sent to. */
221221
( void * ) pcTransmittedString, /* The data being sent. */

FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/main_networking.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ void main_tcp_echo_client_tasks( void )
161161

162162
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
163163

164-
extern NetworkInterface_t * pxFillInterfaceDescriptor( BaseType_t xEMACIndex,
165-
NetworkInterface_t * pxInterface );
166-
pxFillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
164+
extern NetworkInterface_t * pxLibslirp_FillInterfaceDescriptor( BaseType_t xEMACIndex,
165+
NetworkInterface_t * pxInterface );
166+
pxLibslirp_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
167167

168168
/* === End-point 0 === */
169169
FreeRTOS_FillEndPoint( &( xInterfaces[ 0 ] ), &( xEndPoints [ 0 ] ), ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
@@ -202,7 +202,7 @@ void main_tcp_echo_client_tasks( void )
202202
* events are only received if implemented in the MAC driver. */
203203
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
204204
void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,
205-
struct xNetworkEndPoint * pxEndPoint )
205+
struct xNetworkEndPoint * pxEndPoint )
206206
#else
207207
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent )
208208
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
@@ -279,6 +279,7 @@ static void prvMiscInitialisation( void )
279279
{
280280
time_t xTimeNow;
281281
uint32_t ulRandomNumbers[ 4 ];
282+
282283
/* Seed the random number generator. */
283284
time( &xTimeNow );
284285
FreeRTOS_debug_printf( ( "Seed for randomiser: %lu\n", xTimeNow ) );
@@ -313,10 +314,10 @@ static void prvMiscInitialisation( void )
313314

314315
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
315316
BaseType_t xApplicationDNSQueryHook_Multi( struct xNetworkEndPoint * pxEndPoint,
316-
const char * pcName )
317+
const char * pcName )
317318
#else
318319
BaseType_t xApplicationDNSQueryHook( const char * pcName )
319-
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
320+
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
320321
{
321322
BaseType_t xReturn;
322323

FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ int main( void )
170170
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
171171

172172
#ifdef ipconfigUSE_LIBSLIRP
173-
extern NetworkInterface_t* pxFillInterfaceDescriptor(BaseType_t xEMACIndex,
173+
extern NetworkInterface_t* pxLibslirp_FillInterfaceDescriptor(BaseType_t xEMACIndex,
174174
NetworkInterface_t * pxInterface);
175-
pxFillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
175+
pxLibslirp_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
176176
#else
177177
pxWinPcap_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
178178
#endif

FreeRTOS-Plus/VisualStudio_StaticProjects/FreeRTOS+TCP/plus_tcp_hooks_winsim.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ void vPlatformInitIpStack( void )
205205
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
206206
/* Initialise the interface descriptor for WinPCap. */
207207
#ifdef ipconfigUSE_LIBSLIRP
208-
extern NetworkInterface_t* pxFillInterfaceDescriptor(BaseType_t xEMACIndex,
208+
extern NetworkInterface_t* pxLibslirp_FillInterfaceDescriptor(BaseType_t xEMACIndex,
209209
NetworkInterface_t * pxInterface);
210-
pxFillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
210+
pxLibslirp_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
211211
#else
212212
pxWinPcap_FillInterfaceDescriptor( 0, &( xInterfaces[ 0 ] ) );
213213
#endif

manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
path: "FreeRTOS/Source"
1212

1313
- name: "FreeRTOS-Plus-TCP"
14-
version: "67b9e1c"
14+
version: "40c16fe"
1515
repository:
1616
type: "git"
1717
url: "https://github.com/FreeRTOS/FreeRTOS-Plus-TCP.git"

0 commit comments

Comments
 (0)