1
0
mirror of https://github.com/FreeRTOS/FreeRTOS-Plus-TCP synced 2025-10-24 12:02:37 +08:00
Commit Graph

38 Commits

Author SHA1 Message Date
Tony Josi
d18fe9c2a2 Add NetworkDown notification to NetworkInterface.c [PR: #671] (#812)
* Add NetworkDown notification to EMAC task

* Add NetworkDown notification to NetworkInterface.c

* Uncrustify: triggered by comment.

* Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag

* Fix formatting

* Uncrustify: triggered by comment.

---------

Co-authored-by: Filip Oleszek <filip.oleszek@o2.pl>
Co-authored-by: zipperowiec <35423392+zipperowiec@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2023-04-18 11:00:00 +00:00
Hein Tibosch
c09528fd57 dev/IPv6: DHCPv6 repaired and tested (#826)
* 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>
2023-04-14 18:24:54 +08: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
holden-zenith
de62c2c41b Disable mmc interrupts for STMF7xx (#775)
Co-authored-by: Holden <holden-zenithaerotech.com>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Paul Bartell <pbartell@amazon.com>
2023-03-15 11:12:07 -07:00
Monika Singh
f2fa5f3a9a Fix compilation issue 2023-03-15 10:25:04 +00:00
sayyadumar
49a84d6b83 rx: Read mac address using FreeRTOS_GetMACAddress() rather than using the defines (#765)
* Read mac address using FreeRTOS_GetMACAddress() rather than using the defines
---------
Co-authored-by: GitHub Action <action@github.com>
2023-03-15 10:07:46 +00:00
ChristosZosi
bb60607763 Use vTaskDelay for sleep in the network-interface of xilinx_ultrascale (#698)
The issue here is that, the FreeRTOS IP-task would block all other
tasks during PHY-link speed negotiations, as it was using busy
waiting. However this is not really ideal. A much more suitable
function for such a task would be `vTaskDelay`.
2023-03-15 03:22:08 +00:00
ChristosZosi
6aaf659973 Minor warning fixes (#589)
* Eliminate compiler unused parameter warning

* Eliminate compiler unused variable warnings

* Eliminate compiler unused function warning

The function pcGetPHIName(...) would be called only in the
FreeRTOS_printf message, however FreeRTOS_printf maybe be defined
to nothing e.g. release builds, which then the warning would come up

* Rework callback setups in the EMAC-driver of the Xilinx UltraScale port

The calls to the function XEmacPs_SetHandler would trigger the
pedantic warning:

"ISO C forbids conversion of object pointer to function pointer type"

The reason for this, is that the second parameter of the function
XEmacPS_SetHandler is declared as pointer to a void type, but the
function "expects" a function pointer, which in setup_isr rightly
happens.

However IMHO, this is just bad code from the side of Xilinx, as not
on all architectures the size of a data pointer is identical to the
size of a function pointer, which also is correctly recognised by
the compiler.

Instead of using the "bad" function XEmacPs_SetHandler, we can set the
handlers manually to the EmacPS-instance.

* Uncrustify: triggered by comment.

* Update source/portable/NetworkInterface/xilinx_ultrascale/x_emacpsif_hw.c

Co-authored-by: Paul Bartell <paul.bartell@gmail.com>

* Apply suggestions from code review

Co-authored-by: Paul Bartell <paul.bartell@gmail.com>

* Address comments from reviews

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
2023-03-15 03:22:08 +00:00
jasonpcarroll
03af49a075 Fix Windows thread calling vTaskSuspendAll / xTaskResumeAll. (#592)
Co-authored-by: Jason Carroll <czjaso@amazon.com>
2023-03-15 03:22:08 +00:00
ChristosZosi
c2cb9960b6 Fix Network-interface of the Xilinx UltraScale port (#588)
The underlying issue was when the port would be used with Jumbo frames.
During receives of Jumbo packets the data length was always set
incorrectly, which then would cause buffer allocation issues and
subsequently corrupted data would be sent to the IP-task.

After some inspection in the Xilinx UltraScale port, I found out
that when the data length would be set, the wrong mask from the
Xilinx Ethernet MAC driver would be used. By using the right mask
(XEMACPS_RXBUF_LEN_JUMBO_MASK) when Jumbo Frame support is enabled
the issue was resolved
2023-03-15 03:22:08 +00:00
Pete Bone
4e4991ddd1 Update deprecated macros in network driver files (#579)
* Update deprecated macros in network driver files

* Fix typo in RX driver.

* Replace #warning with #error on test for deprecated macro.

* Fix doxygen check

Co-authored-by: PeterB <PeterB@PETE-LT.otg.local>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2023-03-15 03:22:08 +00:00
Pete Bone
f80ce70279 Eliminate some warnings (#578)
* Eliminate some warnings related to print statements

Authored-by:  Pete Bone  <pete-pjb@users.noreply.github.com >
2023-03-15 03:22:08 +00:00
Hein Tibosch
871a6db70f IPv4/single: SAME70 EMAC buffer sizes (#568)
* Implemented Maty's solution

* Added a new statistic 'tx_write_fail'

* Uncrustify: triggered by comment.

* Increase NETWORK_BUFFER_SIZE in order to include the 'ipBUFFER_PADDING' bytes

* ICMP checksum calculated manually

* Uncrustify: triggered by comment.

* Update gmac_SAM.c

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2023-03-15 03:22:08 +00:00
Hein Tibosch
d71007d82b IPv4/single SAME70 emac race condition (#567)
* Implemented Maty's solution

* Added a new statistic 'tx_write_fail'

* Uncrustify: triggered by comment.

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: GitHub Action <action@github.com>
2023-03-14 10:07:04 +00:00
Tony Josi
b4a928b354 Fix build issue with network interface of STM32F4 (#778)
* fix build errors with STM32F4 netwrok interface

* moves the default config for ipconfigUSE_DHCPv6 outside of ipconfigUSE_TCP check

* Uncrustify: triggered by comment.

---------

Co-authored-by: GitHub Action <action@github.com>
2023-03-13 15:42:03 +05:30
Monika Singh
dbd2b001b1 Update portable layer for backward compatibility (#755)
* Rename FreeRTOS_IPStart to FreeRTOS_IPInit_Multi

* Update backward compatability for portable layer
2023-03-07 22:02:55 +05:30
Hein Tibosch
ff11a1484a 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>
2023-02-23 14:50:27 +05:30
kar-rahul-aws
31a549b73a A new algorithm to select the endpoint for received packets[ PR #713 ] (#726)
* End Point changes #PR 713

* Fix build issues in PR#713 : extra */ in FreeRTOS_Routing.c

* Fix Mathcing EndPoint function in Zynq Interface

* Update FreeRTOS_ARP.c

* Spell check fix

* Fix build check issue : add const in xIPv6_GetIPType declaration

* Uncrustify: triggered by comment.

---------

Co-authored-by: GitHub Action <action@github.com>
2023-02-17 19:22:13 +05:30
ActoryOu
c880d7c3f9 Remove Dup function HAL_ETH_SetMDIOClockRange. (#722) 2023-02-16 12:43:07 +08:00
kar-rahul-aws
4553edd116 Change in UDP process flow to drop packet for invalid IPv4 payload length (#716)
* Change in UDP process flow to drop packet in case of invalid payload length for IPv4

* Uncrustify: triggered by comment.

* Update FreeRTOS_IP.h

---------

Co-authored-by: GitHub Action <action@github.com>
2023-02-15 10:04:45 +05:30
kar-rahul-aws
ab881bfeac Portable layer changes (#701)
* Update NetworkInterface.c

* Update NetworkInterface.c

* Update NetworkInterface.c

* Update x_emacpsif_dma.c

* Update NetworkInterface.c

* Update NetworkInterface_eth.c

* Update NetworkInterface.c

* Uncrustify: triggered by comment.

* Update FreeRTOS_DNS_Cache.c

* Update NetworkInterface.c

* Update NetworkInterface.c

* Update NetworkInterface.c

* Update FreeRTOS_DNS_Parser.c

* Update FreeRTOS_DNS_Parser.c

* Update NetworkInterface.c

* Update uncached_memory.c

* Update x_emacpsif.h

* Update x_emacpsif_dma.c

* Update x_emacpsif_hw.c

* Update x_emacpsif_physpeed.c

* Update x_topology.h

---------

Co-authored-by: GitHub Action <action@github.com>
2023-02-10 19:14:23 +05:30
Tony Josi
0639fd45a0 Fix unit test build issues and test failures for IP Utils (#699)
* 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>
2023-02-07 10:19:09 +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
7315e4b3ba Fix FreeRTOS_IP test cases (#666)
* 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>
2023-01-16 21:07:57 +05:30
kar-rahul-aws
bf32bf336e Demo changes for IPv4 Endpoint changes (#660)
* Update FreeRTOS_ARP.c
* Update FreeRTOS_UDP_IPv4.c
* Update FreeRTOS_TCP_Transmission_IPV4.c
* Update FreeRTOS_IP.c
* Update FreeRTOS_DHCP.c
* Update FreeRTOS_DNS.c
* Update NetworkInterface.c

Add Functions  To avoid scheduler suspension: xPacketBouncedBack and prvStreamBufferAdd
2023-01-10 19:27:49 +05:30
kar-rahul-aws
306445517e Update Portable Folder for End Point changes (#602)
Added changes in WinpCap Port for IPV4 Endpoint changes
* Update NetworkInterface.c/NetworkInterface.h with End point changes.
* Run uncrustify

Co-authored-by: GitHub Action <action@github.com>
2022-12-16 12:17:38 +05:30
Paul Bartell
cb70927b98 NetifSlirp: Fix compiler warnings and errors (#562)
* NetifSlirp: Fix compiler warnings and errors

Built on latest gcc, clang, and msvc for x86.

* Apply suggestions from code review
2022-10-11 14:06:26 -07:00
Paul Bartell
dcd0df708a NetifSlirp: Fix compatibility with libslirp v4.6.x (#554)
* NetifSlirp: Fix compatibility with libslirp v4.6.x

* NetifSlirp: Fix compiler warning on MSVC

* Uncrustify: triggered by comment.

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2022-09-30 10:14:17 -07:00
Paul Bartell
daa4e18e4d Implement BufferAllocation1 support for simulators
Add a vNetworkInterfaceAllocateRAMToBuffers callback for the linux
pcap, WinPCap, and libslirp NetworkInterface implementations.
2022-09-13 15:41:01 -07:00
Paul Bartell
8988bd741c NetifSlirp: Remove dependency on libslirp if.h
This addresses build issues when the using system-provided version of
libslirp on linux and macos.
2022-09-12 15:12:58 -07:00
Paul Bartell
e5da99952f NetifSlirp: Address some gcc/linux warnings 2022-09-12 15:12:58 -07:00
Paul Bartell
a6ca0be209 Add libslirp NetworkInterface implementation
Libslirp is used by qemu to provide userspace NAT networking. This serves as
a replacement for the current libpcap / winpcap NetworkInterface but does
not require elevated privileges or selecting a particular interface to bind to.

In this implementation, incoming connections are not supported.

Tested with git revision 38638382c8f3dc2523468f0c54014f4fdf0aa38f on MacOS and Windows.
2022-09-12 15:12:58 -07:00
Aniruddha Kanhere
1ab6eb8885 Update version numbers and licensing info (#541)
* 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>
2022-08-12 16:21:44 -07:00
Aniruddha Kanhere
f44d36d5ce Update version number of TCP to development (#516)
* 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
2022-07-06 10:29:48 -07:00
holden-zenith
b6a4e40eb4 Fix various compiler warnings (#494)
* Fix various compiler warnings

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2022-06-24 15:22:10 -07:00
Aniruddha Kanhere
cf8dbe6f1d Bring in changes from @htibosch's PR 465 (#479) 2022-06-07 14:20:54 -07:00
Aniruddha Kanhere
ab3d0fa100 TM4C: Enable PHY interrupts for link changes (#478)
* Bring in changes by @martinaao
2022-06-06 12:18:40 -07:00
Aniruddha Kanhere
a4124602cc Merge changes to main.
This commit brings in the refactoring and restructuring changes
from IntegrationTesting1 branch to the main branch.
It also includes additional unit tests for 100% coverage.
The rationale behind not creating a PR is that the conflicts were too
huge to be resolved correctly. Thus, a force push to the main branch is
being done.
2022-05-26 12:42:45 -07:00