* 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>
* Set ipBUFFER_PADDING to 14 bytes by default on 64 bit targets v2
* Added U suffix to some literal values like 0xFFFFFFFFU
* Corrected the offset/size table in the comments
* Changes ipBUFFER_PADDING checks after review Monika and Tony
---------
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
* Disable DHCP timer when network goes down
* Don't stop checking the Network Timer
* Fix network down when using RA
* Revert "Don't stop checking the Network Timer"
This reverts commit f5d8d98856.
* Add vSetNotAllNetworksUp function
* Fix unit tests
* Update comments
* Store DHCPv4 socket locally for all endpoints
* Add vDHCPStop and vDHCPv6Stop functions
* Fix IP Utils tests
* Fix most of DHCP unit tests
* Fix formatting
* Change vSetNotAllNetworksUp into a more generic vSetAllNetworksUp
* Fix almost all of DHCP unit tests
* Fix formatting
* Add tests for vDHCPStop and vDHCPv6Stop functions
* Fix formatting
* Remove redundant MISRA comment
* Set all fields of xAddress when binding DHCP socket
* Fix unit test coverage of prvCreateDHCPSocket
* Fix DHCP CBMC memory proof
---------
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.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
* Defines ipUDP_PAYLOAD_IP_TYPE_OFFSET as an offset dependent on the IPv6 and UDP headers.
Calculates ipIP_TYPE_OFFSET automatically based on the sizes it depends on instead of using a hardcoded number.
Removes the definitions of ipIP_TYPE_OFFSET and ipUDP_PAYLOAD_IP_TYPE_OFFSET from FreeRTOS_IPv6_Private.h because they are already defined in FreeRTOS_IPv4_Private.h
Makes ipIP_TYPE_OFFSET define signed so asserts can properly check for negative values.
Adds an assert to ensure that storing of the IP-Type for IPv4 frames does not result in overwriting the ethernet header which would be the case if ipIP_TYPE_OFFSET somehow became negative or zero.
Adds a comment to the code storing of the IP-Type byte for IPv6 frames emphasizing that it is not required and only used for debugging.
* Uncrustify: triggered by comment.
* Correct the comment of ipUDP_PAYLOAD_IP_TYPE_OFFSET.
---------
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: ActoryOu <jay2002824@gmail.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
* pxDuplicateNetworkBufferWithDescriptor
* pxUDPPayloadBuffer_to_NetworkBuffer NULL
* Add IPv4 Utils
* Add description for unit test and separate IP_Utils/IPv4_Utils
* usGenerateProtocolChecksum
* prvChecksumProtocolCalculate
* Add description of test cases
* pxUDPPayloadBuffer_to_NetworkBuffer & prvProcessNetworkDownEvent & usGenerateProtocolChecksum
* usGenerateProtocolChecksum
* Full coverage
* Remove dedundant include
* Code beautify
* IPv4_Utils full coverage
* Remove redundant include in IPv4_Utils unit test
* Fix IPv4 UT building
* Fix spelling.
* Add macro for minimum TCP offset.
* Fix doxygen
* Fix again
* Move Stub functions to _stubs.c and fix compile warning
* Update diffconfig UT
* Compare endpoint IP address in TCP.
* Replace ipLOCAL_IP_ADDRESS_POINTER with endpoint.
* Set ipLOCAL_IP_ADDRESS_POINTER in DHCP/network down events.
* Check endpoint in DNS_TreatNBNS.
* Fix MISRA.
* Remove DNS_Parser part.
* 556 Initial Cmake Module definition. #557
* renaming variables that have conflicting names with MSC and *nix headers
* fix build issue for posix port
* Fix warning: -Waddress-of-packed-member when calculating checksum directly from network packets
* fix warnings with prvInitialiseTCPFields declaration
* removing macros that hides the structure fields
* Updating build check enable all config to enable all config macros
* CMake: Fix GIT_REPOSITORY and GIT_TAG (#742)
* moving ipTRUE_BOOL and ipFALSE_BOOL out of #ifndef pdTRUE_SIGNED check as they are not defined in kernel
* minor fix to the cmake files and main file
* Uncrustify: triggered by comment.
* adding doxygen comments to new functions
* Uncrustify: triggered by comment
* Add more warnings check and fix warnings
* Uncrustify: triggered by comment
* fix review feedback and more debug printf warnings fix
* more warnings fix
* fix misra issues
* Uncrustify: triggered by comment
* replace sin_addr with sin_address.ulIP_IPv4 in +TCP demos
* replace sin_addr6 with sin_address.xIP_IPv6 in +TCP demos
* replace freertos_sockaddr6 with freertos_sockaddr in +TCP demos
* review feedback changes
* removing duplicate def for prvStreamBufferAdd from winpcap
* fix more warnings from MSVC
* Uncrustify: triggered by comment
* review feedback changes
* Uncrustify: triggered by comment
---------
Co-authored-by: phelter <paulheltera@gmail.com>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
* add FreeRTOS_GetAddressConfiguration and FreeRTOS_SetAddressConfiguration
* renaming FreeRTOS_GetUDPPayloadBuffer_ByIPType to FreeRTOS_GetUDPPayloadBuffer_Multi
* adding ipconfigIPv4_BACKWARD_COMPATIBLE to all main branch APIs that got changed except hooks
* rename vApplicationIPNetworkEventHook to vApplicationIPNetworkEventHook_Multi when ipconfigIPv4_BACKWARD_COMPATIBLE is disabled
* renaming xApplicationDNSQueryHook to xApplicationDNSQueryHook_Multi when ipconfigIPv4_BACKWARD_COMPATIBLE is disabled
* Uncrustify: triggered by comment
* fix DNS_ParseDNSReply complexity issue
* Uncrustify: triggered by comment
* replacing with ipconfigIPv4_BACKWARD_COMPATIBLE flag
* minor unit test fix
---------
Co-authored-by: GitHub Action <action@github.com>
* Fix seg fault
* Remove ipconfigUSE_IPV6
* Add change for FreeRTOS_IP_Utils unit test case
* Fix comments
* Uncrustify: triggered by comment.
* Fixed build issue with IP utils unit test build.
* Removed calculation of checksum being done twice for debug printf
---------
Co-authored-by: Monika Singh <moninom@amazon.com>
Co-authored-by: Monika Singh <108652024+moninom1@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
* 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
- Add IPv6 changes to FreeRTOS_IP_Timer FreeRTOS_IP_Utils
- Add FreeRTOS_DHCPv6.h
- Update generateChecksum.
- MISRA: Fix rule 1.1, 8.13, 8.5, 20.9 and Suppress rule 8.9, 11.3
- Limit the use of ipconfigUSE_IPV6
- Run uncrustify and update the files
* 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>
* Misra: supressing rule 18.3
* test misra fix
* misra rule 18.3 remove violation
* testig coredump
* invetigate test failing locally only
* modified code
* Bring some changes back
* off by one bug
* off by one or 2 error
* Fix ut
* trigger github actions
* Fix Unit test
* Fix ut
* Fix ut
* UT fix ut
* Fix UT
* Fix UT
* Style: fix formatting
* Fix UT
* Remove printf
* Remove dead code
* Address PR comments
* Change cast type