1
0
mirror of https://github.com/FreeRTOS/FreeRTOS-Plus-TCP synced 2025-10-21 23:30:39 +08:00
Commit Graph

10 Commits

Author SHA1 Message Date
Emil Popov
aa7f9f0ce1 Adds NetIf functions for filtering MAC addresses (#1065)
* 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>
2024-04-08 16:46:36 +05:30
Hein Tibosch
05f6ecae35 Avoid compiler warnings about the printf formats (#1119)
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2024-04-03 16:27:40 +05:30
Tony Josi
ef14a0871f Fix declarations after statements (#1106)
* Fix C90: Wno-declaration-after-statement

* Uncrustify: triggered by comment

---------

Co-authored-by: GitHub Action <action@github.com>
2024-02-23 17:52:12 +05:30
Soren Ptak
eed294c0ec CI-CD Updates (#1014)
* 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
2023-09-05 14:31:24 -07:00
Monika Singh
b23fa86ac4 Add and fix -Wconversion errors (#980)
* Fix Wconverstion

* Enable Wconversion warning

* Add fix

* Fix MISRA

* Fix coverity

* Add comments
2023-07-27 15:56:36 +05:30
ActoryOu
dd9a203249 [IPv6] Fix checksum calculation of IPv6 with extension headers. (#952)
* Fix IPv6 checksum calculation

* Use HW support option to see if we need to calculate TX checksum on NS/NA/RS packets.
2023-07-11 10:52:03 +08:00
Monika Singh
a492abb0a8 Fix Additional Clang warnings
Corrects several warnings from Clang flags
for Clang 13.
2023-04-18 11:00:00 +00:00
Tony Josi
89269454b9 CMake changes from main branch [PR: #557, PR: #742] (#803)
* 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>
2023-03-27 10:52:02 +05:30
Hein Tibosch
f88dea60ca Reparations and recommendations for the dev/IPv6_integration branch (#664)
* 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
2023-01-25 18:33:44 +05:30
Monika Singh
70c261d986 Add IPv6 changes to FreeRTOS_IP_Timer FreeRTOS_IP_Utils file. (#572)
- 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
2022-11-21 14:22:29 +05:30