mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-15 16:15:08 -05:00
Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083)
* Use new version of CI-CD Actions, checkout@v3 instead of checkout@v2 on all jobs * Use cSpell spell check, and use ubuntu-20.04 for formatting check * Add in bot formatting action * Update freertos_demo.yml and freertos_plus_demo.yml files to increase github log readability * Add in a Qemu demo onto the workflows.
This commit is contained in:
parent
537007d96c
commit
3a2f6646f0
1036 changed files with 134568 additions and 127281 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
*----------------------------------------------------------*/
|
||||
|
||||
/* Used for IPv6 validation */
|
||||
#define configECHO_SERVER_ADDR_STRING "fe80::a53b:3371:d92f:970b"
|
||||
#define configECHO_SERVER_ADDR_STRING "fe80::a53b:3371:d92f:970b"
|
||||
/* Used for IPv4 validation */
|
||||
/* #define configECHO_SERVER_ADDR_STRING "192.168.1.3" */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RTOSDemo", "WIN32.vcxproj", "{C686325E-3261-42F7-AEB1-DDE5280E1CEB}"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -76,9 +76,9 @@ This demo provides 4 examples:
|
|||
1. Set `mainCREATE_TCP_ECHO_SERVER_TASK` to 1 in the [main.c](main.c) file.
|
||||
1. Build the project and run.
|
||||
```
|
||||
0 0.167 [IP-task ] uxNetworkisUp = 1
|
||||
1 0.167 [IP-task ] uxNetworkisUp = 2
|
||||
2 1.727 [IP-task ] uxNetworkisUp = 3
|
||||
0 0.167 [IP-task ] uxNetworkIsUp = 1
|
||||
1 0.167 [IP-task ] uxNetworkIsUp = 2
|
||||
2 1.727 [IP-task ] uxNetworkIsUp = 3
|
||||
3 1.727 [IP-task ] IPv4 address = 192.168.1.83
|
||||
```
|
||||
1. Echo server should now be running and ready to accept incoming connections
|
||||
|
|
|
|||
|
|
@ -1,474 +1,474 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 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.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* A set of tasks are created that send TCP echo requests to the standard echo
|
||||
* port (port 7) on the IP address set by the configECHO_SERVER_ADDR0 to
|
||||
* configECHO_SERVER_ADDR3 constants, then wait for and verify the reply
|
||||
* (another demo is available that demonstrates the reception being performed in
|
||||
* a task other than that from with the request was made).
|
||||
*
|
||||
* See the following web page for essential demo usage and configuration
|
||||
* details:
|
||||
* https://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/examples_FreeRTOS_simulator.html
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
|
||||
/* FreeRTOS+TCP includes. */
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include "FreeRTOS_Sockets.h"
|
||||
#include "FreeRTOS_IP_Private.h"
|
||||
|
||||
/*#include "tcp_echo_config.h" */
|
||||
|
||||
/* Exclude the whole file if FreeRTOSIPConfig.h is configured to use UDP only. */
|
||||
#if ( ipconfigUSE_TCP == 1 )
|
||||
|
||||
/* The echo tasks create a socket, send out a number of echo requests, listen
|
||||
* for the echo reply, then close the socket again before starting over. This
|
||||
* delay is used between each iteration to ensure the network does not get too
|
||||
* congested. */
|
||||
#define echoLOOP_DELAY pdMS_TO_TICKS( 2U )
|
||||
|
||||
/* The size of the buffers is a multiple of the MSS - the length of the data
|
||||
* sent is a pseudo random size between 20 and echoBUFFER_SIZES. */
|
||||
#define echoBUFFER_SIZE_MULTIPLIER ( 3 )
|
||||
#define echoBUFFER_SIZES ( ipconfigTCP_MSS * echoBUFFER_SIZE_MULTIPLIER )
|
||||
|
||||
/* The number of instances of the echo client task to create. */
|
||||
#define echoNUM_ECHO_CLIENTS ( 1 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Uses a socket to send data to, then receive data from, the standard echo
|
||||
* port number 7.
|
||||
*/
|
||||
static void prvEchoClientTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* Creates a pseudo random sized buffer of data to send to the echo server.
|
||||
*/
|
||||
static BaseType_t prvCreateTxData( char * ucBuffer,
|
||||
uint32_t ulBufferLength );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Rx and Tx time outs are used to ensure the sockets do not wait too long for
|
||||
* missing data. */
|
||||
static const TickType_t xReceiveTimeOut = pdMS_TO_TICKS( 4000 );
|
||||
static const TickType_t xSendTimeOut = pdMS_TO_TICKS( 4000 );
|
||||
static BaseType_t xHasStarted = pdFALSE;
|
||||
|
||||
/* Counters for each created task - for inspection only. */
|
||||
static uint32_t ulTxRxCycles[ echoNUM_ECHO_CLIENTS ] = { 0 },
|
||||
ulTxRxFailures[ echoNUM_ECHO_CLIENTS ] = { 0 },
|
||||
ulConnections[ echoNUM_ECHO_CLIENTS ] = { 0 };
|
||||
|
||||
/* Rx and Tx buffers for each created task. */
|
||||
static char cTxBuffers[ echoNUM_ECHO_CLIENTS ][ echoBUFFER_SIZES ],
|
||||
cRxBuffers[ echoNUM_ECHO_CLIENTS ][ echoBUFFER_SIZES ];
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vStartTCPEchoClientTasks_SingleTasks( uint16_t usTaskStackSize,
|
||||
UBaseType_t uxTaskPriority )
|
||||
{
|
||||
if( xHasStarted == pdFALSE )
|
||||
{
|
||||
BaseType_t xCount = 0;
|
||||
BaseType_t x;
|
||||
|
||||
xHasStarted = pdTRUE;
|
||||
|
||||
/* Create the echo client tasks. */
|
||||
for( x = 0; x < echoNUM_ECHO_CLIENTS; x++ )
|
||||
{
|
||||
char ucName[ 16 ];
|
||||
snprintf( ucName, sizeof ucName, "echo_%02d", ( int ) x );
|
||||
BaseType_t rc = xTaskCreate( prvEchoClientTask, /* The function that implements the task. */
|
||||
ucName, /* Just a text name for the task to aid debugging. */
|
||||
usTaskStackSize, /* The stack size is defined in FreeRTOSIPConfig.h. */
|
||||
( void * ) x, /* The task parameter, not used in this case. */
|
||||
uxTaskPriority, /* The priority assigned to the task is defined in FreeRTOSConfig.h. */
|
||||
NULL ); /* The task handle is not used. */
|
||||
|
||||
if( rc == pdPASS )
|
||||
{
|
||||
xCount++;
|
||||
}
|
||||
}
|
||||
|
||||
configPRINTF( ( "Started %d / %d tasks\n", ( int ) xCount, ( int ) echoNUM_ECHO_CLIENTS ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
configPRINTF( ( "vStartTCPEchoClientTasks_SingleTasks: already started\n" ) );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static BaseType_t xIsFatalError( BaseType_t xCode )
|
||||
{
|
||||
BaseType_t xReturn = pdFALSE;
|
||||
|
||||
if( ( xCode < 0 ) && ( xCode != -pdFREERTOS_ERRNO_EWOULDBLOCK ) )
|
||||
{
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvEchoClientTask( void * pvParameters )
|
||||
{
|
||||
Socket_t xSocket;
|
||||
struct freertos_sockaddr xEchoServerAddress;
|
||||
int32_t lLoopCount = 0UL;
|
||||
const int32_t lMaxLoopCount = 1;
|
||||
volatile uint32_t ulTxCount = 0UL;
|
||||
BaseType_t xReceivedBytes, xReturned = 0, xInstance;
|
||||
BaseType_t lTransmitted, lStringLength;
|
||||
char * pcTransmittedString, * pcReceivedString;
|
||||
WinProperties_t xWinProps;
|
||||
TickType_t xTimeOnEntering;
|
||||
TickType_t uxDuration = 0;
|
||||
size_t xTotalSent = 0U;
|
||||
size_t xTotalRecv = 0U;
|
||||
BaseType_t xFamily = FREERTOS_AF_INET;
|
||||
|
||||
/* Fill in the buffer and window sizes that will be used by the socket. */
|
||||
#ifdef _WINDOWS_
|
||||
xWinProps.lTxBufSize = 8 * ipconfigTCP_MSS;
|
||||
xWinProps.lTxWinSize = 5;
|
||||
xWinProps.lRxBufSize = 8 * ipconfigTCP_MSS;
|
||||
xWinProps.lRxWinSize = 5;
|
||||
#else
|
||||
xWinProps.lTxBufSize = 3 * ipconfigTCP_MSS;
|
||||
xWinProps.lTxWinSize = 2;
|
||||
xWinProps.lRxBufSize = 3 * ipconfigTCP_MSS;
|
||||
xWinProps.lRxWinSize = 2;
|
||||
#endif
|
||||
|
||||
/* This task can be created a number of times. Each instance is numbered
|
||||
* to enable each instance to use a different Rx and Tx buffer. The number is
|
||||
* passed in as the task's parameter. */
|
||||
xInstance = ( BaseType_t ) pvParameters;
|
||||
|
||||
/* Point to the buffers to be used by this instance of this task. */
|
||||
pcTransmittedString = &( cTxBuffers[ xInstance ][ 0 ] );
|
||||
pcReceivedString = &( cRxBuffers[ xInstance ][ 0 ] );
|
||||
|
||||
memset( &xEchoServerAddress, 0, sizeof( xEchoServerAddress ) );
|
||||
|
||||
/* Echo requests are sent to the echo server. The address of the echo
|
||||
* server is configured by the constants configECHO_SERVER_ADDR0 to
|
||||
* configECHO_SERVER_ADDR3 in FreeRTOSConfig.h. */
|
||||
|
||||
#ifdef configECHO_SERVER_ADDR_STRING
|
||||
{
|
||||
BaseType_t rc = FreeRTOS_inet_pton( FREERTOS_AF_INET6, configECHO_SERVER_ADDR_STRING, ( void * ) xEchoServerAddress.sin_address.xIP_IPv6.ucBytes );
|
||||
|
||||
if( rc == pdPASS )
|
||||
{
|
||||
xFamily = FREERTOS_AF_INET6;
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = FreeRTOS_inet_pton( FREERTOS_AF_INET4, configECHO_SERVER_ADDR_STRING, ( void * ) xEchoServerAddress.sin_address.xIP_IPv6.ucBytes );
|
||||
configASSERT( rc == pdPASS );
|
||||
xFamily = FREERTOS_AF_INET4;
|
||||
}
|
||||
}
|
||||
#else /* ifdef configECHO_SERVER_ADDR_STRING */
|
||||
{
|
||||
xEchoServerAddress.sin_address.ulIP_IPv4 = FreeRTOS_inet_addr_quick( configECHO_SERVER_ADDR0, configECHO_SERVER_ADDR1, configECHO_SERVER_ADDR2, configECHO_SERVER_ADDR3 );
|
||||
}
|
||||
#endif /* ifdef configECHO_SERVER_ADDR_STRING */
|
||||
|
||||
xEchoServerAddress.sin_len = sizeof( xEchoServerAddress );
|
||||
xEchoServerAddress.sin_port = FreeRTOS_htons( configECHO_SERVER_PORT );
|
||||
xEchoServerAddress.sin_family = xFamily;
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
configPRINTF( ( "-------- Starting New Iteration --------\n" ) );
|
||||
BaseType_t xResult;
|
||||
/* Create a TCP socket. */
|
||||
xSocket = FreeRTOS_socket( xFamily, FREERTOS_SOCK_STREAM, FREERTOS_IPPROTO_TCP );
|
||||
configASSERT( xSocket != FREERTOS_INVALID_SOCKET );
|
||||
|
||||
/* Set a time out so a missing reply does not cause the task to block
|
||||
* indefinitely. */
|
||||
FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVTIMEO, &xReceiveTimeOut, sizeof( xReceiveTimeOut ) );
|
||||
FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDTIMEO, &xSendTimeOut, sizeof( xSendTimeOut ) );
|
||||
|
||||
/* Set the window and buffer sizes. */
|
||||
FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_WIN_PROPERTIES, ( void * ) &xWinProps, sizeof( xWinProps ) );
|
||||
xTotalSent = 0U;
|
||||
xTotalRecv = 0U;
|
||||
|
||||
/* Connect to the echo server. */
|
||||
xResult = FreeRTOS_connect( xSocket, &xEchoServerAddress, sizeof( xEchoServerAddress ) );
|
||||
configPRINTF( ( "FreeRTOS_connect returns %d\n", ( int ) xResult ) );
|
||||
|
||||
if( xResult == 0 )
|
||||
{
|
||||
ulConnections[ xInstance ]++;
|
||||
|
||||
/* Send a number of echo requests. */
|
||||
for( lLoopCount = 0; lLoopCount < lMaxLoopCount; lLoopCount++ )
|
||||
{
|
||||
/* Create the string that is sent to the echo server. */
|
||||
lStringLength = prvCreateTxData( pcTransmittedString, echoBUFFER_SIZES );
|
||||
|
||||
/* Add in some unique text at the front of the string. */
|
||||
sprintf( pcTransmittedString, "TxRx message number %u", ( unsigned ) ulTxCount );
|
||||
ulTxCount++;
|
||||
|
||||
/* Send the string to the socket. */
|
||||
lTransmitted = FreeRTOS_send( xSocket, /* The socket being sent to. */
|
||||
( void * ) pcTransmittedString, /* The data being sent. */
|
||||
lStringLength, /* The length of the data being sent. */
|
||||
0 ); /* No flags. */
|
||||
configPRINTF( ( "FreeRTOS_send: %u/%u\n", ( unsigned ) lTransmitted, ( unsigned ) lStringLength ) );
|
||||
|
||||
if( xIsFatalError( lTransmitted ) )
|
||||
{
|
||||
/* Error? */
|
||||
break;
|
||||
}
|
||||
|
||||
xTotalSent += lTransmitted;
|
||||
|
||||
/* Clear the buffer into which the echoed string will be
|
||||
* placed. */
|
||||
memset( ( void * ) pcReceivedString, 0x00, echoBUFFER_SIZES );
|
||||
xReceivedBytes = 0;
|
||||
|
||||
/* Receive data echoed back to the socket. */
|
||||
while( xReceivedBytes < lTransmitted )
|
||||
{
|
||||
xReturned = FreeRTOS_recv( xSocket, /* The socket being received from. */
|
||||
&( pcReceivedString[ xReceivedBytes ] ), /* The buffer into which the received data will be written. */
|
||||
lStringLength - xReceivedBytes, /* The size of the buffer provided to receive the data. */
|
||||
0 ); /* No flags. */
|
||||
|
||||
if( xIsFatalError( xReturned ) )
|
||||
{
|
||||
/* Error occurred. Latch it so it can be detected
|
||||
* below. */
|
||||
break;
|
||||
}
|
||||
|
||||
if( xReturned == 0 )
|
||||
{
|
||||
/* Timed out. */
|
||||
configPRINTF( ( "recv returned %u\n", ( unsigned ) xReturned ) );
|
||||
break;
|
||||
}
|
||||
|
||||
/* Keep a count of the bytes received so far. */
|
||||
xReceivedBytes += xReturned;
|
||||
xTotalRecv += xReturned;
|
||||
}
|
||||
|
||||
/* If an error occurred it will be latched in xReceivedBytes,
|
||||
* otherwise xReceived bytes will be just that - the number of
|
||||
* bytes received from the echo server. */
|
||||
if( xReceivedBytes > 0 )
|
||||
{
|
||||
/* Compare the transmitted string to the received string. */
|
||||
configASSERT( strncmp( pcReceivedString, pcTransmittedString, lTransmitted ) == 0 );
|
||||
|
||||
if( strncmp( pcReceivedString, pcTransmittedString, lTransmitted ) == 0 )
|
||||
{
|
||||
/* The echo reply was received without error. */
|
||||
ulTxRxCycles[ xInstance ]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The received string did not match the transmitted
|
||||
* string. */
|
||||
ulTxRxFailures[ xInstance ]++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if( xIsFatalError( xReturned ) )
|
||||
{
|
||||
/* FreeRTOS_recv() returned an error. */
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Timed out without receiving anything? */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Finished using the connected socket, initiate a graceful close:
|
||||
* FIN, FIN+ACK, ACK. */
|
||||
FreeRTOS_shutdown( xSocket, FREERTOS_SHUT_RDWR );
|
||||
|
||||
/* Expect FreeRTOS_recv() to return an error once the shutdown is
|
||||
* complete. */
|
||||
xTimeOnEntering = xTaskGetTickCount();
|
||||
|
||||
do
|
||||
{
|
||||
xReturned = FreeRTOS_recv( xSocket, /* The socket being received from. */
|
||||
&( pcReceivedString[ 0 ] ), /* The buffer into which the received data will be written. */
|
||||
echoBUFFER_SIZES, /* The size of the buffer provided to receive the data. */
|
||||
0 );
|
||||
|
||||
uxDuration = ( xTaskGetTickCount() - xTimeOnEntering );
|
||||
|
||||
if( xReturned < 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
} while( uxDuration < xReceiveTimeOut );
|
||||
}
|
||||
|
||||
configPRINTF( ( "Instance[%u]: Good %u/%u shutdown %u\n",
|
||||
( unsigned ) xInstance,
|
||||
( unsigned ) ( ulTxRxCycles[ xInstance ] - ulTxRxFailures[ xInstance ] ),
|
||||
( unsigned ) ( ulTxRxCycles[ xInstance ] ),
|
||||
( unsigned ) uxDuration ) );
|
||||
configPRINTF( ( "%u x %u = %u Exchange %u/%u\n",
|
||||
( unsigned ) echoBUFFER_SIZE_MULTIPLIER,
|
||||
( unsigned ) echoBUFFER_SIZES,
|
||||
( unsigned ) ( echoBUFFER_SIZE_MULTIPLIER * echoBUFFER_SIZES ),
|
||||
( unsigned ) xTotalSent,
|
||||
( unsigned ) xTotalRecv ) );
|
||||
configPRINTF( ( "--------------------------------------\n\n" ) );
|
||||
|
||||
/* Close this socket before looping back to create another. */
|
||||
FreeRTOS_closesocket( xSocket );
|
||||
|
||||
/* Pause for a short while to ensure the network is not too
|
||||
* congested. */
|
||||
vTaskDelay( echoLOOP_DELAY );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static BaseType_t prvCreateTxData( char * cBuffer,
|
||||
uint32_t ulBufferLength )
|
||||
{
|
||||
BaseType_t lCharactersToAdd, lCharacter;
|
||||
char cChar = '0';
|
||||
const BaseType_t lMinimumLength = 60;
|
||||
uint32_t ulRandomNumber;
|
||||
static uint32_t ulNextnumber = 1U;
|
||||
|
||||
/* Randomise the number of characters that will be sent in the echo
|
||||
* request. */
|
||||
do
|
||||
{
|
||||
( void ) xApplicationGetRandomNumber( &ulRandomNumber );
|
||||
lCharactersToAdd = ulRandomNumber % ( ulBufferLength - 20UL );
|
||||
} while( ( lCharactersToAdd == 0 ) || ( lCharactersToAdd < lMinimumLength ) ); /* Must be at least enough to add the unique text to the start of the string later. */
|
||||
|
||||
/* Fill the buffer. */
|
||||
for( lCharacter = 0; lCharacter < lCharactersToAdd; lCharacter++ )
|
||||
{
|
||||
cBuffer[ lCharacter ] = cChar;
|
||||
cChar++;
|
||||
|
||||
if( cChar > '~' )
|
||||
{
|
||||
cChar = '0';
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
/* Replace the string "0123456789" with an increasing number. */
|
||||
char pcBuf[ 16 ];
|
||||
char * pcPtr = cBuffer;
|
||||
const char * ucLast = &( cBuffer[ ulBufferLength ] );
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
char * next = strchr( pcPtr, '0' );
|
||||
|
||||
if( ( next == NULL ) || ( ( next + 10 ) >= ucLast ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf( pcBuf, sizeof pcBuf, "%010u", ulNextnumber );
|
||||
memcpy( next, pcBuf, 10 );
|
||||
ulNextnumber++;
|
||||
pcPtr = next + 10;
|
||||
}
|
||||
}
|
||||
return lCharactersToAdd;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t xAreSingleTaskTCPEchoClientsStillRunning( void )
|
||||
{
|
||||
static uint32_t ulLastEchoSocketCount[ echoNUM_ECHO_CLIENTS ] = { 0 }, ulLastConnections[ echoNUM_ECHO_CLIENTS ] = { 0 };
|
||||
BaseType_t xReturn = pdPASS, x;
|
||||
|
||||
/* Return fail is the number of cycles does not increment between
|
||||
* consecutive calls. */
|
||||
for( x = 0; x < echoNUM_ECHO_CLIENTS; x++ )
|
||||
{
|
||||
if( ulTxRxCycles[ x ] == ulLastEchoSocketCount[ x ] )
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ulLastEchoSocketCount[ x ] = ulTxRxCycles[ x ];
|
||||
}
|
||||
|
||||
if( ulConnections[ x ] == ulLastConnections[ x ] )
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ulConnections[ x ] = ulLastConnections[ x ];
|
||||
}
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
#endif /* ipconfigUSE_TCP */
|
||||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 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.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* A set of tasks are created that send TCP echo requests to the standard echo
|
||||
* port (port 7) on the IP address set by the configECHO_SERVER_ADDR0 to
|
||||
* configECHO_SERVER_ADDR3 constants, then wait for and verify the reply
|
||||
* (another demo is available that demonstrates the reception being performed in
|
||||
* a task other than that from with the request was made).
|
||||
*
|
||||
* See the following web page for essential demo usage and configuration
|
||||
* details:
|
||||
* https://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/examples_FreeRTOS_simulator.html
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
|
||||
/* FreeRTOS+TCP includes. */
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include "FreeRTOS_Sockets.h"
|
||||
#include "FreeRTOS_IP_Private.h"
|
||||
|
||||
/*#include "tcp_echo_config.h" */
|
||||
|
||||
/* Exclude the whole file if FreeRTOSIPConfig.h is configured to use UDP only. */
|
||||
#if ( ipconfigUSE_TCP == 1 )
|
||||
|
||||
/* The echo tasks create a socket, send out a number of echo requests, listen
|
||||
* for the echo reply, then close the socket again before starting over. This
|
||||
* delay is used between each iteration to ensure the network does not get too
|
||||
* congested. */
|
||||
#define echoLOOP_DELAY pdMS_TO_TICKS( 2U )
|
||||
|
||||
/* The size of the buffers is a multiple of the MSS - the length of the data
|
||||
* sent is a pseudo random size between 20 and echoBUFFER_SIZES. */
|
||||
#define echoBUFFER_SIZE_MULTIPLIER ( 3 )
|
||||
#define echoBUFFER_SIZES ( ipconfigTCP_MSS * echoBUFFER_SIZE_MULTIPLIER )
|
||||
|
||||
/* The number of instances of the echo client task to create. */
|
||||
#define echoNUM_ECHO_CLIENTS ( 1 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Uses a socket to send data to, then receive data from, the standard echo
|
||||
* port number 7.
|
||||
*/
|
||||
static void prvEchoClientTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* Creates a pseudo random sized buffer of data to send to the echo server.
|
||||
*/
|
||||
static BaseType_t prvCreateTxData( char * ucBuffer,
|
||||
uint32_t ulBufferLength );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Rx and Tx time outs are used to ensure the sockets do not wait too long for
|
||||
* missing data. */
|
||||
static const TickType_t xReceiveTimeOut = pdMS_TO_TICKS( 4000 );
|
||||
static const TickType_t xSendTimeOut = pdMS_TO_TICKS( 4000 );
|
||||
static BaseType_t xHasStarted = pdFALSE;
|
||||
|
||||
/* Counters for each created task - for inspection only. */
|
||||
static uint32_t ulTxRxCycles[ echoNUM_ECHO_CLIENTS ] = { 0 },
|
||||
ulTxRxFailures[ echoNUM_ECHO_CLIENTS ] = { 0 },
|
||||
ulConnections[ echoNUM_ECHO_CLIENTS ] = { 0 };
|
||||
|
||||
/* Rx and Tx buffers for each created task. */
|
||||
static char cTxBuffers[ echoNUM_ECHO_CLIENTS ][ echoBUFFER_SIZES ],
|
||||
cRxBuffers[ echoNUM_ECHO_CLIENTS ][ echoBUFFER_SIZES ];
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vStartTCPEchoClientTasks_SingleTasks( uint16_t usTaskStackSize,
|
||||
UBaseType_t uxTaskPriority )
|
||||
{
|
||||
if( xHasStarted == pdFALSE )
|
||||
{
|
||||
BaseType_t xCount = 0;
|
||||
BaseType_t x;
|
||||
|
||||
xHasStarted = pdTRUE;
|
||||
|
||||
/* Create the echo client tasks. */
|
||||
for( x = 0; x < echoNUM_ECHO_CLIENTS; x++ )
|
||||
{
|
||||
char ucName[ 16 ];
|
||||
snprintf( ucName, sizeof ucName, "echo_%02d", ( int ) x );
|
||||
BaseType_t rc = xTaskCreate( prvEchoClientTask, /* The function that implements the task. */
|
||||
ucName, /* Just a text name for the task to aid debugging. */
|
||||
usTaskStackSize, /* The stack size is defined in FreeRTOSIPConfig.h. */
|
||||
( void * ) x, /* The task parameter, not used in this case. */
|
||||
uxTaskPriority, /* The priority assigned to the task is defined in FreeRTOSConfig.h. */
|
||||
NULL ); /* The task handle is not used. */
|
||||
|
||||
if( rc == pdPASS )
|
||||
{
|
||||
xCount++;
|
||||
}
|
||||
}
|
||||
|
||||
configPRINTF( ( "Started %d / %d tasks\n", ( int ) xCount, ( int ) echoNUM_ECHO_CLIENTS ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
configPRINTF( ( "vStartTCPEchoClientTasks_SingleTasks: already started\n" ) );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static BaseType_t xIsFatalError( BaseType_t xCode )
|
||||
{
|
||||
BaseType_t xReturn = pdFALSE;
|
||||
|
||||
if( ( xCode < 0 ) && ( xCode != -pdFREERTOS_ERRNO_EWOULDBLOCK ) )
|
||||
{
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvEchoClientTask( void * pvParameters )
|
||||
{
|
||||
Socket_t xSocket;
|
||||
struct freertos_sockaddr xEchoServerAddress;
|
||||
int32_t lLoopCount = 0UL;
|
||||
const int32_t lMaxLoopCount = 1;
|
||||
volatile uint32_t ulTxCount = 0UL;
|
||||
BaseType_t xReceivedBytes, xReturned = 0, xInstance;
|
||||
BaseType_t lTransmitted, lStringLength;
|
||||
char * pcTransmittedString, * pcReceivedString;
|
||||
WinProperties_t xWinProps;
|
||||
TickType_t xTimeOnEntering;
|
||||
TickType_t uxDuration = 0;
|
||||
size_t xTotalSent = 0U;
|
||||
size_t xTotalRecv = 0U;
|
||||
BaseType_t xFamily = FREERTOS_AF_INET;
|
||||
|
||||
/* Fill in the buffer and window sizes that will be used by the socket. */
|
||||
#ifdef _WINDOWS_
|
||||
xWinProps.lTxBufSize = 8 * ipconfigTCP_MSS;
|
||||
xWinProps.lTxWinSize = 5;
|
||||
xWinProps.lRxBufSize = 8 * ipconfigTCP_MSS;
|
||||
xWinProps.lRxWinSize = 5;
|
||||
#else
|
||||
xWinProps.lTxBufSize = 3 * ipconfigTCP_MSS;
|
||||
xWinProps.lTxWinSize = 2;
|
||||
xWinProps.lRxBufSize = 3 * ipconfigTCP_MSS;
|
||||
xWinProps.lRxWinSize = 2;
|
||||
#endif
|
||||
|
||||
/* This task can be created a number of times. Each instance is numbered
|
||||
* to enable each instance to use a different Rx and Tx buffer. The number is
|
||||
* passed in as the task's parameter. */
|
||||
xInstance = ( BaseType_t ) pvParameters;
|
||||
|
||||
/* Point to the buffers to be used by this instance of this task. */
|
||||
pcTransmittedString = &( cTxBuffers[ xInstance ][ 0 ] );
|
||||
pcReceivedString = &( cRxBuffers[ xInstance ][ 0 ] );
|
||||
|
||||
memset( &xEchoServerAddress, 0, sizeof( xEchoServerAddress ) );
|
||||
|
||||
/* Echo requests are sent to the echo server. The address of the echo
|
||||
* server is configured by the constants configECHO_SERVER_ADDR0 to
|
||||
* configECHO_SERVER_ADDR3 in FreeRTOSConfig.h. */
|
||||
|
||||
#ifdef configECHO_SERVER_ADDR_STRING
|
||||
{
|
||||
BaseType_t rc = FreeRTOS_inet_pton( FREERTOS_AF_INET6, configECHO_SERVER_ADDR_STRING, ( void * ) xEchoServerAddress.sin_address.xIP_IPv6.ucBytes );
|
||||
|
||||
if( rc == pdPASS )
|
||||
{
|
||||
xFamily = FREERTOS_AF_INET6;
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = FreeRTOS_inet_pton( FREERTOS_AF_INET4, configECHO_SERVER_ADDR_STRING, ( void * ) xEchoServerAddress.sin_address.xIP_IPv6.ucBytes );
|
||||
configASSERT( rc == pdPASS );
|
||||
xFamily = FREERTOS_AF_INET4;
|
||||
}
|
||||
}
|
||||
#else /* ifdef configECHO_SERVER_ADDR_STRING */
|
||||
{
|
||||
xEchoServerAddress.sin_address.ulIP_IPv4 = FreeRTOS_inet_addr_quick( configECHO_SERVER_ADDR0, configECHO_SERVER_ADDR1, configECHO_SERVER_ADDR2, configECHO_SERVER_ADDR3 );
|
||||
}
|
||||
#endif /* ifdef configECHO_SERVER_ADDR_STRING */
|
||||
|
||||
xEchoServerAddress.sin_len = sizeof( xEchoServerAddress );
|
||||
xEchoServerAddress.sin_port = FreeRTOS_htons( configECHO_SERVER_PORT );
|
||||
xEchoServerAddress.sin_family = xFamily;
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
configPRINTF( ( "-------- Starting New Iteration --------\n" ) );
|
||||
BaseType_t xResult;
|
||||
/* Create a TCP socket. */
|
||||
xSocket = FreeRTOS_socket( xFamily, FREERTOS_SOCK_STREAM, FREERTOS_IPPROTO_TCP );
|
||||
configASSERT( xSocket != FREERTOS_INVALID_SOCKET );
|
||||
|
||||
/* Set a time out so a missing reply does not cause the task to block
|
||||
* indefinitely. */
|
||||
FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVTIMEO, &xReceiveTimeOut, sizeof( xReceiveTimeOut ) );
|
||||
FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDTIMEO, &xSendTimeOut, sizeof( xSendTimeOut ) );
|
||||
|
||||
/* Set the window and buffer sizes. */
|
||||
FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_WIN_PROPERTIES, ( void * ) &xWinProps, sizeof( xWinProps ) );
|
||||
xTotalSent = 0U;
|
||||
xTotalRecv = 0U;
|
||||
|
||||
/* Connect to the echo server. */
|
||||
xResult = FreeRTOS_connect( xSocket, &xEchoServerAddress, sizeof( xEchoServerAddress ) );
|
||||
configPRINTF( ( "FreeRTOS_connect returns %d\n", ( int ) xResult ) );
|
||||
|
||||
if( xResult == 0 )
|
||||
{
|
||||
ulConnections[ xInstance ]++;
|
||||
|
||||
/* Send a number of echo requests. */
|
||||
for( lLoopCount = 0; lLoopCount < lMaxLoopCount; lLoopCount++ )
|
||||
{
|
||||
/* Create the string that is sent to the echo server. */
|
||||
lStringLength = prvCreateTxData( pcTransmittedString, echoBUFFER_SIZES );
|
||||
|
||||
/* Add in some unique text at the front of the string. */
|
||||
sprintf( pcTransmittedString, "TxRx message number %u", ( unsigned ) ulTxCount );
|
||||
ulTxCount++;
|
||||
|
||||
/* Send the string to the socket. */
|
||||
lTransmitted = FreeRTOS_send( xSocket, /* The socket being sent to. */
|
||||
( void * ) pcTransmittedString, /* The data being sent. */
|
||||
lStringLength, /* The length of the data being sent. */
|
||||
0 ); /* No flags. */
|
||||
configPRINTF( ( "FreeRTOS_send: %u/%u\n", ( unsigned ) lTransmitted, ( unsigned ) lStringLength ) );
|
||||
|
||||
if( xIsFatalError( lTransmitted ) )
|
||||
{
|
||||
/* Error? */
|
||||
break;
|
||||
}
|
||||
|
||||
xTotalSent += lTransmitted;
|
||||
|
||||
/* Clear the buffer into which the echoed string will be
|
||||
* placed. */
|
||||
memset( ( void * ) pcReceivedString, 0x00, echoBUFFER_SIZES );
|
||||
xReceivedBytes = 0;
|
||||
|
||||
/* Receive data echoed back to the socket. */
|
||||
while( xReceivedBytes < lTransmitted )
|
||||
{
|
||||
xReturned = FreeRTOS_recv( xSocket, /* The socket being received from. */
|
||||
&( pcReceivedString[ xReceivedBytes ] ), /* The buffer into which the received data will be written. */
|
||||
lStringLength - xReceivedBytes, /* The size of the buffer provided to receive the data. */
|
||||
0 ); /* No flags. */
|
||||
|
||||
if( xIsFatalError( xReturned ) )
|
||||
{
|
||||
/* Error occurred. Latch it so it can be detected
|
||||
* below. */
|
||||
break;
|
||||
}
|
||||
|
||||
if( xReturned == 0 )
|
||||
{
|
||||
/* Timed out. */
|
||||
configPRINTF( ( "recv returned %u\n", ( unsigned ) xReturned ) );
|
||||
break;
|
||||
}
|
||||
|
||||
/* Keep a count of the bytes received so far. */
|
||||
xReceivedBytes += xReturned;
|
||||
xTotalRecv += xReturned;
|
||||
}
|
||||
|
||||
/* If an error occurred it will be latched in xReceivedBytes,
|
||||
* otherwise xReceived bytes will be just that - the number of
|
||||
* bytes received from the echo server. */
|
||||
if( xReceivedBytes > 0 )
|
||||
{
|
||||
/* Compare the transmitted string to the received string. */
|
||||
configASSERT( strncmp( pcReceivedString, pcTransmittedString, lTransmitted ) == 0 );
|
||||
|
||||
if( strncmp( pcReceivedString, pcTransmittedString, lTransmitted ) == 0 )
|
||||
{
|
||||
/* The echo reply was received without error. */
|
||||
ulTxRxCycles[ xInstance ]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The received string did not match the transmitted
|
||||
* string. */
|
||||
ulTxRxFailures[ xInstance ]++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if( xIsFatalError( xReturned ) )
|
||||
{
|
||||
/* FreeRTOS_recv() returned an error. */
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Timed out without receiving anything? */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Finished using the connected socket, initiate a graceful close:
|
||||
* FIN, FIN+ACK, ACK. */
|
||||
FreeRTOS_shutdown( xSocket, FREERTOS_SHUT_RDWR );
|
||||
|
||||
/* Expect FreeRTOS_recv() to return an error once the shutdown is
|
||||
* complete. */
|
||||
xTimeOnEntering = xTaskGetTickCount();
|
||||
|
||||
do
|
||||
{
|
||||
xReturned = FreeRTOS_recv( xSocket, /* The socket being received from. */
|
||||
&( pcReceivedString[ 0 ] ), /* The buffer into which the received data will be written. */
|
||||
echoBUFFER_SIZES, /* The size of the buffer provided to receive the data. */
|
||||
0 );
|
||||
|
||||
uxDuration = ( xTaskGetTickCount() - xTimeOnEntering );
|
||||
|
||||
if( xReturned < 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
} while( uxDuration < xReceiveTimeOut );
|
||||
}
|
||||
|
||||
configPRINTF( ( "Instance[%u]: Good %u/%u shutdown %u\n",
|
||||
( unsigned ) xInstance,
|
||||
( unsigned ) ( ulTxRxCycles[ xInstance ] - ulTxRxFailures[ xInstance ] ),
|
||||
( unsigned ) ( ulTxRxCycles[ xInstance ] ),
|
||||
( unsigned ) uxDuration ) );
|
||||
configPRINTF( ( "%u x %u = %u Exchange %u/%u\n",
|
||||
( unsigned ) echoBUFFER_SIZE_MULTIPLIER,
|
||||
( unsigned ) echoBUFFER_SIZES,
|
||||
( unsigned ) ( echoBUFFER_SIZE_MULTIPLIER * echoBUFFER_SIZES ),
|
||||
( unsigned ) xTotalSent,
|
||||
( unsigned ) xTotalRecv ) );
|
||||
configPRINTF( ( "--------------------------------------\n\n" ) );
|
||||
|
||||
/* Close this socket before looping back to create another. */
|
||||
FreeRTOS_closesocket( xSocket );
|
||||
|
||||
/* Pause for a short while to ensure the network is not too
|
||||
* congested. */
|
||||
vTaskDelay( echoLOOP_DELAY );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static BaseType_t prvCreateTxData( char * cBuffer,
|
||||
uint32_t ulBufferLength )
|
||||
{
|
||||
BaseType_t lCharactersToAdd, lCharacter;
|
||||
char cChar = '0';
|
||||
const BaseType_t lMinimumLength = 60;
|
||||
uint32_t ulRandomNumber;
|
||||
static uint32_t ulNextnumber = 1U;
|
||||
|
||||
/* Randomise the number of characters that will be sent in the echo
|
||||
* request. */
|
||||
do
|
||||
{
|
||||
( void ) xApplicationGetRandomNumber( &ulRandomNumber );
|
||||
lCharactersToAdd = ulRandomNumber % ( ulBufferLength - 20UL );
|
||||
} while( ( lCharactersToAdd == 0 ) || ( lCharactersToAdd < lMinimumLength ) ); /* Must be at least enough to add the unique text to the start of the string later. */
|
||||
|
||||
/* Fill the buffer. */
|
||||
for( lCharacter = 0; lCharacter < lCharactersToAdd; lCharacter++ )
|
||||
{
|
||||
cBuffer[ lCharacter ] = cChar;
|
||||
cChar++;
|
||||
|
||||
if( cChar > '~' )
|
||||
{
|
||||
cChar = '0';
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
/* Replace the string "0123456789" with an increasing number. */
|
||||
char pcBuf[ 16 ];
|
||||
char * pcPtr = cBuffer;
|
||||
const char * ucLast = &( cBuffer[ ulBufferLength ] );
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
char * next = strchr( pcPtr, '0' );
|
||||
|
||||
if( ( next == NULL ) || ( ( next + 10 ) >= ucLast ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf( pcBuf, sizeof pcBuf, "%010u", ulNextnumber );
|
||||
memcpy( next, pcBuf, 10 );
|
||||
ulNextnumber++;
|
||||
pcPtr = next + 10;
|
||||
}
|
||||
}
|
||||
return lCharactersToAdd;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t xAreSingleTaskTCPEchoClientsStillRunning( void )
|
||||
{
|
||||
static uint32_t ulLastEchoSocketCount[ echoNUM_ECHO_CLIENTS ] = { 0 }, ulLastConnections[ echoNUM_ECHO_CLIENTS ] = { 0 };
|
||||
BaseType_t xReturn = pdPASS, x;
|
||||
|
||||
/* Return fail is the number of cycles does not increment between
|
||||
* consecutive calls. */
|
||||
for( x = 0; x < echoNUM_ECHO_CLIENTS; x++ )
|
||||
{
|
||||
if( ulTxRxCycles[ x ] == ulLastEchoSocketCount[ x ] )
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ulLastEchoSocketCount[ x ] = ulTxRxCycles[ x ];
|
||||
}
|
||||
|
||||
if( ulConnections[ x ] == ulLastConnections[ x ] )
|
||||
{
|
||||
xReturn = pdFAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ulConnections[ x ] = ulLastConnections[ x ];
|
||||
}
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
#endif /* ipconfigUSE_TCP */
|
||||
|
|
|
|||
|
|
@ -1,38 +1,38 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 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.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SINGLE_TASK_TCP_ECHO_CLIENTS_H
|
||||
#define SINGLE_TASK_TCP_ECHO_CLIENTS_H
|
||||
|
||||
/*
|
||||
* Create the TCP echo client tasks. This is the version where an echo request
|
||||
* is made from the same task that listens for the echo reply.
|
||||
*/
|
||||
void vStartTCPEchoClientTasks_SingleTasks( uint16_t usTaskStackSize,
|
||||
UBaseType_t uxTaskPriority );
|
||||
BaseType_t xAreSingleTaskTCPEchoClientsStillRunning( void );
|
||||
|
||||
#endif /* SINGLE_TASK_TCP_ECHO_CLIENTS_H */
|
||||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 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.
|
||||
*
|
||||
* https://www.FreeRTOS.org
|
||||
* https://github.com/FreeRTOS
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SINGLE_TASK_TCP_ECHO_CLIENTS_H
|
||||
#define SINGLE_TASK_TCP_ECHO_CLIENTS_H
|
||||
|
||||
/*
|
||||
* Create the TCP echo client tasks. This is the version where an echo request
|
||||
* is made from the same task that listens for the echo reply.
|
||||
*/
|
||||
void vStartTCPEchoClientTasks_SingleTasks( uint16_t usTaskStackSize,
|
||||
UBaseType_t uxTaskPriority );
|
||||
BaseType_t xAreSingleTaskTCPEchoClientsStillRunning( void );
|
||||
|
||||
#endif /* SINGLE_TASK_TCP_ECHO_CLIENTS_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
@ -24,17 +24,17 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* A set of tasks are created that send UDP echo requests to the
|
||||
* IP address set by the configECHO_SERVER_ADDR0 to
|
||||
* configECHO_SERVER_ADDR_STRING constant, then wait for and verify the reply
|
||||
*
|
||||
* See the following web page for essential demo usage and configuration
|
||||
* details:
|
||||
* https://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/examples_FreeRTOS_simulator.html
|
||||
*/
|
||||
/*
|
||||
* A set of tasks are created that send UDP echo requests to the
|
||||
* IP address set by the configECHO_SERVER_ADDR0 to
|
||||
* configECHO_SERVER_ADDR_STRING constant, then wait for and verify the reply
|
||||
*
|
||||
* See the following web page for essential demo usage and configuration
|
||||
* details:
|
||||
* https://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/examples_FreeRTOS_simulator.html
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
/* Standard includes. */
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -50,240 +50,239 @@
|
|||
#include "FreeRTOS_IP_Private.h"
|
||||
|
||||
|
||||
#define USE_ZERO_COPY ( 1 )
|
||||
#define USE_ZERO_COPY ( 1 )
|
||||
|
||||
/* The echo tasks create a socket, send out a number of echo requests, listen
|
||||
for the echo reply, then close the socket again before starting over. This
|
||||
delay is used between each iteration to ensure the network does not get too
|
||||
congested. */
|
||||
#define echoLOOP_DELAY pdMS_TO_TICKS( 2U )
|
||||
* for the echo reply, then close the socket again before starting over. This
|
||||
* delay is used between each iteration to ensure the network does not get too
|
||||
* congested. */
|
||||
#define echoLOOP_DELAY pdMS_TO_TICKS( 2U )
|
||||
|
||||
/* The number of instances of the echo client task to create. */
|
||||
#define echoNUM_ECHO_CLIENTS ( 1 )
|
||||
#define echoNUM_ECHO_CLIENTS ( 1 )
|
||||
|
||||
#define TX_RX_STR_SIZE ( 25 )
|
||||
#define TX_RX_STR_SIZE ( 25 )
|
||||
|
||||
/* Rx and Tx time outs are used to ensure the sockets do not wait too long for
|
||||
missing data. */
|
||||
static const TickType_t xReceiveTimeOut = pdMS_TO_TICKS(4000);
|
||||
static const TickType_t xSendTimeOut = pdMS_TO_TICKS(4000);
|
||||
* missing data. */
|
||||
static const TickType_t xReceiveTimeOut = pdMS_TO_TICKS( 4000 );
|
||||
static const TickType_t xSendTimeOut = pdMS_TO_TICKS( 4000 );
|
||||
static BaseType_t xHasStarted = pdFALSE;
|
||||
|
||||
/*
|
||||
* UDP echo client task
|
||||
*/
|
||||
static void prvUDPEchoClientTask(void* pvParameters);
|
||||
* UDP echo client task
|
||||
*/
|
||||
static void prvUDPEchoClientTask( void * pvParameters );
|
||||
|
||||
void vStartUDPEchoClientTasks_SingleTasks(uint16_t usTaskStackSize, UBaseType_t uxTaskPriority)
|
||||
void vStartUDPEchoClientTasks_SingleTasks( uint16_t usTaskStackSize,
|
||||
UBaseType_t uxTaskPriority )
|
||||
{
|
||||
|
||||
if (xHasStarted == pdFALSE)
|
||||
if( xHasStarted == pdFALSE )
|
||||
{
|
||||
BaseType_t xCount = 0;
|
||||
BaseType_t x;
|
||||
|
||||
xHasStarted = pdTRUE;
|
||||
|
||||
/* Create the echo client tasks. */
|
||||
for (x = 0; x < echoNUM_ECHO_CLIENTS; x++)
|
||||
for( x = 0; x < echoNUM_ECHO_CLIENTS; x++ )
|
||||
{
|
||||
char ucName[16];
|
||||
snprintf(ucName, sizeof ucName, "echo_%02d", (int)x);
|
||||
BaseType_t rc = xTaskCreate(prvUDPEchoClientTask, /* The function that implements the task. */
|
||||
ucName, /* Just a text name for the task to aid debugging. */
|
||||
usTaskStackSize, /* The stack size is defined in FreeRTOSIPConfig.h. */
|
||||
(void*)x, /* The task parameter, not used in this case. */
|
||||
uxTaskPriority, /* The priority assigned to the task is defined in FreeRTOSConfig.h. */
|
||||
NULL); /* The task handle is not used. */
|
||||
if (rc == pdPASS)
|
||||
char ucName[ 16 ];
|
||||
snprintf( ucName, sizeof ucName, "echo_%02d", ( int ) x );
|
||||
BaseType_t rc = xTaskCreate( prvUDPEchoClientTask, /* The function that implements the task. */
|
||||
ucName, /* Just a text name for the task to aid debugging. */
|
||||
usTaskStackSize, /* The stack size is defined in FreeRTOSIPConfig.h. */
|
||||
( void * ) x, /* The task parameter, not used in this case. */
|
||||
uxTaskPriority, /* The priority assigned to the task is defined in FreeRTOSConfig.h. */
|
||||
NULL ); /* The task handle is not used. */
|
||||
|
||||
if( rc == pdPASS )
|
||||
{
|
||||
xCount++;
|
||||
}
|
||||
}
|
||||
configPRINTF(("Started %d / %d tasks\n", (int)xCount, (int)echoNUM_ECHO_CLIENTS));
|
||||
|
||||
configPRINTF( ( "Started %d / %d tasks\n", ( int ) xCount, ( int ) echoNUM_ECHO_CLIENTS ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
configPRINTF(("vStartUDPEchoClientTasks_SingleTasks: already started\n"));
|
||||
configPRINTF( ( "vStartUDPEchoClientTasks_SingleTasks: already started\n" ) );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvUDPEchoClientTask(void* pvParameters)
|
||||
static void prvUDPEchoClientTask( void * pvParameters )
|
||||
{
|
||||
Socket_t xSocket;
|
||||
struct freertos_sockaddr xEchoServerAddress, xRxAddress;
|
||||
int8_t cTxString[TX_RX_STR_SIZE], cRxString[TX_RX_STR_SIZE]; /* Make sure the stack is large enough to hold these. Turn on stack overflow checking during debug to be sure. */
|
||||
int8_t cTxString[ TX_RX_STR_SIZE ], cRxString[ TX_RX_STR_SIZE ]; /* Make sure the stack is large enough to hold these. Turn on stack overflow checking during debug to be sure. */
|
||||
int32_t lLoopCount = 0UL;
|
||||
int32_t lReturned;
|
||||
const int32_t lMaxLoopCount = 50;
|
||||
volatile uint32_t ulRxCount = 0UL, ulTxCount = 0UL;
|
||||
uint32_t xAddressLength = sizeof(xEchoServerAddress);
|
||||
uint32_t xAddressLength = sizeof( xEchoServerAddress );
|
||||
BaseType_t xFamily = FREERTOS_AF_INET;
|
||||
uint8_t ucIPType = ipTYPE_IPv4;
|
||||
|
||||
/* Remove compiler warning about unused parameters. */
|
||||
(void)pvParameters;
|
||||
( void ) pvParameters;
|
||||
|
||||
memset( &xEchoServerAddress, 0, sizeof( xEchoServerAddress ) );
|
||||
memset( &xRxAddress, 0, sizeof( xRxAddress ) );
|
||||
|
||||
memset(&xEchoServerAddress, 0, sizeof(xEchoServerAddress));
|
||||
memset(&xRxAddress, 0, sizeof(xRxAddress));
|
||||
/* Echo requests are sent to the echo server. The address of the echo
|
||||
server is configured by the constants configECHO_SERVER_ADDR0 to
|
||||
configECHO_SERVER_ADDR3 in FreeRTOSConfig.h. */
|
||||
* server is configured by the constants configECHO_SERVER_ADDR0 to
|
||||
* configECHO_SERVER_ADDR3 in FreeRTOSConfig.h. */
|
||||
|
||||
#ifdef configECHO_SERVER_ADDR_STRING
|
||||
#ifdef configECHO_SERVER_ADDR_STRING
|
||||
{
|
||||
BaseType_t rc = FreeRTOS_inet_pton(FREERTOS_AF_INET6, configECHO_SERVER_ADDR_STRING, (void*)xEchoServerAddress.sin_address.xIP_IPv6.ucBytes);
|
||||
if (rc == pdPASS)
|
||||
BaseType_t rc = FreeRTOS_inet_pton( FREERTOS_AF_INET6, configECHO_SERVER_ADDR_STRING, ( void * ) xEchoServerAddress.sin_address.xIP_IPv6.ucBytes );
|
||||
|
||||
if( rc == pdPASS )
|
||||
{
|
||||
xFamily = FREERTOS_AF_INET6;
|
||||
ucIPType = ipTYPE_IPv6;
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = FreeRTOS_inet_pton(FREERTOS_AF_INET4, configECHO_SERVER_ADDR_STRING, (void*) &(xEchoServerAddress.sin_address.ulIP_IPv4));
|
||||
configASSERT(rc == pdPASS);
|
||||
rc = FreeRTOS_inet_pton( FREERTOS_AF_INET4, configECHO_SERVER_ADDR_STRING, ( void * ) &( xEchoServerAddress.sin_address.ulIP_IPv4 ) );
|
||||
configASSERT( rc == pdPASS );
|
||||
xFamily = FREERTOS_AF_INET4;
|
||||
ucIPType = ipTYPE_IPv4;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else /* ifdef configECHO_SERVER_ADDR_STRING */
|
||||
{
|
||||
xEchoServerAddress.sin_address.ulIP_IPv4 = FreeRTOS_inet_addr_quick(configECHO_SERVER_ADDR0, configECHO_SERVER_ADDR1, configECHO_SERVER_ADDR2, configECHO_SERVER_ADDR3);
|
||||
xEchoServerAddress.sin_address.ulIP_IPv4 = FreeRTOS_inet_addr_quick( configECHO_SERVER_ADDR0, configECHO_SERVER_ADDR1, configECHO_SERVER_ADDR2, configECHO_SERVER_ADDR3 );
|
||||
}
|
||||
#endif
|
||||
#endif /* ifdef configECHO_SERVER_ADDR_STRING */
|
||||
|
||||
xEchoServerAddress.sin_len = sizeof(xEchoServerAddress);
|
||||
xEchoServerAddress.sin_port = FreeRTOS_htons(configECHO_SERVER_PORT);
|
||||
xEchoServerAddress.sin_len = sizeof( xEchoServerAddress );
|
||||
xEchoServerAddress.sin_port = FreeRTOS_htons( configECHO_SERVER_PORT );
|
||||
xEchoServerAddress.sin_family = xFamily;
|
||||
|
||||
|
||||
for (;; )
|
||||
for( ; ; )
|
||||
{
|
||||
configPRINTF( ( "-------- Starting New Iteration --------\n" ) );
|
||||
/* Create a socket. */
|
||||
xSocket = FreeRTOS_socket(xFamily, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP);
|
||||
configASSERT(xSocket != FREERTOS_INVALID_SOCKET);
|
||||
xSocket = FreeRTOS_socket( xFamily, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP );
|
||||
configASSERT( xSocket != FREERTOS_INVALID_SOCKET );
|
||||
|
||||
/* Set a time out so a missing reply does not cause the task to block
|
||||
indefinitely. */
|
||||
FreeRTOS_setsockopt(xSocket, 0, FREERTOS_SO_RCVTIMEO, &xReceiveTimeOut, sizeof(xReceiveTimeOut));
|
||||
* indefinitely. */
|
||||
FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVTIMEO, &xReceiveTimeOut, sizeof( xReceiveTimeOut ) );
|
||||
|
||||
/* Send a number of echo requests. */
|
||||
for (lLoopCount = 0; lLoopCount < lMaxLoopCount; lLoopCount++)
|
||||
for( lLoopCount = 0; lLoopCount < lMaxLoopCount; lLoopCount++ )
|
||||
{
|
||||
/* Create the string that is sent to the echo server. */
|
||||
sprintf((char*)cTxString, "Message number %u\r\n", ulTxCount);
|
||||
sprintf( ( char * ) cTxString, "Message number %u\r\n", ulTxCount );
|
||||
|
||||
#if USE_ZERO_COPY
|
||||
#if USE_ZERO_COPY
|
||||
|
||||
/*
|
||||
* First obtain a buffer of adequate length from the TCP/IP stack into which
|
||||
* the string will be written. */
|
||||
uint8_t* pucBuffer = FreeRTOS_GetUDPPayloadBuffer_Multi(TX_RX_STR_SIZE, portMAX_DELAY, ucIPType);
|
||||
configASSERT(pucBuffer != NULL);
|
||||
memcpy(pucBuffer, &cTxString, strlen((const char*)cTxString) + 1);
|
||||
/*
|
||||
* First obtain a buffer of adequate length from the TCP/IP stack into which
|
||||
* the string will be written. */
|
||||
uint8_t * pucBuffer = FreeRTOS_GetUDPPayloadBuffer_Multi( TX_RX_STR_SIZE, portMAX_DELAY, ucIPType );
|
||||
configASSERT( pucBuffer != NULL );
|
||||
memcpy( pucBuffer, &cTxString, strlen( ( const char * ) cTxString ) + 1 );
|
||||
|
||||
/* Send the string to the socket. ulFlags is set to 0, so the zero
|
||||
copy interface is not used. That means the data from cTxString is
|
||||
copied into a network buffer inside FreeRTOS_sendto(), and cTxString
|
||||
can be reused as soon as FreeRTOS_sendto() has returned. 1 is added
|
||||
to ensure the NULL string terminator is sent as part of the message. */
|
||||
lReturned = FreeRTOS_sendto(xSocket, /* The socket being sent to. */
|
||||
(void*)pucBuffer, /* The data being sent. */
|
||||
strlen((const char*)pucBuffer) + 1, /* The length of the data being sent. */
|
||||
FREERTOS_ZERO_COPY, /* ulFlags with the FREERTOS_ZERO_COPY bit clear. */
|
||||
&xEchoServerAddress, /* The destination address. */
|
||||
sizeof(xEchoServerAddress));
|
||||
/* Send the string to the socket. ulFlags is set to 0, so the zero
|
||||
* copy interface is not used. That means the data from cTxString is
|
||||
* copied into a network buffer inside FreeRTOS_sendto(), and cTxString
|
||||
* can be reused as soon as FreeRTOS_sendto() has returned. 1 is added
|
||||
* to ensure the NULL string terminator is sent as part of the message. */
|
||||
lReturned = FreeRTOS_sendto( xSocket, /* The socket being sent to. */
|
||||
( void * ) pucBuffer, /* The data being sent. */
|
||||
strlen( ( const char * ) pucBuffer ) + 1, /* The length of the data being sent. */
|
||||
FREERTOS_ZERO_COPY, /* ulFlags with the FREERTOS_ZERO_COPY bit clear. */
|
||||
&xEchoServerAddress, /* The destination address. */
|
||||
sizeof( xEchoServerAddress ) );
|
||||
#else /* if USE_ZERO_COPY */
|
||||
|
||||
#else
|
||||
/* Send the string to the socket. ulFlags is set to 0, so the zero
|
||||
* copy interface is not used. That means the data from cTxString is
|
||||
* copied into a network buffer inside FreeRTOS_sendto(), and cTxString
|
||||
* can be reused as soon as FreeRTOS_sendto() has returned. 1 is added
|
||||
* to ensure the NULL string terminator is sent as part of the message. */
|
||||
lReturned = FreeRTOS_sendto( xSocket, /* The socket being sent to. */
|
||||
( void * ) cTxString, /* The data being sent. */
|
||||
strlen( ( const char * ) cTxString ) + 1, /* The length of the data being sent. */
|
||||
0, /* ulFlags with the FREERTOS_ZERO_COPY bit clear. */
|
||||
&xEchoServerAddress, /* The destination address. */
|
||||
sizeof( xEchoServerAddress ) );
|
||||
#endif /* if USE_ZERO_COPY */
|
||||
|
||||
/* Send the string to the socket. ulFlags is set to 0, so the zero
|
||||
copy interface is not used. That means the data from cTxString is
|
||||
copied into a network buffer inside FreeRTOS_sendto(), and cTxString
|
||||
can be reused as soon as FreeRTOS_sendto() has returned. 1 is added
|
||||
to ensure the NULL string terminator is sent as part of the message. */
|
||||
lReturned = FreeRTOS_sendto(xSocket, /* The socket being sent to. */
|
||||
(void*)cTxString, /* The data being sent. */
|
||||
strlen((const char*)cTxString) + 1, /* The length of the data being sent. */
|
||||
0, /* ulFlags with the FREERTOS_ZERO_COPY bit clear. */
|
||||
&xEchoServerAddress, /* The destination address. */
|
||||
sizeof(xEchoServerAddress));
|
||||
|
||||
#endif
|
||||
|
||||
if (lReturned == 0)
|
||||
if( lReturned == 0 )
|
||||
{
|
||||
/* The send operation failed. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Keep a count of how many echo requests have been transmitted so
|
||||
it can be compared to the number of echo replies received. It would
|
||||
be expected to loose at least one to an ARP message the first time
|
||||
the connection is created. */
|
||||
* it can be compared to the number of echo replies received. It would
|
||||
* be expected to loose at least one to an ARP message the first time
|
||||
* the connection is created. */
|
||||
ulTxCount++;
|
||||
/* The send was successful. */
|
||||
FreeRTOS_debug_printf(("[Echo Client] Data sent... \r\n"));
|
||||
FreeRTOS_debug_printf( ( "[Echo Client] Data sent... \r\n" ) );
|
||||
}
|
||||
|
||||
/* Receive data echoed back to the socket. ulFlags is zero, so the
|
||||
zero copy option is not being used and the received data will be
|
||||
copied into the buffer pointed to by cRxString. xAddressLength is
|
||||
not actually used (at the time of writing this comment, anyway) by
|
||||
FreeRTOS_recvfrom(), but is set appropriately in case future
|
||||
versions do use it. */
|
||||
* zero copy option is not being used and the received data will be
|
||||
* copied into the buffer pointed to by cRxString. xAddressLength is
|
||||
* not actually used (at the time of writing this comment, anyway) by
|
||||
* FreeRTOS_recvfrom(), but is set appropriately in case future
|
||||
* versions do use it. */
|
||||
|
||||
memset((void*)cRxString, 0x00, sizeof(cRxString));
|
||||
memset( ( void * ) cRxString, 0x00, sizeof( cRxString ) );
|
||||
|
||||
|
||||
#if USE_ZERO_COPY
|
||||
#if USE_ZERO_COPY
|
||||
uint8_t * pucReceivedUDPPayload = NULL;
|
||||
lReturned = FreeRTOS_recvfrom( xSocket,
|
||||
&pucReceivedUDPPayload,
|
||||
0,
|
||||
FREERTOS_ZERO_COPY,
|
||||
&xRxAddress,
|
||||
&xAddressLength );
|
||||
|
||||
uint8_t* pucReceivedUDPPayload = NULL;
|
||||
lReturned = FreeRTOS_recvfrom(xSocket,
|
||||
&pucReceivedUDPPayload,
|
||||
0,
|
||||
FREERTOS_ZERO_COPY,
|
||||
&xRxAddress,
|
||||
&xAddressLength);
|
||||
if( pucReceivedUDPPayload != NULL )
|
||||
{
|
||||
memcpy( ( void * ) ( cRxString ), pucReceivedUDPPayload, TX_RX_STR_SIZE );
|
||||
|
||||
if (pucReceivedUDPPayload != NULL) {
|
||||
memcpy((void*)(cRxString), pucReceivedUDPPayload, TX_RX_STR_SIZE);
|
||||
FreeRTOS_ReleaseUDPPayloadBuffer( ( void * ) pucReceivedUDPPayload );
|
||||
}
|
||||
#else /* if USE_ZERO_COPY */
|
||||
lReturned = FreeRTOS_recvfrom( xSocket, /* The socket being received from. */
|
||||
cRxString, /* The buffer into which the received data will be written. */
|
||||
sizeof( cRxString ), /* The size of the buffer provided to receive the data. */
|
||||
0, /* ulFlags with the FREERTOS_ZERO_COPY bit clear. */
|
||||
&xRxAddress, /* The address from where the data was sent (the source address). */
|
||||
&xAddressLength );
|
||||
#endif /* USE_ZERO_COPY */
|
||||
|
||||
FreeRTOS_ReleaseUDPPayloadBuffer((void*)pucReceivedUDPPayload);
|
||||
}
|
||||
#else
|
||||
|
||||
lReturned = FreeRTOS_recvfrom(xSocket, /* The socket being received from. */
|
||||
cRxString, /* The buffer into which the received data will be written. */
|
||||
sizeof(cRxString), /* The size of the buffer provided to receive the data. */
|
||||
0, /* ulFlags with the FREERTOS_ZERO_COPY bit clear. */
|
||||
&xRxAddress, /* The address from where the data was sent (the source address). */
|
||||
&xAddressLength);
|
||||
|
||||
#endif /* USE_ZERO_COPY */
|
||||
|
||||
|
||||
|
||||
if (lReturned > 0)
|
||||
if( lReturned > 0 )
|
||||
{
|
||||
/* Compare the transmitted string to the received string. */
|
||||
if (strcmp((char*)cRxString, (char*)cTxString) == 0)
|
||||
if( strcmp( ( char * ) cRxString, ( char * ) cTxString ) == 0 )
|
||||
{
|
||||
/* The echo reply was received without error. */
|
||||
ulRxCount++;
|
||||
|
||||
if( ( ulRxCount % 10 ) == 0 )
|
||||
{
|
||||
configPRINTF(("[Echo Client] Data was received correctly.\r\n"));
|
||||
configPRINTF( ( "[Echo Client] Data was received correctly.\r\n" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FreeRTOS_debug_printf(("[Echo Client] Data received was erreneous.\r\n"));
|
||||
FreeRTOS_debug_printf( ( "[Echo Client] Data received was erroneous.\r\n" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FreeRTOS_debug_printf(("[Echo Client] Data was not received\r\n"));
|
||||
FreeRTOS_debug_printf( ( "[Echo Client] Data was not received\r\n" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -291,10 +290,10 @@ static void prvUDPEchoClientTask(void* pvParameters)
|
|||
configPRINTF( ( "--------------------------------------\n\n" ) );
|
||||
|
||||
/* Pause for a short while to ensure the network is not too
|
||||
congested. */
|
||||
vTaskDelay(echoLOOP_DELAY);
|
||||
* congested. */
|
||||
vTaskDelay( echoLOOP_DELAY );
|
||||
|
||||
/* Close this socket before looping back to create another. */
|
||||
FreeRTOS_closesocket(xSocket);
|
||||
FreeRTOS_closesocket( xSocket );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
@ -27,10 +27,11 @@
|
|||
#ifndef SINGLE_TASK_UDP_ECHO_CLIENTS_H
|
||||
#define SINGLE_TASK_UDP_ECHO_CLIENTS_H
|
||||
|
||||
/*
|
||||
* Create the UDP echo client tasks. This is the version where an echo request
|
||||
* is made from the same task that listens for the echo reply.
|
||||
*/
|
||||
void vStartUDPEchoClientTasks_SingleTasks(uint16_t usTaskStackSize, UBaseType_t uxTaskPriority);
|
||||
/*
|
||||
* Create the UDP echo client tasks. This is the version where an echo request
|
||||
* is made from the same task that listens for the echo reply.
|
||||
*/
|
||||
void vStartUDPEchoClientTasks_SingleTasks( uint16_t usTaskStackSize,
|
||||
UBaseType_t uxTaskPriority );
|
||||
|
||||
#endif /* SINGLE_TASK_UDP_ECHO_CLIENTS_H */
|
||||
|
|
|
|||
|
|
@ -1,283 +1,283 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C686325E-3261-42F7-AEB1-DDE5280E1CEB}</ProjectGuid>
|
||||
<ProjectName>RTOSDemo</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
<Import Project="FreeRTOS_Plus_TCP_IPv6_Multi.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
<Import Project="FreeRTOS_Plus_TCP_IPv6_Multi.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Debug/WIN32.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>
|
||||
$(FREERTOS_INCLUDE_DIR);
|
||||
$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW;
|
||||
$(UTILITIES_SOURCE_DIR)\include;
|
||||
$(PLUS_TCP_INCLUDE_DIR);
|
||||
$(PLUS_TCP_SOURCE_DIR)\protocols\include;
|
||||
$(PLUS_TCP_SOURCE_DIR)\portable\BufferManagement;
|
||||
$(PLUS_TCP_SOURCE_DIR)\portable\Compiler\MSVC;
|
||||
$(DEMO_COMMON_SOURCE_DIR)\WinPCap;
|
||||
$(DEMO_COMMON_SOURCE_DIR)\logging\include;
|
||||
..\common\NTP\include;
|
||||
.;
|
||||
..\common\Logging\windows
|
||||
</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;ipconfigUSE_PCAP=1;_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/WIN32.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalOptions>/wd4210 /wd4127 /wd4214 /wd4201 /wd4244 /wd4310 %(AdditionalOptions)</AdditionalOptions>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0c09</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>.\Debug/RTOSDemo.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Debug/WIN32.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DEMO_COMMON_SOURCE_DIR)\WinPCap</AdditionalLibraryDirectories>
|
||||
<Profile>false</Profile>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug/WIN32.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Release/WIN32.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\Release/WIN32.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0c09</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>.\Release/RTOSDemo.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>.\Release/WIN32.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>
|
||||
</AdditionalDependencies>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release/WIN32.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\date_and_time.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\http_client_test.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\plus_tcp_demo_cli.c">
|
||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/wd4068 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\tcp_dump_packets.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_BitConfig.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4_Sockets.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4_Utils.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6_Sockets.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6_Utils.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_IP_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_IP_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_State_Handling_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_State_Handling_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Transmission_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Transmission_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Utils_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Utils_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_Tiny_TCP.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_UDP_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_UDP_IPv6.c" />
|
||||
<ClCompile Include="..\..\FreeRTOS_Plus_TCP_Minimal_Windows_Simulator\DemoTasks\SimpleTCPEchoServer.c" />
|
||||
<ClCompile Include="Logging_WinSim.c" />
|
||||
<ClCompile Include="printf-stdarg.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\event_groups.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\list.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\portable\MemMang\heap_4.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW\port.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\queue.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\tasks.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\timers.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ARP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DHCP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Cache.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Callback.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Networking.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Parser.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ICMP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP_Timers.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP_Utils.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Sockets.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Stream_Buffer.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_IP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Reception.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_State_Handling.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Transmission.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Utils.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_WIN.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_UDP_IP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Routing.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\portable\BufferManagement\BufferAllocation_2.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\portable\NetworkInterface\WinPCap\NetworkInterface.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DHCPv6.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ND.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_RA.c" />
|
||||
<ClCompile Include="..\common\NTP\NTPDemo.c" />
|
||||
<ClCompile Include="main.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TCPEchoClient_SingleTasks.c" />
|
||||
<ClCompile Include="UDPEchoClient_SingleTasks.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\event_groups.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\FreeRTOS.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\portable.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\projdefs.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\queue.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\semphr.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\task.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\timers.h" />
|
||||
<ClInclude Include="$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW\portmacro.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOSIPConfigDefaults.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ARP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DHCP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Cache.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Callback.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Globals.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Networking.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Parser.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_errno_TCP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ICMP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Private.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Timers.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Utils.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Sockets.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Stream_Buffer.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_IP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Reception.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_State_Handling.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Transmission.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Utils.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_WIN.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_UDP_IP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Routing.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_BitConfig.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DHCPv6.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ND.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\IPTraceMacroDefaults.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\NetworkBufferManagement.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\NetworkInterface.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Private.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Sockets.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Utils.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Private.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Sockets.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Utils.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IP_Common.h" />
|
||||
<ClInclude Include="FreeRTOSConfig.h" />
|
||||
<ClInclude Include="FreeRTOSIPConfig.h" />
|
||||
<ClInclude Include="TCPEchoClient_SingleTasks.h" />
|
||||
<ClInclude Include="UDPEchoClient_SingleTasks.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C686325E-3261-42F7-AEB1-DDE5280E1CEB}</ProjectGuid>
|
||||
<ProjectName>RTOSDemo</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
<Import Project="FreeRTOS_Plus_TCP_IPv6_Multi.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
|
||||
<Import Project="FreeRTOS_Plus_TCP_IPv6_Multi.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Debug/WIN32.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>
|
||||
$(FREERTOS_INCLUDE_DIR);
|
||||
$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW;
|
||||
$(UTILITIES_SOURCE_DIR)\include;
|
||||
$(PLUS_TCP_INCLUDE_DIR);
|
||||
$(PLUS_TCP_SOURCE_DIR)\protocols\include;
|
||||
$(PLUS_TCP_SOURCE_DIR)\portable\BufferManagement;
|
||||
$(PLUS_TCP_SOURCE_DIR)\portable\Compiler\MSVC;
|
||||
$(DEMO_COMMON_SOURCE_DIR)\WinPCap;
|
||||
$(DEMO_COMMON_SOURCE_DIR)\logging\include;
|
||||
..\common\NTP\include;
|
||||
.;
|
||||
..\common\Logging\windows
|
||||
</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;ipconfigUSE_PCAP=1;_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/WIN32.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<AdditionalOptions>/wd4210 /wd4127 /wd4214 /wd4201 /wd4244 /wd4310 %(AdditionalOptions)</AdditionalOptions>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0c09</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>.\Debug/RTOSDemo.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Debug/WIN32.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DEMO_COMMON_SOURCE_DIR)\WinPCap</AdditionalLibraryDirectories>
|
||||
<Profile>false</Profile>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Debug/WIN32.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Release/WIN32.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<PreprocessorDefinitions>_WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\Release/WIN32.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0c09</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<OutputFile>.\Release/RTOSDemo.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ProgramDatabaseFile>.\Release/WIN32.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>
|
||||
</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>
|
||||
</AdditionalDependencies>
|
||||
</Link>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>.\Release/WIN32.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\date_and_time.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\http_client_test.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\plus_tcp_demo_cli.c">
|
||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/wd4068 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\tcp_dump_packets.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_BitConfig.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4_Sockets.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4_Utils.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6_Sockets.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6_Utils.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_IP_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_IP_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_State_Handling_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_State_Handling_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Transmission_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Transmission_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Utils_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Utils_IPv6.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_Tiny_TCP.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_UDP_IPv4.c" />
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_UDP_IPv6.c" />
|
||||
<ClCompile Include="..\..\FreeRTOS_Plus_TCP_Minimal_Windows_Simulator\DemoTasks\SimpleTCPEchoServer.c" />
|
||||
<ClCompile Include="Logging_WinSim.c" />
|
||||
<ClCompile Include="printf-stdarg.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\event_groups.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\list.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\portable\MemMang\heap_4.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW\port.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\queue.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\tasks.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\timers.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ARP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DHCP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Cache.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Callback.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Networking.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Parser.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ICMP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP_Timers.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP_Utils.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Sockets.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Stream_Buffer.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_IP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Reception.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_State_Handling.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Transmission.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Utils.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_WIN.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_UDP_IP.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Routing.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\portable\BufferManagement\BufferAllocation_2.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\portable\NetworkInterface\WinPCap\NetworkInterface.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DHCPv6.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ND.c" />
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_RA.c" />
|
||||
<ClCompile Include="..\common\NTP\NTPDemo.c" />
|
||||
<ClCompile Include="main.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TCPEchoClient_SingleTasks.c" />
|
||||
<ClCompile Include="UDPEchoClient_SingleTasks.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\event_groups.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\FreeRTOS.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\portable.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\projdefs.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\queue.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\semphr.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\task.h" />
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\timers.h" />
|
||||
<ClInclude Include="$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW\portmacro.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOSIPConfigDefaults.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ARP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DHCP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Cache.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Callback.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Globals.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Networking.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Parser.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_errno_TCP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ICMP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Private.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Timers.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Utils.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Sockets.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Stream_Buffer.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_IP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Reception.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_State_Handling.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Transmission.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Utils.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_WIN.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_UDP_IP.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Routing.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_BitConfig.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DHCPv6.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ND.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\IPTraceMacroDefaults.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\NetworkBufferManagement.h" />
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\NetworkInterface.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Private.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Sockets.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Utils.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Private.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Sockets.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Utils.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IP_Common.h" />
|
||||
<ClInclude Include="FreeRTOSConfig.h" />
|
||||
<ClInclude Include="FreeRTOSIPConfig.h" />
|
||||
<ClInclude Include="TCPEchoClient_SingleTasks.h" />
|
||||
<ClInclude Include="UDPEchoClient_SingleTasks.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
|
|
@ -1,354 +1,354 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{38712199-cebf-4124-bf15-398f7c3419ea}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS">
|
||||
<UniqueIdentifier>{af3445a1-4908-4170-89ed-39345d90d30c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS\Source">
|
||||
<UniqueIdentifier>{f32be356-4763-4cae-9020-974a2638cb08}</UniqueIdentifier>
|
||||
<Extensions>*.c</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS\Source\Portable">
|
||||
<UniqueIdentifier>{88f409e6-d396-4ac5-94bd-7a99c914be46}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS+">
|
||||
<UniqueIdentifier>{e5ad4ec7-23dc-4295-8add-2acaee488f5a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS\Source\include">
|
||||
<UniqueIdentifier>{d2dcd641-8d91-492b-852f-5563ffadaec6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS+\FreeRTOS+TCP">
|
||||
<UniqueIdentifier>{8672fa26-b119-481f-8b8d-086419c01a3e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS+\FreeRTOS+TCP\portable">
|
||||
<UniqueIdentifier>{4570be11-ec96-4b55-ac58-24b50ada980a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS+\FreeRTOS+TCP\include">
|
||||
<UniqueIdentifier>{5d93ed51-023a-41ad-9243-8d230165d34b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DemoTasks">
|
||||
<UniqueIdentifier>{b71e974a-9f28-4815-972b-d930ba8a34d0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_UDP_IP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DHCP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Sockets.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\portable\BufferManagement\BufferAllocation_2.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\portable</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\portable\NetworkInterface\WinPCap\NetworkInterface.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\portable</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ARP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_IP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_WIN.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Routing.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Stream_Buffer.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DHCPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ND.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_RA.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\NTP\NTPDemo.c" />
|
||||
<ClCompile Include="main.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\tcp_dump_packets.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\plus_tcp_demo_cli.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\date_and_time.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\http_client_test.c" />
|
||||
<ClCompile Include="printf-stdarg.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\event_groups.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\list.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\portable\MemMang\heap_4.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW\port.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\queue.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\timers.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\tasks.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ICMP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP_Timers.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP_Utils.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Reception.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_State_Handling.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Transmission.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Utils.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Callback.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Networking.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Parser.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Cache.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_BitConfig.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4_Sockets.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4_Utils.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6_Sockets.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6_Utils.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_IP_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_IP_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_State_Handling_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_State_Handling_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Transmission_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Transmission_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Utils_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Utils_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_Tiny_TCP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_UDP_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_UDP_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TCPEchoClient_SingleTasks.c" />
|
||||
<ClCompile Include="Logging_WinSim.c" />
|
||||
<ClCompile Include="UDPEchoClient_SingleTasks.c" />
|
||||
<ClCompile Include="..\..\FreeRTOS_Plus_TCP_Minimal_Windows_Simulator\DemoTasks\SimpleTCPEchoServer.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\timers.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\event_groups.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\FreeRTOS.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\queue.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\semphr.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\task.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\portable.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\projdefs.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\NetworkInterface.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Sockets.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_UDP_IP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Private.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\NetworkBufferManagement.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ARP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DHCP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Cache.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Callback.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Globals.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Networking.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Parser.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_errno_TCP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ICMP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Timers.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Utils.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_IP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Reception.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_State_Handling.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Transmission.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Utils.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_WIN.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Routing.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_BitConfig.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DHCPv6.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ND.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOSIPConfigDefaults.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\IPTraceMacroDefaults.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Stream_Buffer.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FreeRTOSConfig.h" />
|
||||
<ClInclude Include="FreeRTOSIPConfig.h" />
|
||||
<ClInclude Include="$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW\portmacro.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IP_Common.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Private.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Sockets.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Utils.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Private.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Sockets.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Utils.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TCPEchoClient_SingleTasks.h" />
|
||||
<ClInclude Include="UDPEchoClient_SingleTasks.h" />
|
||||
</ItemGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{38712199-cebf-4124-bf15-398f7c3419ea}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS">
|
||||
<UniqueIdentifier>{af3445a1-4908-4170-89ed-39345d90d30c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS\Source">
|
||||
<UniqueIdentifier>{f32be356-4763-4cae-9020-974a2638cb08}</UniqueIdentifier>
|
||||
<Extensions>*.c</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS\Source\Portable">
|
||||
<UniqueIdentifier>{88f409e6-d396-4ac5-94bd-7a99c914be46}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS+">
|
||||
<UniqueIdentifier>{e5ad4ec7-23dc-4295-8add-2acaee488f5a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS\Source\include">
|
||||
<UniqueIdentifier>{d2dcd641-8d91-492b-852f-5563ffadaec6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS+\FreeRTOS+TCP">
|
||||
<UniqueIdentifier>{8672fa26-b119-481f-8b8d-086419c01a3e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS+\FreeRTOS+TCP\portable">
|
||||
<UniqueIdentifier>{4570be11-ec96-4b55-ac58-24b50ada980a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FreeRTOS+\FreeRTOS+TCP\include">
|
||||
<UniqueIdentifier>{5d93ed51-023a-41ad-9243-8d230165d34b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DemoTasks">
|
||||
<UniqueIdentifier>{b71e974a-9f28-4815-972b-d930ba8a34d0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_UDP_IP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DHCP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Sockets.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\portable\BufferManagement\BufferAllocation_2.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\portable</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\portable\NetworkInterface\WinPCap\NetworkInterface.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\portable</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ARP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_IP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_WIN.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Routing.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_Stream_Buffer.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DHCPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ND.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_RA.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\NTP\NTPDemo.c" />
|
||||
<ClCompile Include="main.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\tcp_dump_packets.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\plus_tcp_demo_cli.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\date_and_time.c" />
|
||||
<ClCompile Include="$(UTILITIES_SOURCE_DIR)\http_client_test.c" />
|
||||
<ClCompile Include="printf-stdarg.c" />
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\event_groups.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\list.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\portable\MemMang\heap_4.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW\port.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\queue.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\timers.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(FREERTOS_SOURCE_DIR)\tasks.c">
|
||||
<Filter>FreeRTOS\Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_ICMP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP_Timers.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_IP_Utils.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Reception.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_State_Handling.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Transmission.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_TCP_Utils.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Callback.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Networking.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Parser.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(PLUS_TCP_SOURCE_DIR)\FreeRTOS_DNS_Cache.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_BitConfig.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4_Sockets.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv4_Utils.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6_Sockets.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_IPv6_Utils.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_IP_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_IP_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_State_Handling_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_State_Handling_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Transmission_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Transmission_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Utils_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_TCP_Utils_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_Tiny_TCP.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_UDP_IPv4.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\FreeRTOS_UDP_IPv6.c">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TCPEchoClient_SingleTasks.c" />
|
||||
<ClCompile Include="Logging_WinSim.c" />
|
||||
<ClCompile Include="UDPEchoClient_SingleTasks.c" />
|
||||
<ClCompile Include="..\..\FreeRTOS_Plus_TCP_Minimal_Windows_Simulator\DemoTasks\SimpleTCPEchoServer.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\timers.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\event_groups.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\FreeRTOS.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\queue.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\semphr.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\task.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\portable.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(FREERTOS_INCLUDE_DIR)\projdefs.h">
|
||||
<Filter>FreeRTOS\Source\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\NetworkInterface.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Sockets.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_UDP_IP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Private.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\NetworkBufferManagement.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ARP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DHCP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Cache.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Callback.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Globals.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Networking.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DNS_Parser.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_errno_TCP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ICMP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Timers.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_IP_Utils.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_IP.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Reception.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_State_Handling.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Transmission.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_Utils.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_TCP_WIN.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Routing.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_BitConfig.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_DHCPv6.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_ND.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOSIPConfigDefaults.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\IPTraceMacroDefaults.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(PLUS_TCP_INCLUDE_DIR)\FreeRTOS_Stream_Buffer.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FreeRTOSConfig.h" />
|
||||
<ClInclude Include="FreeRTOSIPConfig.h" />
|
||||
<ClInclude Include="$(FREERTOS_SOURCE_DIR)\portable\MSVC-MingW\portmacro.h" />
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IP_Common.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Private.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Sockets.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv4_Utils.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Private.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Sockets.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Source\FreeRTOS-Plus-TCP\source\include\FreeRTOS_IPv6_Utils.h">
|
||||
<Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TCPEchoClient_SingleTasks.h" />
|
||||
<ClInclude Include="UDPEchoClient_SingleTasks.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
@ -162,7 +162,7 @@ static UBaseType_t ulNextRand;
|
|||
#define mainNETWORK_UP_COUNT 1U
|
||||
#endif
|
||||
|
||||
static uint32_t uxNetworkisUp = 0U;
|
||||
static uint32_t uxNetworkIsUp = 0U;
|
||||
|
||||
|
||||
/* A semaphore to become idle. */
|
||||
|
|
@ -218,10 +218,10 @@ int main( void )
|
|||
/* === End-point 0 === */
|
||||
FreeRTOS_FillEndPoint( &( xInterfaces[ 0 ] ), &( xEndPoints[ 0 ] ), ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );
|
||||
#if ( ipconfigUSE_DHCP != 0 )
|
||||
{
|
||||
/* End-point 0 wants to use DHCPv4. */
|
||||
xEndPoints[ 0 ].bits.bWantDHCP = pdTRUE;
|
||||
}
|
||||
{
|
||||
/* End-point 0 wants to use DHCPv4. */
|
||||
xEndPoints[ 0 ].bits.bWantDHCP = pdTRUE;
|
||||
}
|
||||
#endif /* ( ipconfigUSE_DHCP != 0 ) */
|
||||
|
||||
/*
|
||||
|
|
@ -231,87 +231,87 @@ int main( void )
|
|||
* Gateway: fe80::ba27:ebff:fe5a:d751 // obtained from Router Advertisement
|
||||
*/
|
||||
#if ( ipconfigUSE_IPv6 != 0 && USES_IPV6_ENDPOINT != 0 )
|
||||
{
|
||||
IPv6_Address_t xIPAddress;
|
||||
IPv6_Address_t xPrefix;
|
||||
IPv6_Address_t xGateWay;
|
||||
|
||||
FreeRTOS_inet_pton6( "2001:470:ed44::", xPrefix.ucBytes );
|
||||
|
||||
FreeRTOS_CreateIPv6Address( &xIPAddress, &xPrefix, 64, pdTRUE );
|
||||
FreeRTOS_inet_pton6( "fe80::ba27:ebff:fe5a:d751", xGateWay.ucBytes );
|
||||
|
||||
FreeRTOS_FillEndPoint_IPv6( &( xInterfaces[ 0 ] ),
|
||||
&( xEndPoints[ 1 ] ),
|
||||
&( xIPAddress ),
|
||||
&( xPrefix ),
|
||||
64uL, /* Prefix length. */
|
||||
&( xGateWay ),
|
||||
NULL, /* pxDNSServerAddress: Not used yet. */
|
||||
ucMACAddress );
|
||||
FreeRTOS_inet_pton6( "2001:4860:4860::8888", xEndPoints[ 1 ].ipv6_settings.xDNSServerAddresses[ 0 ].ucBytes );
|
||||
FreeRTOS_inet_pton6( "fe80::1", xEndPoints[ 1 ].ipv6_settings.xDNSServerAddresses[ 1 ].ucBytes );
|
||||
FreeRTOS_inet_pton6( "2001:4860:4860::8888", xEndPoints[ 1 ].ipv6_defaults.xDNSServerAddresses[ 0 ].ucBytes );
|
||||
FreeRTOS_inet_pton6( "fe80::1", xEndPoints[ 1 ].ipv6_defaults.xDNSServerAddresses[ 1 ].ucBytes );
|
||||
|
||||
#if ( ipconfigUSE_RA != 0 )
|
||||
{
|
||||
/* End-point 1 wants to use Router Advertisement */
|
||||
xEndPoints[ 1 ].bits.bWantRA = pdTRUE;
|
||||
}
|
||||
#endif /* #if( ipconfigUSE_RA != 0 ) */
|
||||
#if ( ipconfigUSE_DHCPv6 != 0 )
|
||||
{
|
||||
/* End-point 1 wants to use DHCPv6. */
|
||||
xEndPoints[ 1 ].bits.bWantDHCP = pdTRUE;
|
||||
}
|
||||
#endif /* ( ipconfigUSE_DHCPv6 != 0 ) */
|
||||
}
|
||||
#endif /* ( ipconfigUSE_IPv6 != 0 ) */
|
||||
#if ( ipconfigUSE_IPv6 != 0 && USES_IPV6_ENDPOINT != 0 )
|
||||
{
|
||||
/*
|
||||
* End-point-3 : private
|
||||
* Network: fe80::/10 (link-local)
|
||||
* IPv6 : fe80::d80e:95cc:3154:b76a/128
|
||||
* Gateway: -
|
||||
*/
|
||||
{
|
||||
IPv6_Address_t xIPAddress;
|
||||
IPv6_Address_t xPrefix;
|
||||
IPv6_Address_t xGateWay;
|
||||
|
||||
FreeRTOS_inet_pton6( "2001:470:ed44::", xPrefix.ucBytes );
|
||||
FreeRTOS_inet_pton6( "fe80::", xPrefix.ucBytes );
|
||||
FreeRTOS_inet_pton6( "fe80::7009", xIPAddress.ucBytes );
|
||||
|
||||
FreeRTOS_CreateIPv6Address( &xIPAddress, &xPrefix, 64, pdTRUE );
|
||||
FreeRTOS_inet_pton6( "fe80::ba27:ebff:fe5a:d751", xGateWay.ucBytes );
|
||||
|
||||
FreeRTOS_FillEndPoint_IPv6( &( xInterfaces[ 0 ] ),
|
||||
&( xEndPoints[ 1 ] ),
|
||||
&( xIPAddress ),
|
||||
&( xPrefix ),
|
||||
64uL, /* Prefix length. */
|
||||
&( xGateWay ),
|
||||
NULL, /* pxDNSServerAddress: Not used yet. */
|
||||
ucMACAddress );
|
||||
FreeRTOS_inet_pton6( "2001:4860:4860::8888", xEndPoints[ 1 ].ipv6_settings.xDNSServerAddresses[ 0 ].ucBytes );
|
||||
FreeRTOS_inet_pton6( "fe80::1", xEndPoints[ 1 ].ipv6_settings.xDNSServerAddresses[ 1 ].ucBytes );
|
||||
FreeRTOS_inet_pton6( "2001:4860:4860::8888", xEndPoints[ 1 ].ipv6_defaults.xDNSServerAddresses[ 0 ].ucBytes );
|
||||
FreeRTOS_inet_pton6( "fe80::1", xEndPoints[ 1 ].ipv6_defaults.xDNSServerAddresses[ 1 ].ucBytes );
|
||||
|
||||
#if ( ipconfigUSE_RA != 0 )
|
||||
{
|
||||
/* End-point 1 wants to use Router Advertisement */
|
||||
xEndPoints[ 1 ].bits.bWantRA = pdTRUE;
|
||||
}
|
||||
#endif /* #if( ipconfigUSE_RA != 0 ) */
|
||||
#if ( ipconfigUSE_DHCPv6 != 0 )
|
||||
{
|
||||
/* End-point 1 wants to use DHCPv6. */
|
||||
xEndPoints[ 1 ].bits.bWantDHCP = pdTRUE;
|
||||
}
|
||||
#endif /* ( ipconfigUSE_DHCPv6 != 0 ) */
|
||||
}
|
||||
#endif /* ( ipconfigUSE_IPv6 != 0 ) */
|
||||
#if ( ipconfigUSE_IPv6 != 0 && USES_IPV6_ENDPOINT != 0 )
|
||||
{
|
||||
/*
|
||||
* End-point-3 : private
|
||||
* Network: fe80::/10 (link-local)
|
||||
* IPv6 : fe80::d80e:95cc:3154:b76a/128
|
||||
* Gateway: -
|
||||
*/
|
||||
{
|
||||
IPv6_Address_t xIPAddress;
|
||||
IPv6_Address_t xPrefix;
|
||||
|
||||
FreeRTOS_inet_pton6( "fe80::", xPrefix.ucBytes );
|
||||
FreeRTOS_inet_pton6( "fe80::7009", xIPAddress.ucBytes );
|
||||
|
||||
FreeRTOS_FillEndPoint_IPv6(
|
||||
&( xInterfaces[ 0 ] ),
|
||||
&( xEndPoints[ 2 ] ),
|
||||
&( xIPAddress ),
|
||||
&( xPrefix ),
|
||||
10U, /* Prefix length. */
|
||||
NULL, /* No gateway */
|
||||
NULL, /* pxDNSServerAddress: Not used yet. */
|
||||
ucMACAddress );
|
||||
}
|
||||
FreeRTOS_FillEndPoint_IPv6(
|
||||
&( xInterfaces[ 0 ] ),
|
||||
&( xEndPoints[ 2 ] ),
|
||||
&( xIPAddress ),
|
||||
&( xPrefix ),
|
||||
10U, /* Prefix length. */
|
||||
NULL, /* No gateway */
|
||||
NULL, /* pxDNSServerAddress: Not used yet. */
|
||||
ucMACAddress );
|
||||
}
|
||||
}
|
||||
#endif /* if ( ipconfigUSE_IPv6 != 0 ) */
|
||||
/* === End-point 0 === */
|
||||
#if ( ( mainNETWORK_UP_COUNT >= 4U ) || ( USES_IPV6_ENDPOINT == 0 && mainNETWORK_UP_COUNT >= 2U ) )
|
||||
{
|
||||
/*172.25.201.204 */
|
||||
/*netmask 255.255.240.0 */
|
||||
const uint8_t ucMACAddress2[ 6 ] = { 0x00, 0x22, 0x22, 0x22, 0x22, 82 };
|
||||
const uint8_t ucIPAddress2[ 4 ] = { 192, 168, 2, 210 };
|
||||
const uint8_t ucNetMask2[ 4 ] = { 255, 255, 255, 0 };
|
||||
const uint8_t ucGatewayAddress2[ 4 ] = { 0, 0, 0, 0 };
|
||||
FreeRTOS_FillEndPoint( &( xInterfaces[ 0 ] ), &( xEndPoints[ 3 ] ), ucIPAddress2, ucNetMask2, ucGatewayAddress2, ucDNSServerAddress, ucMACAddress2 );
|
||||
#if ( ipconfigUSE_DHCP != 0 )
|
||||
{
|
||||
/*172.25.201.204 */
|
||||
/*netmask 255.255.240.0 */
|
||||
const uint8_t ucMACAddress2[ 6 ] = { 0x00, 0x22, 0x22, 0x22, 0x22, 82 };
|
||||
const uint8_t ucIPAddress2[ 4 ] = { 192, 168, 2, 210 };
|
||||
const uint8_t ucNetMask2[ 4 ] = { 255, 255, 255, 0 };
|
||||
const uint8_t ucGatewayAddress2[ 4 ] = { 0, 0, 0, 0 };
|
||||
FreeRTOS_FillEndPoint( &( xInterfaces[ 0 ] ), &( xEndPoints[ 3 ] ), ucIPAddress2, ucNetMask2, ucGatewayAddress2, ucDNSServerAddress, ucMACAddress2 );
|
||||
#if ( ipconfigUSE_DHCP != 0 )
|
||||
{
|
||||
/* End-point 0 wants to use DHCPv4. */
|
||||
xEndPoints[ 3 ].bits.bWantDHCP = pdTRUE;
|
||||
}
|
||||
#endif /* ( ipconfigUSE_DHCP != 0 ) */
|
||||
/* End-point 0 wants to use DHCPv4. */
|
||||
xEndPoints[ 3 ].bits.bWantDHCP = pdTRUE;
|
||||
}
|
||||
#endif /* ( ipconfigUSE_DHCP != 0 ) */
|
||||
}
|
||||
#endif /* ( mainNETWORK_UP_COUNT >= 3U ) */
|
||||
|
||||
FreeRTOS_IPInit_Multi();
|
||||
|
|
@ -386,9 +386,9 @@ void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,
|
|||
{
|
||||
/* Create the tasks that use the IP stack if they have not already been
|
||||
* created. */
|
||||
uxNetworkisUp++;
|
||||
uxNetworkIsUp++;
|
||||
|
||||
if( ( xTasksAlreadyCreated == pdFALSE ) && ( uxNetworkisUp == mainNETWORK_UP_COUNT ) )
|
||||
if( ( xTasksAlreadyCreated == pdFALSE ) && ( uxNetworkIsUp == mainNETWORK_UP_COUNT ) )
|
||||
{
|
||||
#if USE_LOG_EVENT
|
||||
iEventLogClear();
|
||||
|
|
@ -399,22 +399,23 @@ void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,
|
|||
* demo tasks. */
|
||||
|
||||
#if ( mainCREATE_TCP_ECHO_TASKS_SINGLE == 1 )
|
||||
{
|
||||
vStartTCPEchoClientTasks_SingleTasks( mainECHO_CLIENT_TASK_STACK_SIZE, mainECHO_CLIENT_TASK_PRIORITY );
|
||||
}
|
||||
{
|
||||
vStartTCPEchoClientTasks_SingleTasks( mainECHO_CLIENT_TASK_STACK_SIZE, mainECHO_CLIENT_TASK_PRIORITY );
|
||||
}
|
||||
#endif /* mainCREATE_TCP_ECHO_TASKS_SINGLE */
|
||||
|
||||
#if ( mainCREATE_TCP_ECHO_SERVER_TASK == 1 )
|
||||
{
|
||||
extern void vStartSimpleTCPServerTasks( uint16_t usStackSize, UBaseType_t uxPriority );
|
||||
vStartSimpleTCPServerTasks( mainECHO_SERVER_TASK_STACK_SIZE, mainECHO_SERVER_TASK_PRIORITY );
|
||||
}
|
||||
{
|
||||
extern void vStartSimpleTCPServerTasks( uint16_t usStackSize,
|
||||
UBaseType_t uxPriority );
|
||||
vStartSimpleTCPServerTasks( mainECHO_SERVER_TASK_STACK_SIZE, mainECHO_SERVER_TASK_PRIORITY );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ( mainCREATE_UDP_ECHO_TASKS_SINGLE == 1 )
|
||||
{
|
||||
vStartUDPEchoClientTasks_SingleTasks( mainECHO_SERVER_TASK_STACK_SIZE, mainECHO_SERVER_TASK_PRIORITY );
|
||||
}
|
||||
{
|
||||
vStartUDPEchoClientTasks_SingleTasks( mainECHO_SERVER_TASK_STACK_SIZE, mainECHO_SERVER_TASK_PRIORITY );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ( mainCREATE_CLI_TASK == 1 )
|
||||
|
|
@ -426,7 +427,7 @@ void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,
|
|||
xTasksAlreadyCreated = pdTRUE;
|
||||
}
|
||||
|
||||
configPRINTF( ( "uxNetworkisUp = %u\n", ( unsigned ) uxNetworkisUp ) );
|
||||
configPRINTF( ( "uxNetworkIsUp = %u\n", ( unsigned ) uxNetworkIsUp ) );
|
||||
|
||||
if( pxEndPoint->bits.bIPv6 == 0U )
|
||||
{
|
||||
|
|
@ -670,7 +671,7 @@ const char * pcCommandList[] =
|
|||
/* "arpqc 192.168.2.10", */
|
||||
/* "arpqc 172.217.194.100", */
|
||||
/* "arpqc 2404:6800:4003:c0f::5e", */
|
||||
"ifconfig",
|
||||
"ifconfig",
|
||||
/* "udp 192.168.2.255@2402 Hello", */
|
||||
/* "udp 192.168.2.255@2402 Hello", */
|
||||
/* "udp 192.168.2.255@2402 Hello", */
|
||||
|
|
@ -722,11 +723,11 @@ static void prvCliTask( void * pvArgument )
|
|||
/* pcap_prepare(); */
|
||||
|
||||
/* Wait for all end-points to come up.
|
||||
* They're counted with 'uxNetworkisUp'. */
|
||||
* They're counted with 'uxNetworkIsUp'. */
|
||||
do
|
||||
{
|
||||
vTaskDelay( pdMS_TO_TICKS( 100U ) );
|
||||
} while( uxNetworkisUp != mainNETWORK_UP_COUNT );
|
||||
} while( uxNetworkIsUp != mainNETWORK_UP_COUNT );
|
||||
|
||||
xDNS_IP_Preference = xPreferenceIPv6;
|
||||
|
||||
|
|
@ -750,7 +751,7 @@ static void prvCliTask( void * pvArgument )
|
|||
snprintf( pcCommand, sizeof( pcCommand ), "%s", pcCommandList[ xCommandIndex ] );
|
||||
configPRINTF( ( "\n" ) );
|
||||
configPRINTF( ( "/*==================== %s (%d/%d) ====================*/\n",
|
||||
pcCommand, xCommandIndex + 1, ARRAY_SIZE( pcCommandList ) ) );
|
||||
pcCommand, xCommandIndex + 1, ARRAY_SIZE( pcCommandList ) ) );
|
||||
configPRINTF( ( "\n" ) );
|
||||
xHandleTestingCommand( pcCommand, sizeof( pcCommand ) );
|
||||
xCommandIndex++;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ struct SStringBuf
|
|||
ucBytes : { 0, 1, 2, 3 }
|
||||
};
|
||||
#else
|
||||
const static _U32 u32 = { 0, 1, 2, 3 };
|
||||
const static _U32 u32 = { 0, 1, 2, 3 };
|
||||
#endif
|
||||
|
||||
static void strbuf_init( struct SStringBuf * apStr,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
@ -144,9 +144,9 @@ void vNTPClearCache( void )
|
|||
{
|
||||
ulIPAddressFound = 0U;
|
||||
#if ( ipconfigUSE_IPv6 != 0 )
|
||||
{
|
||||
memset( &( xIPAddressFound ), 0, sizeof xIPAddressFound );
|
||||
}
|
||||
{
|
||||
memset( &( xIPAddressFound ), 0, sizeof xIPAddressFound );
|
||||
}
|
||||
#endif
|
||||
xHasIPAddress = pdFALSE;
|
||||
}
|
||||
|
|
@ -432,7 +432,8 @@ static void prvReadTime( struct SNtpPacket * pxPacket )
|
|||
#if ( USE_PLUS_FAT != 0 )
|
||||
FreeRTOS_gmtime_r( &uxCurrentSeconds, &xTimeStruct );
|
||||
#else
|
||||
extern struct tm * gmtime_r( const time_t * pxTime, struct tm * tmStruct );
|
||||
extern struct tm * gmtime_r( const time_t * pxTime,
|
||||
struct tm * tmStruct );
|
||||
gmtime_r( &uxCurrentSeconds, &xTimeStruct );
|
||||
#endif /* ( USE_PLUS_FAT != 0 ) */
|
||||
|
||||
|
|
@ -506,22 +507,22 @@ static void prvNTPTask( void * pvParameters )
|
|||
|
||||
xStatus = EStatusLookup;
|
||||
#if ( ipconfigSOCKET_HAS_USER_SEMAPHORE != 0 ) || ( ipconfigUSE_CALLBACKS != 0 )
|
||||
{
|
||||
xNTPWakeupSem = xSemaphoreCreateBinary();
|
||||
}
|
||||
{
|
||||
xNTPWakeupSem = xSemaphoreCreateBinary();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ( ipconfigUSE_CALLBACKS != 0 )
|
||||
{
|
||||
memset( &xHandler, '\0', sizeof( xHandler ) );
|
||||
xHandler.pxOnUDPReceive = xOnUDPReceive;
|
||||
FreeRTOS_setsockopt( xUDPSocket, 0, FREERTOS_SO_UDP_RECV_HANDLER, ( void * ) &xHandler, sizeof( xHandler ) );
|
||||
}
|
||||
{
|
||||
memset( &xHandler, '\0', sizeof( xHandler ) );
|
||||
xHandler.pxOnUDPReceive = xOnUDPReceive;
|
||||
FreeRTOS_setsockopt( xUDPSocket, 0, FREERTOS_SO_UDP_RECV_HANDLER, ( void * ) &xHandler, sizeof( xHandler ) );
|
||||
}
|
||||
#endif
|
||||
#if ( ipconfigSOCKET_HAS_USER_SEMAPHORE != 0 )
|
||||
{
|
||||
FreeRTOS_setsockopt( xUDPSocket, 0, FREERTOS_SO_SET_SEMAPHORE, ( void * ) &xNTPWakeupSem, sizeof( xNTPWakeupSem ) );
|
||||
}
|
||||
{
|
||||
FreeRTOS_setsockopt( xUDPSocket, 0, FREERTOS_SO_SET_SEMAPHORE, ( void * ) &xNTPWakeupSem, sizeof( xNTPWakeupSem ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
for( ; ; )
|
||||
|
|
@ -633,43 +634,43 @@ static void prvNTPTask( void * pvParameters )
|
|||
}
|
||||
|
||||
#if ( ipconfigUSE_CALLBACKS != 0 )
|
||||
{
|
||||
xSemaphoreTake( xNTPWakeupSem, 5000 );
|
||||
}
|
||||
{
|
||||
xSemaphoreTake( xNTPWakeupSem, 5000 );
|
||||
}
|
||||
#else
|
||||
{
|
||||
uint32_t xAddressSize;
|
||||
BaseType_t xReturned;
|
||||
|
||||
xAddressSize = sizeof( xAddress );
|
||||
xReturned = FreeRTOS_recvfrom( xUDPSocket, ( void * ) cRecvBuffer, sizeof( cRecvBuffer ), 0, &xAddress, &xAddressSize );
|
||||
|
||||
switch( xReturned )
|
||||
{
|
||||
uint32_t xAddressSize;
|
||||
BaseType_t xReturned;
|
||||
case 0:
|
||||
case -pdFREERTOS_ERRNO_EAGAIN:
|
||||
case -pdFREERTOS_ERRNO_EINTR:
|
||||
break;
|
||||
|
||||
xAddressSize = sizeof( xAddress );
|
||||
xReturned = FreeRTOS_recvfrom( xUDPSocket, ( void * ) cRecvBuffer, sizeof( cRecvBuffer ), 0, &xAddress, &xAddressSize );
|
||||
default:
|
||||
|
||||
switch( xReturned )
|
||||
{
|
||||
case 0:
|
||||
case -pdFREERTOS_ERRNO_EAGAIN:
|
||||
case -pdFREERTOS_ERRNO_EINTR:
|
||||
break;
|
||||
if( xReturned < sizeof( xNTPPacket ) )
|
||||
{
|
||||
FreeRTOS_printf( ( "FreeRTOS_recvfrom: returns %ld\n", xReturned ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
prvReadTime( ( struct SNtpPacket * ) cRecvBuffer );
|
||||
|
||||
default:
|
||||
|
||||
if( xReturned < sizeof( xNTPPacket ) )
|
||||
if( xStatus != EStatusPause )
|
||||
{
|
||||
FreeRTOS_printf( ( "FreeRTOS_recvfrom: returns %ld\n", xReturned ) );
|
||||
xStatus = EStatusPause;
|
||||
}
|
||||
else
|
||||
{
|
||||
prvReadTime( ( struct SNtpPacket * ) cRecvBuffer );
|
||||
}
|
||||
|
||||
if( xStatus != EStatusPause )
|
||||
{
|
||||
xStatus = EStatusPause;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif /* if ( ipconfigUSE_CALLBACKS != 0 ) */
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@
|
|||
UINT bh_caplen; /*/< Length of captured portion. The captured portion <b>can be different</b> */
|
||||
/*/< from the original packet, because it is possible (with a proper filter) */
|
||||
/*/< to instruct the driver to capture only a portion of the packets. */
|
||||
UINT bh_datalen; /*/< Original length of packet */
|
||||
USHORT bh_hdrlen; /*/< Length of bpf header (this struct plus alignment padding). In some cases, */
|
||||
UINT bh_datalen; /*/< Original length of packet */
|
||||
USHORT bh_hdrlen; /*/< Length of bpf header (this struct plus alignment padding). In some cases, */
|
||||
/*/< a padding could be added between the end of this structure and the packet */
|
||||
/*/< data for performance reasons. This filed can be used to retrieve the actual data */
|
||||
/*/< of the packet. */
|
||||
|
|
@ -170,11 +170,11 @@
|
|||
*/
|
||||
struct dump_bpf_hdr
|
||||
{
|
||||
struct timeval ts; /*/< Time stamp of the packet */
|
||||
UINT caplen; /*/< Length of captured portion. The captured portion can smaller than the */
|
||||
struct timeval ts; /*/< Time stamp of the packet */
|
||||
UINT caplen; /*/< Length of captured portion. The captured portion can smaller than the */
|
||||
/*/< the original packet, because it is possible (with a proper filter) to */
|
||||
/*/< instruct the driver to capture only a portion of the packets. */
|
||||
UINT len; /*/< Length of the original packet (off wire). */
|
||||
UINT len; /*/< Length of the original packet (off wire). */
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -237,11 +237,11 @@
|
|||
/*/< function can be used to define the minimum amount of data in the kernel buffer */
|
||||
/*/< that will cause the event to be signalled. */
|
||||
|
||||
UINT ReadTimeOut; /*/< \internal The amount of time after which a read on the driver will be released and */
|
||||
UINT ReadTimeOut; /*/< \internal The amount of time after which a read on the driver will be released and */
|
||||
/*/< ReadEvent will be signaled, also if no packets were captured */
|
||||
CHAR Name[ ADAPTER_NAME_LENGTH ];
|
||||
PWAN_ADAPTER pWanAdapter;
|
||||
UINT Flags; /*/< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API. */
|
||||
UINT Flags; /*/< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API. */
|
||||
|
||||
#ifdef HAVE_AIRPCAP_API
|
||||
PAirpcapHandle AirpcapAd;
|
||||
|
|
@ -267,14 +267,14 @@
|
|||
*/
|
||||
typedef struct _PACKET
|
||||
{
|
||||
HANDLE hEvent; /*/< \deprecated Still present for compatibility with old applications. */
|
||||
OVERLAPPED OverLapped; /*/< \deprecated Still present for compatibility with old applications. */
|
||||
PVOID Buffer; /*/< Buffer with containing the packets. See the PacketReceivePacket() for */
|
||||
HANDLE hEvent; /*/< \deprecated Still present for compatibility with old applications. */
|
||||
OVERLAPPED OverLapped; /*/< \deprecated Still present for compatibility with old applications. */
|
||||
PVOID Buffer; /*/< Buffer with containing the packets. See the PacketReceivePacket() for */
|
||||
/*/< details about the organization of the data in this buffer */
|
||||
UINT Length; /*/< Length of the buffer */
|
||||
DWORD ulBytesReceived; /*/< Number of valid bytes present in the buffer, i.e. amount of data */
|
||||
UINT Length; /*/< Length of the buffer */
|
||||
DWORD ulBytesReceived; /*/< Number of valid bytes present in the buffer, i.e. amount of data */
|
||||
/*/< received by the last call to PacketReceivePacket() */
|
||||
BOOLEAN bIoComplete; /*/< \deprecated Still present for compatibility with old applications. */
|
||||
BOOLEAN bIoComplete; /*/< \deprecated Still present for compatibility with old applications. */
|
||||
} PACKET, * LPPACKET;
|
||||
|
||||
/*!
|
||||
|
|
@ -286,16 +286,16 @@
|
|||
*/
|
||||
struct _PACKET_OID_DATA
|
||||
{
|
||||
ULONG Oid; /*/< OID code. See the Microsoft DDK documentation or the file ntddndis.h */
|
||||
ULONG Oid; /*/< OID code. See the Microsoft DDK documentation or the file ntddndis.h */
|
||||
/*/< for a complete list of valid codes. */
|
||||
ULONG Length; /*/< Length of the data field */
|
||||
UCHAR Data[ 1 ]; /*/< variable-lenght field that contains the information passed to or received */
|
||||
ULONG Length; /*/< Length of the data field */
|
||||
UCHAR Data[ 1 ]; /*/< variable-length field that contains the information passed to or received */
|
||||
/*/< from the adapter. */
|
||||
};
|
||||
typedef struct _PACKET_OID_DATA PACKET_OID_DATA, * PPACKET_OID_DATA;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
@ -392,7 +392,7 @@
|
|||
#define PACKET_START_OEM_NO_NETMON 0x00000001
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__PACKET32 */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
@ -25,7 +25,8 @@
|
|||
*/
|
||||
|
||||
|
||||
char pkt1[] = {
|
||||
char pkt1[] =
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14,
|
||||
0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x30, 0x09, 0x9c, 0x40, 0x00, 0x80, 0x06,
|
||||
|
|
@ -36,7 +37,8 @@ char pkt1[] = {
|
|||
0x05, 0xb4, 0x01, 0x01, 0x04, 0x02
|
||||
};
|
||||
|
||||
char pkt2[] = {
|
||||
char pkt2[] =
|
||||
{
|
||||
0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01,
|
||||
0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x40, 0x06,
|
||||
|
|
@ -47,7 +49,8 @@ char pkt2[] = {
|
|||
0x05, 0x92
|
||||
};
|
||||
|
||||
char pkt3[] = {
|
||||
char pkt3[] =
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14,
|
||||
0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x28, 0x09, 0x9e, 0x40, 0x00, 0x80, 0x06,
|
||||
|
|
@ -57,7 +60,8 @@ char pkt3[] = {
|
|||
0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00
|
||||
};
|
||||
|
||||
char pkt4[] = {
|
||||
char pkt4[] =
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14,
|
||||
0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00,
|
||||
0x02, 0x27, 0x09, 0x9f, 0x40, 0x00, 0x80, 0x06,
|
||||
|
|
@ -131,7 +135,8 @@ char pkt4[] = {
|
|||
0x65, 0x0d, 0x0a, 0x0d, 0x0a
|
||||
};
|
||||
|
||||
char pkt5[] = {
|
||||
char pkt5[] =
|
||||
{
|
||||
0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01,
|
||||
0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x2c, 0x00, 0x02, 0x00, 0x00, 0x40, 0x06,
|
||||
|
|
@ -142,7 +147,8 @@ char pkt5[] = {
|
|||
0x05, 0x92
|
||||
};
|
||||
|
||||
char pkt6[] = {
|
||||
char pkt6[] =
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14,
|
||||
0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x28, 0x09, 0xa1, 0x40, 0x00, 0x80, 0x06,
|
||||
|
|
@ -152,7 +158,8 @@ char pkt6[] = {
|
|||
0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00
|
||||
};
|
||||
|
||||
char pkt7[] = {
|
||||
char pkt7[] =
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14,
|
||||
0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00,
|
||||
0x02, 0x27, 0x09, 0xa2, 0x40, 0x00, 0x80, 0x06,
|
||||
|
|
@ -226,7 +233,8 @@ char pkt7[] = {
|
|||
0x65, 0x0d, 0x0a, 0x0d, 0x0a
|
||||
};
|
||||
|
||||
char pkt8[] = {
|
||||
char pkt8[] =
|
||||
{
|
||||
0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01,
|
||||
0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x2c, 0x00, 0x03, 0x00, 0x00, 0x40, 0x06,
|
||||
|
|
@ -237,7 +245,8 @@ char pkt8[] = {
|
|||
0x05, 0x92
|
||||
};
|
||||
|
||||
char pkt9[] = {
|
||||
char pkt9[] =
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14,
|
||||
0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x28, 0x09, 0xa3, 0x40, 0x00, 0x80, 0x06,
|
||||
|
|
@ -247,7 +256,8 @@ char pkt9[] = {
|
|||
0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00
|
||||
};
|
||||
|
||||
char pkt10[] = {
|
||||
char pkt10[] =
|
||||
{
|
||||
0x00, 0x14, 0x22, 0xcb, 0x18, 0x2d, 0x00, 0x01,
|
||||
0x02, 0x45, 0x09, 0x11, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x2c, 0x00, 0x04, 0x00, 0x00, 0x40, 0x06,
|
||||
|
|
@ -258,7 +268,8 @@ char pkt10[] = {
|
|||
0x05, 0x92
|
||||
};
|
||||
|
||||
char pkt11[] = {
|
||||
char pkt11[] =
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14,
|
||||
0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x28, 0x09, 0xa6, 0x40, 0x00, 0x80, 0x06,
|
||||
|
|
@ -268,7 +279,8 @@ char pkt11[] = {
|
|||
0x42, 0xd8, 0x82, 0x3f, 0x00, 0x00
|
||||
};
|
||||
|
||||
char pkt12[] = {
|
||||
char pkt12[] =
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x45, 0x09, 0x11, 0x00, 0x14,
|
||||
0x22, 0xcb, 0x18, 0x2d, 0x08, 0x00, 0x45, 0x00,
|
||||
0x00, 0x28, 0x09, 0xa7, 0x40, 0x00, 0x80, 0x06,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#define __WIN32_EXTENSIONS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Definitions */
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
PAirpcapHandle pcap_get_airpcap_handle( pcap_t * p );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__WIN32_EXTENSIONS_H__ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
@ -48,7 +48,7 @@ static pcap_if_t * prvPrintAvailableNetworkInterfaces( void );
|
|||
* Open the network interface. The number of the interface to be opened is set
|
||||
* by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h.
|
||||
*/
|
||||
static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces );
|
||||
static void prvOpenSelectedNetworkInterface( pcap_if_t * pxAllNetworkInterfaces );
|
||||
|
||||
/*
|
||||
* Configure the capture filter to allow blocking reads, and to filter out
|
||||
|
|
@ -56,105 +56,105 @@ static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces )
|
|||
*/
|
||||
static void prvConfigureCaptureBehaviour( void );
|
||||
|
||||
pcap_t *pxOpenedInterfaceHandle = NULL;
|
||||
pcap_t * pxOpenedInterfaceHandle = NULL;
|
||||
LARGE_INTEGER freq, sys_start_time;
|
||||
|
||||
#define archNUM_BUFFERS 5
|
||||
#define archNUM_BUFFER_POINTERS ( archNUM_BUFFERS - 1 )
|
||||
#define archNUM_BUFFERS 5
|
||||
#define archNUM_BUFFER_POINTERS ( archNUM_BUFFERS - 1 )
|
||||
|
||||
static void prvInterruptSimulator( void *pvParameters );
|
||||
static void prvInterruptSimulator( void * pvParameters );
|
||||
|
||||
static unsigned char ucEthernetBuffer[ archNUM_BUFFERS ][ UIP_CONF_BUFFER_SIZE ];
|
||||
static unsigned char *pucEthernetBufferPointers[ archNUM_BUFFER_POINTERS ];
|
||||
static unsigned char * pucEthernetBufferPointers[ archNUM_BUFFER_POINTERS ];
|
||||
|
||||
static long lLengthOfDataInBuffer[ archNUM_BUFFER_POINTERS ] = { 0 };
|
||||
static unsigned char ucNextBufferToFill = 0U, ucNextBufferToProcess = 0U;
|
||||
|
||||
unsigned char *uip_buf = NULL;
|
||||
char cErrorBuffer[PCAP_ERRBUF_SIZE];
|
||||
unsigned char * uip_buf = NULL;
|
||||
char cErrorBuffer[ PCAP_ERRBUF_SIZE ];
|
||||
|
||||
void vNetifTx( void )
|
||||
{
|
||||
pcap_sendpacket( pxOpenedInterfaceHandle, uip_buf, uip_len );
|
||||
pcap_sendpacket( pxOpenedInterfaceHandle, uip_buf, uip_len );
|
||||
pcap_sendpacket( pxOpenedInterfaceHandle, uip_buf, uip_len );
|
||||
pcap_sendpacket( pxOpenedInterfaceHandle, uip_buf, uip_len );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
UBaseType_t uxNetifRx( void )
|
||||
{
|
||||
UBaseType_t xDataLen;
|
||||
unsigned char *pucTemp;
|
||||
UBaseType_t xDataLen;
|
||||
unsigned char * pucTemp;
|
||||
|
||||
/* Check there is really data available. */
|
||||
xDataLen = lLengthOfDataInBuffer[ ucNextBufferToProcess ];
|
||||
if( xDataLen != 0L )
|
||||
{
|
||||
/* Check there is really data available. */
|
||||
xDataLen = lLengthOfDataInBuffer[ ucNextBufferToProcess ];
|
||||
|
||||
/* The buffer pointed to by uip_buf is going to change. Remember which
|
||||
buffer uip_buf is currently pointing to. */
|
||||
pucTemp = uip_buf;
|
||||
if( xDataLen != 0L )
|
||||
{
|
||||
/* The buffer pointed to by uip_buf is going to change. Remember which
|
||||
* buffer uip_buf is currently pointing to. */
|
||||
pucTemp = uip_buf;
|
||||
|
||||
/* Point uip_buf at the next buffer that contains data. */
|
||||
uip_buf = pucEthernetBufferPointers[ ucNextBufferToProcess ];
|
||||
/* Point uip_buf at the next buffer that contains data. */
|
||||
uip_buf = pucEthernetBufferPointers[ ucNextBufferToProcess ];
|
||||
|
||||
/* The buffer pointed to by
|
||||
pucEthernetBufferPointeres[ ucNextBufferToProcess ] is now in use by
|
||||
uip_buf, but the buffer uip_buf was pointing to on entry to this
|
||||
function is free. Set
|
||||
pucEthernetBufferPointeres[ ucNextBufferToProcess ] to the free
|
||||
buffer. */
|
||||
pucEthernetBufferPointers[ ucNextBufferToProcess ] = pucTemp;
|
||||
lLengthOfDataInBuffer[ ucNextBufferToProcess ] = 0L;
|
||||
/* The buffer pointed to by
|
||||
* pucEthernetBufferPointeres[ ucNextBufferToProcess ] is now in use by
|
||||
* uip_buf, but the buffer uip_buf was pointing to on entry to this
|
||||
* function is free. Set
|
||||
* pucEthernetBufferPointeres[ ucNextBufferToProcess ] to the free
|
||||
* buffer. */
|
||||
pucEthernetBufferPointers[ ucNextBufferToProcess ] = pucTemp;
|
||||
lLengthOfDataInBuffer[ ucNextBufferToProcess ] = 0L;
|
||||
|
||||
ucNextBufferToProcess++;
|
||||
if( ucNextBufferToProcess >= archNUM_BUFFER_POINTERS )
|
||||
{
|
||||
ucNextBufferToProcess = 0L;
|
||||
}
|
||||
}
|
||||
ucNextBufferToProcess++;
|
||||
|
||||
return xDataLen;
|
||||
if( ucNextBufferToProcess >= archNUM_BUFFER_POINTERS )
|
||||
{
|
||||
ucNextBufferToProcess = 0L;
|
||||
}
|
||||
}
|
||||
|
||||
return xDataLen;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
BaseType_t xNetifInit( void )
|
||||
{
|
||||
BaseType_t x;
|
||||
pcap_if_t *pxAllNetworkInterfaces;
|
||||
BaseType_t x;
|
||||
pcap_if_t * pxAllNetworkInterfaces;
|
||||
|
||||
/* Allocate a free buffer to each buffer pointer. */
|
||||
for( x = 0; x < sizeof( pucEthernetBufferPointers ) / sizeof( unsigned char * ); x++ )
|
||||
{
|
||||
pucEthernetBufferPointers[ x ] = &( ucEthernetBuffer[ x ][ 0 ] );
|
||||
}
|
||||
/* Allocate a free buffer to each buffer pointer. */
|
||||
for( x = 0; x < sizeof( pucEthernetBufferPointers ) / sizeof( unsigned char * ); x++ )
|
||||
{
|
||||
pucEthernetBufferPointers[ x ] = &( ucEthernetBuffer[ x ][ 0 ] );
|
||||
}
|
||||
|
||||
/* Start with uip_buf pointing to a buffer that is not referenced from the
|
||||
pucEthernetBufferPointers[] array. */
|
||||
uip_buf = &( ucEthernetBuffer[ archNUM_BUFFERS - 1 ][ 0 ] );
|
||||
/* Start with uip_buf pointing to a buffer that is not referenced from the
|
||||
* pucEthernetBufferPointers[] array. */
|
||||
uip_buf = &( ucEthernetBuffer[ archNUM_BUFFERS - 1 ][ 0 ] );
|
||||
|
||||
/* Query the computer the simulation is being executed on to find the
|
||||
network interfaces it has installed. */
|
||||
pxAllNetworkInterfaces = prvPrintAvailableNetworkInterfaces();
|
||||
|
||||
/* Open the network interface. The number of the interface to be opened is
|
||||
set by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h.
|
||||
Calling this function will set the pxOpenedInterfaceHandle variable. If,
|
||||
after calling this function, pxOpenedInterfaceHandle is equal to NULL, then
|
||||
the interface could not be opened. */
|
||||
if( pxAllNetworkInterfaces != NULL )
|
||||
{
|
||||
prvOpenSelectedNetworkInterface( pxAllNetworkInterfaces );
|
||||
}
|
||||
|
||||
/* Query the computer the simulation is being executed on to find the
|
||||
* network interfaces it has installed. */
|
||||
pxAllNetworkInterfaces = prvPrintAvailableNetworkInterfaces();
|
||||
|
||||
return x;
|
||||
/* Open the network interface. The number of the interface to be opened is
|
||||
* set by the configNETWORK_INTERFACE_TO_USE constant in FreeRTOSConfig.h.
|
||||
* Calling this function will set the pxOpenedInterfaceHandle variable. If,
|
||||
* after calling this function, pxOpenedInterfaceHandle is equal to NULL, then
|
||||
* the interface could not be opened. */
|
||||
if( pxAllNetworkInterfaces != NULL )
|
||||
{
|
||||
prvOpenSelectedNetworkInterface( pxAllNetworkInterfaces );
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static pcap_if_t * prvPrintAvailableNetworkInterfaces( void )
|
||||
{
|
||||
pcap_if_t * pxAllNetworkInterfaces = NULL, *xInterface;
|
||||
long lInterfaceNumber = 1;
|
||||
{
|
||||
pcap_if_t * pxAllNetworkInterfaces = NULL, * xInterface;
|
||||
long lInterfaceNumber = 1;
|
||||
|
||||
if( pcap_findalldevs_ex( PCAP_SRC_IF_STRING, NULL, &pxAllNetworkInterfaces, cErrorBuffer ) == -1 )
|
||||
{
|
||||
|
|
@ -162,174 +162,176 @@ long lInterfaceNumber = 1;
|
|||
pxAllNetworkInterfaces = NULL;
|
||||
}
|
||||
|
||||
if( pxAllNetworkInterfaces != NULL )
|
||||
{
|
||||
/* Print out the list of network interfaces. The first in the list
|
||||
is interface '1', not interface '0'. */
|
||||
for( xInterface = pxAllNetworkInterfaces; xInterface != NULL; xInterface = xInterface->next )
|
||||
{
|
||||
printf( "%d. %s", lInterfaceNumber, xInterface->name );
|
||||
|
||||
if( xInterface->description != NULL )
|
||||
{
|
||||
printf( " (%s)\r\n", xInterface->description );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( " (No description available)\r\n") ;
|
||||
}
|
||||
|
||||
lInterfaceNumber++;
|
||||
}
|
||||
}
|
||||
if( pxAllNetworkInterfaces != NULL )
|
||||
{
|
||||
/* Print out the list of network interfaces. The first in the list
|
||||
* is interface '1', not interface '0'. */
|
||||
for( xInterface = pxAllNetworkInterfaces; xInterface != NULL; xInterface = xInterface->next )
|
||||
{
|
||||
printf( "%d. %s", lInterfaceNumber, xInterface->name );
|
||||
|
||||
if( xInterface->description != NULL )
|
||||
{
|
||||
printf( " (%s)\r\n", xInterface->description );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( " (No description available)\r\n" );
|
||||
}
|
||||
|
||||
lInterfaceNumber++;
|
||||
}
|
||||
}
|
||||
|
||||
if( lInterfaceNumber == 1 )
|
||||
{
|
||||
/* The interface number was never incremented, so the above for() loop
|
||||
did not execute meaning no interfaces were found. */
|
||||
/* The interface number was never incremented, so the above for() loop
|
||||
* did not execute meaning no interfaces were found. */
|
||||
printf( " \r\nNo network interfaces were found.\r\n" );
|
||||
pxAllNetworkInterfaces = NULL;
|
||||
}
|
||||
|
||||
printf( "\r\nThe interface that will be opened is set by configNETWORK_INTERFACE_TO_USE which should be defined in FreeRTOSConfig.h\r\n" );
|
||||
printf( "Attempting to open interface number %d.\r\n", configNETWORK_INTERFACE_TO_USE );
|
||||
|
||||
printf( "\r\nThe interface that will be opened is set by configNETWORK_INTERFACE_TO_USE which should be defined in FreeRTOSConfig.h\r\n" );
|
||||
printf( "Attempting to open interface number %d.\r\n", configNETWORK_INTERFACE_TO_USE );
|
||||
|
||||
if( ( configNETWORK_INTERFACE_TO_USE < 1L ) || ( configNETWORK_INTERFACE_TO_USE > lInterfaceNumber ) )
|
||||
{
|
||||
printf("\r\nconfigNETWORK_INTERFACE_TO_USE is not in the valid range.\r\n" );
|
||||
|
||||
if( pxAllNetworkInterfaces != NULL )
|
||||
{
|
||||
/* Free the device list, as no devices are going to be opened. */
|
||||
pcap_freealldevs( pxAllNetworkInterfaces );
|
||||
pxAllNetworkInterfaces = NULL;
|
||||
}
|
||||
printf( "\r\nconfigNETWORK_INTERFACE_TO_USE is not in the valid range.\r\n" );
|
||||
|
||||
if( pxAllNetworkInterfaces != NULL )
|
||||
{
|
||||
/* Free the device list, as no devices are going to be opened. */
|
||||
pcap_freealldevs( pxAllNetworkInterfaces );
|
||||
pxAllNetworkInterfaces = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return pxAllNetworkInterfaces;
|
||||
return pxAllNetworkInterfaces;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvOpenSelectedNetworkInterface( pcap_if_t *pxAllNetworkInterfaces )
|
||||
static void prvOpenSelectedNetworkInterface( pcap_if_t * pxAllNetworkInterfaces )
|
||||
{
|
||||
pcap_if_t *xInterface;
|
||||
long x;
|
||||
pcap_if_t * xInterface;
|
||||
long x;
|
||||
|
||||
/* Walk the list of devices until the selected device is located. */
|
||||
xInterface = pxAllNetworkInterfaces;
|
||||
xInterface = pxAllNetworkInterfaces;
|
||||
|
||||
for( x = 0L; x < ( configNETWORK_INTERFACE_TO_USE - 1L ); x++ )
|
||||
{
|
||||
xInterface = xInterface->next;
|
||||
}
|
||||
{
|
||||
xInterface = xInterface->next;
|
||||
}
|
||||
|
||||
/* Open the selected interface. */
|
||||
pxOpenedInterfaceHandle = pcap_open( xInterface->name, /* The name of the selected interface. */
|
||||
UIP_CONF_BUFFER_SIZE, /* The size of the packet to capture. */
|
||||
PCAP_OPENFLAG_PROMISCUOUS, /* Open in promiscious mode as the MAC and
|
||||
IP address is going to be "simulated", and
|
||||
not be the real MAC and IP address. This allows
|
||||
trafic to the simulated IP address to be routed
|
||||
to uIP, and trafic to the real IP address to be
|
||||
routed to the Windows TCP/IP stack. */
|
||||
0xfffffffL, /* The read time out. This is going to block
|
||||
until data is available. */
|
||||
NULL, /* No authentication is required as this is
|
||||
not a remote capture session. */
|
||||
cErrorBuffer
|
||||
);
|
||||
|
||||
if ( pxOpenedInterfaceHandle == NULL )
|
||||
pxOpenedInterfaceHandle = pcap_open( xInterface->name, /* The name of the selected interface. */
|
||||
UIP_CONF_BUFFER_SIZE, /* The size of the packet to capture. */
|
||||
PCAP_OPENFLAG_PROMISCUOUS, /* Open in promiscuous mode as the MAC and
|
||||
* IP address is going to be "simulated", and
|
||||
* not be the real MAC and IP address. This allows
|
||||
* traffic to the simulated IP address to be routed
|
||||
* to uIP, and traffic to the real IP address to be
|
||||
* routed to the Windows TCP/IP stack. */
|
||||
0xfffffffL, /* The read time out. This is going to block
|
||||
* until data is available. */
|
||||
NULL, /* No authentication is required as this is
|
||||
* not a remote capture session. */
|
||||
cErrorBuffer
|
||||
);
|
||||
|
||||
if( pxOpenedInterfaceHandle == NULL )
|
||||
{
|
||||
printf( "\r\n%s is not supported by WinPcap and cannot be opened\r\n", xInterface->name );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Configure the capture filter to allow blocking reads, and to filter
|
||||
out packets that are not of interest to this demo. */
|
||||
prvConfigureCaptureBehaviour();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Configure the capture filter to allow blocking reads, and to filter
|
||||
* out packets that are not of interest to this demo. */
|
||||
prvConfigureCaptureBehaviour();
|
||||
}
|
||||
|
||||
/* The device list is no longer required. */
|
||||
pcap_freealldevs( pxAllNetworkInterfaces );
|
||||
/* The device list is no longer required. */
|
||||
pcap_freealldevs( pxAllNetworkInterfaces );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvConfigureCaptureBehaviour( void )
|
||||
{
|
||||
struct bpf_program xFilterCode;
|
||||
const long lMinBytesToCopy = 10L, lBlocking = 0L;
|
||||
unsigned long ulNetMask;
|
||||
struct bpf_program xFilterCode;
|
||||
const long lMinBytesToCopy = 10L, lBlocking = 0L;
|
||||
unsigned long ulNetMask;
|
||||
|
||||
/* Unblock a read as soon as anything is received. */
|
||||
pcap_setmintocopy( pxOpenedInterfaceHandle, lMinBytesToCopy );
|
||||
/* Unblock a read as soon as anything is received. */
|
||||
pcap_setmintocopy( pxOpenedInterfaceHandle, lMinBytesToCopy );
|
||||
|
||||
/* Allow blocking. */
|
||||
pcap_setnonblock( pxOpenedInterfaceHandle, lBlocking, cErrorBuffer );
|
||||
/* Allow blocking. */
|
||||
pcap_setnonblock( pxOpenedInterfaceHandle, lBlocking, cErrorBuffer );
|
||||
|
||||
/* Set up a filter so only the packets of interest are passed to the uIP
|
||||
stack. cErrorBuffer is used for convenience to create the string. Don't
|
||||
confuse this with an error message. */
|
||||
sprintf( cErrorBuffer, "broadcast or multicast or host %d.%d.%d.%d", configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );
|
||||
/* Set up a filter so only the packets of interest are passed to the uIP
|
||||
* stack. cErrorBuffer is used for convenience to create the string. Don't
|
||||
* confuse this with an error message. */
|
||||
sprintf( cErrorBuffer, "broadcast or multicast or host %d.%d.%d.%d", configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );
|
||||
|
||||
ulNetMask = ( configNET_MASK3 << 24UL ) | ( configNET_MASK2 << 16UL ) | ( configNET_MASK1 << 8L ) | configNET_MASK0;
|
||||
ulNetMask = ( configNET_MASK3 << 24UL ) | ( configNET_MASK2 << 16UL ) | ( configNET_MASK1 << 8L ) | configNET_MASK0;
|
||||
|
||||
if( pcap_compile(pxOpenedInterfaceHandle, &xFilterCode, cErrorBuffer, 1, ulNetMask ) < 0 )
|
||||
if( pcap_compile( pxOpenedInterfaceHandle, &xFilterCode, cErrorBuffer, 1, ulNetMask ) < 0 )
|
||||
{
|
||||
printf("\r\nThe packet filter string is invalid\r\n" );
|
||||
printf( "\r\nThe packet filter string is invalid\r\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( pcap_setfilter( pxOpenedInterfaceHandle, &xFilterCode ) < 0 )
|
||||
{
|
||||
printf( "\r\nAn error occurred setting the packet filter.\r\n" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( pcap_setfilter( pxOpenedInterfaceHandle, &xFilterCode ) < 0 )
|
||||
{
|
||||
printf( "\r\nAn error occurred setting the packet filter.\r\n" );
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a task that simulates an interrupt in a real system. This will
|
||||
block waiting for packets, then send a message to the uIP task when data
|
||||
is available. */
|
||||
xTaskCreate( prvInterruptSimulator, ( signed char * ) "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, ( configuIP_TASK_PRIORITY - 1 ), NULL );
|
||||
/* Create a task that simulates an interrupt in a real system. This will
|
||||
* block waiting for packets, then send a message to the uIP task when data
|
||||
* is available. */
|
||||
xTaskCreate( prvInterruptSimulator, ( signed char * ) "MAC_ISR", configMINIMAL_STACK_SIZE, NULL, ( ipconfigIP_TASK_PRIORITY - 1 ), NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvInterruptSimulator( void *pvParameters )
|
||||
static void prvInterruptSimulator( void * pvParameters )
|
||||
{
|
||||
static struct pcap_pkthdr *pxHeader;
|
||||
const unsigned char *pucPacketData;
|
||||
extern QueueHandle_t xEMACEventQueue;
|
||||
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;
|
||||
long lResult;
|
||||
static struct pcap_pkthdr * pxHeader;
|
||||
const unsigned char * pucPacketData;
|
||||
extern QueueHandle_t xEMACEventQueue;
|
||||
const unsigned long ulRxEvent = uipETHERNET_RX_EVENT;
|
||||
long lResult;
|
||||
|
||||
/* Just to kill the compiler warning. */
|
||||
( void ) pvParameters;
|
||||
/* Just to kill the compiler warning. */
|
||||
( void ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Get the next packet. */
|
||||
lResult = pcap_next_ex( pxOpenedInterfaceHandle, &pxHeader, &pucPacketData );
|
||||
if( lResult )
|
||||
{
|
||||
/* Is the next buffer into which data should be placed free? */
|
||||
if( lLengthOfDataInBuffer[ ucNextBufferToFill ] == 0L )
|
||||
{
|
||||
/* Copy the data from the captured packet into the buffer. */
|
||||
memcpy( pucEthernetBufferPointers[ ucNextBufferToFill ], pucPacketData, pxHeader->len );
|
||||
for( ; ; )
|
||||
{
|
||||
/* Get the next packet. */
|
||||
lResult = pcap_next_ex( pxOpenedInterfaceHandle, &pxHeader, &pucPacketData );
|
||||
|
||||
/* Note the amount of data that was copied. */
|
||||
lLengthOfDataInBuffer[ ucNextBufferToFill ] = pxHeader->len;
|
||||
if( lResult )
|
||||
{
|
||||
/* Is the next buffer into which data should be placed free? */
|
||||
if( lLengthOfDataInBuffer[ ucNextBufferToFill ] == 0L )
|
||||
{
|
||||
/* Copy the data from the captured packet into the buffer. */
|
||||
memcpy( pucEthernetBufferPointers[ ucNextBufferToFill ], pucPacketData, pxHeader->len );
|
||||
|
||||
/* Move onto the next buffer, wrapping around if necessary. */
|
||||
ucNextBufferToFill++;
|
||||
if( ucNextBufferToFill >= archNUM_BUFFER_POINTERS )
|
||||
{
|
||||
ucNextBufferToFill = 0U;
|
||||
}
|
||||
/* Note the amount of data that was copied. */
|
||||
lLengthOfDataInBuffer[ ucNextBufferToFill ] = pxHeader->len;
|
||||
|
||||
/* Data was received and stored. Send a message to the uIP task
|
||||
to let it know. */
|
||||
xQueueSendToBack( xEMACEventQueue, &ulRxEvent, portMAX_DELAY );
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Move onto the next buffer, wrapping around if necessary. */
|
||||
ucNextBufferToFill++;
|
||||
|
||||
if( ucNextBufferToFill >= archNUM_BUFFER_POINTERS )
|
||||
{
|
||||
ucNextBufferToFill = 0U;
|
||||
}
|
||||
|
||||
/* Data was received and stored. Send a message to the uIP task
|
||||
* to let it know. */
|
||||
xQueueSendToBack( xEMACEventQueue, &ulRxEvent, portMAX_DELAY );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#define IN_EXPERIMENTAL( a ) ( ( ( ( u_int32_t ) ( a ) ) & 0xf0000000 ) == 0xf0000000 )
|
||||
#define IN_EXPERIMENTAL( a ) ( ( ( ( u_int32_t ) ( a ) ) & 0xf0000000 ) == 0xf0000000 )
|
||||
|
||||
#define IN_LOOPBACKNET 127
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS V202212.00
|
||||
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* Copyright (C) 2020 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
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
*
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PCAP_BLUETOOTH_STRUCTS_H__
|
||||
#define _PCAP_BLUETOOTH_STRUCTS_H__
|
||||
|
||||
|
|
@ -40,8 +40,9 @@
|
|||
* Header prepended libpcap to each bluetooth h:4 frame.
|
||||
* fields are in network byte order
|
||||
*/
|
||||
typedef struct _pcap_bluetooth_h4_header {
|
||||
u_int32_t direction; /* if first bit is set direction is incoming */
|
||||
typedef struct _pcap_bluetooth_h4_header
|
||||
{
|
||||
u_int32_t direction; /* if first bit is set direction is incoming */
|
||||
} pcap_bluetooth_h4_header;
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -34,11 +34,11 @@
|
|||
*/
|
||||
|
||||
#ifndef lib_pcap_namedb_h
|
||||
#define lib_pcap_namedb_h
|
||||
#define lib_pcap_namedb_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* As returned by the pcap_next_etherent()
|
||||
|
|
@ -47,43 +47,52 @@ extern "C" {
|
|||
* on systems that don't have support for /etc/ethers, we
|
||||
* export these hooks since they'll
|
||||
*/
|
||||
struct pcap_etherent {
|
||||
u_char addr[6];
|
||||
char name[122];
|
||||
};
|
||||
#ifndef PCAP_ETHERS_FILE
|
||||
#define PCAP_ETHERS_FILE "/etc/ethers"
|
||||
#endif
|
||||
struct pcap_etherent *pcap_next_etherent(FILE *);
|
||||
u_char *pcap_ether_hostton(const char*);
|
||||
u_char *pcap_ether_aton(const char *);
|
||||
struct pcap_etherent
|
||||
{
|
||||
u_char addr[ 6 ];
|
||||
char name[ 122 ];
|
||||
};
|
||||
#ifndef PCAP_ETHERS_FILE
|
||||
#define PCAP_ETHERS_FILE "/etc/ethers"
|
||||
#endif
|
||||
struct pcap_etherent * pcap_next_etherent( FILE * );
|
||||
u_char * pcap_ether_hostton( const char * );
|
||||
u_char * pcap_ether_aton( const char * );
|
||||
|
||||
bpf_u_int32 **pcap_nametoaddr(const char *);
|
||||
#ifdef INET6
|
||||
struct addrinfo *pcap_nametoaddrinfo(const char *);
|
||||
#endif
|
||||
bpf_u_int32 pcap_nametonetaddr(const char *);
|
||||
bpf_u_int32 ** pcap_nametoaddr( const char * );
|
||||
#ifdef INET6
|
||||
struct addrinfo * pcap_nametoaddrinfo( const char * );
|
||||
#endif
|
||||
bpf_u_int32 pcap_nametonetaddr( const char * );
|
||||
|
||||
int pcap_nametoport( const char *,
|
||||
int *,
|
||||
int * );
|
||||
int pcap_nametoportrange( const char *,
|
||||
int *,
|
||||
int *,
|
||||
int * );
|
||||
int pcap_nametoproto( const char * );
|
||||
int pcap_nametoeproto( const char * );
|
||||
int pcap_nametollc( const char * );
|
||||
|
||||
int pcap_nametoport(const char *, int *, int *);
|
||||
int pcap_nametoportrange(const char *, int *, int *, int *);
|
||||
int pcap_nametoproto(const char *);
|
||||
int pcap_nametoeproto(const char *);
|
||||
int pcap_nametollc(const char *);
|
||||
/*
|
||||
* If a protocol is unknown, PROTO_UNDEF is returned.
|
||||
* Also, pcap_nametoport() returns the protocol along with the port number.
|
||||
* If there are ambiguous entried in /etc/services (i.e. domain
|
||||
* can be either tcp or udp) PROTO_UNDEF is returned.
|
||||
*/
|
||||
#define PROTO_UNDEF -1
|
||||
#define PROTO_UNDEF -1
|
||||
|
||||
/* XXX move these to pcap-int.h? */
|
||||
int __pcap_atodn(const char *, bpf_u_int32 *);
|
||||
int __pcap_atoin(const char *, bpf_u_int32 *);
|
||||
u_short __pcap_nametodnaddr(const char *);
|
||||
int __pcap_atodn( const char *,
|
||||
bpf_u_int32 * );
|
||||
int __pcap_atoin( const char *,
|
||||
bpf_u_int32 * );
|
||||
u_short __pcap_nametodnaddr( const char * );
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* ifndef lib_pcap_namedb_h */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994, 1995, 1996, 1997
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -35,59 +36,59 @@
|
|||
*/
|
||||
|
||||
#ifndef lib_pcap_pcap_h
|
||||
#define lib_pcap_pcap_h
|
||||
#define lib_pcap_pcap_h
|
||||
|
||||
#if defined(WIN32)
|
||||
#include <pcap-stdinc.h>
|
||||
#elif defined(MSDOS)
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h> /* u_int, u_char etc. */
|
||||
#else /* UN*X */
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#endif /* WIN32/MSDOS/UN*X */
|
||||
#if defined( WIN32 )
|
||||
#include <pcap-stdinc.h>
|
||||
#elif defined( MSDOS )
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h> /* u_int, u_char etc. */
|
||||
#else /* UN*X */
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#endif /* WIN32/MSDOS/UN*X */
|
||||
|
||||
#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
|
||||
#include <pcap/bpf.h>
|
||||
#endif
|
||||
#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
|
||||
#include <pcap/bpf.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_REMOTE
|
||||
// We have to define the SOCKET here, although it has been defined in sockutils.h
|
||||
// This is to avoid the distribution of the 'sockutils.h' file around
|
||||
// (for example in the WinPcap developer's pack)
|
||||
#ifndef SOCKET
|
||||
#ifdef WIN32
|
||||
#define SOCKET unsigned int
|
||||
#else
|
||||
#define SOCKET int
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_REMOTE
|
||||
/* We have to define the SOCKET here, although it has been defined in sockutils.h */
|
||||
/* This is to avoid the distribution of the 'sockutils.h' file around */
|
||||
/* (for example in the WinPcap developer's pack) */
|
||||
#ifndef SOCKET
|
||||
#ifdef WIN32
|
||||
#define SOCKET unsigned int
|
||||
#else
|
||||
#define SOCKET int
|
||||
#endif
|
||||
#endif
|
||||
#endif /* ifdef HAVE_REMOTE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PCAP_VERSION_MAJOR 2
|
||||
#define PCAP_VERSION_MINOR 4
|
||||
#define PCAP_VERSION_MAJOR 2
|
||||
#define PCAP_VERSION_MINOR 4
|
||||
|
||||
#define PCAP_ERRBUF_SIZE 256
|
||||
#define PCAP_ERRBUF_SIZE 256
|
||||
|
||||
/*
|
||||
* Compatibility for systems that have a bpf.h that
|
||||
* predates the bpf typedefs for 64-bit support.
|
||||
*/
|
||||
#if BPF_RELEASE - 0 < 199406
|
||||
typedef int bpf_int32;
|
||||
typedef u_int bpf_u_int32;
|
||||
#endif
|
||||
#if BPF_RELEASE - 0 < 199406
|
||||
typedef int bpf_int32;
|
||||
typedef u_int bpf_u_int32;
|
||||
#endif
|
||||
|
||||
typedef struct pcap pcap_t;
|
||||
typedef struct pcap_dumper pcap_dumper_t;
|
||||
typedef struct pcap_if pcap_if_t;
|
||||
typedef struct pcap_addr pcap_addr_t;
|
||||
typedef struct pcap pcap_t;
|
||||
typedef struct pcap_dumper pcap_dumper_t;
|
||||
typedef struct pcap_if pcap_if_t;
|
||||
typedef struct pcap_addr pcap_addr_t;
|
||||
|
||||
/*
|
||||
* The first record in the file contains saved values for some
|
||||
|
|
@ -126,31 +127,33 @@ typedef struct pcap_addr pcap_addr_t;
|
|||
* so that future versions of libpcap and programs that use it (such as
|
||||
* tcpdump) will be able to read your new capture file format.
|
||||
*/
|
||||
struct pcap_file_header {
|
||||
bpf_u_int32 magic;
|
||||
u_short version_major;
|
||||
u_short version_minor;
|
||||
bpf_int32 thiszone; /* gmt to local correction */
|
||||
bpf_u_int32 sigfigs; /* accuracy of timestamps */
|
||||
bpf_u_int32 snaplen; /* max length saved portion of each pkt */
|
||||
bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */
|
||||
};
|
||||
struct pcap_file_header
|
||||
{
|
||||
bpf_u_int32 magic;
|
||||
u_short version_major;
|
||||
u_short version_minor;
|
||||
bpf_int32 thiszone; /* gmt to local correction */
|
||||
bpf_u_int32 sigfigs; /* accuracy of timestamps */
|
||||
bpf_u_int32 snaplen; /* max length saved portion of each pkt */
|
||||
bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */
|
||||
};
|
||||
|
||||
/*
|
||||
* Macros for the value returned by pcap_datalink_ext().
|
||||
*
|
||||
*
|
||||
* If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro
|
||||
* gives the FCS length of packets in the capture.
|
||||
*/
|
||||
#define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000)
|
||||
#define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28)
|
||||
#define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000)
|
||||
#define LT_FCS_LENGTH_PRESENT( x ) ( ( x ) & 0x04000000 )
|
||||
#define LT_FCS_LENGTH( x ) ( ( ( x ) & 0xF0000000 ) >> 28 )
|
||||
#define LT_FCS_DATALINK_EXT( x ) ( ( ( ( x ) & 0xF ) << 28 ) | 0x04000000 )
|
||||
|
||||
typedef enum {
|
||||
PCAP_D_INOUT = 0,
|
||||
PCAP_D_IN,
|
||||
PCAP_D_OUT
|
||||
} pcap_direction_t;
|
||||
typedef enum
|
||||
{
|
||||
PCAP_D_INOUT = 0,
|
||||
PCAP_D_IN,
|
||||
PCAP_D_OUT
|
||||
} pcap_direction_t;
|
||||
|
||||
/*
|
||||
* Generic per-packet information, as supplied by libpcap.
|
||||
|
|
@ -164,85 +167,92 @@ typedef enum {
|
|||
* should supply the appropriate version of "struct timeval", even if
|
||||
* that's not what the underlying packet capture mechanism supplies.
|
||||
*/
|
||||
struct pcap_pkthdr {
|
||||
struct timeval ts; /* time stamp */
|
||||
bpf_u_int32 caplen; /* length of portion present */
|
||||
bpf_u_int32 len; /* length this packet (off wire) */
|
||||
};
|
||||
struct pcap_pkthdr
|
||||
{
|
||||
struct timeval ts; /* time stamp */
|
||||
bpf_u_int32 caplen; /* length of portion present */
|
||||
bpf_u_int32 len; /* length this packet (off wire) */
|
||||
};
|
||||
|
||||
/*
|
||||
* As returned by the pcap_stats()
|
||||
*/
|
||||
struct pcap_stat {
|
||||
u_int ps_recv; /* number of packets received */
|
||||
u_int ps_drop; /* number of packets dropped */
|
||||
u_int ps_ifdrop; /* drops by interface XXX not yet supported */
|
||||
#ifdef HAVE_REMOTE
|
||||
u_int ps_capt; /* number of packets that are received by the application; please get rid off the Win32 ifdef */
|
||||
u_int ps_sent; /* number of packets sent by the server on the network */
|
||||
u_int ps_netdrop; /* number of packets lost on the network */
|
||||
#endif /* HAVE_REMOTE */
|
||||
};
|
||||
struct pcap_stat
|
||||
{
|
||||
u_int ps_recv; /* number of packets received */
|
||||
u_int ps_drop; /* number of packets dropped */
|
||||
u_int ps_ifdrop; /* drops by interface XXX not yet supported */
|
||||
#ifdef HAVE_REMOTE
|
||||
u_int ps_capt; /* number of packets that are received by the application; please get rid off the Win32 ifdef */
|
||||
u_int ps_sent; /* number of packets sent by the server on the network */
|
||||
u_int ps_netdrop; /* number of packets lost on the network */
|
||||
#endif /* HAVE_REMOTE */
|
||||
};
|
||||
|
||||
#ifdef MSDOS
|
||||
|
||||
#ifdef MSDOS
|
||||
/*
|
||||
* As returned by the pcap_stats_ex()
|
||||
*/
|
||||
struct pcap_stat_ex {
|
||||
u_long rx_packets; /* total packets received */
|
||||
u_long tx_packets; /* total packets transmitted */
|
||||
u_long rx_bytes; /* total bytes received */
|
||||
u_long tx_bytes; /* total bytes transmitted */
|
||||
u_long rx_errors; /* bad packets received */
|
||||
u_long tx_errors; /* packet transmit problems */
|
||||
u_long rx_dropped; /* no space in Rx buffers */
|
||||
u_long tx_dropped; /* no space available for Tx */
|
||||
u_long multicast; /* multicast packets received */
|
||||
u_long collisions;
|
||||
struct pcap_stat_ex
|
||||
{
|
||||
u_long rx_packets; /* total packets received */
|
||||
u_long tx_packets; /* total packets transmitted */
|
||||
u_long rx_bytes; /* total bytes received */
|
||||
u_long tx_bytes; /* total bytes transmitted */
|
||||
u_long rx_errors; /* bad packets received */
|
||||
u_long tx_errors; /* packet transmit problems */
|
||||
u_long rx_dropped; /* no space in Rx buffers */
|
||||
u_long tx_dropped; /* no space available for Tx */
|
||||
u_long multicast; /* multicast packets received */
|
||||
u_long collisions;
|
||||
|
||||
/* detailed rx_errors: */
|
||||
u_long rx_length_errors;
|
||||
u_long rx_over_errors; /* receiver ring buff overflow */
|
||||
u_long rx_crc_errors; /* recv'd pkt with crc error */
|
||||
u_long rx_frame_errors; /* recv'd frame alignment error */
|
||||
u_long rx_fifo_errors; /* recv'r fifo overrun */
|
||||
u_long rx_missed_errors; /* recv'r missed packet */
|
||||
/* detailed rx_errors: */
|
||||
u_long rx_length_errors;
|
||||
u_long rx_over_errors; /* receiver ring buff overflow */
|
||||
u_long rx_crc_errors; /* recv'd pkt with crc error */
|
||||
u_long rx_frame_errors; /* recv'd frame alignment error */
|
||||
u_long rx_fifo_errors; /* recv'r fifo overrun */
|
||||
u_long rx_missed_errors; /* recv'r missed packet */
|
||||
|
||||
/* detailed tx_errors */
|
||||
u_long tx_aborted_errors;
|
||||
u_long tx_carrier_errors;
|
||||
u_long tx_fifo_errors;
|
||||
u_long tx_heartbeat_errors;
|
||||
u_long tx_window_errors;
|
||||
};
|
||||
#endif
|
||||
/* detailed tx_errors */
|
||||
u_long tx_aborted_errors;
|
||||
u_long tx_carrier_errors;
|
||||
u_long tx_fifo_errors;
|
||||
u_long tx_heartbeat_errors;
|
||||
u_long tx_window_errors;
|
||||
};
|
||||
#endif /* ifdef MSDOS */
|
||||
|
||||
/*
|
||||
* Item in a list of interfaces.
|
||||
*/
|
||||
struct pcap_if {
|
||||
struct pcap_if *next;
|
||||
char *name; /* name to hand to "pcap_open_live()" */
|
||||
char *description; /* textual description of interface, or NULL */
|
||||
struct pcap_addr *addresses;
|
||||
bpf_u_int32 flags; /* PCAP_IF_ interface flags */
|
||||
};
|
||||
struct pcap_if
|
||||
{
|
||||
struct pcap_if * next;
|
||||
char * name; /* name to hand to "pcap_open_live()" */
|
||||
char * description; /* textual description of interface, or NULL */
|
||||
struct pcap_addr * addresses;
|
||||
bpf_u_int32 flags; /* PCAP_IF_ interface flags */
|
||||
};
|
||||
|
||||
#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */
|
||||
#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */
|
||||
|
||||
/*
|
||||
* Representation of an interface address.
|
||||
*/
|
||||
struct pcap_addr {
|
||||
struct pcap_addr *next;
|
||||
struct sockaddr *addr; /* address */
|
||||
struct sockaddr *netmask; /* netmask for that address */
|
||||
struct sockaddr *broadaddr; /* broadcast address for that address */
|
||||
struct sockaddr *dstaddr; /* P2P destination address for that address */
|
||||
};
|
||||
struct pcap_addr
|
||||
{
|
||||
struct pcap_addr * next;
|
||||
struct sockaddr * addr; /* address */
|
||||
struct sockaddr * netmask; /* netmask for that address */
|
||||
struct sockaddr * broadaddr; /* broadcast address for that address */
|
||||
struct sockaddr * dstaddr; /* P2P destination address for that address */
|
||||
};
|
||||
|
||||
typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *,
|
||||
const u_char *);
|
||||
typedef void (* pcap_handler)( u_char *,
|
||||
const struct pcap_pkthdr *,
|
||||
const u_char * );
|
||||
|
||||
/*
|
||||
* Error codes for the pcap API.
|
||||
|
|
@ -250,158 +260,222 @@ typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *,
|
|||
* failure of a call that returns these codes by checking for a
|
||||
* negative value.
|
||||
*/
|
||||
#define PCAP_ERROR -1 /* generic error code */
|
||||
#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */
|
||||
#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */
|
||||
#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */
|
||||
#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */
|
||||
#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */
|
||||
#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */
|
||||
#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */
|
||||
#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */
|
||||
#define PCAP_ERROR -1 /* generic error code */
|
||||
#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */
|
||||
#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */
|
||||
#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */
|
||||
#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */
|
||||
#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */
|
||||
#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */
|
||||
#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */
|
||||
#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */
|
||||
|
||||
/*
|
||||
* Warning codes for the pcap API.
|
||||
* These will all be positive and non-zero, so they won't look like
|
||||
* errors.
|
||||
*/
|
||||
#define PCAP_WARNING 1 /* generic warning code */
|
||||
#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */
|
||||
#define PCAP_WARNING 1 /* generic warning code */
|
||||
#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */
|
||||
|
||||
char *pcap_lookupdev(char *);
|
||||
int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *);
|
||||
char * pcap_lookupdev( char * );
|
||||
int pcap_lookupnet( const char *,
|
||||
bpf_u_int32 *,
|
||||
bpf_u_int32 *,
|
||||
char * );
|
||||
|
||||
pcap_t *pcap_create(const char *, char *);
|
||||
int pcap_set_snaplen(pcap_t *, int);
|
||||
int pcap_set_promisc(pcap_t *, int);
|
||||
int pcap_can_set_rfmon(pcap_t *);
|
||||
int pcap_set_rfmon(pcap_t *, int);
|
||||
int pcap_set_timeout(pcap_t *, int);
|
||||
int pcap_set_buffer_size(pcap_t *, int);
|
||||
int pcap_activate(pcap_t *);
|
||||
pcap_t * pcap_create( const char *,
|
||||
char * );
|
||||
int pcap_set_snaplen( pcap_t *,
|
||||
int );
|
||||
int pcap_set_promisc( pcap_t *,
|
||||
int );
|
||||
int pcap_can_set_rfmon( pcap_t * );
|
||||
int pcap_set_rfmon( pcap_t *,
|
||||
int );
|
||||
int pcap_set_timeout( pcap_t *,
|
||||
int );
|
||||
int pcap_set_buffer_size( pcap_t *,
|
||||
int );
|
||||
int pcap_activate( pcap_t * );
|
||||
|
||||
pcap_t *pcap_open_live(const char *, int, int, int, char *);
|
||||
pcap_t *pcap_open_dead(int, int);
|
||||
pcap_t *pcap_open_offline(const char *, char *);
|
||||
#if defined(WIN32)
|
||||
pcap_t *pcap_hopen_offline(intptr_t, char *);
|
||||
#if !defined(LIBPCAP_EXPORTS)
|
||||
#define pcap_fopen_offline(f,b) \
|
||||
pcap_hopen_offline(_get_osfhandle(_fileno(f)), b)
|
||||
#else /*LIBPCAP_EXPORTS*/
|
||||
static pcap_t *pcap_fopen_offline(FILE *, char *);
|
||||
#endif
|
||||
#else /*WIN32*/
|
||||
pcap_t *pcap_fopen_offline(FILE *, char *);
|
||||
#endif /*WIN32*/
|
||||
pcap_t * pcap_open_live( const char *,
|
||||
int,
|
||||
int,
|
||||
int,
|
||||
char * );
|
||||
pcap_t * pcap_open_dead( int,
|
||||
int );
|
||||
pcap_t * pcap_open_offline( const char *,
|
||||
char * );
|
||||
#if defined( WIN32 )
|
||||
pcap_t * pcap_hopen_offline( intptr_t,
|
||||
char * );
|
||||
#if !defined( LIBPCAP_EXPORTS )
|
||||
#define pcap_fopen_offline( f, b ) \
|
||||
pcap_hopen_offline( _get_osfhandle( _fileno( f ) ), b )
|
||||
#else /*LIBPCAP_EXPORTS*/
|
||||
static pcap_t * pcap_fopen_offline( FILE *,
|
||||
char * );
|
||||
#endif
|
||||
#else /*WIN32*/
|
||||
pcap_t * pcap_fopen_offline( FILE *,
|
||||
char * );
|
||||
#endif /*WIN32*/
|
||||
|
||||
void pcap_close(pcap_t *);
|
||||
int pcap_loop(pcap_t *, int, pcap_handler, u_char *);
|
||||
int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
|
||||
const u_char*
|
||||
pcap_next(pcap_t *, struct pcap_pkthdr *);
|
||||
int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
|
||||
void pcap_breakloop(pcap_t *);
|
||||
int pcap_stats(pcap_t *, struct pcap_stat *);
|
||||
int pcap_setfilter(pcap_t *, struct bpf_program *);
|
||||
int pcap_setdirection(pcap_t *, pcap_direction_t);
|
||||
int pcap_getnonblock(pcap_t *, char *);
|
||||
int pcap_setnonblock(pcap_t *, int, char *);
|
||||
int pcap_inject(pcap_t *, const void *, size_t);
|
||||
int pcap_sendpacket(pcap_t *, const u_char *, int);
|
||||
const char *pcap_statustostr(int);
|
||||
const char *pcap_strerror(int);
|
||||
char *pcap_geterr(pcap_t *);
|
||||
void pcap_perror(pcap_t *, char *);
|
||||
int pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
|
||||
bpf_u_int32);
|
||||
int pcap_compile_nopcap(int, int, struct bpf_program *,
|
||||
const char *, int, bpf_u_int32);
|
||||
void pcap_freecode(struct bpf_program *);
|
||||
int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *,
|
||||
const u_char *);
|
||||
int pcap_datalink(pcap_t *);
|
||||
int pcap_datalink_ext(pcap_t *);
|
||||
int pcap_list_datalinks(pcap_t *, int **);
|
||||
int pcap_set_datalink(pcap_t *, int);
|
||||
void pcap_free_datalinks(int *);
|
||||
int pcap_datalink_name_to_val(const char *);
|
||||
const char *pcap_datalink_val_to_name(int);
|
||||
const char *pcap_datalink_val_to_description(int);
|
||||
int pcap_snapshot(pcap_t *);
|
||||
int pcap_is_swapped(pcap_t *);
|
||||
int pcap_major_version(pcap_t *);
|
||||
int pcap_minor_version(pcap_t *);
|
||||
void pcap_close( pcap_t * );
|
||||
int pcap_loop( pcap_t *,
|
||||
int,
|
||||
pcap_handler,
|
||||
u_char * );
|
||||
int pcap_dispatch( pcap_t *,
|
||||
int,
|
||||
pcap_handler,
|
||||
u_char * );
|
||||
const u_char * pcap_next( pcap_t *,
|
||||
struct pcap_pkthdr * );
|
||||
int pcap_next_ex( pcap_t *,
|
||||
struct pcap_pkthdr **,
|
||||
const u_char ** );
|
||||
void pcap_breakloop( pcap_t * );
|
||||
int pcap_stats( pcap_t *,
|
||||
struct pcap_stat * );
|
||||
int pcap_setfilter( pcap_t *,
|
||||
struct bpf_program * );
|
||||
int pcap_setdirection( pcap_t *,
|
||||
pcap_direction_t );
|
||||
int pcap_getnonblock( pcap_t *,
|
||||
char * );
|
||||
int pcap_setnonblock( pcap_t *,
|
||||
int,
|
||||
char * );
|
||||
int pcap_inject( pcap_t *,
|
||||
const void *,
|
||||
size_t );
|
||||
int pcap_sendpacket( pcap_t *,
|
||||
const u_char *,
|
||||
int );
|
||||
const char * pcap_statustostr( int );
|
||||
const char * pcap_strerror( int );
|
||||
char * pcap_geterr( pcap_t * );
|
||||
void pcap_perror( pcap_t *,
|
||||
char * );
|
||||
int pcap_compile( pcap_t *,
|
||||
struct bpf_program *,
|
||||
const char *,
|
||||
int,
|
||||
bpf_u_int32 );
|
||||
int pcap_compile_nopcap( int,
|
||||
int,
|
||||
struct bpf_program *,
|
||||
const char *,
|
||||
int,
|
||||
bpf_u_int32 );
|
||||
void pcap_freecode( struct bpf_program * );
|
||||
int pcap_offline_filter( struct bpf_program *,
|
||||
const struct pcap_pkthdr *,
|
||||
const u_char * );
|
||||
int pcap_datalink( pcap_t * );
|
||||
int pcap_datalink_ext( pcap_t * );
|
||||
int pcap_list_datalinks( pcap_t *,
|
||||
int ** );
|
||||
int pcap_set_datalink( pcap_t *,
|
||||
int );
|
||||
void pcap_free_datalinks( int * );
|
||||
int pcap_datalink_name_to_val( const char * );
|
||||
const char * pcap_datalink_val_to_name( int );
|
||||
const char * pcap_datalink_val_to_description( int );
|
||||
int pcap_snapshot( pcap_t * );
|
||||
int pcap_is_swapped( pcap_t * );
|
||||
int pcap_major_version( pcap_t * );
|
||||
int pcap_minor_version( pcap_t * );
|
||||
|
||||
/* XXX */
|
||||
FILE *pcap_file(pcap_t *);
|
||||
int pcap_fileno(pcap_t *);
|
||||
FILE * pcap_file( pcap_t * );
|
||||
int pcap_fileno( pcap_t * );
|
||||
|
||||
pcap_dumper_t *pcap_dump_open(pcap_t *, const char *);
|
||||
pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp);
|
||||
FILE *pcap_dump_file(pcap_dumper_t *);
|
||||
long pcap_dump_ftell(pcap_dumper_t *);
|
||||
int pcap_dump_flush(pcap_dumper_t *);
|
||||
void pcap_dump_close(pcap_dumper_t *);
|
||||
void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *);
|
||||
pcap_dumper_t * pcap_dump_open( pcap_t *,
|
||||
const char * );
|
||||
pcap_dumper_t * pcap_dump_fopen( pcap_t *,
|
||||
FILE * fp );
|
||||
FILE * pcap_dump_file( pcap_dumper_t * );
|
||||
long pcap_dump_ftell( pcap_dumper_t * );
|
||||
int pcap_dump_flush( pcap_dumper_t * );
|
||||
void pcap_dump_close( pcap_dumper_t * );
|
||||
void pcap_dump( u_char *,
|
||||
const struct pcap_pkthdr *,
|
||||
const u_char * );
|
||||
|
||||
int pcap_findalldevs(pcap_if_t **, char *);
|
||||
void pcap_freealldevs(pcap_if_t *);
|
||||
int pcap_findalldevs( pcap_if_t **,
|
||||
char * );
|
||||
void pcap_freealldevs( pcap_if_t * );
|
||||
|
||||
const char *pcap_lib_version(void);
|
||||
const char * pcap_lib_version( void );
|
||||
|
||||
/* XXX this guy lives in the bpf tree */
|
||||
u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
|
||||
int bpf_validate(const struct bpf_insn *f, int len);
|
||||
char *bpf_image(const struct bpf_insn *, int);
|
||||
void bpf_dump(const struct bpf_program *, int);
|
||||
u_int bpf_filter( const struct bpf_insn *,
|
||||
const u_char *,
|
||||
u_int,
|
||||
u_int );
|
||||
int bpf_validate( const struct bpf_insn * f,
|
||||
int len );
|
||||
char * bpf_image( const struct bpf_insn *,
|
||||
int );
|
||||
void bpf_dump( const struct bpf_program *,
|
||||
int );
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined( WIN32 )
|
||||
|
||||
/*
|
||||
* Win32 definitions
|
||||
*/
|
||||
|
||||
int pcap_setbuff(pcap_t *p, int dim);
|
||||
int pcap_setmode(pcap_t *p, int mode);
|
||||
int pcap_setmintocopy(pcap_t *p, int size);
|
||||
int pcap_setbuff( pcap_t * p,
|
||||
int dim );
|
||||
int pcap_setmode( pcap_t * p,
|
||||
int mode );
|
||||
int pcap_setmintocopy( pcap_t * p,
|
||||
int size );
|
||||
|
||||
#ifdef WPCAP
|
||||
#ifdef WPCAP
|
||||
/* Include file with the wpcap-specific extensions */
|
||||
#include <Win32-Extensions.h>
|
||||
#endif /* WPCAP */
|
||||
#include <Win32-Extensions.h>
|
||||
#endif /* WPCAP */
|
||||
|
||||
#define MODE_CAPT 0
|
||||
#define MODE_STAT 1
|
||||
#define MODE_MON 2
|
||||
#define MODE_CAPT 0
|
||||
#define MODE_STAT 1
|
||||
#define MODE_MON 2
|
||||
|
||||
#elif defined(MSDOS)
|
||||
#elif defined( MSDOS )
|
||||
|
||||
/*
|
||||
* MS-DOS definitions
|
||||
*/
|
||||
|
||||
int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *);
|
||||
void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait);
|
||||
u_long pcap_mac_packets (void);
|
||||
int pcap_stats_ex( pcap_t *,
|
||||
struct pcap_stat_ex * );
|
||||
void pcap_set_wait( pcap_t * p,
|
||||
void ( * yield )( void ),
|
||||
int wait );
|
||||
u_long pcap_mac_packets( void );
|
||||
|
||||
#else /* UN*X */
|
||||
#else /* UN*X */
|
||||
|
||||
/*
|
||||
* UN*X definitions
|
||||
*/
|
||||
|
||||
int pcap_get_selectable_fd(pcap_t *);
|
||||
int pcap_get_selectable_fd( pcap_t * );
|
||||
|
||||
#endif /* WIN32/MSDOS/UN*X */
|
||||
#endif /* WIN32/MSDOS/UN*X */
|
||||
|
||||
#ifdef HAVE_REMOTE
|
||||
#ifdef HAVE_REMOTE
|
||||
/* Includes most of the public stuff that is needed for the remote capture */
|
||||
#include <remote-ext.h>
|
||||
#endif /* HAVE_REMOTE */
|
||||
#include <remote-ext.h>
|
||||
#endif /* HAVE_REMOTE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* ifndef lib_pcap_pcap_h */
|
||||
|
|
|
|||
|
|
@ -79,15 +79,16 @@
|
|||
/*
|
||||
* A DLT_LINUX_SLL fake link-layer header.
|
||||
*/
|
||||
#define SLL_HDR_LEN 16 /* total header length */
|
||||
#define SLL_ADDRLEN 8 /* length of address field */
|
||||
#define SLL_HDR_LEN 16 /* total header length */
|
||||
#define SLL_ADDRLEN 8 /* length of address field */
|
||||
|
||||
struct sll_header {
|
||||
u_int16_t sll_pkttype; /* packet type */
|
||||
u_int16_t sll_hatype; /* link-layer address type */
|
||||
u_int16_t sll_halen; /* link-layer address length */
|
||||
u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
|
||||
u_int16_t sll_protocol; /* protocol */
|
||||
struct sll_header
|
||||
{
|
||||
u_int16_t sll_pkttype; /* packet type */
|
||||
u_int16_t sll_hatype; /* link-layer address type */
|
||||
u_int16_t sll_halen; /* link-layer address length */
|
||||
u_int8_t sll_addr[ SLL_ADDRLEN ]; /* link-layer address */
|
||||
u_int16_t sll_protocol; /* protocol */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -96,11 +97,11 @@ struct sll_header {
|
|||
* available even on systems other than Linux, and so that they
|
||||
* don't change even if the PACKET_ values change.
|
||||
*/
|
||||
#define LINUX_SLL_HOST 0
|
||||
#define LINUX_SLL_BROADCAST 1
|
||||
#define LINUX_SLL_MULTICAST 2
|
||||
#define LINUX_SLL_OTHERHOST 3
|
||||
#define LINUX_SLL_OUTGOING 4
|
||||
#define LINUX_SLL_HOST 0
|
||||
#define LINUX_SLL_BROADCAST 1
|
||||
#define LINUX_SLL_MULTICAST 2
|
||||
#define LINUX_SLL_OTHERHOST 3
|
||||
#define LINUX_SLL_OUTGOING 4
|
||||
|
||||
/*
|
||||
* The LINUX_SLL_ values for "sll_protocol"; these correspond to the
|
||||
|
|
@ -123,7 +124,7 @@ struct sll_header {
|
|||
* in the Linux "if_ether.h" will, I suspect, actually show up in
|
||||
* captures.)
|
||||
*/
|
||||
#define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */
|
||||
#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */
|
||||
#define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */
|
||||
#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */
|
||||
|
||||
#endif
|
||||
#endif /* ifndef lib_pcap_sll_h */
|
||||
|
|
|
|||
|
|
@ -32,36 +32,37 @@
|
|||
*
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PCAP_USB_STRUCTS_H__
|
||||
#define _PCAP_USB_STRUCTS_H__
|
||||
|
||||
/*
|
||||
/*
|
||||
* possible transfer mode
|
||||
*/
|
||||
#define URB_TRANSFER_IN 0x80
|
||||
#define URB_ISOCHRONOUS 0x0
|
||||
#define URB_INTERRUPT 0x1
|
||||
#define URB_CONTROL 0x2
|
||||
#define URB_BULK 0x3
|
||||
#define URB_TRANSFER_IN 0x80
|
||||
#define URB_ISOCHRONOUS 0x0
|
||||
#define URB_INTERRUPT 0x1
|
||||
#define URB_CONTROL 0x2
|
||||
#define URB_BULK 0x3
|
||||
|
||||
/*
|
||||
* possible event type
|
||||
*/
|
||||
#define URB_SUBMIT 'S'
|
||||
#define URB_COMPLETE 'C'
|
||||
#define URB_ERROR 'E'
|
||||
#define URB_SUBMIT 'S'
|
||||
#define URB_COMPLETE 'C'
|
||||
#define URB_ERROR 'E'
|
||||
|
||||
/*
|
||||
* USB setup header as defined in USB specification.
|
||||
* Appears at the front of each packet in DLT_USB captures.
|
||||
*/
|
||||
typedef struct _usb_setup {
|
||||
u_int8_t bmRequestType;
|
||||
u_int8_t bRequest;
|
||||
u_int16_t wValue;
|
||||
u_int16_t wIndex;
|
||||
u_int16_t wLength;
|
||||
typedef struct _usb_setup
|
||||
{
|
||||
u_int8_t bmRequestType;
|
||||
u_int8_t bRequest;
|
||||
u_int16_t wValue;
|
||||
u_int16_t wIndex;
|
||||
u_int16_t wLength;
|
||||
} pcap_usb_setup;
|
||||
|
||||
|
||||
|
|
@ -69,22 +70,23 @@ typedef struct _usb_setup {
|
|||
* Header prepended by linux kernel to each event.
|
||||
* Appears at the front of each packet in DLT_USB_LINUX captures.
|
||||
*/
|
||||
typedef struct _usb_header {
|
||||
u_int64_t id;
|
||||
u_int8_t event_type;
|
||||
u_int8_t transfer_type;
|
||||
u_int8_t endpoint_number;
|
||||
u_int8_t device_address;
|
||||
u_int16_t bus_id;
|
||||
char setup_flag;/*if !=0 the urb setup header is not present*/
|
||||
char data_flag; /*if !=0 no urb data is present*/
|
||||
int64_t ts_sec;
|
||||
int32_t ts_usec;
|
||||
int32_t status;
|
||||
u_int32_t urb_len;
|
||||
u_int32_t data_len; /* amount of urb data really present in this event*/
|
||||
pcap_usb_setup setup;
|
||||
typedef struct _usb_header
|
||||
{
|
||||
u_int64_t id;
|
||||
u_int8_t event_type;
|
||||
u_int8_t transfer_type;
|
||||
u_int8_t endpoint_number;
|
||||
u_int8_t device_address;
|
||||
u_int16_t bus_id;
|
||||
char setup_flag; /*if !=0 the urb setup header is not present*/
|
||||
char data_flag; /*if !=0 no urb data is present*/
|
||||
int64_t ts_sec;
|
||||
int32_t ts_usec;
|
||||
int32_t status;
|
||||
u_int32_t urb_len;
|
||||
u_int32_t data_len; /* amount of urb data really present in this event*/
|
||||
pcap_usb_setup setup;
|
||||
} pcap_usb_header;
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* ifndef _PCAP_USB_STRUCTS_H__ */
|
||||
|
|
|
|||
|
|
@ -36,11 +36,12 @@
|
|||
#ifndef lib_pcap_vlan_h
|
||||
#define lib_pcap_vlan_h
|
||||
|
||||
struct vlan_tag {
|
||||
u_int16_t vlan_tpid; /* ETH_P_8021Q */
|
||||
u_int16_t vlan_tci; /* VLAN TCI */
|
||||
struct vlan_tag
|
||||
{
|
||||
u_int16_t vlan_tpid; /* ETH_P_8021Q */
|
||||
u_int16_t vlan_tci; /* VLAN TCI */
|
||||
};
|
||||
|
||||
#define VLAN_TAG_LEN 4
|
||||
#define VLAN_TAG_LEN 4
|
||||
|
||||
#endif
|
||||
#endif /* ifndef lib_pcap_vlan_h */
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* 3. Neither the name of the Politecnico di Torino nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!
|
||||
|
|
@ -204,7 +204,7 @@
|
|||
#define PCAP_OPENFLAG_PROMISCUOUS 1
|
||||
|
||||
/*!
|
||||
* \brief Defines if the data trasfer (in case of a remote
|
||||
* \brief Defines if the data transfer (in case of a remote
|
||||
* capture) has to be done with UDP protocol.
|
||||
*
|
||||
* If it is '1' if you want a UDP data connection, '0' if you want
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
* \brief Defines if the local adapter will capture its own generated traffic.
|
||||
*
|
||||
* This flag tells the underlying capture driver to drop the packets that were sent by itself.
|
||||
* This is usefult when building applications like bridges, that should ignore the traffic
|
||||
* This is useful when building applications like bridges, that should ignore the traffic
|
||||
* they just sent.
|
||||
*/
|
||||
#define PCAP_OPENFLAG_NOCAPTURE_LOCAL 8
|
||||
|
|
@ -324,7 +324,7 @@
|
|||
|
||||
/*!
|
||||
*
|
||||
* \brief This structure keeps the information needed to autheticate
|
||||
* \brief This structure keeps the information needed to authenticate
|
||||
* the user on a remote machine.
|
||||
*
|
||||
* The remote machine can either grant or refuse the access according
|
||||
|
|
@ -397,7 +397,7 @@
|
|||
|
||||
|
||||
|
||||
/*! Maximum lenght of an host name (needed for the RPCAP active mode) */
|
||||
/*! Maximum length of an host name (needed for the RPCAP active mode) */
|
||||
#define RPCAP_HOSTLIST_SIZE 1024
|
||||
|
||||
|
||||
|
|
@ -465,7 +465,7 @@
|
|||
/* End of remote capture functions */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue