* Adds ipconfigMAC_FILTERING that when enabled, adds two MAC manipulation functions to NetworkInterface_t
Adds documentation and design notes for the MAC filtering functions of the SAME70 network driver.
Exposes pcLOCAL_ALL_NODES_MULTICAST_MAC[ ipMAC_ADDRESS_LENGTH_BYTES ] so that network drivers can add it to the received multicast addresses during initialization.
Adds functions to the SAME70 network driver that allow modification of what MAC addresses are being received by the hardware. This implementation utilizes the 4 specific match registers and the 64bit hash match register that are present in the SAME70/V71 microcontrollers.
Registes the mDNS address when the SAME70 network driver is initialized.
Moves the registering of the solicited-node multicast address from the network driver to vIPNetworkUpCalls()
Adds 'U' to some uint8_t[] initializers
* Removes ipconfigMAC_FILTERING
Rewrites the comment describing the MAC filtering functions.
* Adds checks for ipconfigUSE_IPv6
Fixes a copy/paste bug that was allowing pfRemoveAllowedMAC() to be called without being checked for non-NULL
* Updates the unit tests for better coverage. Thanks @htibosch
* Converts the indexing variables to `size_t xIndex` and avoids inline for() declarations in DriverSAM/NetworkInterface.c
Consolidates the solicited-node MAC and MLD management into a single function.
Calls the new solicited-node address management function on network UP/DOWN events.
* Update some comments
Rewrites the generation of the solicited-node multicast IPv6 address. Thanks @htibosch
Sprits the allocation and NULL check when allocating an MLD report. Thanks @AniruddhaKanhere
* Moves vManageSolicitedNodeAddress() from FreeRTOS_IP_Utils.c to FreeRTOS_IPv6_Utils.c
Changes some indexing variables prefix to "ux"
* Adds a macros for easy checking if a MAC address is unicast or multicast.
Improves the readability of the SAME70 hash register code by adding a bunch of macros and defines
Moves all hash register macros anad variables to the top of NetworkInterface.c where they belong.
* Adds xNetworkInterface * parameters to the MAC filtering functions as requested by @HTRamsey
* Updates the DriverSAM network inteface to include the new MAC filter function parameters.
* more renaming
* Adds overflow check when incrementing the specific match register counters. Thanks @HTRamsey
* Adds proper casting when converting byte arrays to uint32_t registers. Thanks @htibosch.
* Exposes pcLOCAL_ALL_NODES_MULTICAST_IP so that it can be re-used by the user
* Fixes an array initializer that was not constant at compile time.
Removes code that was not supposed to be in this PR
* Uncrustify: triggered by comment.
* Fix unit tests
* Fix formatting
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.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>
* Fixes an issue which resulted in the response to a Neighbor Solicitation to be sent out the wrong interface.
Modifies prvHandleEthernetPacket() to ensure prvProcessEthernetPacket() never gets called with a NULL pointer
Modifies prvProcessEthernetPacket() to cleanly handle pxNetworkBuffer->pxInterface and pxNetworkBuffer->pxEndPoint being NULL.
* Fix unit tests
* Fix unit tests
* Uncrustify: triggered by comment
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
Co-authored-by: GitHub Action <action@github.com>
* Changes the ND cache full behavior: If the Neighbor Discovery cache ever gets full, trying to store a new entry will overwrite the oldest existing entry.
* Adds casting to avoid warnings
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
* 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
* DHCPv6 repaired and tested
* More changes
* Added entries to lexicon.txt
* Ran uncrustify on tools/tcp_utilities
* Formatting STM32Fxx
* Uncrusitfy tcp_mem_stats.c
* Remove trailing space
* I didn't mean to update the tcp_utilities directory yet
* Changes after Actory's review
* Replaced tabs with spaces
* Fix spelling.
* Changed the application hook for IPv6 and set the correct IPv6 defaults when failed
* Add a macro as maximum send buffer size.
* Fix formatting & build test.
* Replace xApplicationDHCPHook with xApplicationDHCPHook_Multi.
* Fix comments for xDNSServers & uxDNSCount.
* Fix ApplicationDHCPHook_Multi parameters.
---------
Co-authored-by: ActoryOu <jay2002824@gmail.com>
Co-authored-by: ActoryOu <ousc@amazon.com>
* fix ip timers unit tests
* fix FreeRTOS_IP_Utils_DiffConfig_utest tests
* fixed FreeRTOS_IP_Utils_utest
* fix dns cache unit test
* wip arp utests
* fixing arp unit tests
* fix dhcp errors
* clearing structs before usage
* fix dns parser seg fault
* fix dns parser seg fault in unit test
* fix arp uunit tests
* fix arp unit tests
* fixing dns unit test and updating the CBMC proofs
* fixing udp unit tests
* fixing TCP IP unit tests
* fixing TCP IP diffconfig unit tests
* adding additional header file for ARP for declaring missing stub headers
* minor fix
* Uncrustify: triggered by comment
* fixing comments
---------
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>
* Add IPv6 data path and endpoint changes to FreeRTOS_IP.c
* Add FreeRTOS_IPv4.h and FreeRTOS_IPv6.h files.
* Fix compilation issues and run Uncrustify