* Fixes the eARPGetCacheEntryGateWay() return value when a gateway is not found.
* Updates the unit test. Thanks @kstribrnAmzn
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
* Fixes the Incoming IPv4 destination IP check when ipconfigETHERNET_DRIVER_FILTERS_PACKETS is disabled
* Add new API FreeRTOS_OutputARPRequest_Multi
* Fix UTs
* Fixes an issue which resulted in the response to a Neighbor Solicitation to be sent out the wrong interface.
Enforces that pxNetworkBuffer, pxNetworkBuffer->pxInterface, and pxNetworkBuffer->pxEndPoint are non-NULL for received packets.
* Adds proper loppback checks. Thanks @tony-josi-aws
* Update assert to checks
* Fix cbmc
* Remove repeated proof
* Fix unit tests
* Fix C90: Wno-declaration-after-statement
* Fix unit tests
* Uncrustify: triggered by comment
* Fix MISRA
* Fix build
* Uncrustify: triggered by comment
* Fix CBMC proofs
* Fix CBMC proof
* Uncrustify: triggered by comment
* Fix CBMC and UTs
* Uncrustify: triggered by comment
* Revert "Fix C90: Wno-declaration-after-statement"
This reverts commit b63cc50e61.
* Add comments as per review suggestions
* Uncrustify: triggered by comment
* Fix UTs
* Update with review suggestions
* Fix UTs and CBMC
* Fix CBMC
* Fix build
* Uncrustify: triggered by comment
* Remove unused comments
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: GitHub Action <action@github.com>
* Remove xCheckLoopback function because we now have a loopback endpoint.
* Remove xCheckLoopback CBMC proof
* Remove xCheckLoopback UTs
---------
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
* Update FreeRTOS_Routing.c
In line 855, the #if directive is checking for the "ipconfigHAS_PRINTF" conditional expression. Following this conditional check, line 872 should have a "FreeRTOS_printf" instead a "FreeRTOS_debug_printf".
It also fixes the "variable 'xRetNtopFrom' set but not used" compilation warning
* Uncrustify: triggered by comment.
* Update comment
* Uncrustify: triggered by comment.
* Update one more occurance
---------
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
Fix following MISRA issues :
MISRA Rule 8_5 : Symbol "FreeRTOS_inet_ntop6" is declared more than once.
MISRA Rule 8_9 : Symbol "FreeRTOS_in6addr_loopback" should be defined at block scope.
MISRA Rule 8_8 : missing static storage modifier for "prvCloseDHCPSocket" which has internal linkage.
MISRA Rule 9_1 : Using uninitialized value "xRemoteIP.xIs_IPv6" when calling "pxTCPSocketLookup".
MISRA Rule 9_1 : Using uninitialized value "pxAddress->sin_family" when calling "prvSocketBindAdd".
MISRA Rule 11_3 : A cast shall not be performed between two pointer of different object type.
MISRA Rule 12_1 : Missing parentheses on sub-expression of the operator.
MISRA Rule 14.4 : The condition expression 0 does not have an essentially boolean type
MISRA Rule 15_6 : The body of the "then" branch of the "if" statement is not a compound statement.
MISRA Rule 17_7 : The return value of a non-void function "memset" is unused.
MISRA Rule 20_5 : Using "#undef".
MISRA Rule 20_10 : Use of "#" or "##" preprocessor operator.
MISRA Rule 21_1 : Defining or undefining a reserved name "_static", which is an identifier or macro name beginning with an underscore.
MISRA Rule 21_15 : Calling function "memcmp" with incompatible types "void " and "uint8_t const ()[6]".
* Preparing library to use loopback device
* Repaired FreeRTOS_AddEndPoint() as well
* Minor changes for Doxygen
* Uncrustify: triggered by comment.
* Added IPv6.h and removed call to xIsIPv6Loopback
* Conditional compilation of xIPv6_GetIPType()
* Do not call xBadIPv4Loopback() when IPv4 is not enabled
* Repaired unit tests
* In FreeRTOS_AddEndPoint(), set next to NULL
* One more change in FreeRTOS_AddNetworkInterface()
* FreeRTOS_FillEndPoint: save pxNext before clearing entire endpoint struct
* Uncrustify: triggered by comment.
* Changes after review by Shub
* Changes after review by Shub, part 2
* Uncrustify: triggered by comment.
* Replace pxUDPPacket with pxIPacket in function prvAllowIPPacketIPv4()
* utest: replace xIPv6UnspecifiedAddress with FreeRTOS_in6addr_any
* Checked unit-tests and coverage
* ut: Repaired GetIPType loopback test
* Update test/unit-test/FreeRTOS_IPv6_ConfigDriverCheckChecksum/FreeRTOS_IPv6_ConfigDriverCheckChecksum_stubs.c
Co-authored-by: ActoryOu <jay2002824@gmail.com>
* Update test/unit-test/FreeRTOS_IPv6/ut.cmake
Co-authored-by: ActoryOu <jay2002824@gmail.com>
* Remove test for 'ipIPv4_FRAME_TYPE'
* Repairing tu again
---------
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: ActoryOu <jay2002824@gmail.com>
* 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
* adding more checks for GARP
* adding more checks for GARP
* adding more checks for GARP
* more debug logs
* more debug logs
* more testing
* verify subnet
* fix formatting, cleaning up
* fix formatting, cleaning up
* adding unit tests
* updating review comments
* Let the TCP timer becomes expired in stead of active
* Renamed parameter of function vIPSetTCPTimerExpiredState
* Adapt unit tests to use the new name and field
* Change bActive to bExpired
* Empty commit
* Fix spell check
* When a gratuitous ARP is received, use it to update the ARP cache entry
* wip
* adding comments on matching endpoint for Gratuitous ARP
* adding unit tests for Gratuitous ARP processing, fix formatting
* fix build
* fix formatting
* fix formatting
* fic CBMC
* adding review changes
---------
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
* Minor changes to the CBMC DHCP proof to make the code more readable
* minor documentation fix
* fix unit tests
* Uncrustify: triggered by comment
* minor update
---------
Co-authored-by: GitHub Action <action@github.com>
* updating doxygen config
* fixing doxygen comments
* adding IPv6 files and fixing comments
* fix doxygen cfg and file names in comments
* wip doxygen v6 docs
* adding doxygen comments
* include RA src file to doxgendocs generation
* fix spell check issues
* Uncrustify: triggered by comment.
* fix minor build issue
* fix spell check issues
* Uncrustify: triggered by comment
* fix trailing white space
* Dev integration hein.v8 (#738)
* Updating tcp utilities
* Some more change in dev_integration_hein.v8
* In FreeRTOS_DNS_Parser.c : use 'ipUDP_PAYLOAD_OFFSET_IPv4' in stead of 'ipIP_PAYLOAD_OFFSET'
* And a few more corrections
* Changes to WinPCap network interface, removed debugging code
* After applying uncrustify
* Oops, I forgot the push changes in include files.
* Now removing it, hopefully
---------
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Monika Singh <108652024+moninom1@users.noreply.github.com>
* Fix CBMC proofs for DNS (#718)
* Use CBMC XML output to enable VSCode debugger (#673)
Prior to this commit, CBMC would emit logging information in plain text
format, which does not contain information required for the CBMC VSCode
debugger. This commit makes CBMC use XML instead of plain text.
Co-authored-by: Mark Tuttle <tuttle@acm.org>
* wip
* wip DNSgetHostByName
* wip DNSgetHostByName
* fixed cbmc proof for DNS_ReadNameField
* wip DNSgetHostByName_a_harness
* Fix CBMC prooff for DNSgetHostByName
* wip fix DNSgetHostByName_a CBMC proof
* fixed cbmc target func not called issue in DNSclear
* fixed cbmc target func not called issue in DNSlookup
* fix DNSgetHostByName_a CBMC proof
* update comments
* more asserts
* fixing formatting
* updating as per review comments
* fix dns after review comments
* adding more asserts
* adds more asserts
* minor fix
* fixing comments
* fixing comments
* fixing minor issue
* fixing DNS_ReadReply() signature
* making code more consistant
* adding more asserts
* making code more consistent
---------
Co-authored-by: Kareem Khazem <karkhaz@amazon.com>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
* Uncrustify: triggered by comment
* fixing formatting
---------
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Monika Singh <108652024+moninom1@users.noreply.github.com>
Co-authored-by: Kareem Khazem <karkhaz@amazon.com>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
* Updating tcp utilities
* Some more change in dev_integration_hein.v8
* In FreeRTOS_DNS_Parser.c : use 'ipUDP_PAYLOAD_OFFSET_IPv4' in stead of 'ipIP_PAYLOAD_OFFSET'
* And a few more corrections
* Changes to WinPCap network interface, removed debugging code
* After applying uncrustify
* Oops, I forgot the push changes in include files.
* Now removing it, hopefully
---------
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Monika Singh <108652024+moninom1@users.noreply.github.com>
* Changes after testing all other protocols IPv4 and IPv6
* Clear interface/endpoint when creating a network buffer
* After running uncristify
* Didn't mean to update 'TCP_Transmission_IPV4'
* Removed changes from Routing.h to make merging easier
* Reparations and recommendations for the dev/IPv6_integration branch
* Applied uncrustify
* More changes after testing ARP, ICMP4, ICMP6, UDPv4 and UDPv6, DNSv6
* A few changes to DNS after testing it
* Fix FreeRTOS_IP and FreeRTOS_IP_DiffConfig test cases
* Remove test_prvProcessIPEventsAndTimers_eNetworkDownEvent test Case
- eNetworkDownEvent no longer support xNetworkUp variable, the network status
is kept in pxEndPoint->bits.bEndPointUp.
* Run Uncrustify.
Co-authored-by: GitHub Action <action@github.com>
* WIP fix tests for failing ARP unit tests
* WIP fix failing test cases for ARP unit tests
* WIP fix failing test cases for the ARP unit test cases
* Fixed failing test cases for the FreeRTOS_ARP_DataLenLessThanMinPacket_utest unit tests
* Fixed failing test cases for ARP unit tests
* Add EndPoint changes to FreeRTOS_Socket.c
* Split Socket.c to IPv4 and IPv6 files
* Combine freertos_sockaddr for IPv4 and IPv6
* Update sendto and recv function to handle IPv4 and IPv6 case
* Run uncrustify
* Add IPv6 specific header files.
* Update according to Coding Guidelines and Uncrustify
* Adding common IP file to handle common strctures
Co-authored-by: Monika Singh <moninom@amazon.com>
* Update source location for coverity
* Add coverage checker
* Add build check with default configuration
* Fix build combination and DNS error
* uncrustified and fixed cmakelists
* This commit updates version number in all files to Development-Branch
* Update version number macros
* This commit fixes a typo in version number macro
* Added a 'critical section' to prevent a race condition in stream buffers
* Uncrustify: triggered by comment.
* Fixed unit-tests by adding mocked functions
* Initial commit of file README.md
* Update README.md
* Fix the title of README file in coverity
* Addressed issue comments
* Update command
* Add details about remaining exception
* Move file to original location
* Remove use of sudo in commands
* Fix links; added coverity version note
* Update README.md
* Remove CMake installation instructions
* Update manifest/history and copyright year
* Update kernel version to 10.4.5
* Update remaining copyright year instances
* Update the version number macros
* Update license header titles
* Remove kernel license header and add TCP header
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>