Remove dependency of CBMC on Patches (#181)
* Changes to DHCP * CBMC DNS changes * Changes for TCP_IP * Changes to TCP_WIN * Define away static to nothing * Remove patches * Changes after Mark's comments v1 * Update MakefileCommon.json * Correction!pull/189/head
parent
a7fec906a4
commit
08af68ef90
@ -1,64 +0,0 @@
|
||||
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c
|
||||
index 04b0487..d6e74a9 100644
|
||||
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c
|
||||
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c
|
||||
@@ -156,7 +156,11 @@ struct xDHCPMessage_IPv4
|
||||
typedef struct xDHCPMessage_IPv4 DHCPMessage_IPv4_t;
|
||||
|
||||
/* The UDP socket used for all incoming and outgoing DHCP traffic. */
|
||||
+#ifdef CBMC
|
||||
+Socket_t xDHCPSocket;
|
||||
+#else
|
||||
static Socket_t xDHCPSocket;
|
||||
+#endif
|
||||
|
||||
#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 )
|
||||
/* Define the Link Layer IP address: 169.254.x.x */
|
||||
@@ -179,7 +183,11 @@ static void prvSendDHCPDiscover( void );
|
||||
/*
|
||||
* Interpret message received on the DHCP socket.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType );
|
||||
+#else
|
||||
static BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType );
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Generate a DHCP request packet, and send it on the DHCP socket.
|
||||
@@ -204,7 +212,11 @@ static uint8_t *prvCreatePartDHCPMessage( struct freertos_sockaddr *pxAddress,
|
||||
/*
|
||||
* Create the DHCP socket, if it has not been created already.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+void prvCreateDHCPSocket( void );
|
||||
+#else
|
||||
static void prvCreateDHCPSocket( void );
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Close the DHCP socket.
|
||||
@@ -223,7 +235,11 @@ static void prvCloseDHCPSocket( void );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Hold information in between steps in the DHCP state machine. */
|
||||
+#ifdef CBMC
|
||||
+DHCPData_t xDHCPData;
|
||||
+#else
|
||||
static DHCPData_t xDHCPData;
|
||||
+#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -623,7 +639,11 @@ static void prvInitialiseDHCP( void )
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType )
|
||||
+#else
|
||||
static BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType )
|
||||
+#endif
|
||||
{
|
||||
uint8_t *pucUDPPayload;
|
||||
int32_t lBytes;
|
@ -1,100 +0,0 @@
|
||||
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c
|
||||
index 480d50b..5557253 100644
|
||||
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c
|
||||
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c
|
||||
@@ -114,7 +114,11 @@ static Socket_t prvCreateDNSSocket( void );
|
||||
/*
|
||||
* Create the DNS message in the zero copy buffer passed in the first parameter.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
+#else
|
||||
static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
+#endif
|
||||
const char *pcHostName,
|
||||
TickType_t uxIdentifier );
|
||||
|
||||
@@ -122,7 +126,11 @@ static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
* Simple routine that jumps over the NAME field of a resource record.
|
||||
* It returns the number of bytes read.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
+#else
|
||||
static size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
+#endif
|
||||
size_t uxLength );
|
||||
|
||||
/*
|
||||
@@ -130,7 +138,11 @@ static size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
* The parameter 'xExpected' indicates whether the identifier in the reply
|
||||
* was expected, and thus if the DNS cache may be updated with the reply.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer,
|
||||
+#else
|
||||
static uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer,
|
||||
+#endif
|
||||
size_t uxBufferLength,
|
||||
BaseType_t xExpected );
|
||||
|
||||
@@ -184,7 +196,11 @@ static uint32_t prvGetHostByName( const char *pcHostName,
|
||||
|
||||
|
||||
#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 )
|
||||
+#ifdef CBMC
|
||||
+ size_t prvReadNameField( const uint8_t *pucByte,
|
||||
+#else
|
||||
static size_t prvReadNameField( const uint8_t *pucByte,
|
||||
+#endif
|
||||
size_t uxRemainingBytes,
|
||||
char *pcName,
|
||||
size_t uxDestLen );
|
||||
@@ -758,7 +774,11 @@ TickType_t uxWriteTimeOut_ticks = ipconfigDNS_SEND_BLOCK_TIME_TICKS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
+#else
|
||||
static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
+#endif
|
||||
const char *pcHostName,
|
||||
TickType_t uxIdentifier )
|
||||
{
|
||||
@@ -838,7 +858,11 @@ static const DNSMessage_t xDefaultPartDNSHeader =
|
||||
|
||||
#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 )
|
||||
|
||||
+#ifdef CBMC
|
||||
+ size_t prvReadNameField( const uint8_t *pucByte,
|
||||
+#else
|
||||
static size_t prvReadNameField( const uint8_t *pucByte,
|
||||
+#endif
|
||||
size_t uxRemainingBytes,
|
||||
char *pcName,
|
||||
size_t uxDestLen )
|
||||
@@ -932,7 +956,11 @@ static const DNSMessage_t xDefaultPartDNSHeader =
|
||||
#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
+#else
|
||||
static size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
+#endif
|
||||
size_t uxLength )
|
||||
{
|
||||
size_t uxChunkLength;
|
||||
@@ -1050,7 +1078,11 @@ size_t uxPayloadSize;
|
||||
#endif /* ipconfigUSE_NBNS */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer,
|
||||
+#else
|
||||
static uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer,
|
||||
+#endif
|
||||
size_t uxBufferLength,
|
||||
BaseType_t xExpected )
|
||||
{
|
@ -1,83 +0,0 @@
|
||||
From: Aniruddha R Kanhere <kanherea@amazon.com>
|
||||
Date: Wed, 03 June 2020 09:51:25 +0000
|
||||
Subject: [PATCH] modified lib
|
||||
|
||||
---
|
||||
.../freertos_plus_tcp/source/FreeRTOS_TCP_IP.c | 24 ++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c
|
||||
index 7a2c00c68..cb537b347 100644
|
||||
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c
|
||||
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c
|
||||
@@ -198,14 +198,22 @@ static BaseType_t prvTCPPrepareConnect( FreeRTOS_Socket_t *pxSocket );
|
||||
/*
|
||||
* Parse the TCP option(s) received, if present.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, const NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
+#else
|
||||
static void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, const NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Identify and deal with a single TCP header option, advancing the pointer to
|
||||
* the header. This function returns pdTRUE or pdFALSE depending on whether the
|
||||
* caller should continue to parse more header options or break the loop.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
+#else
|
||||
static size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
+#endif
|
||||
size_t uxTotalLength,
|
||||
FreeRTOS_Socket_t * const pxSocket,
|
||||
BaseType_t xHasSYNFlag );
|
||||
@@ -215,7 +223,11 @@ static size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
* Skip past TCP header options when doing Selective ACK, until there are no
|
||||
* more options left.
|
||||
*/
|
||||
+ #ifdef CBMC
|
||||
+ void prvReadSackOption( const uint8_t * const pucPtr,
|
||||
+ #else
|
||||
static void prvReadSackOption( const uint8_t * const pucPtr,
|
||||
+ #endif
|
||||
size_t uxIndex,
|
||||
FreeRTOS_Socket_t * const pxSocket );
|
||||
#endif/* ( ipconfigUSE_TCP_WIN == 1 ) */
|
||||
@@ -1137,7 +1149,11 @@ uint32_t ulInitialSequenceNumber = 0;
|
||||
* that: ((pxTCPHeader->ucTCPOffset & 0xf0) > 0x50), meaning that the TP header
|
||||
* is longer than the usual 20 (5 x 4) bytes.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, const NetworkBufferDescriptor_t *pxNetworkBuffer )
|
||||
+#else
|
||||
static void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, const NetworkBufferDescriptor_t *pxNetworkBuffer )
|
||||
+#endif
|
||||
{
|
||||
size_t uxTCPHeaderOffset = ipSIZE_OF_ETH_HEADER + xIPHeaderSize( pxNetworkBuffer );
|
||||
const ProtocolHeaders_t *pxProtocolHeaders = ipPOINTER_CAST( ProtocolHeaders_t *,
|
||||
@@ -1199,7 +1215,11 @@ uint8_t ucLength;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
+#else
|
||||
static size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
+#endif
|
||||
size_t uxTotalLength,
|
||||
FreeRTOS_Socket_t * const pxSocket,
|
||||
BaseType_t xHasSYNFlag )
|
||||
@@ -1331,7 +1351,11 @@ TCPWindow_t *pxTCPWindow = &( pxSocket->u.xTCP.xTCPWindow );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
+ #ifdef CBMC
|
||||
+ void prvReadSackOption( const uint8_t * const pucPtr,
|
||||
+ #else
|
||||
static void prvReadSackOption( const uint8_t * const pucPtr,
|
||||
+ #endif
|
||||
size_t uxIndex,
|
||||
FreeRTOS_Socket_t * const pxSocket )
|
||||
{
|
@ -1,17 +0,0 @@
|
||||
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
|
||||
index 0078ab313..b0cccbad8 100644
|
||||
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
|
||||
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
|
||||
@@ -192,8 +192,12 @@ extern void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewL
|
||||
|
||||
/* List of free TCP segments. */
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
+#ifdef CBMC
|
||||
+ List_t xSegmentList;
|
||||
+#else
|
||||
static List_t xSegmentList;
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* Logging verbosity level. */
|
||||
BaseType_t xTCPWindowLoggingLevel = 0;
|
@ -1,64 +0,0 @@
|
||||
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c
|
||||
index 04b0487..d6e74a9 100644
|
||||
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c
|
||||
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c
|
||||
@@ -156,7 +156,11 @@ struct xDHCPMessage_IPv4
|
||||
typedef struct xDHCPMessage_IPv4 DHCPMessage_IPv4_t;
|
||||
|
||||
/* The UDP socket used for all incoming and outgoing DHCP traffic. */
|
||||
+#ifdef CBMC
|
||||
+Socket_t xDHCPSocket;
|
||||
+#else
|
||||
static Socket_t xDHCPSocket;
|
||||
+#endif
|
||||
|
||||
#if( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 )
|
||||
/* Define the Link Layer IP address: 169.254.x.x */
|
||||
@@ -179,7 +183,11 @@ static void prvSendDHCPDiscover( void );
|
||||
/*
|
||||
* Interpret message received on the DHCP socket.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType );
|
||||
+#else
|
||||
static BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType );
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Generate a DHCP request packet, and send it on the DHCP socket.
|
||||
@@ -204,7 +212,11 @@ static uint8_t *prvCreatePartDHCPMessage( struct freertos_sockaddr *pxAddress,
|
||||
/*
|
||||
* Create the DHCP socket, if it has not been created already.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+void prvCreateDHCPSocket( void );
|
||||
+#else
|
||||
static void prvCreateDHCPSocket( void );
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Close the DHCP socket.
|
||||
@@ -223,7 +235,11 @@ static void prvCloseDHCPSocket( void );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Hold information in between steps in the DHCP state machine. */
|
||||
+#ifdef CBMC
|
||||
+DHCPData_t xDHCPData;
|
||||
+#else
|
||||
static DHCPData_t xDHCPData;
|
||||
+#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -623,7 +639,11 @@ static void prvInitialiseDHCP( void )
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType )
|
||||
+#else
|
||||
static BaseType_t prvProcessDHCPReplies( BaseType_t xExpectedMessageType )
|
||||
+#endif
|
||||
{
|
||||
uint8_t *pucUDPPayload;
|
||||
int32_t lBytes;
|
@ -1,100 +0,0 @@
|
||||
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c
|
||||
index 480d50b..5557253 100644
|
||||
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c
|
||||
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c
|
||||
@@ -114,7 +114,11 @@ static Socket_t prvCreateDNSSocket( void );
|
||||
/*
|
||||
* Create the DNS message in the zero copy buffer passed in the first parameter.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
+#else
|
||||
static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
+#endif
|
||||
const char *pcHostName,
|
||||
TickType_t uxIdentifier );
|
||||
|
||||
@@ -122,7 +126,11 @@ static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
* Simple routine that jumps over the NAME field of a resource record.
|
||||
* It returns the number of bytes read.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
+#else
|
||||
static size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
+#endif
|
||||
size_t uxLength );
|
||||
|
||||
/*
|
||||
@@ -130,7 +138,11 @@ static size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
* The parameter 'xExpected' indicates whether the identifier in the reply
|
||||
* was expected, and thus if the DNS cache may be updated with the reply.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer,
|
||||
+#else
|
||||
static uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer,
|
||||
+#endif
|
||||
size_t uxBufferLength,
|
||||
BaseType_t xExpected );
|
||||
|
||||
@@ -184,7 +196,11 @@ static uint32_t prvGetHostByName( const char *pcHostName,
|
||||
|
||||
|
||||
#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 )
|
||||
+#ifdef CBMC
|
||||
+ size_t prvReadNameField( const uint8_t *pucByte,
|
||||
+#else
|
||||
static size_t prvReadNameField( const uint8_t *pucByte,
|
||||
+#endif
|
||||
size_t uxRemainingBytes,
|
||||
char *pcName,
|
||||
size_t uxDestLen );
|
||||
@@ -758,7 +774,11 @@ TickType_t uxWriteTimeOut_ticks = ipconfigDNS_SEND_BLOCK_TIME_TICKS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
+#else
|
||||
static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer,
|
||||
+#endif
|
||||
const char *pcHostName,
|
||||
TickType_t uxIdentifier )
|
||||
{
|
||||
@@ -838,7 +858,11 @@ static const DNSMessage_t xDefaultPartDNSHeader =
|
||||
|
||||
#if( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 )
|
||||
|
||||
+#ifdef CBMC
|
||||
+ size_t prvReadNameField( const uint8_t *pucByte,
|
||||
+#else
|
||||
static size_t prvReadNameField( const uint8_t *pucByte,
|
||||
+#endif
|
||||
size_t uxRemainingBytes,
|
||||
char *pcName,
|
||||
size_t uxDestLen )
|
||||
@@ -932,7 +956,11 @@ static const DNSMessage_t xDefaultPartDNSHeader =
|
||||
#endif /* ipconfigUSE_DNS_CACHE || ipconfigDNS_USE_CALLBACKS */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
+#else
|
||||
static size_t prvSkipNameField( const uint8_t *pucByte,
|
||||
+#endif
|
||||
size_t uxLength )
|
||||
{
|
||||
size_t uxChunkLength;
|
||||
@@ -1050,7 +1078,11 @@ size_t uxPayloadSize;
|
||||
#endif /* ipconfigUSE_NBNS */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer,
|
||||
+#else
|
||||
static uint32_t prvParseDNSReply( uint8_t *pucUDPPayloadBuffer,
|
||||
+#endif
|
||||
size_t uxBufferLength,
|
||||
BaseType_t xExpected )
|
||||
{
|
@ -1,83 +0,0 @@
|
||||
From: Aniruddha R Kanhere <kanherea@amazon.com>
|
||||
Date: Wed, 03 June 2020 09:51:25 +0000
|
||||
Subject: [PATCH] modified lib
|
||||
|
||||
---
|
||||
.../freertos_plus_tcp/source/FreeRTOS_TCP_IP.c | 24 ++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c
|
||||
index 7a2c00c68..cb537b347 100644
|
||||
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c
|
||||
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c
|
||||
@@ -198,14 +198,22 @@ static BaseType_t prvTCPPrepareConnect( FreeRTOS_Socket_t *pxSocket );
|
||||
/*
|
||||
* Parse the TCP option(s) received, if present.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, const NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
+#else
|
||||
static void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, const NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Identify and deal with a single TCP header option, advancing the pointer to
|
||||
* the header. This function returns pdTRUE or pdFALSE depending on whether the
|
||||
* caller should continue to parse more header options or break the loop.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
+#else
|
||||
static size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
+#endif
|
||||
size_t uxTotalLength,
|
||||
FreeRTOS_Socket_t * const pxSocket,
|
||||
BaseType_t xHasSYNFlag );
|
||||
@@ -215,7 +223,11 @@ static size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
* Skip past TCP header options when doing Selective ACK, until there are no
|
||||
* more options left.
|
||||
*/
|
||||
+ #ifdef CBMC
|
||||
+ void prvReadSackOption( const uint8_t * const pucPtr,
|
||||
+ #else
|
||||
static void prvReadSackOption( const uint8_t * const pucPtr,
|
||||
+ #endif
|
||||
size_t uxIndex,
|
||||
FreeRTOS_Socket_t * const pxSocket );
|
||||
#endif/* ( ipconfigUSE_TCP_WIN == 1 ) */
|
||||
@@ -1137,7 +1149,11 @@ uint32_t ulInitialSequenceNumber = 0;
|
||||
* that: ((pxTCPHeader->ucTCPOffset & 0xf0) > 0x50), meaning that the TP header
|
||||
* is longer than the usual 20 (5 x 4) bytes.
|
||||
*/
|
||||
+#ifdef CBMC
|
||||
+void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, const NetworkBufferDescriptor_t *pxNetworkBuffer )
|
||||
+#else
|
||||
static void prvCheckOptions( FreeRTOS_Socket_t *pxSocket, const NetworkBufferDescriptor_t *pxNetworkBuffer )
|
||||
+#endif
|
||||
{
|
||||
size_t uxTCPHeaderOffset = ipSIZE_OF_ETH_HEADER + xIPHeaderSize( pxNetworkBuffer );
|
||||
const ProtocolHeaders_t *pxProtocolHeaders = ipPOINTER_CAST( ProtocolHeaders_t *,
|
||||
@@ -1199,7 +1215,11 @@ uint8_t ucLength;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
+#ifdef CBMC
|
||||
+size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
+#else
|
||||
static size_t prvSingleStepTCPHeaderOptions( const uint8_t * const pucPtr,
|
||||
+#endif
|
||||
size_t uxTotalLength,
|
||||
FreeRTOS_Socket_t * const pxSocket,
|
||||
BaseType_t xHasSYNFlag )
|
||||
@@ -1331,7 +1351,11 @@ TCPWindow_t *pxTCPWindow = &( pxSocket->u.xTCP.xTCPWindow );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
+ #ifdef CBMC
|
||||
+ void prvReadSackOption( const uint8_t * const pucPtr,
|
||||
+ #else
|
||||
static void prvReadSackOption( const uint8_t * const pucPtr,
|
||||
+ #endif
|
||||
size_t uxIndex,
|
||||
FreeRTOS_Socket_t * const pxSocket )
|
||||
{
|
@ -1,17 +0,0 @@
|
||||
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
|
||||
index 0078ab313..b0cccbad8 100644
|
||||
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
|
||||
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
|
||||
@@ -192,8 +192,12 @@ extern void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewL
|
||||
|
||||
/* List of free TCP segments. */
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
+#ifdef CBMC
|
||||
+ List_t xSegmentList;
|
||||
+#else
|
||||
static List_t xSegmentList;
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* Logging verbosity level. */
|
||||
BaseType_t xTCPWindowLoggingLevel = 0;
|
Loading…
Reference in New Issue