mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Fixes to FreeRTOS+UDP trace macro parameters and placements.
This commit is contained in:
parent
888733ef79
commit
e4f495012f
|
@ -70,7 +70,7 @@ port number. */
|
||||||
|
|
||||||
/* xWaitingPacketSemaphore is not created until the socket is bound, so can be
|
/* xWaitingPacketSemaphore is not created until the socket is bound, so can be
|
||||||
tested to see if bind() has been called. */
|
tested to see if bind() has been called. */
|
||||||
#define socketSOCKET_IS_BOUND( pxSocket ) ( ( uint32_t ) pxSocket->xWaitingPacketSemaphore )
|
#define socketSOCKET_IS_BOUND( pxSocket ) ( ( portBASE_TYPE ) pxSocket->xWaitingPacketSemaphore )
|
||||||
|
|
||||||
/* If FreeRTOS_sendto() is called on a socket that is not bound to a port
|
/* If FreeRTOS_sendto() is called on a socket that is not bound to a port
|
||||||
number then, depending on the FreeRTOSIPConfig.h settings, it might be that a
|
number then, depending on the FreeRTOSIPConfig.h settings, it might be that a
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
* This file is part of the FreeRTOS+UDP distribution. The FreeRTOS+UDP license
|
* This file is part of the FreeRTOS+UDP distribution. The FreeRTOS+UDP license
|
||||||
* terms are different to the FreeRTOS license terms.
|
* terms are different to the FreeRTOS license terms.
|
||||||
*
|
*
|
||||||
* FreeRTOS+UDP uses a dual license model that allows the software to be used
|
* FreeRTOS+UDP uses a dual license model that allows the software to be used
|
||||||
* under a standard GPL open source license, or a commercial license. The
|
* under a standard GPL open source license, or a commercial license. The
|
||||||
* standard GPL license (unlike the modified GPL license under which FreeRTOS
|
* standard GPL license (unlike the modified GPL license under which FreeRTOS
|
||||||
* itself is distributed) requires that all software statically linked with
|
* itself is distributed) requires that all software statically linked with
|
||||||
* FreeRTOS+UDP is also distributed under the same GPL V2 license terms.
|
* FreeRTOS+UDP is also distributed under the same GPL V2 license terms.
|
||||||
* Details of both license options follow:
|
* Details of both license options follow:
|
||||||
*
|
*
|
||||||
* - Open source licensing -
|
* - Open source licensing -
|
||||||
|
@ -21,9 +21,9 @@
|
||||||
*
|
*
|
||||||
* - Commercial licensing -
|
* - Commercial licensing -
|
||||||
* Businesses and individuals that for commercial or other reasons cannot comply
|
* Businesses and individuals that for commercial or other reasons cannot comply
|
||||||
* with the terms of the GPL V2 license must obtain a commercial license before
|
* with the terms of the GPL V2 license must obtain a commercial license before
|
||||||
* incorporating FreeRTOS+UDP into proprietary software for distribution in any
|
* incorporating FreeRTOS+UDP into proprietary software for distribution in any
|
||||||
* form. Commercial licenses can be purchased from http://shop.freertos.org/udp
|
* form. Commercial licenses can be purchased from http://shop.freertos.org/udp
|
||||||
* and do not require any source files to be changed.
|
* and do not require any source files to be changed.
|
||||||
*
|
*
|
||||||
* FreeRTOS+UDP is distributed in the hope that it will be useful. You cannot
|
* FreeRTOS+UDP is distributed in the hope that it will be useful. You cannot
|
||||||
|
@ -582,8 +582,8 @@ static portBASE_TYPE xReturn = pdFALSE;
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
*ipLOCAL_IP_ADDRESS_POINTER = xNetworkAddressing.ulDefaultIPAddress;
|
*ipLOCAL_IP_ADDRESS_POINTER = xNetworkAddressing.ulDefaultIPAddress;
|
||||||
|
|
||||||
/* Ensure the gateway is on the same subnet as the IP
|
/* Ensure the gateway is on the same subnet as the IP
|
||||||
address. */
|
address. */
|
||||||
configASSERT( ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) == ( xNetworkAddressing.ulGatewayAddress & xNetworkAddressing.ulNetMask ) );
|
configASSERT( ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) == ( xNetworkAddressing.ulGatewayAddress & xNetworkAddressing.ulNetMask ) );
|
||||||
}
|
}
|
||||||
|
@ -724,7 +724,7 @@ eIPEvent_t eMessage;
|
||||||
/* This time can be used to send more than one type of message to the IP
|
/* This time can be used to send more than one type of message to the IP
|
||||||
task. The message ID is stored in the ID of the timer. The strange
|
task. The message ID is stored in the ID of the timer. The strange
|
||||||
casting is to avoid compiler warnings. */
|
casting is to avoid compiler warnings. */
|
||||||
eMessage = ( eIPEvent_t ) ( ( int ) pvTimerGetTimerID( xTimer ) );
|
eMessage = ( eIPEvent_t ) ( ( portBASE_TYPE ) pvTimerGetTimerID( xTimer ) );
|
||||||
|
|
||||||
prvSendEventToIPTask( eMessage );
|
prvSendEventToIPTask( eMessage );
|
||||||
}
|
}
|
||||||
|
@ -1298,7 +1298,7 @@ xARPPacket_t *pxARPPacket;
|
||||||
|
|
||||||
pxNetworkBuffer->xDataLength = sizeof( xARPPacket_t );
|
pxNetworkBuffer->xDataLength = sizeof( xARPPacket_t );
|
||||||
|
|
||||||
iptraceCREATING_ARP_REQUEST( ulIPAddress );
|
iptraceCREATING_ARP_REQUEST( pxNetworkBuffer->ulIPAddress );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -1403,7 +1403,7 @@ static void prvProcessNetworkDownEvent( void )
|
||||||
/* Static configuration is being used, so the network is now up. */
|
/* Static configuration is being used, so the network is now up. */
|
||||||
#if ipconfigFREERTOS_PLUS_NABTO == 1
|
#if ipconfigFREERTOS_PLUS_NABTO == 1
|
||||||
{
|
{
|
||||||
/* Return value is used in configASSERT() inside the
|
/* Return value is used in configASSERT() inside the
|
||||||
function. */
|
function. */
|
||||||
( void ) xStartNabtoTask();
|
( void ) xStartNabtoTask();
|
||||||
}
|
}
|
||||||
|
@ -1594,7 +1594,7 @@ uint16_t usLength, usReturn;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* The hardware will check the checksum. Returning 0 allows this
|
/* The hardware will check the checksum. Returning 0 allows this
|
||||||
function to be used to both check an incoming checksum and set an
|
function to be used to both check an incoming checksum and set an
|
||||||
outgoing checksum in this case. */
|
outgoing checksum in this case. */
|
||||||
usReturn = 0;
|
usReturn = 0;
|
||||||
|
@ -1660,11 +1660,11 @@ uint16_t usLength, usReturn;
|
||||||
xICMPHeader_t *pxICMPHeader;
|
xICMPHeader_t *pxICMPHeader;
|
||||||
xIPHeader_t *pxIPHeader;
|
xIPHeader_t *pxIPHeader;
|
||||||
|
|
||||||
iptraceSENDING_PING_REPLY( pxIPHeader->ulSourceIPAddress );
|
|
||||||
|
|
||||||
pxICMPHeader = &( pxICMPPacket->xICMPHeader );
|
pxICMPHeader = &( pxICMPPacket->xICMPHeader );
|
||||||
pxIPHeader = &( pxICMPPacket->xIPHeader );
|
pxIPHeader = &( pxICMPPacket->xIPHeader );
|
||||||
|
|
||||||
|
iptraceSENDING_PING_REPLY( pxIPHeader->ulSourceIPAddress );
|
||||||
|
|
||||||
/* The checksum can be checked here - but a ping reply should be
|
/* The checksum can be checked here - but a ping reply should be
|
||||||
returned even if the checksum is incorrect so the other end can
|
returned even if the checksum is incorrect so the other end can
|
||||||
tell that the ping was received - even if the ping reply contains
|
tell that the ping was received - even if the ping reply contains
|
||||||
|
@ -1763,7 +1763,7 @@ uint16_t us, usDataLength16BitWords, *pusNextData, usReturn;
|
||||||
{
|
{
|
||||||
ulChecksum = ( ulChecksum & 0xffffUL ) + ( ulChecksum >> 16UL );
|
ulChecksum = ( ulChecksum & 0xffffUL ) + ( ulChecksum >> 16UL );
|
||||||
}
|
}
|
||||||
|
|
||||||
usReturn = ~( ( uint16_t ) ulChecksum );
|
usReturn = ~( ( uint16_t ) ulChecksum );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -107,10 +107,10 @@ struct freertos_sockaddr
|
||||||
#if ipconfigBYTE_ORDER == FREERTOS_LITTLE_ENDIAN
|
#if ipconfigBYTE_ORDER == FREERTOS_LITTLE_ENDIAN
|
||||||
|
|
||||||
#define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 ) \
|
#define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 ) \
|
||||||
( ( ( uint32_t ) ( ucOctet3 ) ) << 24UL ) | \
|
( ( ( ( uint32_t ) ( ucOctet3 ) ) << 24UL ) | \
|
||||||
( ( ( uint32_t ) ( ucOctet2 ) ) << 16UL ) | \
|
( ( ( uint32_t ) ( ucOctet2 ) ) << 16UL ) | \
|
||||||
( ( ( uint32_t ) ( ucOctet1 ) ) << 8UL ) | \
|
( ( ( uint32_t ) ( ucOctet1 ) ) << 8UL ) | \
|
||||||
( ( uint32_t ) ( ucOctet0 ) )
|
( ( uint32_t ) ( ucOctet0 ) ) )
|
||||||
|
|
||||||
#define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer ) \
|
#define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer ) \
|
||||||
sprintf( ( char * ) ( pucBuffer ), "%d.%d.%d.%d", \
|
sprintf( ( char * ) ( pucBuffer ), "%d.%d.%d.%d", \
|
||||||
|
@ -122,17 +122,17 @@ struct freertos_sockaddr
|
||||||
#else /* ipconfigBYTE_ORDER */
|
#else /* ipconfigBYTE_ORDER */
|
||||||
|
|
||||||
#define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 ) \
|
#define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 ) \
|
||||||
( ( ( uint32_t ) ( ucOctet0 ) ) << 24UL ) | \
|
( ( ( ( uint32_t ) ( ucOctet0 ) ) << 24UL ) | \
|
||||||
( ( ( uint32_t ) ( ucOctet1 ) ) << 16UL ) | \
|
( ( ( uint32_t ) ( ucOctet1 ) ) << 16UL ) | \
|
||||||
( ( ( uint32_t ) ( ucOctet2 ) ) << 8UL ) | \
|
( ( ( uint32_t ) ( ucOctet2 ) ) << 8UL ) | \
|
||||||
( ( uint32_t ) ( ucOctet3 ) )
|
( ( uint32_t ) ( ucOctet3 ) ) )
|
||||||
|
|
||||||
#define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer ) \
|
#define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer ) \
|
||||||
sprintf( ( char * ) ( pucBuffer ), "%d.%d.%d.%d", \
|
sprintf( ( char * ) ( pucBuffer ), "%d.%d.%d.%d", \
|
||||||
( ( ( ulIPAddress ) >> 24UL ) & 0xffUL ) ), \
|
( ( ( ulIPAddress ) >> 24UL ) & 0xffUL ), \
|
||||||
( ( ( ulIPAddress ) >> 16UL ) & 0xffUL ), \
|
( ( ( ulIPAddress ) >> 16UL ) & 0xffUL ), \
|
||||||
( ( ( ulIPAddress ) >> 8UL ) & 0xffUL ), \
|
( ( ( ulIPAddress ) >> 8UL ) & 0xffUL ), \
|
||||||
( ( ulIPAddress ) & 0xffUL )
|
( ( ulIPAddress ) & 0xffUL ) )
|
||||||
|
|
||||||
#endif /* ipconfigBYTE_ORDER */
|
#endif /* ipconfigBYTE_ORDER */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue