Skip to content

Commit 9fdfbf3

Browse files
committed
Sync FreeRTOS-Labs -CLI -TCP -Trace with the version in FreeRTOS-Plus.
Projects under FreeRTOS-Labs directory are in beta, developers updating projects please make sure you are using the correct version of -CLI -TCP -Trace. If you must edit -CLI -TCP and -Trace, please ensure the copies are synced.
1 parent ec6f3d7 commit 9fdfbf3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4102
-4388
lines changed

FreeRTOS-Labs/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,28 @@
11
/*
2-
* FreeRTOS+CLI V1.0.3 (C) 2014 Real Time Engineers ltd. All rights reserved.
2+
* FreeRTOS+CLI V1.0.4
3+
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
34
*
4-
* This file is part of the FreeRTOS+CLI distribution. The FreeRTOS+CLI license
5-
* terms are different to the FreeRTOS license terms.
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
611
*
7-
* FreeRTOS+CLI uses a dual license model that allows the software to be used
8-
* under a standard GPL open source license, or a commercial license. The
9-
* standard GPL license (unlike the modified GPL license under which FreeRTOS
10-
* itself is distributed) requires that all software statically linked with
11-
* FreeRTOS+CLI is also distributed under the same GPL V2 license terms.
12-
* Details of both license options follow:
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software.
1314
*
14-
* - Open source licensing -
15-
* FreeRTOS+CLI is a free download and may be used, modified, evaluated and
16-
* distributed without charge provided the user adheres to version two of the
17-
* GNU General Public License (GPL) and does not remove the copyright notice or
18-
* this text. The GPL V2 text is available on the gnu.org web site, and on the
19-
* following URL: http://www.FreeRTOS.org/gpl-2.0.txt.
20-
*
21-
* - Commercial licensing -
22-
* Businesses and individuals that for commercial or other reasons cannot comply
23-
* with the terms of the GPL V2 license must obtain a low cost commercial
24-
* license before incorporating FreeRTOS+CLI into proprietary software for
25-
* distribution in any form. Commercial licenses can be purchased from
26-
* http://shop.freertos.org/cli and do not require any source files to be
27-
* changed.
28-
*
29-
* FreeRTOS+CLI is distributed in the hope that it will be useful. You cannot
30-
* use FreeRTOS+CLI unless you agree that you use the software 'as is'.
31-
* FreeRTOS+CLI is provided WITHOUT ANY WARRANTY; without even the implied
32-
* warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
33-
* PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they
34-
* implied, expressed, or statutory.
35-
*
36-
* 1 tab == 4 spaces!
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3721
*
3822
* http://www.FreeRTOS.org
39-
* http://www.FreeRTOS.org/FreeRTOS-Plus
23+
* http://aws.amazon.com/freertos
4024
*
25+
* 1 tab == 4 spaces!
4126
*/
4227

4328
/* Standard includes. */
@@ -51,6 +36,16 @@
5136
/* Utils includes. */
5237
#include "FreeRTOS_CLI.h"
5338

39+
/* If the application writer needs to place the buffer used by the CLI at a
40+
fixed address then set configAPPLICATION_PROVIDES_cOutputBuffer to 1 in
41+
FreeRTOSConfig.h, then declare an array with the following name and size in
42+
one of the application files:
43+
char cOutputBuffer[ configCOMMAND_INT_MAX_OUTPUT_SIZE ];
44+
*/
45+
#ifndef configAPPLICATION_PROVIDES_cOutputBuffer
46+
#define configAPPLICATION_PROVIDES_cOutputBuffer 0
47+
#endif
48+
5449
typedef struct xCOMMAND_INPUT_LIST
5550
{
5651
const CLI_Command_Definition_t *pxCommandLineDefinition;
@@ -93,8 +88,17 @@ command interpreter by UART and by Ethernet. Sharing a buffer is done purely
9388
to save RAM. Note, however, that the command console itself is not re-entrant,
9489
so only one command interpreter interface can be used at any one time. For that
9590
reason, no attempt at providing mutual exclusion to the cOutputBuffer array is
96-
attempted. */
97-
static char cOutputBuffer[ configCOMMAND_INT_MAX_OUTPUT_SIZE ];
91+
attempted.
92+
93+
configAPPLICATION_PROVIDES_cOutputBuffer is provided to allow the application
94+
writer to provide their own cOutputBuffer declaration in cases where the
95+
buffer needs to be placed at a fixed address (rather than by the linker). */
96+
#if( configAPPLICATION_PROVIDES_cOutputBuffer == 0 )
97+
static char cOutputBuffer[ configCOMMAND_INT_MAX_OUTPUT_SIZE ];
98+
#else
99+
extern char cOutputBuffer[ configCOMMAND_INT_MAX_OUTPUT_SIZE ];
100+
#endif
101+
98102

99103
/*-----------------------------------------------------------*/
100104

FreeRTOS-Labs/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.h

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,28 @@
11
/*
2-
* FreeRTOS+CLI V1.0.3 (C) 2014 Real Time Engineers ltd. All rights reserved.
2+
* FreeRTOS+CLI V1.0.4
3+
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
34
*
4-
* This file is part of the FreeRTOS+CLI distribution. The FreeRTOS+CLI license
5-
* terms are different to the FreeRTOS license terms.
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
611
*
7-
* FreeRTOS+CLI uses a dual license model that allows the software to be used
8-
* under a standard GPL open source license, or a commercial license. The
9-
* standard GPL license (unlike the modified GPL license under which FreeRTOS
10-
* itself is distributed) requires that all software statically linked with
11-
* FreeRTOS+CLI is also distributed under the same GPL V2 license terms.
12-
* Details of both license options follow:
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software.
1314
*
14-
* - Open source licensing -
15-
* FreeRTOS+CLI is a free download and may be used, modified, evaluated and
16-
* distributed without charge provided the user adheres to version two of the
17-
* GNU General Public License (GPL) and does not remove the copyright notice or
18-
* this text. The GPL V2 text is available on the gnu.org web site, and on the
19-
* following URL: http://www.FreeRTOS.org/gpl-2.0.txt.
20-
*
21-
* - Commercial licensing -
22-
* Businesses and individuals that for commercial or other reasons cannot comply
23-
* with the terms of the GPL V2 license must obtain a low cost commercial
24-
* license before incorporating FreeRTOS+CLI into proprietary software for
25-
* distribution in any form. Commercial licenses can be purchased from
26-
* http://shop.freertos.org/cli and do not require any source files to be
27-
* changed.
28-
*
29-
* FreeRTOS+CLI is distributed in the hope that it will be useful. You cannot
30-
* use FreeRTOS+CLI unless you agree that you use the software 'as is'.
31-
* FreeRTOS+CLI is provided WITHOUT ANY WARRANTY; without even the implied
32-
* warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
33-
* PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they
34-
* implied, expressed, or statutory.
35-
*
36-
* 1 tab == 4 spaces!
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3721
*
3822
* http://www.FreeRTOS.org
39-
* http://www.FreeRTOS.org/FreeRTOS-Plus
23+
* http://aws.amazon.com/freertos
4024
*
25+
* 1 tab == 4 spaces!
4126
*/
4227

4328
#ifndef COMMAND_INTERPRETER_H

FreeRTOS-Labs/Source/FreeRTOS-Plus-CLI/History.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Changes between V1.0.3 and V1.0.4 released
2+
3+
+ Update to use stdint and the FreeRTOS specific typedefs that were
4+
introduced in FreeRTOS V8.0.0.
5+
16
Changes between V1.0.2 and V1.0.3 released
27

38
+ Previously, and in line with good software engineering practice, the
Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
Note the FreeRTOS+CLI license terms are different to the FreeRTOS license terms.
1+
FreeRTOS+CLI is released under the following MIT license.
22

3-
FreeRTOS+CLI is dual licensed. The files are provided here under an unmodified
4-
open source GNU GPL license. Commercial licenses are also available, and are
5-
provided free for some hardware platforms. See http://www.FreeRTOS.org/cli
3+
Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of
5+
this software and associated documentation files (the "Software"), to deal in
6+
the Software without restriction, including without limitation the rights to
7+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8+
the Software, and to permit persons to whom the Software is furnished to do so,
9+
subject to the following conditions:
610

11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
713

14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FreeRTOS-Labs/Source/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* FreeRTOS+TCP 191100 experimental
3-
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* FreeRTOS+TCP V2.2.0
3+
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of
66
* this software and associated documentation files (the "Software"), to deal in
@@ -580,15 +580,37 @@ NetworkBufferDescriptor_t *pxNetworkBuffer;
580580
}
581581
}
582582
#endif
583+
if( xIsCallingFromIPTask() != 0 )
584+
{
585+
/* Only the IP-task is allowed to call this function directly. */
586+
xNetworkInterfaceOutput( pxNetworkBuffer, pdTRUE );
587+
}
588+
else
589+
{
590+
IPStackEvent_t xSendEvent;
583591

584-
xNetworkInterfaceOutput( pxNetworkBuffer, pdTRUE );
592+
/* Send a message to the IP-task to send this ARP packet. */
593+
xSendEvent.eEventType = eNetworkTxEvent;
594+
xSendEvent.pvData = ( void * ) pxNetworkBuffer;
595+
if( xSendEventStructToIPTask( &xSendEvent, ( TickType_t ) portMAX_DELAY ) == pdFAIL )
596+
{
597+
/* Failed to send the message, so release the network buffer. */
598+
vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer );
599+
}
600+
}
585601
}
586602
}
587603

588604
void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer )
589605
{
590606
ARPPacket_t *pxARPPacket;
591607

608+
/* Buffer allocation ensures that buffers always have space
609+
for an ARP packet. See buffer allocation implementations 1
610+
and 2 under portable/BufferManagement. */
611+
configASSERT( pxNetworkBuffer );
612+
configASSERT( pxNetworkBuffer->xDataLength >= sizeof(ARPPacket_t) );
613+
592614
pxARPPacket = ( ARPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer;
593615

594616
/* memcpy the const part of the header information into the correct

FreeRTOS-Labs/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* FreeRTOS+TCP 191100 experimental
3-
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* FreeRTOS+TCP V2.2.0
3+
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of
66
* this software and associated documentation files (the "Software"), to deal in
@@ -84,9 +84,9 @@
8484

8585
/* Offsets into the transmitted DHCP options fields at which various parameters
8686
are located. */
87-
#define dhcpCLIENT_IDENTIFIER_OFFSET ( 5 )
88-
#define dhcpREQUESTED_IP_ADDRESS_OFFSET ( 13 )
89-
#define dhcpDHCP_SERVER_IP_ADDRESS_OFFSET ( 19 )
87+
#define dhcpCLIENT_IDENTIFIER_OFFSET ( 6 )
88+
#define dhcpREQUESTED_IP_ADDRESS_OFFSET ( 14 )
89+
#define dhcpDHCP_SERVER_IP_ADDRESS_OFFSET ( 20 )
9090

9191
/* Values used in the DHCP packets. */
9292
#define dhcpREQUEST_OPCODE ( 1 )
@@ -354,9 +354,7 @@ BaseType_t xGivingUp = pdFALSE;
354354

355355
if( xDHCPData.xDHCPTxPeriod <= ipconfigMAXIMUM_DISCOVER_TX_PERIOD )
356356
{
357-
xDHCPData.ulTransactionId = ipconfigRAND32( );
358-
359-
if( 0 != xDHCPData.ulTransactionId )
357+
if( xApplicationGetRandomNumber( &( xDHCPData.ulTransactionId ) ) != pdFALSE )
360358
{
361359
xDHCPData.xDHCPTxTime = xTaskGetTickCount( );
362360
xDHCPData.xUseBroadcast = !xDHCPData.xUseBroadcast;
@@ -589,10 +587,9 @@ static void prvInitialiseDHCP( void )
589587
/* Initialise the parameters that will be set by the DHCP process. Per
590588
https://www.ietf.org/rfc/rfc2131.txt, Transaction ID should be a random
591589
value chosen by the client. */
592-
xDHCPData.ulTransactionId = ipconfigRAND32();
593590

594591
/* Check for random number generator API failure. */
595-
if( 0 != xDHCPData.ulTransactionId )
592+
if( xApplicationGetRandomNumber( &( xDHCPData.ulTransactionId ) ) != pdFALSE )
596593
{
597594
xDHCPData.xUseBroadcast = 0;
598595
xDHCPData.ulOfferedIPAddress = 0UL;
@@ -604,6 +601,10 @@ static void prvInitialiseDHCP( void )
604601
FreeRTOS_debug_printf( ( "prvInitialiseDHCP: start after %lu ticks\n", dhcpINITIAL_TIMER_PERIOD ) );
605602
vIPReloadDHCPTimer( dhcpINITIAL_TIMER_PERIOD );
606603
}
604+
else
605+
{
606+
/* There was a problem with the randomiser. */
607+
}
607608
}
608609
/*-----------------------------------------------------------*/
609610

@@ -642,8 +643,8 @@ const uint32_t ulMandatoryOptions = 2ul; /* DHCP server address, and the correct
642643
/* Walk through the options until the dhcpOPTION_END_BYTE byte
643644
is found, taking care not to walk off the end of the options. */
644645
pucByte = &( pxDHCPMessage->ucFirstOptionByte );
645-
/* Maintain a pointer to the last valid byte (i.e. not the first
646-
invalid byte). */
646+
/* Maintain a pointer to the last valid byte (i.e. not the first
647+
invalid byte). */
647648
pucLastByte = pucUDPPayload + lBytes - 1;
648649

649650
while( pucByte <= pucLastByte )
@@ -665,7 +666,7 @@ const uint32_t ulMandatoryOptions = 2ul; /* DHCP server address, and the correct
665666
/* Stop if the response is malformed. */
666667
if( pucByte < pucLastByte )
667668
{
668-
/* There are at least two bytes left. */
669+
/* There are at least two bytes left. */
669670
ucLength = pucByte[ 1 ];
670671
pucByte += 2;
671672

@@ -904,7 +905,7 @@ static const uint8_t ucDHCPRequestOptions[] =
904905
dhcpCLIENT_IDENTIFIER_OFFSET, dhcpREQUESTED_IP_ADDRESS_OFFSET and
905906
dhcpDHCP_SERVER_IP_ADDRESS_OFFSET. */
906907
dhcpMESSAGE_TYPE_OPTION_CODE, 1, dhcpMESSAGE_TYPE_REQUEST, /* Message type option. */
907-
dhcpCLIENT_IDENTIFIER_OPTION_CODE, 6, 0, 0, 0, 0, 0, 0, /* Client identifier. */
908+
dhcpCLIENT_IDENTIFIER_OPTION_CODE, 7, 1, 0, 0, 0, 0, 0, 0, /* Client identifier. */
908909
dhcpREQUEST_IP_ADDRESS_OPTION_CODE, 4, 0, 0, 0, 0, /* The IP address being requested. */
909910
dhcpSERVER_IP_ADDRESS_OPTION_CODE, 4, 0, 0, 0, 0, /* The IP address of the DHCP server. */
910911
dhcpOPTION_END_BYTE
@@ -942,7 +943,7 @@ static const uint8_t ucDHCPDiscoverOptions[] =
942943
{
943944
/* Do not change the ordering without also changing dhcpCLIENT_IDENTIFIER_OFFSET. */
944945
dhcpMESSAGE_TYPE_OPTION_CODE, 1, dhcpMESSAGE_TYPE_DISCOVER, /* Message type option. */
945-
dhcpCLIENT_IDENTIFIER_OPTION_CODE, 6, 0, 0, 0, 0, 0, 0, /* Client identifier. */
946+
dhcpCLIENT_IDENTIFIER_OPTION_CODE, 7, 1, 0, 0, 0, 0, 0, 0, /* Client identifier. */
946947
dhcpPARAMETER_REQUEST_OPTION_CODE, 3, dhcpSUBNET_MASK_OPTION_CODE, dhcpGATEWAY_OPTION_CODE, dhcpDNS_SERVER_OPTIONS_CODE, /* Parameter request option. */
947948
dhcpOPTION_END_BYTE
948949
};
@@ -968,13 +969,16 @@ size_t xOptionsLength = sizeof( ucDHCPDiscoverOptions );
968969
static void prvPrepareLinkLayerIPLookUp( void )
969970
{
970971
uint8_t ucLinkLayerIPAddress[ 2 ];
972+
uint32_t ulNumbers[ 2 ];
971973

972974
/* After DHCP has failed to answer, prepare everything to start
973975
trying-out LinkLayer IP-addresses, using the random method. */
974976
xDHCPData.xDHCPTxTime = xTaskGetTickCount();
975977

976-
ucLinkLayerIPAddress[ 0 ] = ( uint8_t )1 + ( uint8_t )( ipconfigRAND32() % 0xFDu ); /* get value 1..254 for IP-address 3rd byte of IP address to try. */
977-
ucLinkLayerIPAddress[ 1 ] = ( uint8_t )1 + ( uint8_t )( ipconfigRAND32() % 0xFDu ); /* get value 1..254 for IP-address 4th byte of IP address to try. */
978+
xApplicationGetRandomNumber( &( ulNumbers[ 0 ] ) );
979+
xApplicationGetRandomNumber( &( ulNumbers[ 1 ] ) );
980+
ucLinkLayerIPAddress[ 0 ] = ( uint8_t )1 + ( uint8_t )( ulNumbers[ 0 ] % 0xFDu ); /* get value 1..254 for IP-address 3rd byte of IP address to try. */
981+
ucLinkLayerIPAddress[ 1 ] = ( uint8_t )1 + ( uint8_t )( ulNumbers[ 1 ] % 0xFDu ); /* get value 1..254 for IP-address 4th byte of IP address to try. */
978982

979983
xNetworkAddressing.ulGatewayAddress = FreeRTOS_htonl( 0xA9FE0203 );
980984

@@ -995,9 +999,15 @@ size_t xOptionsLength = sizeof( ucDHCPDiscoverOptions );
995999
xNetworkAddressing.ulBroadcastAddress = ( xDHCPData.ulOfferedIPAddress & xNetworkAddressing.ulNetMask ) | ~xNetworkAddressing.ulNetMask;
9961000

9971001
/* Close socket to ensure packets don't queue on it. not needed anymore as DHCP failed. but still need timer for ARP testing. */
998-
vSocketClose( xDHCPData.xDHCPSocket );
999-
xDHCPData.xDHCPSocket = NULL;
1000-
xDHCPData.xDHCPTxPeriod = pdMS_TO_TICKS( 3000ul + ( ipconfigRAND32() & 0x3fful ) ); /* do ARP test every (3 + 0-1024mS) seconds. */
1002+
if( xDHCPData.xDHCPSocket != NULL )
1003+
{
1004+
/* Close socket to ensure packets don't queue on it. */
1005+
vSocketClose( xDHCPData.xDHCPSocket );
1006+
xDHCPData.xDHCPSocket = NULL;
1007+
}
1008+
1009+
xApplicationGetRandomNumber( &( ulNumbers[ 0 ] ) );
1010+
xDHCPData.xDHCPTxPeriod = pdMS_TO_TICKS( 3000ul + ( ulNumbers[ 0 ] & 0x3ffuL ) ); /* do ARP test every (3 + 0-1024mS) seconds. */
10011011

10021012
xARPHadIPClash = pdFALSE; /* reset flag that shows if have ARP clash. */
10031013
vARPSendGratuitous();

0 commit comments

Comments
 (0)