/* * FreeRTOS+TCP * Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * http://aws.amazon.com/freertos * http://www.FreeRTOS.org */ /* Include Unity header */ #include "unity.h" /* Include standard libraries */ #include #include #include #include "mock_task.h" #include "mock_list.h" #include "mock_queue.h" #include "mock_event_groups.h" #include "mock_FreeRTOS_IP_Private.h" #include "mock_FreeRTOS_IP_Utils.h" #include "mock_FreeRTOS_IP_Timers.h" #include "mock_FreeRTOS_TCP_IP.h" #include "mock_FreeRTOS_IP.h" #include "mock_FreeRTOS_ARP.h" #include "mock_NetworkBufferManagement.h" #include "mock_NetworkInterface.h" #include "mock_FreeRTOS_DHCP.h" #include "mock_FreeRTOS_Sockets.h" #include "mock_FreeRTOS_DNS.h" #include "mock_FreeRTOS_Stream_Buffer.h" #include "mock_FreeRTOS_TCP_WIN.h" #include "mock_FreeRTOS_UDP_IP.h" #include "FreeRTOS_ICMP.h" #include "FreeRTOSIPConfig.h" void test_ProcessICMPPacket_PacketSizeSmall( void ) { eFrameProcessingResult_t eResult; NetworkBufferDescriptor_t * pxNetworkBuffer, xNetworkBuffer; pxNetworkBuffer = &xNetworkBuffer; pxNetworkBuffer->xDataLength = sizeof( ICMPPacket_t ) - 1; eResult = ProcessICMPPacket( pxNetworkBuffer ); TEST_ASSERT_EQUAL( eReleaseBuffer, eResult ); }