mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-12-16 09:54:32 +08:00
Update version number in readiness for V10.3.0 release. Sync SVN with reviewed release candidate.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,199 +1,199 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdint.h>
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "semphr.h"
|
||||
|
||||
/* FreeRTOS+TCP includes. */
|
||||
#include "FreeRTOS_UDP_IP.h"
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include "FreeRTOS_Sockets.h"
|
||||
#include "FreeRTOS_IP_Private.h"
|
||||
|
||||
/*
|
||||
* uxStreamBufferAdd( )
|
||||
* Adds data to a stream buffer. If uxOffset > 0, data will be written at
|
||||
* an offset from uxHead while uxHead will not be moved yet. This possibility
|
||||
* will be used when TCP data is received while earlier data is still missing.
|
||||
* If 'pucData' equals NULL, the function is called to advance 'uxHead' only.
|
||||
*/
|
||||
size_t uxStreamBufferAdd( StreamBuffer_t *pxBuffer, size_t uxOffset, const uint8_t *pucData, size_t uxCount )
|
||||
{
|
||||
size_t uxSpace, uxNextHead, uxFirst;
|
||||
|
||||
uxSpace = uxStreamBufferGetSpace( pxBuffer );
|
||||
|
||||
/* If uxOffset > 0, items can be placed in front of uxHead */
|
||||
if( uxSpace > uxOffset )
|
||||
{
|
||||
uxSpace -= uxOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
uxSpace = 0u;
|
||||
}
|
||||
|
||||
/* The number of bytes that can be written is the minimum of the number of
|
||||
bytes requested and the number available. */
|
||||
uxCount = FreeRTOS_min_uint32( uxSpace, uxCount );
|
||||
|
||||
if( uxCount != 0u )
|
||||
{
|
||||
uxNextHead = pxBuffer->uxHead;
|
||||
|
||||
if( uxOffset != 0u )
|
||||
{
|
||||
/* ( uxOffset > 0 ) means: write in front if the uxHead marker */
|
||||
uxNextHead += uxOffset;
|
||||
if( uxNextHead >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxNextHead -= pxBuffer->LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
if( pucData != NULL )
|
||||
{
|
||||
/* Calculate the number of bytes that can be added in the first
|
||||
write - which may be less than the total number of bytes that need
|
||||
to be added if the buffer will wrap back to the beginning. */
|
||||
uxFirst = FreeRTOS_min_uint32( pxBuffer->LENGTH - uxNextHead, uxCount );
|
||||
|
||||
/* Write as many bytes as can be written in the first write. */
|
||||
memcpy( ( void* ) ( pxBuffer->ucArray + uxNextHead ), pucData, uxFirst );
|
||||
|
||||
/* If the number of bytes written was less than the number that
|
||||
could be written in the first write... */
|
||||
if( uxCount > uxFirst )
|
||||
{
|
||||
/* ...then write the remaining bytes to the start of the
|
||||
buffer. */
|
||||
memcpy( ( void * )pxBuffer->ucArray, pucData + uxFirst, uxCount - uxFirst );
|
||||
}
|
||||
}
|
||||
|
||||
if( uxOffset == 0u )
|
||||
{
|
||||
/* ( uxOffset == 0 ) means: write at uxHead position */
|
||||
uxNextHead += uxCount;
|
||||
if( uxNextHead >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxNextHead -= pxBuffer->LENGTH;
|
||||
}
|
||||
pxBuffer->uxHead = uxNextHead;
|
||||
}
|
||||
|
||||
if( xStreamBufferLessThenEqual( pxBuffer, pxBuffer->uxFront, uxNextHead ) != pdFALSE )
|
||||
{
|
||||
/* Advance the front pointer */
|
||||
pxBuffer->uxFront = uxNextHead;
|
||||
}
|
||||
}
|
||||
|
||||
return uxCount;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* uxStreamBufferGet( )
|
||||
* 'uxOffset' can be used to read data located at a certain offset from 'lTail'.
|
||||
* If 'pucData' equals NULL, the function is called to advance 'lTail' only.
|
||||
* if 'xPeek' is pdTRUE, or if 'uxOffset' is non-zero, the 'lTail' pointer will
|
||||
* not be advanced.
|
||||
*/
|
||||
size_t uxStreamBufferGet( StreamBuffer_t *pxBuffer, size_t uxOffset, uint8_t *pucData, size_t uxMaxCount, BaseType_t xPeek )
|
||||
{
|
||||
size_t uxSize, uxCount, uxFirst, uxNextTail;
|
||||
|
||||
/* How much data is available? */
|
||||
uxSize = uxStreamBufferGetSize( pxBuffer );
|
||||
|
||||
if( uxSize > uxOffset )
|
||||
{
|
||||
uxSize -= uxOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
uxSize = 0u;
|
||||
}
|
||||
|
||||
/* Use the minimum of the wanted bytes and the available bytes. */
|
||||
uxCount = FreeRTOS_min_uint32( uxSize, uxMaxCount );
|
||||
|
||||
if( uxCount > 0u )
|
||||
{
|
||||
uxNextTail = pxBuffer->uxTail;
|
||||
|
||||
if( uxOffset != 0u )
|
||||
{
|
||||
uxNextTail += uxOffset;
|
||||
if( uxNextTail >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxNextTail -= pxBuffer->LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
if( pucData != NULL )
|
||||
{
|
||||
/* Calculate the number of bytes that can be read - which may be
|
||||
less than the number wanted if the data wraps around to the start of
|
||||
the buffer. */
|
||||
uxFirst = FreeRTOS_min_uint32( pxBuffer->LENGTH - uxNextTail, uxCount );
|
||||
|
||||
/* Obtain the number of bytes it is possible to obtain in the first
|
||||
read. */
|
||||
memcpy( pucData, pxBuffer->ucArray + uxNextTail, uxFirst );
|
||||
|
||||
/* If the total number of wanted bytes is greater than the number
|
||||
that could be read in the first read... */
|
||||
if( uxCount > uxFirst )
|
||||
{
|
||||
/*...then read the remaining bytes from the start of the buffer. */
|
||||
memcpy( pucData + uxFirst, pxBuffer->ucArray, uxCount - uxFirst );
|
||||
}
|
||||
}
|
||||
|
||||
if( ( xPeek == pdFALSE ) && ( uxOffset == 0UL ) )
|
||||
{
|
||||
/* Move the tail pointer to effecively remove the data read from
|
||||
the buffer. */
|
||||
uxNextTail += uxCount;
|
||||
|
||||
if( uxNextTail >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxNextTail -= pxBuffer->LENGTH;
|
||||
}
|
||||
|
||||
pxBuffer->uxTail = uxNextTail;
|
||||
}
|
||||
}
|
||||
|
||||
return uxCount;
|
||||
}
|
||||
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdint.h>
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "semphr.h"
|
||||
|
||||
/* FreeRTOS+TCP includes. */
|
||||
#include "FreeRTOS_UDP_IP.h"
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include "FreeRTOS_Sockets.h"
|
||||
#include "FreeRTOS_IP_Private.h"
|
||||
|
||||
/*
|
||||
* uxStreamBufferAdd( )
|
||||
* Adds data to a stream buffer. If uxOffset > 0, data will be written at
|
||||
* an offset from uxHead while uxHead will not be moved yet. This possibility
|
||||
* will be used when TCP data is received while earlier data is still missing.
|
||||
* If 'pucData' equals NULL, the function is called to advance 'uxHead' only.
|
||||
*/
|
||||
size_t uxStreamBufferAdd( StreamBuffer_t *pxBuffer, size_t uxOffset, const uint8_t *pucData, size_t uxCount )
|
||||
{
|
||||
size_t uxSpace, uxNextHead, uxFirst;
|
||||
|
||||
uxSpace = uxStreamBufferGetSpace( pxBuffer );
|
||||
|
||||
/* If uxOffset > 0, items can be placed in front of uxHead */
|
||||
if( uxSpace > uxOffset )
|
||||
{
|
||||
uxSpace -= uxOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
uxSpace = 0u;
|
||||
}
|
||||
|
||||
/* The number of bytes that can be written is the minimum of the number of
|
||||
bytes requested and the number available. */
|
||||
uxCount = FreeRTOS_min_uint32( uxSpace, uxCount );
|
||||
|
||||
if( uxCount != 0u )
|
||||
{
|
||||
uxNextHead = pxBuffer->uxHead;
|
||||
|
||||
if( uxOffset != 0u )
|
||||
{
|
||||
/* ( uxOffset > 0 ) means: write in front if the uxHead marker */
|
||||
uxNextHead += uxOffset;
|
||||
if( uxNextHead >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxNextHead -= pxBuffer->LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
if( pucData != NULL )
|
||||
{
|
||||
/* Calculate the number of bytes that can be added in the first
|
||||
write - which may be less than the total number of bytes that need
|
||||
to be added if the buffer will wrap back to the beginning. */
|
||||
uxFirst = FreeRTOS_min_uint32( pxBuffer->LENGTH - uxNextHead, uxCount );
|
||||
|
||||
/* Write as many bytes as can be written in the first write. */
|
||||
memcpy( ( void* ) ( pxBuffer->ucArray + uxNextHead ), pucData, uxFirst );
|
||||
|
||||
/* If the number of bytes written was less than the number that
|
||||
could be written in the first write... */
|
||||
if( uxCount > uxFirst )
|
||||
{
|
||||
/* ...then write the remaining bytes to the start of the
|
||||
buffer. */
|
||||
memcpy( ( void * )pxBuffer->ucArray, pucData + uxFirst, uxCount - uxFirst );
|
||||
}
|
||||
}
|
||||
|
||||
if( uxOffset == 0u )
|
||||
{
|
||||
/* ( uxOffset == 0 ) means: write at uxHead position */
|
||||
uxNextHead += uxCount;
|
||||
if( uxNextHead >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxNextHead -= pxBuffer->LENGTH;
|
||||
}
|
||||
pxBuffer->uxHead = uxNextHead;
|
||||
}
|
||||
|
||||
if( xStreamBufferLessThenEqual( pxBuffer, pxBuffer->uxFront, uxNextHead ) != pdFALSE )
|
||||
{
|
||||
/* Advance the front pointer */
|
||||
pxBuffer->uxFront = uxNextHead;
|
||||
}
|
||||
}
|
||||
|
||||
return uxCount;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* uxStreamBufferGet( )
|
||||
* 'uxOffset' can be used to read data located at a certain offset from 'lTail'.
|
||||
* If 'pucData' equals NULL, the function is called to advance 'lTail' only.
|
||||
* if 'xPeek' is pdTRUE, or if 'uxOffset' is non-zero, the 'lTail' pointer will
|
||||
* not be advanced.
|
||||
*/
|
||||
size_t uxStreamBufferGet( StreamBuffer_t *pxBuffer, size_t uxOffset, uint8_t *pucData, size_t uxMaxCount, BaseType_t xPeek )
|
||||
{
|
||||
size_t uxSize, uxCount, uxFirst, uxNextTail;
|
||||
|
||||
/* How much data is available? */
|
||||
uxSize = uxStreamBufferGetSize( pxBuffer );
|
||||
|
||||
if( uxSize > uxOffset )
|
||||
{
|
||||
uxSize -= uxOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
uxSize = 0u;
|
||||
}
|
||||
|
||||
/* Use the minimum of the wanted bytes and the available bytes. */
|
||||
uxCount = FreeRTOS_min_uint32( uxSize, uxMaxCount );
|
||||
|
||||
if( uxCount > 0u )
|
||||
{
|
||||
uxNextTail = pxBuffer->uxTail;
|
||||
|
||||
if( uxOffset != 0u )
|
||||
{
|
||||
uxNextTail += uxOffset;
|
||||
if( uxNextTail >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxNextTail -= pxBuffer->LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
if( pucData != NULL )
|
||||
{
|
||||
/* Calculate the number of bytes that can be read - which may be
|
||||
less than the number wanted if the data wraps around to the start of
|
||||
the buffer. */
|
||||
uxFirst = FreeRTOS_min_uint32( pxBuffer->LENGTH - uxNextTail, uxCount );
|
||||
|
||||
/* Obtain the number of bytes it is possible to obtain in the first
|
||||
read. */
|
||||
memcpy( pucData, pxBuffer->ucArray + uxNextTail, uxFirst );
|
||||
|
||||
/* If the total number of wanted bytes is greater than the number
|
||||
that could be read in the first read... */
|
||||
if( uxCount > uxFirst )
|
||||
{
|
||||
/*...then read the remaining bytes from the start of the buffer. */
|
||||
memcpy( pucData + uxFirst, pxBuffer->ucArray, uxCount - uxFirst );
|
||||
}
|
||||
}
|
||||
|
||||
if( ( xPeek == pdFALSE ) && ( uxOffset == 0UL ) )
|
||||
{
|
||||
/* Move the tail pointer to effecively remove the data read from
|
||||
the buffer. */
|
||||
uxNextTail += uxCount;
|
||||
|
||||
if( uxNextTail >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxNextTail -= pxBuffer->LENGTH;
|
||||
}
|
||||
|
||||
pxBuffer->uxTail = uxNextTail;
|
||||
}
|
||||
}
|
||||
|
||||
return uxCount;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,177 +1,177 @@
|
||||
Changes between 160919 and 180821 releases:
|
||||
|
||||
+ Multiple security improvements and fixes in packet parsing routines, DNS
|
||||
caching, and TCP sequence number and ID generation.
|
||||
+ Disable NBNS and LLMNR by default.
|
||||
+ Add TCP hang protection by default.
|
||||
|
||||
We thank Ori Karliner of Zimperium zLabs Team for reporting these issues.
|
||||
|
||||
Changes between 160908 and 160919 releases:
|
||||
|
||||
+ Add a NULL check before attempting to close the DHCP socket. [Prior to
|
||||
160823 the IP task closed the DHCP socket by calling a public API function
|
||||
- which checked for the socket being NULL. This was changed to call a
|
||||
local private function, which did not have a NULL check, in place of the
|
||||
public API function.]
|
||||
+ Various [internal only] naming changes to better comply with the FreeRTOS
|
||||
naming conventions.
|
||||
+ Improvements to the Zynq network driver. DMA transmission buffers now use
|
||||
a counting semaphore. When all TX-buffers are in-use, the IP-task will
|
||||
block momentarily until a TX-buffer becomes available.
|
||||
+ Experimental implementation of the TCP window scaling protocol. The
|
||||
scaling option will always be offered, at least with a factor 1. If the
|
||||
TCP sliding window size becomes more than 64KB, the factor will increase
|
||||
automatically.
|
||||
+ ipconfigETHERNET_MINIMUM_PACKET_BYTES is now applied for every protocol:
|
||||
TCP, UDP, and ARP.
|
||||
+ Updated the Zynq project to use BufferAllocation_1.c rather than
|
||||
BufferAllocation_2.c - which is a requirement with its current
|
||||
configuration (due to the alignment requirements on the combined cache and
|
||||
DMA configuration).
|
||||
|
||||
Changes between 160823 and 160908 releases:
|
||||
|
||||
+ Use ipconfigZERO_COPY_TX_DRIVER as the xReleaseAfterSend() parameter where
|
||||
prvTCPReturnPacket() is called in prvSendData() to prevent unnecessary
|
||||
copying of data.
|
||||
+ Remove the use of the uxGetRxEventCount variable, which was used to give
|
||||
priority to incoming messages, but could result in the IP task starving
|
||||
application tasks of processing time.
|
||||
|
||||
Changes between 160112 and 160823 releases
|
||||
|
||||
NOTE: The 160908 release is a maintenance release for the 160112 single
|
||||
interface labs release - not a release of the current development branch.
|
||||
|
||||
+ Various minor stability enhancements, including the ability to work with
|
||||
configTICK_RATE_HZ set to less than 1KHz, closing DHCP sockets directly
|
||||
rather than via FreeRTOS_closesocket(), and better handling of unknown
|
||||
TCP packets before an IP address has been assigned.
|
||||
+ ipBUFFER_PADDING is now configurable through the ipconfigBUFFER_PADDING
|
||||
constant to improve network buffer alignment handling capabilities (expert
|
||||
users/driver writers only).
|
||||
+ Multiple improvements to the FTP server, including to how read only and
|
||||
zero length files are handled.
|
||||
+ ipconfigFTP_HAS_USER_PROPERTIES_HOOK (to allow each user to have a
|
||||
different root directory and access rights) and
|
||||
ipconfigHTTP_HAS_HANDLE_REQUEST_HOOK (to handle AJAX style data)
|
||||
introduced, although these are not yet fully tested and the constant names
|
||||
are likely to change.
|
||||
+ Introduce ipconfigHAS_TX_CRC_OFFLOADING.
|
||||
+ ipconfigUSE_DHCP_HOOK is now called ipconfigUSE_DHCP_HOOK, and the name
|
||||
of the callback function has also changed. See the web documentation for
|
||||
details.
|
||||
+ ipconfigTCP_RX_BUF_LEN is now ipconfigTCP_RX_BUFFER_LENGTH, and
|
||||
ipconfigTCP_TX_BUF_LEN is now ipconfigTCP_TX_BUFFER_LENGTH, which is
|
||||
actually how they have always been documented.
|
||||
+ Added example TFTP server capable of receiving (not sending) files.
|
||||
Intended for bootloader type functionality.
|
||||
+ Various variable name changes for consistency (mainly ensuring UDP, TCP,
|
||||
DNS, etc. always use the same case letters, and type prefixes are correct).
|
||||
+ Various minor edits to improve types used by internal variables.
|
||||
+ Simplified mapping of standard library functions to their Visual Studio
|
||||
equivalents.
|
||||
+ Improve robustness of network drivers.
|
||||
+ Introduce pxResizeNetworkBufferWithDescriptor().
|
||||
+ Removed obsolete FreeRTOSIPConfig.h constants from
|
||||
FreeRTOSIPConfigDefaults.h.
|
||||
+ Added additional asserts() - predominantly to catch incorrect structure
|
||||
packing.
|
||||
|
||||
Changes between 160112 and 160111 releases
|
||||
|
||||
+ Updated the STM32 network driver so checksums are calculated by the
|
||||
hardware.
|
||||
+ Implemented a simple "quit" command in the TCP command console.
|
||||
|
||||
Changes between 150825 and 160111 releases
|
||||
|
||||
+ New device support: Demo applications and example drivers are provided
|
||||
for Atmel SAM4E and ST STM32F4 microcontrollers.
|
||||
+ Various updates to improve compliance with the FreeRTOS coding standard.
|
||||
+ Added a command console example that uses TCP/IP for input and output (the
|
||||
pre-existing command console example uses UDP/IP).
|
||||
+ Updated the UDP logging example so it will send log messages to the local
|
||||
UDP broadcast address if a specific IP address is not provided. This
|
||||
simplifies configuration, but note not all switches and routers will pass
|
||||
broadcast messages.
|
||||
+ Add TCP echo client and TCP echo server examples to the Zynq demo.
|
||||
+ Minor updates to the Zynq network driver.
|
||||
+ Update the Zynq project to use version 2015.4 of the Xilinx SDK.
|
||||
+ Introduce FreeRTOS_SignalSocket(), which can be used to interrupt a task
|
||||
that is blocked while reading from a socket ( FreeRTOS_recv[from] ).
|
||||
+ Make use of FreeRTOS_SignalSocket() in the FTP and HTTP servers.
|
||||
+ Major updates to the NTP client, although this is not included in any of
|
||||
the pre-configured demo applications yet.
|
||||
+ Added support for DHCP zero pad option.
|
||||
+ Added uxGetMinimumIPQueueSpace(), a function to monitor the minimum amount
|
||||
of space on the message queue.
|
||||
+ Better handling of zero length files in the FTP server.
|
||||
+ Fixed a bug reported by Andrey Ivanov from swissEmbedded that affects
|
||||
users of 'ipconfigZERO_COPY_TX_DRIVER'.
|
||||
|
||||
|
||||
Changes between 150825 150825 (?)
|
||||
|
||||
+ Added xApplicationDHCPUserHook() so a user defined hook will be
|
||||
called at certain points in the DHCP process if
|
||||
ipconfigDHCP_USES_USER_HOOK is set to 1.
|
||||
+ Added FreeRTOS_get_tx_head() to improve TCP zero copy behaviour - for
|
||||
expert use only.
|
||||
+ RST is no longer sent if only the ACK flag is set.
|
||||
+ Previously, an immediate ACK was only sent when buffer space was
|
||||
exhausted. Now, to improve performance, it is possible to send an
|
||||
immediate ACK earlier - dependent on the ipconfigTCP_ACK_EARLIER_PACKET
|
||||
setting.
|
||||
+ LLMNR and NBNS requests can now be sent to locate other devices -
|
||||
previously these protocols would only be replied to, not generated.
|
||||
+ Added Auto-IP functionality (still in test) in case DHCP fails. Dependent
|
||||
on the ipconfigDHCP_FALL_BACK_LINK_LAYER_ADDRESS and
|
||||
ipconfigARP_USE_CLASH_DETECTION settings.
|
||||
+ Added NTP code and demo.
|
||||
+ FTP can now STOR and RETR zero-length files.
|
||||
+ Added LLMNR demo to Win32 demo - so now the Win32 responds to
|
||||
"ping RTOSDemo".
|
||||
|
||||
Changes between 141019 and 150825
|
||||
|
||||
+ Added FTP server, which uses the new FreeRTOS+FAT component.
|
||||
+ Added basic HTTP server, which uses the new FreeRTOS+FAT component.
|
||||
+ Multiple definitions that are now common with FreeRTOS+FAT have been moved
|
||||
into FreeRTOS's ProjDefs.h header file, and so prefixed with 'pd'.
|
||||
+ Introduced ipconfigZERO_COPY_TX_DRIVER, which defines who is responsible
|
||||
for freeing a buffer sent to to the MAC driver for transmission, and
|
||||
facilitates the development of zero copy drivers.
|
||||
+ Introduced the FREERTOS_MSG_DONTWAIT flag. The flag can be used as a
|
||||
simpler and faster alternative to using FreeRTOS_setsockopt() to set the
|
||||
send or receive timeout to 0.
|
||||
+ A few functions that were previously all lower case are now mixed case, as
|
||||
lower case function names are only used when they are equivalent to a
|
||||
a Berkeley sockets API function of the same name.
|
||||
+ Introduced uxGetMinimumFreeNetworkBuffers() to return the minimum number
|
||||
of network buffers that have ever existed since the application started
|
||||
executing.
|
||||
+ Introduce ipconfigETHERNET_MINIMUM_PACKET_BYTES to allow the application
|
||||
writer to set their own minimum buffer size should the hardware not be
|
||||
capable of padding under-sized Ethernet frames.
|
||||
+ vNetworkBufferRelease() renamed vReleaseNetworkBuffer() - just for
|
||||
consistency with the names of other functions in the same file.
|
||||
+ Grouped DHCP status data into a structure.
|
||||
+ DHCP is now tried both with and without the broadcast flag.
|
||||
+ Replaced occurrences of configASSERT_VOID() with configASSERT().
|
||||
+ ipconfigDNS_USE_CALLBACKS introduced to allow FreeRTOS_gethostbyname() to
|
||||
be used without blocking.
|
||||
+ Fix: LLMNR and NBNS behaviour when the reply is in a larger buffer than the
|
||||
request, and BufferAllocation_2 was used.
|
||||
+ Introduced ipMAX_IP_TASK_SLEEP_TIME to allow the application writer to
|
||||
override the default value of 10 seconds.
|
||||
+ Fix: Correct error in *pxUDPPayloadBuffer_to_NetworkBuffer().
|
||||
+ FreeRTOS_recv() now recognises the FREERTOS_ZERO_COPY flag, which, when
|
||||
set, the void *pvBuffer parameter is interpreted as void **pvBuffer.
|
||||
+ FreeRTOS_listen() now returns an error code. Previously it always
|
||||
returned 0.
|
||||
+ Fix: Previously if a listening socket was reused, and a connection
|
||||
failed, the TCP/IP stack closed the socket, now the socket is correctly
|
||||
left unclosed as it is owned by the application.
|
||||
+ Various other formatting and minor fix alterations.
|
||||
Changes between 160919 and 180821 releases:
|
||||
|
||||
+ Multiple security improvements and fixes in packet parsing routines, DNS
|
||||
caching, and TCP sequence number and ID generation.
|
||||
+ Disable NBNS and LLMNR by default.
|
||||
+ Add TCP hang protection by default.
|
||||
|
||||
We thank Ori Karliner of Zimperium zLabs Team for reporting these issues.
|
||||
|
||||
Changes between 160908 and 160919 releases:
|
||||
|
||||
+ Add a NULL check before attempting to close the DHCP socket. [Prior to
|
||||
160823 the IP task closed the DHCP socket by calling a public API function
|
||||
- which checked for the socket being NULL. This was changed to call a
|
||||
local private function, which did not have a NULL check, in place of the
|
||||
public API function.]
|
||||
+ Various [internal only] naming changes to better comply with the FreeRTOS
|
||||
naming conventions.
|
||||
+ Improvements to the Zynq network driver. DMA transmission buffers now use
|
||||
a counting semaphore. When all TX-buffers are in-use, the IP-task will
|
||||
block momentarily until a TX-buffer becomes available.
|
||||
+ Experimental implementation of the TCP window scaling protocol. The
|
||||
scaling option will always be offered, at least with a factor 1. If the
|
||||
TCP sliding window size becomes more than 64KB, the factor will increase
|
||||
automatically.
|
||||
+ ipconfigETHERNET_MINIMUM_PACKET_BYTES is now applied for every protocol:
|
||||
TCP, UDP, and ARP.
|
||||
+ Updated the Zynq project to use BufferAllocation_1.c rather than
|
||||
BufferAllocation_2.c - which is a requirement with its current
|
||||
configuration (due to the alignment requirements on the combined cache and
|
||||
DMA configuration).
|
||||
|
||||
Changes between 160823 and 160908 releases:
|
||||
|
||||
+ Use ipconfigZERO_COPY_TX_DRIVER as the xReleaseAfterSend() parameter where
|
||||
prvTCPReturnPacket() is called in prvSendData() to prevent unnecessary
|
||||
copying of data.
|
||||
+ Remove the use of the uxGetRxEventCount variable, which was used to give
|
||||
priority to incoming messages, but could result in the IP task starving
|
||||
application tasks of processing time.
|
||||
|
||||
Changes between 160112 and 160823 releases
|
||||
|
||||
NOTE: The 160908 release is a maintenance release for the 160112 single
|
||||
interface labs release - not a release of the current development branch.
|
||||
|
||||
+ Various minor stability enhancements, including the ability to work with
|
||||
configTICK_RATE_HZ set to less than 1KHz, closing DHCP sockets directly
|
||||
rather than via FreeRTOS_closesocket(), and better handling of unknown
|
||||
TCP packets before an IP address has been assigned.
|
||||
+ ipBUFFER_PADDING is now configurable through the ipconfigBUFFER_PADDING
|
||||
constant to improve network buffer alignment handling capabilities (expert
|
||||
users/driver writers only).
|
||||
+ Multiple improvements to the FTP server, including to how read only and
|
||||
zero length files are handled.
|
||||
+ ipconfigFTP_HAS_USER_PROPERTIES_HOOK (to allow each user to have a
|
||||
different root directory and access rights) and
|
||||
ipconfigHTTP_HAS_HANDLE_REQUEST_HOOK (to handle AJAX style data)
|
||||
introduced, although these are not yet fully tested and the constant names
|
||||
are likely to change.
|
||||
+ Introduce ipconfigHAS_TX_CRC_OFFLOADING.
|
||||
+ ipconfigUSE_DHCP_HOOK is now called ipconfigUSE_DHCP_HOOK, and the name
|
||||
of the callback function has also changed. See the web documentation for
|
||||
details.
|
||||
+ ipconfigTCP_RX_BUF_LEN is now ipconfigTCP_RX_BUFFER_LENGTH, and
|
||||
ipconfigTCP_TX_BUF_LEN is now ipconfigTCP_TX_BUFFER_LENGTH, which is
|
||||
actually how they have always been documented.
|
||||
+ Added example TFTP server capable of receiving (not sending) files.
|
||||
Intended for bootloader type functionality.
|
||||
+ Various variable name changes for consistency (mainly ensuring UDP, TCP,
|
||||
DNS, etc. always use the same case letters, and type prefixes are correct).
|
||||
+ Various minor edits to improve types used by internal variables.
|
||||
+ Simplified mapping of standard library functions to their Visual Studio
|
||||
equivalents.
|
||||
+ Improve robustness of network drivers.
|
||||
+ Introduce pxResizeNetworkBufferWithDescriptor().
|
||||
+ Removed obsolete FreeRTOSIPConfig.h constants from
|
||||
FreeRTOSIPConfigDefaults.h.
|
||||
+ Added additional asserts() - predominantly to catch incorrect structure
|
||||
packing.
|
||||
|
||||
Changes between 160112 and 160111 releases
|
||||
|
||||
+ Updated the STM32 network driver so checksums are calculated by the
|
||||
hardware.
|
||||
+ Implemented a simple "quit" command in the TCP command console.
|
||||
|
||||
Changes between 150825 and 160111 releases
|
||||
|
||||
+ New device support: Demo applications and example drivers are provided
|
||||
for Atmel SAM4E and ST STM32F4 microcontrollers.
|
||||
+ Various updates to improve compliance with the FreeRTOS coding standard.
|
||||
+ Added a command console example that uses TCP/IP for input and output (the
|
||||
pre-existing command console example uses UDP/IP).
|
||||
+ Updated the UDP logging example so it will send log messages to the local
|
||||
UDP broadcast address if a specific IP address is not provided. This
|
||||
simplifies configuration, but note not all switches and routers will pass
|
||||
broadcast messages.
|
||||
+ Add TCP echo client and TCP echo server examples to the Zynq demo.
|
||||
+ Minor updates to the Zynq network driver.
|
||||
+ Update the Zynq project to use version 2015.4 of the Xilinx SDK.
|
||||
+ Introduce FreeRTOS_SignalSocket(), which can be used to interrupt a task
|
||||
that is blocked while reading from a socket ( FreeRTOS_recv[from] ).
|
||||
+ Make use of FreeRTOS_SignalSocket() in the FTP and HTTP servers.
|
||||
+ Major updates to the NTP client, although this is not included in any of
|
||||
the pre-configured demo applications yet.
|
||||
+ Added support for DHCP zero pad option.
|
||||
+ Added uxGetMinimumIPQueueSpace(), a function to monitor the minimum amount
|
||||
of space on the message queue.
|
||||
+ Better handling of zero length files in the FTP server.
|
||||
+ Fixed a bug reported by Andrey Ivanov from swissEmbedded that affects
|
||||
users of 'ipconfigZERO_COPY_TX_DRIVER'.
|
||||
|
||||
|
||||
Changes between 150825 150825 (?)
|
||||
|
||||
+ Added xApplicationDHCPUserHook() so a user defined hook will be
|
||||
called at certain points in the DHCP process if
|
||||
ipconfigDHCP_USES_USER_HOOK is set to 1.
|
||||
+ Added FreeRTOS_get_tx_head() to improve TCP zero copy behaviour - for
|
||||
expert use only.
|
||||
+ RST is no longer sent if only the ACK flag is set.
|
||||
+ Previously, an immediate ACK was only sent when buffer space was
|
||||
exhausted. Now, to improve performance, it is possible to send an
|
||||
immediate ACK earlier - dependent on the ipconfigTCP_ACK_EARLIER_PACKET
|
||||
setting.
|
||||
+ LLMNR and NBNS requests can now be sent to locate other devices -
|
||||
previously these protocols would only be replied to, not generated.
|
||||
+ Added Auto-IP functionality (still in test) in case DHCP fails. Dependent
|
||||
on the ipconfigDHCP_FALL_BACK_LINK_LAYER_ADDRESS and
|
||||
ipconfigARP_USE_CLASH_DETECTION settings.
|
||||
+ Added NTP code and demo.
|
||||
+ FTP can now STOR and RETR zero-length files.
|
||||
+ Added LLMNR demo to Win32 demo - so now the Win32 responds to
|
||||
"ping RTOSDemo".
|
||||
|
||||
Changes between 141019 and 150825
|
||||
|
||||
+ Added FTP server, which uses the new FreeRTOS+FAT component.
|
||||
+ Added basic HTTP server, which uses the new FreeRTOS+FAT component.
|
||||
+ Multiple definitions that are now common with FreeRTOS+FAT have been moved
|
||||
into FreeRTOS's ProjDefs.h header file, and so prefixed with 'pd'.
|
||||
+ Introduced ipconfigZERO_COPY_TX_DRIVER, which defines who is responsible
|
||||
for freeing a buffer sent to to the MAC driver for transmission, and
|
||||
facilitates the development of zero copy drivers.
|
||||
+ Introduced the FREERTOS_MSG_DONTWAIT flag. The flag can be used as a
|
||||
simpler and faster alternative to using FreeRTOS_setsockopt() to set the
|
||||
send or receive timeout to 0.
|
||||
+ A few functions that were previously all lower case are now mixed case, as
|
||||
lower case function names are only used when they are equivalent to a
|
||||
a Berkeley sockets API function of the same name.
|
||||
+ Introduced uxGetMinimumFreeNetworkBuffers() to return the minimum number
|
||||
of network buffers that have ever existed since the application started
|
||||
executing.
|
||||
+ Introduce ipconfigETHERNET_MINIMUM_PACKET_BYTES to allow the application
|
||||
writer to set their own minimum buffer size should the hardware not be
|
||||
capable of padding under-sized Ethernet frames.
|
||||
+ vNetworkBufferRelease() renamed vReleaseNetworkBuffer() - just for
|
||||
consistency with the names of other functions in the same file.
|
||||
+ Grouped DHCP status data into a structure.
|
||||
+ DHCP is now tried both with and without the broadcast flag.
|
||||
+ Replaced occurrences of configASSERT_VOID() with configASSERT().
|
||||
+ ipconfigDNS_USE_CALLBACKS introduced to allow FreeRTOS_gethostbyname() to
|
||||
be used without blocking.
|
||||
+ Fix: LLMNR and NBNS behaviour when the reply is in a larger buffer than the
|
||||
request, and BufferAllocation_2 was used.
|
||||
+ Introduced ipMAX_IP_TASK_SLEEP_TIME to allow the application writer to
|
||||
override the default value of 10 seconds.
|
||||
+ Fix: Correct error in *pxUDPPayloadBuffer_to_NetworkBuffer().
|
||||
+ FreeRTOS_recv() now recognises the FREERTOS_ZERO_COPY flag, which, when
|
||||
set, the void *pvBuffer parameter is interpreted as void **pvBuffer.
|
||||
+ FreeRTOS_listen() now returns an error code. Previously it always
|
||||
returned 0.
|
||||
+ Fix: Previously if a listening socket was reused, and a connection
|
||||
failed, the TCP/IP stack closed the socket, now the socket is correctly
|
||||
left unclosed as it is owned by the application.
|
||||
+ Various other formatting and minor fix alterations.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,2
|
||||
[InternetShortcut]
|
||||
URL=http://www.freertos.org/tcp
|
||||
IDList=
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,2
|
||||
[InternetShortcut]
|
||||
URL=http://www.freertos.org/tcp
|
||||
IDList=
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,141 +1,141 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_ARP_H
|
||||
#define FREERTOS_ARP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Application level configuration options. */
|
||||
#include "FreeRTOSIPConfig.h"
|
||||
#include "FreeRTOSIPConfigDefaults.h"
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
/* Miscellaneous structure and definitions. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
typedef struct xARP_CACHE_TABLE_ROW
|
||||
{
|
||||
uint32_t ulIPAddress; /* The IP address of an ARP cache entry. */
|
||||
MACAddress_t xMACAddress; /* The MAC address of an ARP cache entry. */
|
||||
uint8_t ucAge; /* A value that is periodically decremented but can also be refreshed by active communication. The ARP cache entry is removed if the value reaches zero. */
|
||||
uint8_t ucValid; /* pdTRUE: xMACAddress is valid, pdFALSE: waiting for ARP reply */
|
||||
} ARPCacheRow_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eARPCacheMiss = 0, /* 0 An ARP table lookup did not find a valid entry. */
|
||||
eARPCacheHit, /* 1 An ARP table lookup found a valid entry. */
|
||||
eCantSendPacket /* 2 There is no IP address, or an ARP is still in progress, so the packet cannot be sent. */
|
||||
} eARPLookupResult_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eNotFragment = 0, /* The IP packet being sent is not part of a fragment. */
|
||||
eFirstFragment, /* The IP packet being sent is the first in a set of fragmented packets. */
|
||||
eFollowingFragment /* The IP packet being sent is part of a set of fragmented packets. */
|
||||
} eIPFragmentStatus_t;
|
||||
|
||||
/*
|
||||
* If ulIPAddress is already in the ARP cache table then reset the age of the
|
||||
* entry back to its maximum value. If ulIPAddress is not already in the ARP
|
||||
* cache table then add it - replacing the oldest current entry if there is not
|
||||
* a free space available.
|
||||
*/
|
||||
void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress );
|
||||
|
||||
#if( ipconfigARP_USE_CLASH_DETECTION != 0 )
|
||||
/* Becomes non-zero if another device responded to a gratuitos ARP message. */
|
||||
extern BaseType_t xARPHadIPClash;
|
||||
/* MAC-address of the other device containing the same IP-address. */
|
||||
extern MACAddress_t xARPClashMacAddress;
|
||||
#endif /* ipconfigARP_USE_CLASH_DETECTION */
|
||||
|
||||
#if( ipconfigUSE_ARP_REMOVE_ENTRY != 0 )
|
||||
|
||||
/*
|
||||
* In some rare cases, it might be useful to remove a ARP cache entry of a
|
||||
* known MAC address to make sure it gets refreshed.
|
||||
*/
|
||||
uint32_t ulARPRemoveCacheEntryByMac( const MACAddress_t * pxMACAddress );
|
||||
|
||||
#endif /* ipconfigUSE_ARP_REMOVE_ENTRY != 0 */
|
||||
|
||||
/*
|
||||
* Look for ulIPAddress in the ARP cache. If the IP address exists, copy the
|
||||
* associated MAC address into pxMACAddress, refresh the ARP cache entry's
|
||||
* age, and return eARPCacheHit. If the IP address does not exist in the ARP
|
||||
* cache return eARPCacheMiss. If the packet cannot be sent for any reason
|
||||
* (maybe DHCP is still in process, or the addressing needs a gateway but there
|
||||
* isn't a gateway defined) then return eCantSendPacket.
|
||||
*/
|
||||
eARPLookupResult_t eARPGetCacheEntry( uint32_t *pulIPAddress, MACAddress_t * const pxMACAddress );
|
||||
|
||||
#if( ipconfigUSE_ARP_REVERSED_LOOKUP != 0 )
|
||||
|
||||
/* Lookup an IP-address if only the MAC-address is known */
|
||||
eARPLookupResult_t eARPGetCacheEntryByMac( MACAddress_t * const pxMACAddress, uint32_t *pulIPAddress );
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Reduce the age count in each entry within the ARP cache. An entry is no
|
||||
* longer considered valid and is deleted if its age reaches zero.
|
||||
*/
|
||||
void vARPAgeCache( void );
|
||||
|
||||
/*
|
||||
* Send out an ARP request for the IP address contained in pxNetworkBuffer, and
|
||||
* add an entry into the ARP table that indicates that an ARP reply is
|
||||
* outstanding so re-transmissions can be generated.
|
||||
*/
|
||||
void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
||||
|
||||
/*
|
||||
* After DHCP is ready and when changing IP address, force a quick send of our new IP
|
||||
* address
|
||||
*/
|
||||
void vARPSendGratuitous( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_ARP_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_ARP_H
|
||||
#define FREERTOS_ARP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Application level configuration options. */
|
||||
#include "FreeRTOSIPConfig.h"
|
||||
#include "FreeRTOSIPConfigDefaults.h"
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
/* Miscellaneous structure and definitions. */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
typedef struct xARP_CACHE_TABLE_ROW
|
||||
{
|
||||
uint32_t ulIPAddress; /* The IP address of an ARP cache entry. */
|
||||
MACAddress_t xMACAddress; /* The MAC address of an ARP cache entry. */
|
||||
uint8_t ucAge; /* A value that is periodically decremented but can also be refreshed by active communication. The ARP cache entry is removed if the value reaches zero. */
|
||||
uint8_t ucValid; /* pdTRUE: xMACAddress is valid, pdFALSE: waiting for ARP reply */
|
||||
} ARPCacheRow_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eARPCacheMiss = 0, /* 0 An ARP table lookup did not find a valid entry. */
|
||||
eARPCacheHit, /* 1 An ARP table lookup found a valid entry. */
|
||||
eCantSendPacket /* 2 There is no IP address, or an ARP is still in progress, so the packet cannot be sent. */
|
||||
} eARPLookupResult_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eNotFragment = 0, /* The IP packet being sent is not part of a fragment. */
|
||||
eFirstFragment, /* The IP packet being sent is the first in a set of fragmented packets. */
|
||||
eFollowingFragment /* The IP packet being sent is part of a set of fragmented packets. */
|
||||
} eIPFragmentStatus_t;
|
||||
|
||||
/*
|
||||
* If ulIPAddress is already in the ARP cache table then reset the age of the
|
||||
* entry back to its maximum value. If ulIPAddress is not already in the ARP
|
||||
* cache table then add it - replacing the oldest current entry if there is not
|
||||
* a free space available.
|
||||
*/
|
||||
void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress );
|
||||
|
||||
#if( ipconfigARP_USE_CLASH_DETECTION != 0 )
|
||||
/* Becomes non-zero if another device responded to a gratuitos ARP message. */
|
||||
extern BaseType_t xARPHadIPClash;
|
||||
/* MAC-address of the other device containing the same IP-address. */
|
||||
extern MACAddress_t xARPClashMacAddress;
|
||||
#endif /* ipconfigARP_USE_CLASH_DETECTION */
|
||||
|
||||
#if( ipconfigUSE_ARP_REMOVE_ENTRY != 0 )
|
||||
|
||||
/*
|
||||
* In some rare cases, it might be useful to remove a ARP cache entry of a
|
||||
* known MAC address to make sure it gets refreshed.
|
||||
*/
|
||||
uint32_t ulARPRemoveCacheEntryByMac( const MACAddress_t * pxMACAddress );
|
||||
|
||||
#endif /* ipconfigUSE_ARP_REMOVE_ENTRY != 0 */
|
||||
|
||||
/*
|
||||
* Look for ulIPAddress in the ARP cache. If the IP address exists, copy the
|
||||
* associated MAC address into pxMACAddress, refresh the ARP cache entry's
|
||||
* age, and return eARPCacheHit. If the IP address does not exist in the ARP
|
||||
* cache return eARPCacheMiss. If the packet cannot be sent for any reason
|
||||
* (maybe DHCP is still in process, or the addressing needs a gateway but there
|
||||
* isn't a gateway defined) then return eCantSendPacket.
|
||||
*/
|
||||
eARPLookupResult_t eARPGetCacheEntry( uint32_t *pulIPAddress, MACAddress_t * const pxMACAddress );
|
||||
|
||||
#if( ipconfigUSE_ARP_REVERSED_LOOKUP != 0 )
|
||||
|
||||
/* Lookup an IP-address if only the MAC-address is known */
|
||||
eARPLookupResult_t eARPGetCacheEntryByMac( MACAddress_t * const pxMACAddress, uint32_t *pulIPAddress );
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Reduce the age count in each entry within the ARP cache. An entry is no
|
||||
* longer considered valid and is deleted if its age reaches zero.
|
||||
*/
|
||||
void vARPAgeCache( void );
|
||||
|
||||
/*
|
||||
* Send out an ARP request for the IP address contained in pxNetworkBuffer, and
|
||||
* add an entry into the ARP table that indicates that an ARP reply is
|
||||
* outstanding so re-transmissions can be generated.
|
||||
*/
|
||||
void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
||||
|
||||
/*
|
||||
* After DHCP is ready and when changing IP address, force a quick send of our new IP
|
||||
* address
|
||||
*/
|
||||
void vARPSendGratuitous( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_ARP_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,87 +1,87 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_DHCP_H
|
||||
#define FREERTOS_DHCP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Application level configuration options. */
|
||||
#include "FreeRTOSIPConfig.h"
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
/* Used in the DHCP callback if ipconfigUSE_DHCP_HOOK is set to 1. */
|
||||
typedef enum eDHCP_PHASE
|
||||
{
|
||||
eDHCPPhasePreDiscover, /* Driver is about to send a DHCP discovery. */
|
||||
eDHCPPhasePreRequest, /* Driver is about to request DHCP an IP address. */
|
||||
#if( ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP != 0 )
|
||||
eDHCPPhasePreLLA, /* Driver is about to try get an LLA address */
|
||||
#endif /* ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP */
|
||||
} eDHCPCallbackPhase_t;
|
||||
|
||||
/* Used in the DHCP callback if ipconfigUSE_DHCP_HOOK is set to 1. */
|
||||
typedef enum eDHCP_ANSWERS
|
||||
{
|
||||
eDHCPContinue, /* Continue the DHCP process */
|
||||
eDHCPUseDefaults, /* Stop DHCP and use the static defaults. */
|
||||
eDHCPStopNoChanges, /* Stop DHCP and continue with current settings. */
|
||||
} eDHCPCallbackAnswer_t;
|
||||
|
||||
/*
|
||||
* NOT A PUBLIC API FUNCTION.
|
||||
*/
|
||||
void vDHCPProcess( BaseType_t xReset );
|
||||
|
||||
/* Internal call: returns true if socket is the current DHCP socket */
|
||||
BaseType_t xIsDHCPSocket( Socket_t xSocket );
|
||||
|
||||
/* Prototype of the hook (or callback) function that must be provided by the
|
||||
application if ipconfigUSE_DHCP_HOOK is set to 1. See the following URL for
|
||||
usage information:
|
||||
http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK
|
||||
*/
|
||||
eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t eDHCPPhase, uint32_t ulIPAddress );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_DHCP_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_DHCP_H
|
||||
#define FREERTOS_DHCP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Application level configuration options. */
|
||||
#include "FreeRTOSIPConfig.h"
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
/* Used in the DHCP callback if ipconfigUSE_DHCP_HOOK is set to 1. */
|
||||
typedef enum eDHCP_PHASE
|
||||
{
|
||||
eDHCPPhasePreDiscover, /* Driver is about to send a DHCP discovery. */
|
||||
eDHCPPhasePreRequest, /* Driver is about to request DHCP an IP address. */
|
||||
#if( ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP != 0 )
|
||||
eDHCPPhasePreLLA, /* Driver is about to try get an LLA address */
|
||||
#endif /* ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP */
|
||||
} eDHCPCallbackPhase_t;
|
||||
|
||||
/* Used in the DHCP callback if ipconfigUSE_DHCP_HOOK is set to 1. */
|
||||
typedef enum eDHCP_ANSWERS
|
||||
{
|
||||
eDHCPContinue, /* Continue the DHCP process */
|
||||
eDHCPUseDefaults, /* Stop DHCP and use the static defaults. */
|
||||
eDHCPStopNoChanges, /* Stop DHCP and continue with current settings. */
|
||||
} eDHCPCallbackAnswer_t;
|
||||
|
||||
/*
|
||||
* NOT A PUBLIC API FUNCTION.
|
||||
*/
|
||||
void vDHCPProcess( BaseType_t xReset );
|
||||
|
||||
/* Internal call: returns true if socket is the current DHCP socket */
|
||||
BaseType_t xIsDHCPSocket( Socket_t xSocket );
|
||||
|
||||
/* Prototype of the hook (or callback) function that must be provided by the
|
||||
application if ipconfigUSE_DHCP_HOOK is set to 1. See the following URL for
|
||||
usage information:
|
||||
http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK
|
||||
*/
|
||||
eDHCPCallbackAnswer_t xApplicationDHCPHook( eDHCPCallbackPhase_t eDHCPPhase, uint32_t ulIPAddress );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_DHCP_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,137 +1,137 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_DNS_H
|
||||
#define FREERTOS_DNS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Application level configuration options. */
|
||||
#include "FreeRTOSIPConfig.h"
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
|
||||
/* The Link-local Multicast Name Resolution (LLMNR)
|
||||
* is included.
|
||||
* Note that a special MAC address is required in addition to the NIC's actual
|
||||
* MAC address: 01:00:5E:00:00:FC
|
||||
*
|
||||
* The target IP address will be 224.0.0.252
|
||||
*/
|
||||
#if( ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN )
|
||||
#define ipLLMNR_IP_ADDR 0xE00000FC
|
||||
#else
|
||||
#define ipLLMNR_IP_ADDR 0xFC0000E0
|
||||
#endif /* ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN */
|
||||
|
||||
#define ipLLMNR_PORT 5355 /* Standard LLMNR port. */
|
||||
#define ipDNS_PORT 53 /* Standard DNS port. */
|
||||
#define ipDHCP_CLIENT 67
|
||||
#define ipDHCP_SERVER 68
|
||||
#define ipNBNS_PORT 137 /* NetBIOS Name Service. */
|
||||
#define ipNBDGM_PORT 138 /* Datagram Service, not included. */
|
||||
|
||||
/*
|
||||
* The following function should be provided by the user and return true if it
|
||||
* matches the domain name.
|
||||
*/
|
||||
extern BaseType_t xApplicationDNSQueryHook( const char *pcName );
|
||||
|
||||
/*
|
||||
* LLMNR is very similar to DNS, so is handled by the DNS routines.
|
||||
*/
|
||||
uint32_t ulDNSHandlePacket( NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
|
||||
#if( ipconfigUSE_LLMNR == 1 )
|
||||
extern const MACAddress_t xLLMNR_MacAdress;
|
||||
#endif /* ipconfigUSE_LLMNR */
|
||||
|
||||
#if( ipconfigUSE_NBNS != 0 )
|
||||
|
||||
/*
|
||||
* Inspect a NetBIOS Names-Service message. If the name matches with ours
|
||||
* (xApplicationDNSQueryHook returns true) an answer will be sent back.
|
||||
* Note that LLMNR is a better protocol for name services on a LAN as it is
|
||||
* less polluted
|
||||
*/
|
||||
uint32_t ulNBNSHandlePacket (NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
|
||||
#endif /* ipconfigUSE_NBNS */
|
||||
|
||||
#if( ipconfigUSE_DNS_CACHE != 0 )
|
||||
|
||||
/* Look for the indicated host name in the DNS cache. Returns the IPv4
|
||||
address if present, or 0x0 otherwise. */
|
||||
uint32_t FreeRTOS_dnslookup( const char *pcHostName );
|
||||
|
||||
/* Remove all entries from the DNS cache. */
|
||||
void FreeRTOS_dnsclear();
|
||||
#endif /* ipconfigUSE_DNS_CACHE != 0 */
|
||||
|
||||
#if( ipconfigDNS_USE_CALLBACKS != 0 )
|
||||
|
||||
/*
|
||||
* Users may define this type of function as a callback.
|
||||
* It will be called when a DNS reply is received or when a timeout has been reached.
|
||||
*/
|
||||
typedef void (* FOnDNSEvent ) ( const char * /* pcName */, void * /* pvSearchID */, uint32_t /* ulIPAddress */ );
|
||||
|
||||
/*
|
||||
* Asynchronous version of gethostbyname()
|
||||
* xTimeout is in units of ms.
|
||||
*/
|
||||
uint32_t FreeRTOS_gethostbyname_a( const char *pcHostName, FOnDNSEvent pCallback, void *pvSearchID, TickType_t xTimeout );
|
||||
void FreeRTOS_gethostbyname_cancel( void *pvSearchID );
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE
|
||||
* FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL:
|
||||
* _TBD_ Add URL
|
||||
*/
|
||||
uint32_t FreeRTOS_gethostbyname( const char *pcHostName );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_DNS_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_DNS_H
|
||||
#define FREERTOS_DNS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Application level configuration options. */
|
||||
#include "FreeRTOSIPConfig.h"
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
|
||||
/* The Link-local Multicast Name Resolution (LLMNR)
|
||||
* is included.
|
||||
* Note that a special MAC address is required in addition to the NIC's actual
|
||||
* MAC address: 01:00:5E:00:00:FC
|
||||
*
|
||||
* The target IP address will be 224.0.0.252
|
||||
*/
|
||||
#if( ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN )
|
||||
#define ipLLMNR_IP_ADDR 0xE00000FC
|
||||
#else
|
||||
#define ipLLMNR_IP_ADDR 0xFC0000E0
|
||||
#endif /* ipconfigBYTE_ORDER == pdFREERTOS_BIG_ENDIAN */
|
||||
|
||||
#define ipLLMNR_PORT 5355 /* Standard LLMNR port. */
|
||||
#define ipDNS_PORT 53 /* Standard DNS port. */
|
||||
#define ipDHCP_CLIENT 67
|
||||
#define ipDHCP_SERVER 68
|
||||
#define ipNBNS_PORT 137 /* NetBIOS Name Service. */
|
||||
#define ipNBDGM_PORT 138 /* Datagram Service, not included. */
|
||||
|
||||
/*
|
||||
* The following function should be provided by the user and return true if it
|
||||
* matches the domain name.
|
||||
*/
|
||||
extern BaseType_t xApplicationDNSQueryHook( const char *pcName );
|
||||
|
||||
/*
|
||||
* LLMNR is very similar to DNS, so is handled by the DNS routines.
|
||||
*/
|
||||
uint32_t ulDNSHandlePacket( NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
|
||||
#if( ipconfigUSE_LLMNR == 1 )
|
||||
extern const MACAddress_t xLLMNR_MacAdress;
|
||||
#endif /* ipconfigUSE_LLMNR */
|
||||
|
||||
#if( ipconfigUSE_NBNS != 0 )
|
||||
|
||||
/*
|
||||
* Inspect a NetBIOS Names-Service message. If the name matches with ours
|
||||
* (xApplicationDNSQueryHook returns true) an answer will be sent back.
|
||||
* Note that LLMNR is a better protocol for name services on a LAN as it is
|
||||
* less polluted
|
||||
*/
|
||||
uint32_t ulNBNSHandlePacket (NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
|
||||
#endif /* ipconfigUSE_NBNS */
|
||||
|
||||
#if( ipconfigUSE_DNS_CACHE != 0 )
|
||||
|
||||
/* Look for the indicated host name in the DNS cache. Returns the IPv4
|
||||
address if present, or 0x0 otherwise. */
|
||||
uint32_t FreeRTOS_dnslookup( const char *pcHostName );
|
||||
|
||||
/* Remove all entries from the DNS cache. */
|
||||
void FreeRTOS_dnsclear();
|
||||
#endif /* ipconfigUSE_DNS_CACHE != 0 */
|
||||
|
||||
#if( ipconfigDNS_USE_CALLBACKS != 0 )
|
||||
|
||||
/*
|
||||
* Users may define this type of function as a callback.
|
||||
* It will be called when a DNS reply is received or when a timeout has been reached.
|
||||
*/
|
||||
typedef void (* FOnDNSEvent ) ( const char * /* pcName */, void * /* pvSearchID */, uint32_t /* ulIPAddress */ );
|
||||
|
||||
/*
|
||||
* Asynchronous version of gethostbyname()
|
||||
* xTimeout is in units of ms.
|
||||
*/
|
||||
uint32_t FreeRTOS_gethostbyname_a( const char *pcHostName, FOnDNSEvent pCallback, void *pvSearchID, TickType_t xTimeout );
|
||||
void FreeRTOS_gethostbyname_cancel( void *pvSearchID );
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE
|
||||
* FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL:
|
||||
* _TBD_ Add URL
|
||||
*/
|
||||
uint32_t FreeRTOS_gethostbyname( const char *pcHostName );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_DNS_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,231 +1,231 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*
|
||||
* FreeRTOS_Stream_Buffer.h
|
||||
*
|
||||
* A cicular character buffer
|
||||
* An implementation of a circular buffer without a length field
|
||||
* If LENGTH defines the size of the buffer, a maximum of (LENGT-1) bytes can be stored
|
||||
* In order to add or read data from the buffer, memcpy() will be called at most 2 times
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_STREAM_BUFFER_H
|
||||
#define FREERTOS_STREAM_BUFFER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct xSTREAM_BUFFER {
|
||||
volatile size_t uxTail; /* next item to read */
|
||||
volatile size_t uxMid; /* iterator within the valid items */
|
||||
volatile size_t uxHead; /* next position store a new item */
|
||||
volatile size_t uxFront; /* iterator within the free space */
|
||||
size_t LENGTH; /* const value: number of reserved elements */
|
||||
uint8_t ucArray[ sizeof( size_t ) ];
|
||||
} StreamBuffer_t;
|
||||
|
||||
static portINLINE void vStreamBufferClear( StreamBuffer_t *pxBuffer );
|
||||
static portINLINE void vStreamBufferClear( StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Make the circular buffer empty */
|
||||
pxBuffer->uxHead = 0u;
|
||||
pxBuffer->uxTail = 0u;
|
||||
pxBuffer->uxFront = 0u;
|
||||
pxBuffer->uxMid = 0u;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferSpace( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper );
|
||||
static portINLINE size_t uxStreamBufferSpace( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper )
|
||||
{
|
||||
/* Returns the space between uxLower and uxUpper, which equals to the distance minus 1 */
|
||||
size_t uxCount;
|
||||
|
||||
uxCount = pxBuffer->LENGTH + uxUpper - uxLower - 1u;
|
||||
if( uxCount >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxCount -= pxBuffer->LENGTH;
|
||||
}
|
||||
|
||||
return uxCount;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferDistance( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper );
|
||||
static portINLINE size_t uxStreamBufferDistance( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper )
|
||||
{
|
||||
/* Returns the distance between uxLower and uxUpper */
|
||||
size_t uxCount;
|
||||
|
||||
uxCount = pxBuffer->LENGTH + uxUpper - uxLower;
|
||||
if ( uxCount >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxCount -= pxBuffer->LENGTH;
|
||||
}
|
||||
|
||||
return uxCount;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferGetSpace( const StreamBuffer_t *pxBuffer );
|
||||
static portINLINE size_t uxStreamBufferGetSpace( const StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Returns the number of items which can still be added to uxHead
|
||||
before hitting on uxTail */
|
||||
size_t uxHead = pxBuffer->uxHead;
|
||||
size_t uxTail = pxBuffer->uxTail;
|
||||
|
||||
return uxStreamBufferSpace( pxBuffer, uxHead, uxTail );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferFrontSpace( const StreamBuffer_t *pxBuffer );
|
||||
static portINLINE size_t uxStreamBufferFrontSpace( const StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Distance between uxFront and uxTail
|
||||
or the number of items which can still be added to uxFront,
|
||||
before hitting on uxTail */
|
||||
|
||||
size_t uxFront = pxBuffer->uxFront;
|
||||
size_t uxTail = pxBuffer->uxTail;
|
||||
|
||||
return uxStreamBufferSpace( pxBuffer, uxFront, uxTail );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferGetSize( const StreamBuffer_t *pxBuffer );
|
||||
static portINLINE size_t uxStreamBufferGetSize( const StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Returns the number of items which can be read from uxTail
|
||||
before reaching uxHead */
|
||||
size_t uxHead = pxBuffer->uxHead;
|
||||
size_t uxTail = pxBuffer->uxTail;
|
||||
|
||||
return uxStreamBufferDistance( pxBuffer, uxTail, uxHead );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferMidSpace( const StreamBuffer_t *pxBuffer );
|
||||
static portINLINE size_t uxStreamBufferMidSpace( const StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Returns the distance between uxHead and uxMid */
|
||||
size_t uxHead = pxBuffer->uxHead;
|
||||
size_t uxMid = pxBuffer->uxMid;
|
||||
|
||||
return uxStreamBufferDistance( pxBuffer, uxMid, uxHead );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE void vStreamBufferMoveMid( StreamBuffer_t *pxBuffer, size_t uxCount );
|
||||
static portINLINE void vStreamBufferMoveMid( StreamBuffer_t *pxBuffer, size_t uxCount )
|
||||
{
|
||||
/* Increment uxMid, but no further than uxHead */
|
||||
size_t uxSize = uxStreamBufferMidSpace( pxBuffer );
|
||||
|
||||
if( uxCount > uxSize )
|
||||
{
|
||||
uxCount = uxSize;
|
||||
}
|
||||
pxBuffer->uxMid += uxCount;
|
||||
if( pxBuffer->uxMid >= pxBuffer->LENGTH )
|
||||
{
|
||||
pxBuffer->uxMid -= pxBuffer->LENGTH;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t *pxBuffer, const size_t uxLeft, const size_t uxRight );
|
||||
static portINLINE BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t *pxBuffer, const size_t uxLeft, const size_t uxRight )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
size_t uxTail = pxBuffer->uxTail;
|
||||
|
||||
/* Returns true if ( uxLeft < uxRight ) */
|
||||
if( ( uxLeft < uxTail ) ^ ( uxRight < uxTail ) )
|
||||
{
|
||||
if( uxRight < uxTail )
|
||||
{
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdFALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( uxLeft <= uxRight )
|
||||
{
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdFALSE;
|
||||
}
|
||||
}
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferGetPtr( StreamBuffer_t *pxBuffer, uint8_t **ppucData );
|
||||
static portINLINE size_t uxStreamBufferGetPtr( StreamBuffer_t *pxBuffer, uint8_t **ppucData )
|
||||
{
|
||||
size_t uxNextTail = pxBuffer->uxTail;
|
||||
size_t uxSize = uxStreamBufferGetSize( pxBuffer );
|
||||
|
||||
*ppucData = pxBuffer->ucArray + uxNextTail;
|
||||
|
||||
return FreeRTOS_min_uint32( uxSize, pxBuffer->LENGTH - uxNextTail );
|
||||
}
|
||||
|
||||
/*
|
||||
* Add bytes to a stream buffer.
|
||||
*
|
||||
* pxBuffer - The buffer to which the bytes will be added.
|
||||
* uxOffset - If uxOffset > 0, data will be written at an offset from uxHead
|
||||
* while uxHead will not be moved yet.
|
||||
* pucData - A pointer to the data to be added.
|
||||
* uxCount - The number of bytes to add.
|
||||
*/
|
||||
size_t uxStreamBufferAdd( StreamBuffer_t *pxBuffer, size_t uxOffset, const uint8_t *pucData, size_t uxCount );
|
||||
|
||||
/*
|
||||
* Read bytes from a stream buffer.
|
||||
*
|
||||
* pxBuffer - The buffer from which the bytes will be read.
|
||||
* uxOffset - Can be used to read data located at a certain offset from 'uxTail'.
|
||||
* pucData - A pointer to the buffer into which data will be read.
|
||||
* uxMaxCount - The number of bytes to read.
|
||||
* xPeek - If set to pdTRUE the data will remain in the buffer.
|
||||
*/
|
||||
size_t uxStreamBufferGet( StreamBuffer_t *pxBuffer, size_t uxOffset, uint8_t *pucData, size_t uxMaxCount, BaseType_t xPeek );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* !defined( FREERTOS_STREAM_BUFFER_H ) */
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*
|
||||
* FreeRTOS_Stream_Buffer.h
|
||||
*
|
||||
* A cicular character buffer
|
||||
* An implementation of a circular buffer without a length field
|
||||
* If LENGTH defines the size of the buffer, a maximum of (LENGT-1) bytes can be stored
|
||||
* In order to add or read data from the buffer, memcpy() will be called at most 2 times
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_STREAM_BUFFER_H
|
||||
#define FREERTOS_STREAM_BUFFER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct xSTREAM_BUFFER {
|
||||
volatile size_t uxTail; /* next item to read */
|
||||
volatile size_t uxMid; /* iterator within the valid items */
|
||||
volatile size_t uxHead; /* next position store a new item */
|
||||
volatile size_t uxFront; /* iterator within the free space */
|
||||
size_t LENGTH; /* const value: number of reserved elements */
|
||||
uint8_t ucArray[ sizeof( size_t ) ];
|
||||
} StreamBuffer_t;
|
||||
|
||||
static portINLINE void vStreamBufferClear( StreamBuffer_t *pxBuffer );
|
||||
static portINLINE void vStreamBufferClear( StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Make the circular buffer empty */
|
||||
pxBuffer->uxHead = 0u;
|
||||
pxBuffer->uxTail = 0u;
|
||||
pxBuffer->uxFront = 0u;
|
||||
pxBuffer->uxMid = 0u;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferSpace( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper );
|
||||
static portINLINE size_t uxStreamBufferSpace( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper )
|
||||
{
|
||||
/* Returns the space between uxLower and uxUpper, which equals to the distance minus 1 */
|
||||
size_t uxCount;
|
||||
|
||||
uxCount = pxBuffer->LENGTH + uxUpper - uxLower - 1u;
|
||||
if( uxCount >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxCount -= pxBuffer->LENGTH;
|
||||
}
|
||||
|
||||
return uxCount;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferDistance( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper );
|
||||
static portINLINE size_t uxStreamBufferDistance( const StreamBuffer_t *pxBuffer, const size_t uxLower, const size_t uxUpper )
|
||||
{
|
||||
/* Returns the distance between uxLower and uxUpper */
|
||||
size_t uxCount;
|
||||
|
||||
uxCount = pxBuffer->LENGTH + uxUpper - uxLower;
|
||||
if ( uxCount >= pxBuffer->LENGTH )
|
||||
{
|
||||
uxCount -= pxBuffer->LENGTH;
|
||||
}
|
||||
|
||||
return uxCount;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferGetSpace( const StreamBuffer_t *pxBuffer );
|
||||
static portINLINE size_t uxStreamBufferGetSpace( const StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Returns the number of items which can still be added to uxHead
|
||||
before hitting on uxTail */
|
||||
size_t uxHead = pxBuffer->uxHead;
|
||||
size_t uxTail = pxBuffer->uxTail;
|
||||
|
||||
return uxStreamBufferSpace( pxBuffer, uxHead, uxTail );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferFrontSpace( const StreamBuffer_t *pxBuffer );
|
||||
static portINLINE size_t uxStreamBufferFrontSpace( const StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Distance between uxFront and uxTail
|
||||
or the number of items which can still be added to uxFront,
|
||||
before hitting on uxTail */
|
||||
|
||||
size_t uxFront = pxBuffer->uxFront;
|
||||
size_t uxTail = pxBuffer->uxTail;
|
||||
|
||||
return uxStreamBufferSpace( pxBuffer, uxFront, uxTail );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferGetSize( const StreamBuffer_t *pxBuffer );
|
||||
static portINLINE size_t uxStreamBufferGetSize( const StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Returns the number of items which can be read from uxTail
|
||||
before reaching uxHead */
|
||||
size_t uxHead = pxBuffer->uxHead;
|
||||
size_t uxTail = pxBuffer->uxTail;
|
||||
|
||||
return uxStreamBufferDistance( pxBuffer, uxTail, uxHead );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferMidSpace( const StreamBuffer_t *pxBuffer );
|
||||
static portINLINE size_t uxStreamBufferMidSpace( const StreamBuffer_t *pxBuffer )
|
||||
{
|
||||
/* Returns the distance between uxHead and uxMid */
|
||||
size_t uxHead = pxBuffer->uxHead;
|
||||
size_t uxMid = pxBuffer->uxMid;
|
||||
|
||||
return uxStreamBufferDistance( pxBuffer, uxMid, uxHead );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE void vStreamBufferMoveMid( StreamBuffer_t *pxBuffer, size_t uxCount );
|
||||
static portINLINE void vStreamBufferMoveMid( StreamBuffer_t *pxBuffer, size_t uxCount )
|
||||
{
|
||||
/* Increment uxMid, but no further than uxHead */
|
||||
size_t uxSize = uxStreamBufferMidSpace( pxBuffer );
|
||||
|
||||
if( uxCount > uxSize )
|
||||
{
|
||||
uxCount = uxSize;
|
||||
}
|
||||
pxBuffer->uxMid += uxCount;
|
||||
if( pxBuffer->uxMid >= pxBuffer->LENGTH )
|
||||
{
|
||||
pxBuffer->uxMid -= pxBuffer->LENGTH;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t *pxBuffer, const size_t uxLeft, const size_t uxRight );
|
||||
static portINLINE BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t *pxBuffer, const size_t uxLeft, const size_t uxRight )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
size_t uxTail = pxBuffer->uxTail;
|
||||
|
||||
/* Returns true if ( uxLeft < uxRight ) */
|
||||
if( ( uxLeft < uxTail ) ^ ( uxRight < uxTail ) )
|
||||
{
|
||||
if( uxRight < uxTail )
|
||||
{
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdFALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( uxLeft <= uxRight )
|
||||
{
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdFALSE;
|
||||
}
|
||||
}
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portINLINE size_t uxStreamBufferGetPtr( StreamBuffer_t *pxBuffer, uint8_t **ppucData );
|
||||
static portINLINE size_t uxStreamBufferGetPtr( StreamBuffer_t *pxBuffer, uint8_t **ppucData )
|
||||
{
|
||||
size_t uxNextTail = pxBuffer->uxTail;
|
||||
size_t uxSize = uxStreamBufferGetSize( pxBuffer );
|
||||
|
||||
*ppucData = pxBuffer->ucArray + uxNextTail;
|
||||
|
||||
return FreeRTOS_min_uint32( uxSize, pxBuffer->LENGTH - uxNextTail );
|
||||
}
|
||||
|
||||
/*
|
||||
* Add bytes to a stream buffer.
|
||||
*
|
||||
* pxBuffer - The buffer to which the bytes will be added.
|
||||
* uxOffset - If uxOffset > 0, data will be written at an offset from uxHead
|
||||
* while uxHead will not be moved yet.
|
||||
* pucData - A pointer to the data to be added.
|
||||
* uxCount - The number of bytes to add.
|
||||
*/
|
||||
size_t uxStreamBufferAdd( StreamBuffer_t *pxBuffer, size_t uxOffset, const uint8_t *pucData, size_t uxCount );
|
||||
|
||||
/*
|
||||
* Read bytes from a stream buffer.
|
||||
*
|
||||
* pxBuffer - The buffer from which the bytes will be read.
|
||||
* uxOffset - Can be used to read data located at a certain offset from 'uxTail'.
|
||||
* pucData - A pointer to the buffer into which data will be read.
|
||||
* uxMaxCount - The number of bytes to read.
|
||||
* xPeek - If set to pdTRUE the data will remain in the buffer.
|
||||
*/
|
||||
size_t uxStreamBufferGet( StreamBuffer_t *pxBuffer, size_t uxOffset, uint8_t *pucData, size_t uxMaxCount, BaseType_t xPeek );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* !defined( FREERTOS_STREAM_BUFFER_H ) */
|
||||
|
||||
@@ -1,80 +1,80 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_TCP_IP_H
|
||||
#define FREERTOS_TCP_IP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
|
||||
typedef enum eTCP_STATE {
|
||||
/* Comments about the TCP states are borrowed from the very useful
|
||||
* Wiki page:
|
||||
* http://en.wikipedia.org/wiki/Transmission_Control_Protocol */
|
||||
eCLOSED = 0u, /* 0 (server + client) no connection state at all. */
|
||||
eTCP_LISTEN, /* 1 (server) waiting for a connection request
|
||||
from any remote TCP and port. */
|
||||
eCONNECT_SYN, /* 2 (client) internal state: socket wants to send
|
||||
a connect */
|
||||
eSYN_FIRST, /* 3 (server) Just created, must ACK the SYN request. */
|
||||
eSYN_RECEIVED, /* 4 (server) waiting for a confirming connection request
|
||||
acknowledgement after having both received and sent a connection request. */
|
||||
eESTABLISHED, /* 5 (server + client) an open connection, data received can be
|
||||
delivered to the user. The normal state for the data transfer phase of the connection. */
|
||||
eFIN_WAIT_1, /* 6 (server + client) waiting for a connection termination request from the remote TCP,
|
||||
or an acknowledgement of the connection termination request previously sent. */
|
||||
eFIN_WAIT_2, /* 7 (server + client) waiting for a connection termination request from the remote TCP. */
|
||||
eCLOSE_WAIT, /* 8 (server + client) waiting for a connection termination request from the local user. */
|
||||
eCLOSING, /* (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */
|
||||
eLAST_ACK, /* 9 (server + client) waiting for an acknowledgement of the connection termination request
|
||||
previously sent to the remote TCP
|
||||
(which includes an acknowledgement of its connection termination request). */
|
||||
eTIME_WAIT, /* 10 (either server or client) waiting for enough time to pass to be sure the remote TCP received the
|
||||
acknowledgement of its connection termination request. [According to RFC 793 a connection can
|
||||
stay in TIME-WAIT for a maximum of four minutes known as a MSL (maximum segment lifetime).] */
|
||||
} eIPTCPState_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_TCP_IP_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_TCP_IP_H
|
||||
#define FREERTOS_TCP_IP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BaseType_t xProcessReceivedTCPPacket( NetworkBufferDescriptor_t *pxNetworkBuffer );
|
||||
|
||||
typedef enum eTCP_STATE {
|
||||
/* Comments about the TCP states are borrowed from the very useful
|
||||
* Wiki page:
|
||||
* http://en.wikipedia.org/wiki/Transmission_Control_Protocol */
|
||||
eCLOSED = 0u, /* 0 (server + client) no connection state at all. */
|
||||
eTCP_LISTEN, /* 1 (server) waiting for a connection request
|
||||
from any remote TCP and port. */
|
||||
eCONNECT_SYN, /* 2 (client) internal state: socket wants to send
|
||||
a connect */
|
||||
eSYN_FIRST, /* 3 (server) Just created, must ACK the SYN request. */
|
||||
eSYN_RECEIVED, /* 4 (server) waiting for a confirming connection request
|
||||
acknowledgement after having both received and sent a connection request. */
|
||||
eESTABLISHED, /* 5 (server + client) an open connection, data received can be
|
||||
delivered to the user. The normal state for the data transfer phase of the connection. */
|
||||
eFIN_WAIT_1, /* 6 (server + client) waiting for a connection termination request from the remote TCP,
|
||||
or an acknowledgement of the connection termination request previously sent. */
|
||||
eFIN_WAIT_2, /* 7 (server + client) waiting for a connection termination request from the remote TCP. */
|
||||
eCLOSE_WAIT, /* 8 (server + client) waiting for a connection termination request from the local user. */
|
||||
eCLOSING, /* (server + client) waiting for a connection termination request acknowledgement from the remote TCP. */
|
||||
eLAST_ACK, /* 9 (server + client) waiting for an acknowledgement of the connection termination request
|
||||
previously sent to the remote TCP
|
||||
(which includes an acknowledgement of its connection termination request). */
|
||||
eTIME_WAIT, /* 10 (either server or client) waiting for enough time to pass to be sure the remote TCP received the
|
||||
acknowledgement of its connection termination request. [According to RFC 793 a connection can
|
||||
stay in TIME-WAIT for a maximum of four minutes known as a MSL (maximum segment lifetime).] */
|
||||
} eIPTCPState_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_TCP_IP_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,213 +1,213 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*
|
||||
* FreeRTOS_TCP_WIN.c
|
||||
* Module which handles the TCP windowing schemes for FreeRTOS-PLUS-TCP
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_TCP_WIN_H
|
||||
#define FREERTOS_TCP_WIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern BaseType_t xTCPWindowLoggingLevel;
|
||||
|
||||
typedef struct xTCPTimer
|
||||
{
|
||||
uint32_t ulBorn;
|
||||
} TCPTimer_t;
|
||||
|
||||
typedef struct xTCP_SEGMENT
|
||||
{
|
||||
uint32_t ulSequenceNumber; /* The sequence number of the first byte in this packet */
|
||||
int32_t lMaxLength; /* Maximum space, number of bytes which can be stored in this segment */
|
||||
int32_t lDataLength; /* Actual number of bytes */
|
||||
int32_t lStreamPos; /* reference to the [t|r]xStream of the socket */
|
||||
TCPTimer_t xTransmitTimer; /* saves a timestamp at the moment this segment gets transmitted (TX only) */
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32_t
|
||||
ucTransmitCount : 8,/* Number of times the segment has been transmitted, used to calculate the RTT */
|
||||
ucDupAckCount : 8, /* Counts the number of times that a higher segment was ACK'd. After 3 times a Fast Retransmission takes place */
|
||||
bOutstanding : 1, /* It the peer's turn, we're just waiting for an ACK */
|
||||
bAcked : 1, /* This segment has been acknowledged */
|
||||
bIsForRx : 1; /* pdTRUE if segment is used for reception */
|
||||
} bits;
|
||||
uint32_t ulFlags;
|
||||
} u;
|
||||
#if( ipconfigUSE_TCP_WIN != 0 )
|
||||
struct xLIST_ITEM xQueueItem; /* TX only: segments can be linked in one of three queues: xPriorityQueue, xTxQueue, and xWaitQueue */
|
||||
struct xLIST_ITEM xListItem; /* With this item the segment can be connected to a list, depending on who is owning it */
|
||||
#endif
|
||||
} TCPSegment_t;
|
||||
|
||||
typedef struct xTCP_WINSIZE
|
||||
{
|
||||
uint32_t ulRxWindowLength;
|
||||
uint32_t ulTxWindowLength;
|
||||
} TCPWinSize_t;
|
||||
|
||||
/*
|
||||
* If TCP time-stamps are being used, they will occupy 12 bytes in
|
||||
* each packet, and thus the message space will become smaller
|
||||
*/
|
||||
/* Keep this as a multiple of 4 */
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
#define ipSIZE_TCP_OPTIONS 16u
|
||||
#else
|
||||
#define ipSIZE_TCP_OPTIONS 12u
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Every TCP connection owns a TCP window for the administration of all packets
|
||||
* It owns two sets of segment descriptors, incoming and outgoing
|
||||
*/
|
||||
typedef struct xTCP_WINDOW
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32_t
|
||||
bHasInit : 1, /* The window structure has been initialised */
|
||||
bSendFullSize : 1, /* May only send packets with a size equal to MSS (for optimisation) */
|
||||
bTimeStamps : 1; /* Socket is supposed to use TCP time-stamps. This depends on the */
|
||||
} bits; /* party which opens the connection */
|
||||
uint32_t ulFlags;
|
||||
} u;
|
||||
TCPWinSize_t xSize;
|
||||
struct
|
||||
{
|
||||
uint32_t ulFirstSequenceNumber; /* Logging & debug: the first segment received/sent in this connection
|
||||
* for Tx: initial send sequence number (ISS)
|
||||
* for Rx: initial receive sequence number (IRS) */
|
||||
uint32_t ulCurrentSequenceNumber;/* Tx/Rx: the oldest sequence number not yet confirmed, also SND.UNA / RCV.NXT
|
||||
* In other words: the sequence number of the left side of the sliding window */
|
||||
uint32_t ulFINSequenceNumber; /* The sequence number which carried the FIN flag */
|
||||
uint32_t ulHighestSequenceNumber;/* Sequence number of the right-most byte + 1 */
|
||||
} rx, tx;
|
||||
uint32_t ulOurSequenceNumber; /* The SEQ number we're sending out */
|
||||
uint32_t ulUserDataLength; /* Number of bytes in Rx buffer which may be passed to the user, after having received a 'missing packet' */
|
||||
uint32_t ulNextTxSequenceNumber; /* The sequence number given to the next byte to be added for transmission */
|
||||
int32_t lSRTT; /* Smoothed Round Trip Time, it may increment quickly and it decrements slower */
|
||||
uint8_t ucOptionLength; /* Number of valid bytes in ulOptionsData[] */
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
List_t xPriorityQueue; /* Priority queue: segments which must be sent immediately */
|
||||
List_t xTxQueue; /* Transmit queue: segments queued for transmission */
|
||||
List_t xWaitQueue; /* Waiting queue: outstanding segments */
|
||||
TCPSegment_t *pxHeadSegment; /* points to a segment which has not been transmitted and it's size is still growing (user data being added) */
|
||||
uint32_t ulOptionsData[ipSIZE_TCP_OPTIONS/sizeof(uint32_t)]; /* Contains the options we send out */
|
||||
List_t xTxSegments; /* A linked list of all transmission segments, sorted on sequence number */
|
||||
List_t xRxSegments; /* A linked list of reception segments, order depends on sequence of arrival */
|
||||
#else
|
||||
/* For tiny TCP, there is only 1 outstanding TX segment */
|
||||
TCPSegment_t xTxSegment; /* Priority queue */
|
||||
#endif
|
||||
uint16_t usOurPortNumber; /* Mostly for debugging/logging: our TCP port number */
|
||||
uint16_t usPeerPortNumber; /* debugging/logging: the peer's TCP port number */
|
||||
uint16_t usMSS; /* Current accepted MSS */
|
||||
uint16_t usMSSInit; /* MSS as configured by the socket owner */
|
||||
} TCPWindow_t;
|
||||
|
||||
|
||||
/*=============================================================================
|
||||
*
|
||||
* Creation and destruction
|
||||
*
|
||||
*=============================================================================*/
|
||||
|
||||
/* Create and initialize a window */
|
||||
void vTCPWindowCreate( TCPWindow_t *pxWindow, uint32_t ulRxWindowLength,
|
||||
uint32_t ulTxWindowLength, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS );
|
||||
|
||||
/* Destroy a window (always returns NULL)
|
||||
* It will free some resources: a collection of segments */
|
||||
void vTCPWindowDestroy( TCPWindow_t *pxWindow );
|
||||
|
||||
/* Initialize a window */
|
||||
void vTCPWindowInit( TCPWindow_t *pxWindow, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS );
|
||||
|
||||
/* Clean up allocated segments. Should only be called when FreeRTOS+TCP will no longer be used. */
|
||||
void vTCPSegmentCleanup( void );
|
||||
|
||||
/*=============================================================================
|
||||
*
|
||||
* Rx functions
|
||||
*
|
||||
*=============================================================================*/
|
||||
|
||||
/* if true may be passed directly to user (segment expected and window is empty)
|
||||
* But pxWindow->ackno should always be used to set "BUF->ackno" */
|
||||
int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace );
|
||||
|
||||
/* When lTCPWindowRxCheck returned false, please call store for this unexpected data */
|
||||
BaseType_t xTCPWindowRxStore( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength );
|
||||
|
||||
/* This function will be called as soon as a FIN is received. It will return true
|
||||
* if there are no 'open' reception segments */
|
||||
BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow );
|
||||
|
||||
/* _HT_ Temporary function for testing/debugging
|
||||
* Not used at this moment */
|
||||
void vTCPWinShowSegments( TCPWindow_t *pxWindow, BaseType_t bForRx );
|
||||
|
||||
/*=============================================================================
|
||||
*
|
||||
* Tx functions
|
||||
*
|
||||
*=============================================================================*/
|
||||
|
||||
/* Adds data to the Tx-window */
|
||||
int32_t lTCPWindowTxAdd( TCPWindow_t *pxWindow, uint32_t ulLength, int32_t lPosition, int32_t lMax );
|
||||
|
||||
/* Check data to be sent and calculate the time period we may sleep */
|
||||
BaseType_t xTCPWindowTxHasData( TCPWindow_t *pxWindow, uint32_t ulWindowSize, TickType_t *pulDelay );
|
||||
|
||||
/* See if anything is left to be sent
|
||||
* Function will be called when a FIN has been received. Only when the TX window is clean,
|
||||
* it will return pdTRUE */
|
||||
BaseType_t xTCPWindowTxDone( TCPWindow_t *pxWindow );
|
||||
|
||||
/* Fetches data to be sent.
|
||||
* apPos will point to a location with the circular data buffer: txStream */
|
||||
uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition );
|
||||
|
||||
/* Receive a normal ACK */
|
||||
uint32_t ulTCPWindowTxAck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber );
|
||||
|
||||
/* Receive a SACK option */
|
||||
uint32_t ulTCPWindowTxSack( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_TCP_WIN_H */
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*
|
||||
* FreeRTOS_TCP_WIN.c
|
||||
* Module which handles the TCP windowing schemes for FreeRTOS-PLUS-TCP
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_TCP_WIN_H
|
||||
#define FREERTOS_TCP_WIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern BaseType_t xTCPWindowLoggingLevel;
|
||||
|
||||
typedef struct xTCPTimer
|
||||
{
|
||||
uint32_t ulBorn;
|
||||
} TCPTimer_t;
|
||||
|
||||
typedef struct xTCP_SEGMENT
|
||||
{
|
||||
uint32_t ulSequenceNumber; /* The sequence number of the first byte in this packet */
|
||||
int32_t lMaxLength; /* Maximum space, number of bytes which can be stored in this segment */
|
||||
int32_t lDataLength; /* Actual number of bytes */
|
||||
int32_t lStreamPos; /* reference to the [t|r]xStream of the socket */
|
||||
TCPTimer_t xTransmitTimer; /* saves a timestamp at the moment this segment gets transmitted (TX only) */
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32_t
|
||||
ucTransmitCount : 8,/* Number of times the segment has been transmitted, used to calculate the RTT */
|
||||
ucDupAckCount : 8, /* Counts the number of times that a higher segment was ACK'd. After 3 times a Fast Retransmission takes place */
|
||||
bOutstanding : 1, /* It the peer's turn, we're just waiting for an ACK */
|
||||
bAcked : 1, /* This segment has been acknowledged */
|
||||
bIsForRx : 1; /* pdTRUE if segment is used for reception */
|
||||
} bits;
|
||||
uint32_t ulFlags;
|
||||
} u;
|
||||
#if( ipconfigUSE_TCP_WIN != 0 )
|
||||
struct xLIST_ITEM xQueueItem; /* TX only: segments can be linked in one of three queues: xPriorityQueue, xTxQueue, and xWaitQueue */
|
||||
struct xLIST_ITEM xListItem; /* With this item the segment can be connected to a list, depending on who is owning it */
|
||||
#endif
|
||||
} TCPSegment_t;
|
||||
|
||||
typedef struct xTCP_WINSIZE
|
||||
{
|
||||
uint32_t ulRxWindowLength;
|
||||
uint32_t ulTxWindowLength;
|
||||
} TCPWinSize_t;
|
||||
|
||||
/*
|
||||
* If TCP time-stamps are being used, they will occupy 12 bytes in
|
||||
* each packet, and thus the message space will become smaller
|
||||
*/
|
||||
/* Keep this as a multiple of 4 */
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
#define ipSIZE_TCP_OPTIONS 16u
|
||||
#else
|
||||
#define ipSIZE_TCP_OPTIONS 12u
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Every TCP connection owns a TCP window for the administration of all packets
|
||||
* It owns two sets of segment descriptors, incoming and outgoing
|
||||
*/
|
||||
typedef struct xTCP_WINDOW
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32_t
|
||||
bHasInit : 1, /* The window structure has been initialised */
|
||||
bSendFullSize : 1, /* May only send packets with a size equal to MSS (for optimisation) */
|
||||
bTimeStamps : 1; /* Socket is supposed to use TCP time-stamps. This depends on the */
|
||||
} bits; /* party which opens the connection */
|
||||
uint32_t ulFlags;
|
||||
} u;
|
||||
TCPWinSize_t xSize;
|
||||
struct
|
||||
{
|
||||
uint32_t ulFirstSequenceNumber; /* Logging & debug: the first segment received/sent in this connection
|
||||
* for Tx: initial send sequence number (ISS)
|
||||
* for Rx: initial receive sequence number (IRS) */
|
||||
uint32_t ulCurrentSequenceNumber;/* Tx/Rx: the oldest sequence number not yet confirmed, also SND.UNA / RCV.NXT
|
||||
* In other words: the sequence number of the left side of the sliding window */
|
||||
uint32_t ulFINSequenceNumber; /* The sequence number which carried the FIN flag */
|
||||
uint32_t ulHighestSequenceNumber;/* Sequence number of the right-most byte + 1 */
|
||||
} rx, tx;
|
||||
uint32_t ulOurSequenceNumber; /* The SEQ number we're sending out */
|
||||
uint32_t ulUserDataLength; /* Number of bytes in Rx buffer which may be passed to the user, after having received a 'missing packet' */
|
||||
uint32_t ulNextTxSequenceNumber; /* The sequence number given to the next byte to be added for transmission */
|
||||
int32_t lSRTT; /* Smoothed Round Trip Time, it may increment quickly and it decrements slower */
|
||||
uint8_t ucOptionLength; /* Number of valid bytes in ulOptionsData[] */
|
||||
#if( ipconfigUSE_TCP_WIN == 1 )
|
||||
List_t xPriorityQueue; /* Priority queue: segments which must be sent immediately */
|
||||
List_t xTxQueue; /* Transmit queue: segments queued for transmission */
|
||||
List_t xWaitQueue; /* Waiting queue: outstanding segments */
|
||||
TCPSegment_t *pxHeadSegment; /* points to a segment which has not been transmitted and it's size is still growing (user data being added) */
|
||||
uint32_t ulOptionsData[ipSIZE_TCP_OPTIONS/sizeof(uint32_t)]; /* Contains the options we send out */
|
||||
List_t xTxSegments; /* A linked list of all transmission segments, sorted on sequence number */
|
||||
List_t xRxSegments; /* A linked list of reception segments, order depends on sequence of arrival */
|
||||
#else
|
||||
/* For tiny TCP, there is only 1 outstanding TX segment */
|
||||
TCPSegment_t xTxSegment; /* Priority queue */
|
||||
#endif
|
||||
uint16_t usOurPortNumber; /* Mostly for debugging/logging: our TCP port number */
|
||||
uint16_t usPeerPortNumber; /* debugging/logging: the peer's TCP port number */
|
||||
uint16_t usMSS; /* Current accepted MSS */
|
||||
uint16_t usMSSInit; /* MSS as configured by the socket owner */
|
||||
} TCPWindow_t;
|
||||
|
||||
|
||||
/*=============================================================================
|
||||
*
|
||||
* Creation and destruction
|
||||
*
|
||||
*=============================================================================*/
|
||||
|
||||
/* Create and initialize a window */
|
||||
void vTCPWindowCreate( TCPWindow_t *pxWindow, uint32_t ulRxWindowLength,
|
||||
uint32_t ulTxWindowLength, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS );
|
||||
|
||||
/* Destroy a window (always returns NULL)
|
||||
* It will free some resources: a collection of segments */
|
||||
void vTCPWindowDestroy( TCPWindow_t *pxWindow );
|
||||
|
||||
/* Initialize a window */
|
||||
void vTCPWindowInit( TCPWindow_t *pxWindow, uint32_t ulAckNumber, uint32_t ulSequenceNumber, uint32_t ulMSS );
|
||||
|
||||
/* Clean up allocated segments. Should only be called when FreeRTOS+TCP will no longer be used. */
|
||||
void vTCPSegmentCleanup( void );
|
||||
|
||||
/*=============================================================================
|
||||
*
|
||||
* Rx functions
|
||||
*
|
||||
*=============================================================================*/
|
||||
|
||||
/* if true may be passed directly to user (segment expected and window is empty)
|
||||
* But pxWindow->ackno should always be used to set "BUF->ackno" */
|
||||
int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace );
|
||||
|
||||
/* When lTCPWindowRxCheck returned false, please call store for this unexpected data */
|
||||
BaseType_t xTCPWindowRxStore( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength );
|
||||
|
||||
/* This function will be called as soon as a FIN is received. It will return true
|
||||
* if there are no 'open' reception segments */
|
||||
BaseType_t xTCPWindowRxEmpty( TCPWindow_t *pxWindow );
|
||||
|
||||
/* _HT_ Temporary function for testing/debugging
|
||||
* Not used at this moment */
|
||||
void vTCPWinShowSegments( TCPWindow_t *pxWindow, BaseType_t bForRx );
|
||||
|
||||
/*=============================================================================
|
||||
*
|
||||
* Tx functions
|
||||
*
|
||||
*=============================================================================*/
|
||||
|
||||
/* Adds data to the Tx-window */
|
||||
int32_t lTCPWindowTxAdd( TCPWindow_t *pxWindow, uint32_t ulLength, int32_t lPosition, int32_t lMax );
|
||||
|
||||
/* Check data to be sent and calculate the time period we may sleep */
|
||||
BaseType_t xTCPWindowTxHasData( TCPWindow_t *pxWindow, uint32_t ulWindowSize, TickType_t *pulDelay );
|
||||
|
||||
/* See if anything is left to be sent
|
||||
* Function will be called when a FIN has been received. Only when the TX window is clean,
|
||||
* it will return pdTRUE */
|
||||
BaseType_t xTCPWindowTxDone( TCPWindow_t *pxWindow );
|
||||
|
||||
/* Fetches data to be sent.
|
||||
* apPos will point to a location with the circular data buffer: txStream */
|
||||
uint32_t ulTCPWindowTxGet( TCPWindow_t *pxWindow, uint32_t ulWindowSize, int32_t *plPosition );
|
||||
|
||||
/* Receive a normal ACK */
|
||||
uint32_t ulTCPWindowTxAck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber );
|
||||
|
||||
/* Receive a SACK option */
|
||||
uint32_t ulTCPWindowTxSack( TCPWindow_t *pxWindow, uint32_t ulFirst, uint32_t ulLast );
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_TCP_WIN_H */
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_UDP_IP_H
|
||||
#define FREERTOS_UDP_IP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Application level configuration options. */
|
||||
#include "FreeRTOSIPConfig.h"
|
||||
#include "FreeRTOSIPConfigDefaults.h"
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_UDP_IP_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_UDP_IP_H
|
||||
#define FREERTOS_UDP_IP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Application level configuration options. */
|
||||
#include "FreeRTOSIPConfig.h"
|
||||
#include "FreeRTOSIPConfigDefaults.h"
|
||||
#include "IPTraceMacroDefaults.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* FREERTOS_UDP_IP_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,90 +1,90 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_ERRNO_TCP
|
||||
#define FREERTOS_ERRNO_TCP
|
||||
|
||||
/* The following definitions will be included in the core FreeRTOS code in
|
||||
future versions of FreeRTOS - hence the 'pd' (ProjDefs) prefix - at which time
|
||||
this file will be removed. */
|
||||
|
||||
/* The following errno values are used by FreeRTOS+ components, not FreeRTOS
|
||||
itself. */
|
||||
|
||||
/* For future compatibility (see comment above), check the definitions have not
|
||||
already been made. */
|
||||
#ifndef pdFREERTOS_ERRNO_NONE
|
||||
#define pdFREERTOS_ERRNO_NONE 0 /* No errors */
|
||||
#define pdFREERTOS_ERRNO_ENOENT 2 /* No such file or directory */
|
||||
#define pdFREERTOS_ERRNO_EINTR 4 /* Interrupted system call */
|
||||
#define pdFREERTOS_ERRNO_EIO 5 /* I/O error */
|
||||
#define pdFREERTOS_ERRNO_ENXIO 6 /* No such device or address */
|
||||
#define pdFREERTOS_ERRNO_EBADF 9 /* Bad file number */
|
||||
#define pdFREERTOS_ERRNO_EAGAIN 11 /* No more processes */
|
||||
#define pdFREERTOS_ERRNO_EWOULDBLOCK 11 /* Operation would block */
|
||||
#define pdFREERTOS_ERRNO_ENOMEM 12 /* Not enough memory */
|
||||
#define pdFREERTOS_ERRNO_EACCES 13 /* Permission denied */
|
||||
#define pdFREERTOS_ERRNO_EFAULT 14 /* Bad address */
|
||||
#define pdFREERTOS_ERRNO_EBUSY 16 /* Mount device busy */
|
||||
#define pdFREERTOS_ERRNO_EEXIST 17 /* File exists */
|
||||
#define pdFREERTOS_ERRNO_EXDEV 18 /* Cross-device link */
|
||||
#define pdFREERTOS_ERRNO_ENODEV 19 /* No such device */
|
||||
#define pdFREERTOS_ERRNO_ENOTDIR 20 /* Not a directory */
|
||||
#define pdFREERTOS_ERRNO_EISDIR 21 /* Is a directory */
|
||||
#define pdFREERTOS_ERRNO_EINVAL 22 /* Invalid argument */
|
||||
#define pdFREERTOS_ERRNO_ENOSPC 28 /* No space left on device */
|
||||
#define pdFREERTOS_ERRNO_ESPIPE 29 /* Illegal seek */
|
||||
#define pdFREERTOS_ERRNO_EROFS 30 /* Read only file system */
|
||||
#define pdFREERTOS_ERRNO_EUNATCH 42 /* Protocol driver not attached */
|
||||
#define pdFREERTOS_ERRNO_EBADE 50 /* Invalid exchange */
|
||||
#define pdFREERTOS_ERRNO_EFTYPE 79 /* Inappropriate file type or format */
|
||||
#define pdFREERTOS_ERRNO_ENMFILE 89 /* No more files */
|
||||
#define pdFREERTOS_ERRNO_ENOTEMPTY 90 /* Directory not empty */
|
||||
#define pdFREERTOS_ERRNO_ENAMETOOLONG 91 /* File or path name too long */
|
||||
#define pdFREERTOS_ERRNO_EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
|
||||
#define pdFREERTOS_ERRNO_ENOBUFS 105 /* No buffer space available */
|
||||
#define pdFREERTOS_ERRNO_ENOPROTOOPT 109 /* Protocol not available */
|
||||
#define pdFREERTOS_ERRNO_EADDRINUSE 112 /* Address already in use */
|
||||
#define pdFREERTOS_ERRNO_ETIMEDOUT 116 /* Connection timed out */
|
||||
#define pdFREERTOS_ERRNO_EINPROGRESS 119 /* Connection already in progress */
|
||||
#define pdFREERTOS_ERRNO_EALREADY 120 /* Socket already connected */
|
||||
#define pdFREERTOS_ERRNO_EADDRNOTAVAIL 125 /* Address not available */
|
||||
#define pdFREERTOS_ERRNO_EISCONN 127 /* Socket is already connected */
|
||||
#define pdFREERTOS_ERRNO_ENOTCONN 128 /* Socket is not connected */
|
||||
#define pdFREERTOS_ERRNO_ENOMEDIUM 135 /* No medium inserted */
|
||||
#define pdFREERTOS_ERRNO_EILSEQ 138 /* An invalid UTF-16 sequence was encountered. */
|
||||
#define pdFREERTOS_ERRNO_ECANCELED 140 /* Operation canceled. */
|
||||
|
||||
/* The following endian values are used by FreeRTOS+ components, not FreeRTOS
|
||||
itself. */
|
||||
#define pdFREERTOS_LITTLE_ENDIAN 0
|
||||
#define pdFREERTOS_BIG_ENDIAN 1
|
||||
|
||||
#endif /* pdFREERTOS_ERRNO_NONE */
|
||||
|
||||
#endif /* FREERTOS_ERRNO_TCP */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_ERRNO_TCP
|
||||
#define FREERTOS_ERRNO_TCP
|
||||
|
||||
/* The following definitions will be included in the core FreeRTOS code in
|
||||
future versions of FreeRTOS - hence the 'pd' (ProjDefs) prefix - at which time
|
||||
this file will be removed. */
|
||||
|
||||
/* The following errno values are used by FreeRTOS+ components, not FreeRTOS
|
||||
itself. */
|
||||
|
||||
/* For future compatibility (see comment above), check the definitions have not
|
||||
already been made. */
|
||||
#ifndef pdFREERTOS_ERRNO_NONE
|
||||
#define pdFREERTOS_ERRNO_NONE 0 /* No errors */
|
||||
#define pdFREERTOS_ERRNO_ENOENT 2 /* No such file or directory */
|
||||
#define pdFREERTOS_ERRNO_EINTR 4 /* Interrupted system call */
|
||||
#define pdFREERTOS_ERRNO_EIO 5 /* I/O error */
|
||||
#define pdFREERTOS_ERRNO_ENXIO 6 /* No such device or address */
|
||||
#define pdFREERTOS_ERRNO_EBADF 9 /* Bad file number */
|
||||
#define pdFREERTOS_ERRNO_EAGAIN 11 /* No more processes */
|
||||
#define pdFREERTOS_ERRNO_EWOULDBLOCK 11 /* Operation would block */
|
||||
#define pdFREERTOS_ERRNO_ENOMEM 12 /* Not enough memory */
|
||||
#define pdFREERTOS_ERRNO_EACCES 13 /* Permission denied */
|
||||
#define pdFREERTOS_ERRNO_EFAULT 14 /* Bad address */
|
||||
#define pdFREERTOS_ERRNO_EBUSY 16 /* Mount device busy */
|
||||
#define pdFREERTOS_ERRNO_EEXIST 17 /* File exists */
|
||||
#define pdFREERTOS_ERRNO_EXDEV 18 /* Cross-device link */
|
||||
#define pdFREERTOS_ERRNO_ENODEV 19 /* No such device */
|
||||
#define pdFREERTOS_ERRNO_ENOTDIR 20 /* Not a directory */
|
||||
#define pdFREERTOS_ERRNO_EISDIR 21 /* Is a directory */
|
||||
#define pdFREERTOS_ERRNO_EINVAL 22 /* Invalid argument */
|
||||
#define pdFREERTOS_ERRNO_ENOSPC 28 /* No space left on device */
|
||||
#define pdFREERTOS_ERRNO_ESPIPE 29 /* Illegal seek */
|
||||
#define pdFREERTOS_ERRNO_EROFS 30 /* Read only file system */
|
||||
#define pdFREERTOS_ERRNO_EUNATCH 42 /* Protocol driver not attached */
|
||||
#define pdFREERTOS_ERRNO_EBADE 50 /* Invalid exchange */
|
||||
#define pdFREERTOS_ERRNO_EFTYPE 79 /* Inappropriate file type or format */
|
||||
#define pdFREERTOS_ERRNO_ENMFILE 89 /* No more files */
|
||||
#define pdFREERTOS_ERRNO_ENOTEMPTY 90 /* Directory not empty */
|
||||
#define pdFREERTOS_ERRNO_ENAMETOOLONG 91 /* File or path name too long */
|
||||
#define pdFREERTOS_ERRNO_EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
|
||||
#define pdFREERTOS_ERRNO_ENOBUFS 105 /* No buffer space available */
|
||||
#define pdFREERTOS_ERRNO_ENOPROTOOPT 109 /* Protocol not available */
|
||||
#define pdFREERTOS_ERRNO_EADDRINUSE 112 /* Address already in use */
|
||||
#define pdFREERTOS_ERRNO_ETIMEDOUT 116 /* Connection timed out */
|
||||
#define pdFREERTOS_ERRNO_EINPROGRESS 119 /* Connection already in progress */
|
||||
#define pdFREERTOS_ERRNO_EALREADY 120 /* Socket already connected */
|
||||
#define pdFREERTOS_ERRNO_EADDRNOTAVAIL 125 /* Address not available */
|
||||
#define pdFREERTOS_ERRNO_EISCONN 127 /* Socket is already connected */
|
||||
#define pdFREERTOS_ERRNO_ENOTCONN 128 /* Socket is not connected */
|
||||
#define pdFREERTOS_ERRNO_ENOMEDIUM 135 /* No medium inserted */
|
||||
#define pdFREERTOS_ERRNO_EILSEQ 138 /* An invalid UTF-16 sequence was encountered. */
|
||||
#define pdFREERTOS_ERRNO_ECANCELED 140 /* Operation canceled. */
|
||||
|
||||
/* The following endian values are used by FreeRTOS+ components, not FreeRTOS
|
||||
itself. */
|
||||
#define pdFREERTOS_LITTLE_ENDIAN 0
|
||||
#define pdFREERTOS_BIG_ENDIAN 1
|
||||
|
||||
#endif /* pdFREERTOS_ERRNO_NONE */
|
||||
|
||||
#endif /* FREERTOS_ERRNO_TCP */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,193 +1,193 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/* This file provides default (empty) implementations for any IP trace macros
|
||||
that are not defined by the user. See
|
||||
http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Trace.html */
|
||||
|
||||
#ifndef UDP_TRACE_MACRO_DEFAULTS_H
|
||||
#define UDP_TRACE_MACRO_DEFAULTS_H
|
||||
|
||||
#ifndef iptraceNETWORK_DOWN
|
||||
#define iptraceNETWORK_DOWN()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_BUFFER_RELEASED
|
||||
#define iptraceNETWORK_BUFFER_RELEASED( pxBufferAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_BUFFER_OBTAINED
|
||||
#define iptraceNETWORK_BUFFER_OBTAINED( pxBufferAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR
|
||||
#define iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR( pxBufferAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER
|
||||
#define iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR
|
||||
#define iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceCREATING_ARP_REQUEST
|
||||
#define iptraceCREATING_ARP_REQUEST( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceARP_TABLE_ENTRY_WILL_EXPIRE
|
||||
#define iptraceARP_TABLE_ENTRY_WILL_EXPIRE( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceARP_TABLE_ENTRY_EXPIRED
|
||||
#define iptraceARP_TABLE_ENTRY_EXPIRED( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceARP_TABLE_ENTRY_CREATED
|
||||
#define iptraceARP_TABLE_ENTRY_CREATED( ulIPAddress, ucMACAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_UDP_PACKET
|
||||
#define iptraceSENDING_UDP_PACKET( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptracePACKET_DROPPED_TO_GENERATE_ARP
|
||||
#define iptracePACKET_DROPPED_TO_GENERATE_ARP( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceICMP_PACKET_RECEIVED
|
||||
#define iptraceICMP_PACKET_RECEIVED()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_PING_REPLY
|
||||
#define iptraceSENDING_PING_REPLY( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef traceARP_PACKET_RECEIVED
|
||||
#define traceARP_PACKET_RECEIVED()
|
||||
#endif
|
||||
|
||||
#ifndef iptracePROCESSING_RECEIVED_ARP_REPLY
|
||||
#define iptracePROCESSING_RECEIVED_ARP_REPLY( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_ARP_REPLY
|
||||
#define iptraceSENDING_ARP_REPLY( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_CREATE_SOCKET
|
||||
#define iptraceFAILED_TO_CREATE_SOCKET()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_CREATE_EVENT_GROUP
|
||||
#define iptraceFAILED_TO_CREATE_EVENT_GROUP()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceRECVFROM_DISCARDING_BYTES
|
||||
#define iptraceRECVFROM_DISCARDING_BYTES( xNumberOfBytesDiscarded )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceETHERNET_RX_EVENT_LOST
|
||||
#define iptraceETHERNET_RX_EVENT_LOST()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSTACK_TX_EVENT_LOST
|
||||
#define iptraceSTACK_TX_EVENT_LOST( xEvent )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_EVENT_RECEIVED
|
||||
#define iptraceNETWORK_EVENT_RECEIVED( eEvent )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceBIND_FAILED
|
||||
#define iptraceBIND_FAILED( xSocket, usPort )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS
|
||||
#define iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_DHCP_DISCOVER
|
||||
#define iptraceSENDING_DHCP_DISCOVER()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_DHCP_REQUEST
|
||||
#define iptraceSENDING_DHCP_REQUEST()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceDHCP_SUCCEDEED
|
||||
#define iptraceDHCP_SUCCEDEED( address )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_INTERFACE_TRANSMIT
|
||||
#define iptraceNETWORK_INTERFACE_TRANSMIT()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_INTERFACE_RECEIVE
|
||||
#define iptraceNETWORK_INTERFACE_RECEIVE()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_DNS_REQUEST
|
||||
#define iptraceSENDING_DNS_REQUEST()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceWAITING_FOR_TX_DMA_DESCRIPTOR
|
||||
#define iptraceWAITING_FOR_TX_DMA_DESCRIPTOR()
|
||||
#endif
|
||||
|
||||
#ifndef ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS
|
||||
#define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS 0
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_NOTIFY_SELECT_GROUP
|
||||
#define iptraceFAILED_TO_NOTIFY_SELECT_GROUP( xSocket )
|
||||
#endif
|
||||
|
||||
#ifndef pvPortMallocSocket
|
||||
#define pvPortMallocSocket(xSize) pvPortMalloc( ( xSize ) )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceRECVFROM_TIMEOUT
|
||||
#define iptraceRECVFROM_TIMEOUT()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceRECVFROM_INTERRUPTED
|
||||
#define iptraceRECVFROM_INTERRUPTED()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNO_BUFFER_FOR_SENDTO
|
||||
#define iptraceNO_BUFFER_FOR_SENDTO()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDTO_SOCKET_NOT_BOUND
|
||||
#define iptraceSENDTO_SOCKET_NOT_BOUND()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDTO_DATA_TOO_LONG
|
||||
#define iptraceSENDTO_DATA_TOO_LONG()
|
||||
#endif
|
||||
|
||||
#endif /* UDP_TRACE_MACRO_DEFAULTS_H */
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/* This file provides default (empty) implementations for any IP trace macros
|
||||
that are not defined by the user. See
|
||||
http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Trace.html */
|
||||
|
||||
#ifndef UDP_TRACE_MACRO_DEFAULTS_H
|
||||
#define UDP_TRACE_MACRO_DEFAULTS_H
|
||||
|
||||
#ifndef iptraceNETWORK_DOWN
|
||||
#define iptraceNETWORK_DOWN()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_BUFFER_RELEASED
|
||||
#define iptraceNETWORK_BUFFER_RELEASED( pxBufferAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_BUFFER_OBTAINED
|
||||
#define iptraceNETWORK_BUFFER_OBTAINED( pxBufferAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR
|
||||
#define iptraceNETWORK_BUFFER_OBTAINED_FROM_ISR( pxBufferAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER
|
||||
#define iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR
|
||||
#define iptraceFAILED_TO_OBTAIN_NETWORK_BUFFER_FROM_ISR()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceCREATING_ARP_REQUEST
|
||||
#define iptraceCREATING_ARP_REQUEST( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceARP_TABLE_ENTRY_WILL_EXPIRE
|
||||
#define iptraceARP_TABLE_ENTRY_WILL_EXPIRE( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceARP_TABLE_ENTRY_EXPIRED
|
||||
#define iptraceARP_TABLE_ENTRY_EXPIRED( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceARP_TABLE_ENTRY_CREATED
|
||||
#define iptraceARP_TABLE_ENTRY_CREATED( ulIPAddress, ucMACAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_UDP_PACKET
|
||||
#define iptraceSENDING_UDP_PACKET( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptracePACKET_DROPPED_TO_GENERATE_ARP
|
||||
#define iptracePACKET_DROPPED_TO_GENERATE_ARP( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceICMP_PACKET_RECEIVED
|
||||
#define iptraceICMP_PACKET_RECEIVED()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_PING_REPLY
|
||||
#define iptraceSENDING_PING_REPLY( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef traceARP_PACKET_RECEIVED
|
||||
#define traceARP_PACKET_RECEIVED()
|
||||
#endif
|
||||
|
||||
#ifndef iptracePROCESSING_RECEIVED_ARP_REPLY
|
||||
#define iptracePROCESSING_RECEIVED_ARP_REPLY( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_ARP_REPLY
|
||||
#define iptraceSENDING_ARP_REPLY( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_CREATE_SOCKET
|
||||
#define iptraceFAILED_TO_CREATE_SOCKET()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_CREATE_EVENT_GROUP
|
||||
#define iptraceFAILED_TO_CREATE_EVENT_GROUP()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceRECVFROM_DISCARDING_BYTES
|
||||
#define iptraceRECVFROM_DISCARDING_BYTES( xNumberOfBytesDiscarded )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceETHERNET_RX_EVENT_LOST
|
||||
#define iptraceETHERNET_RX_EVENT_LOST()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSTACK_TX_EVENT_LOST
|
||||
#define iptraceSTACK_TX_EVENT_LOST( xEvent )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_EVENT_RECEIVED
|
||||
#define iptraceNETWORK_EVENT_RECEIVED( eEvent )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceBIND_FAILED
|
||||
#define iptraceBIND_FAILED( xSocket, usPort )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS
|
||||
#define iptraceDHCP_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS( ulIPAddress )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_DHCP_DISCOVER
|
||||
#define iptraceSENDING_DHCP_DISCOVER()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_DHCP_REQUEST
|
||||
#define iptraceSENDING_DHCP_REQUEST()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceDHCP_SUCCEDEED
|
||||
#define iptraceDHCP_SUCCEDEED( address )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_INTERFACE_TRANSMIT
|
||||
#define iptraceNETWORK_INTERFACE_TRANSMIT()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNETWORK_INTERFACE_RECEIVE
|
||||
#define iptraceNETWORK_INTERFACE_RECEIVE()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDING_DNS_REQUEST
|
||||
#define iptraceSENDING_DNS_REQUEST()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceWAITING_FOR_TX_DMA_DESCRIPTOR
|
||||
#define iptraceWAITING_FOR_TX_DMA_DESCRIPTOR()
|
||||
#endif
|
||||
|
||||
#ifndef ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS
|
||||
#define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS 0
|
||||
#endif
|
||||
|
||||
#ifndef iptraceFAILED_TO_NOTIFY_SELECT_GROUP
|
||||
#define iptraceFAILED_TO_NOTIFY_SELECT_GROUP( xSocket )
|
||||
#endif
|
||||
|
||||
#ifndef pvPortMallocSocket
|
||||
#define pvPortMallocSocket(xSize) pvPortMalloc( ( xSize ) )
|
||||
#endif
|
||||
|
||||
#ifndef iptraceRECVFROM_TIMEOUT
|
||||
#define iptraceRECVFROM_TIMEOUT()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceRECVFROM_INTERRUPTED
|
||||
#define iptraceRECVFROM_INTERRUPTED()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceNO_BUFFER_FOR_SENDTO
|
||||
#define iptraceNO_BUFFER_FOR_SENDTO()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDTO_SOCKET_NOT_BOUND
|
||||
#define iptraceSENDTO_SOCKET_NOT_BOUND()
|
||||
#endif
|
||||
|
||||
#ifndef iptraceSENDTO_DATA_TOO_LONG
|
||||
#define iptraceSENDTO_DATA_TOO_LONG()
|
||||
#endif
|
||||
|
||||
#endif /* UDP_TRACE_MACRO_DEFAULTS_H */
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef NETWORK_BUFFER_MANAGEMENT_H
|
||||
#define NETWORK_BUFFER_MANAGEMENT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* NOTE PUBLIC API FUNCTIONS. */
|
||||
BaseType_t xNetworkBuffersInitialise( void );
|
||||
NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks );
|
||||
NetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes );
|
||||
void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
||||
BaseType_t vNetworkBufferReleaseFromISR( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
||||
uint8_t *pucGetNetworkBuffer( size_t *pxRequestedSizeBytes );
|
||||
void vReleaseNetworkBuffer( uint8_t *pucEthernetBuffer );
|
||||
|
||||
/* Get the current number of free network buffers. */
|
||||
UBaseType_t uxGetNumberOfFreeNetworkBuffers( void );
|
||||
|
||||
/* Get the lowest number of free network buffers. */
|
||||
UBaseType_t uxGetMinimumFreeNetworkBuffers( void );
|
||||
|
||||
/* Copy a network buffer into a bigger buffer. */
|
||||
NetworkBufferDescriptor_t *pxDuplicateNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer,
|
||||
size_t uxNewLength);
|
||||
|
||||
/* Increase the size of a Network Buffer.
|
||||
In case BufferAllocation_2.c is used, the new space must be allocated. */
|
||||
NetworkBufferDescriptor_t *pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer,
|
||||
size_t xNewSizeBytes );
|
||||
|
||||
#if ipconfigTCP_IP_SANITY
|
||||
/*
|
||||
* Check if an address is a valid pointer to a network descriptor
|
||||
* by looking it up in the array of network descriptors
|
||||
*/
|
||||
UBaseType_t bIsValidNetworkDescriptor (const NetworkBufferDescriptor_t * pxDesc);
|
||||
BaseType_t prvIsFreeBuffer( const NetworkBufferDescriptor_t *pxDescr );
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* NETWORK_BUFFER_MANAGEMENT_H */
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef NETWORK_BUFFER_MANAGEMENT_H
|
||||
#define NETWORK_BUFFER_MANAGEMENT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* NOTE PUBLIC API FUNCTIONS. */
|
||||
BaseType_t xNetworkBuffersInitialise( void );
|
||||
NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks );
|
||||
NetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes );
|
||||
void vReleaseNetworkBufferAndDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
||||
BaseType_t vNetworkBufferReleaseFromISR( NetworkBufferDescriptor_t * const pxNetworkBuffer );
|
||||
uint8_t *pucGetNetworkBuffer( size_t *pxRequestedSizeBytes );
|
||||
void vReleaseNetworkBuffer( uint8_t *pucEthernetBuffer );
|
||||
|
||||
/* Get the current number of free network buffers. */
|
||||
UBaseType_t uxGetNumberOfFreeNetworkBuffers( void );
|
||||
|
||||
/* Get the lowest number of free network buffers. */
|
||||
UBaseType_t uxGetMinimumFreeNetworkBuffers( void );
|
||||
|
||||
/* Copy a network buffer into a bigger buffer. */
|
||||
NetworkBufferDescriptor_t *pxDuplicateNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * const pxNetworkBuffer,
|
||||
size_t uxNewLength);
|
||||
|
||||
/* Increase the size of a Network Buffer.
|
||||
In case BufferAllocation_2.c is used, the new space must be allocated. */
|
||||
NetworkBufferDescriptor_t *pxResizeNetworkBufferWithDescriptor( NetworkBufferDescriptor_t * pxNetworkBuffer,
|
||||
size_t xNewSizeBytes );
|
||||
|
||||
#if ipconfigTCP_IP_SANITY
|
||||
/*
|
||||
* Check if an address is a valid pointer to a network descriptor
|
||||
* by looking it up in the array of network descriptors
|
||||
*/
|
||||
UBaseType_t bIsValidNetworkDescriptor (const NetworkBufferDescriptor_t * pxDesc);
|
||||
BaseType_t prvIsFreeBuffer( const NetworkBufferDescriptor_t *pxDescr );
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* NETWORK_BUFFER_MANAGEMENT_H */
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef NETWORK_INTERFACE_H
|
||||
#define NETWORK_INTERFACE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* NOTE PUBLIC API FUNCTIONS. */
|
||||
BaseType_t xNetworkInterfaceInitialise( void );
|
||||
BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t xReleaseAfterSend );
|
||||
void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] );
|
||||
BaseType_t xGetPhyLinkStatus( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* NETWORK_INTERFACE_H */
|
||||
|
||||
/*
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://aws.amazon.com/freertos
|
||||
* http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
#ifndef NETWORK_INTERFACE_H
|
||||
#define NETWORK_INTERFACE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* NOTE PUBLIC API FUNCTIONS. */
|
||||
BaseType_t xNetworkInterfaceInitialise( void );
|
||||
BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer, BaseType_t xReleaseAfterSend );
|
||||
void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] );
|
||||
BaseType_t xGetPhyLinkStatus( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* NETWORK_INTERFACE_H */
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
Update pack_struct_start.h and pack_struct_end.h for your architecure.
|
||||
These files define the specifiers needed by your compiler to properly pack struct data
|
||||
need by FreeRTOS+TCP.
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
; /* FIX ME. Update for the compiler specifier needed at end of a struct declartion to pack the struct. */
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
/* FIX ME. Update for the compiler specifier needed at the start of a struct declartion to pack the struct. */
|
||||
@@ -1,46 +1,46 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
__attribute__( (packed) );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
__attribute__( (packed) );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* Nothing to do here. */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* Nothing to do here. */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
__packed
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
__packed
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
;
|
||||
#pragma pack(pop)
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
;
|
||||
#pragma pack(pop)
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
;
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
;
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#ifdef _SH
|
||||
#ifdef __RENESAS__
|
||||
;
|
||||
#pragma unpack
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __RX
|
||||
#ifdef __CCRX__
|
||||
;
|
||||
#pragma packoption
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#ifdef _SH
|
||||
#ifdef __RENESAS__
|
||||
;
|
||||
#pragma unpack
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __RX
|
||||
#ifdef __CCRX__
|
||||
;
|
||||
#pragma packoption
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#ifdef _SH
|
||||
#ifdef __RENESAS__
|
||||
#pragma pack 1
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __RX
|
||||
#ifdef __CCRX__
|
||||
#pragma pack
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
FreeRTOS+TCP V2.0.11
|
||||
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
http://aws.amazon.com/freertos
|
||||
http://www.FreeRTOS.org
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* See the following URL for an explanation of this file:
|
||||
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/Embedded_Compiler_Porting.html
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#ifdef _SH
|
||||
#ifdef __RENESAS__
|
||||
#pragma pack 1
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __RX
|
||||
#ifdef __CCRX__
|
||||
#pragma pack
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user