1
0
mirror of https://github.com/FreeRTOS/FreeRTOS-Plus-TCP synced 2025-10-23 18:38:33 +08:00
Commit Graph

119 Commits

Author SHA1 Message Date
holden-zenith
3062666f80 Uncrustify (#730)
* uncrustify

* Uncrustify: triggered by comment.

* Update FreeRTOS_ARP.c

* Fix whitespace changes

---------

Co-authored-by: Holden <holden-zenithaerotech.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2023-02-17 12:06:39 +05:30
shubnil
883dd778f4 Fix to drop loopback ip packets for UDP (#721)
Fix to drop packets received with loopback ip-address for UDP.
2023-02-16 18:39:35 +05:30
shubnil
b87b70d9c7 Remove some left over IPv6 checks from IPv4 Flow (#723)
Remove a few left over IPv6 code from IPv4 UDP flow.
2023-02-16 17:43:17 +05:30
ActoryOu
c880d7c3f9 Remove Dup function HAL_ETH_SetMDIOClockRange. (#722) 2023-02-16 12:43:07 +08:00
Tony Josi
061a24db85 Fix unit tests and build issues (#712)
* build fix

* fixed faiing tests for FreeRTOS_TCP_IP

* fixed faiing tests for FreeRTOS_TCP_IP_diffconfig

* fixed faiing tests for FreeRTOS_TCP_Transmission

* fixed minor issue with prepareReplyDNSMessage

* fix arp test failures

* fix ARP tests

* wip FreeRTOS_DNS utest

* fix DNS utest failure

* testing coverage

* testing coverage

* updating comments

* disable coverage check
2023-02-15 14:25:33 +05:30
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
Monika Singh
7fa2804215 Fix compilation error in FreeRTOS_BitConfig.h (#714)
The sizes of array variables in C must be known at compile time.
Here sizeof result is a constant. However, if we assign it to a
constant variable it is still a variable to C.
2023-02-14 16:55:07 +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
Monika Singh
96a90c5e79 Add ARP packet drop cases. (#704) 2023-02-08 18:08:16 +05:30
Hein Tibosch
66d4455921 A few minor changes after testing Xueli's branch, mostly in TCP_Transmission (#702) 2023-02-08 18:04:57 +05:30
Hein Tibosch
f44df85c54 Make sure that a socket in the SYN phase doesn't get closed twice (#703) 2023-02-07 15:46:08 +05:30
Tony Josi
16ef9df144 Fix unit test build issues and test failures for IP (#690)
* wip

* fix build failure and test failures for FreeRTOS IP unit tests

* new ip diffconfig 1 included in build

* updating prvProcessUDPPacket() as per PR #689 and fixing tests

* wip ip diffconfig

* added diffconfig2 for ip unit tests wrt to diffconfig with ipconfigCOMPATIBLE_WITH_SINGLE set as zero to enable FreeRTOS_IP_init tests and fixed freertos ip diffconfig unit tests

* minor fix on an ARP unit test

* minor fix with ip utils diffconfig unit tests build

* Fixed build failure with ip diffconfig 1 and 2. Pulled latest changes from dev/v6 branch.

* Removed unused code.
2023-02-07 10:40:24 +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
Tony Josi
cf2e8828e9 Fix unit test build issues and test failures for ARP, TCP, UDP v3 (#697)
* WIP

* Fixed ARP, with 2 test cases pending which requires src changes which are not priority. Fixed TCP and UDP test cases.

* return value of xProcessReceivedUDPPacket initialized to pdFAIL

* fixing UDP test cases

* fixed arp unit tests

* Fix tcp transmission unit test cases.

* Fixed tcp ip failing unit tests

* Fixed tcp reception failing unit tests

* Fixed tcp state handling failing unit tests.

* Fixed ARP diffconfig unit tests.
2023-02-07 09:37:06 +05:30
Tony Josi
8dcdfc5eac Fix unit test build issues and test failures for Sockets (#684)
* build dfix

* fixed FreeRTOS_Sockets_UDP_API_utest and FreeRTOS_Sockets_GenericAPI_utest

* Fixed FreeRTOS_Sockets_TCP_API_utest unit tests
2023-02-03 14:35:28 +05:30
Tony Josi
ebad867cdc Fix unit test build issues and test failures for DNS (#687)
* fixed failing unit tests

* Fixed failing unit tests for dns networking and parser:
* Fixed issue with vReturnEthernetFrame is called twice during DNS_TreatNBNS

* Minor fix with DNS unit test cases
2023-02-03 14:35:00 +05:30
Monika Singh
209cf6f397 Update IPv6 flag (#696)
Clear the IPv6 flag when filling endpoint.
2023-02-01 23:06:03 +05:30
Monika Singh
0490d89319 Add Protocol Testing fixes (#694)
* Fix compilation and add Protocol testing fixes

* Update debug function with correct config flag
2023-01-31 21:56:54 +05:30
Hein Tibosch
d6ddb24a83 Changes after testing all other protocols IPv4 and IPv6 (#689)
* 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
2023-01-31 21:20:06 +05:30
Hein Tibosch
f7884dbb75 Changes after testing TCP IPv4 and IPv6 (#688)
* Changes after testing TCP IPv4 and IPv6
* After running uncrustify
2023-01-31 21:19:18 +05:30
Tony Josi
937ac3b50a Fix unit test build issues and test failures for ARP, TCP, UDP (#682)
* WIP

* Fixed ARP, with 2 test cases pending which requires src changes which are not priority. Fixed TCP and UDP test cases.

* return value of xProcessReceivedUDPPacket initialized to pdFAIL
2023-01-30 09:43:30 +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
Tony Josi
ac1fdae585 Fixed failing test cases for TCP transmission unit tests (#672)
* Fixed minor issue with build

* Fix minor compilation error with latest unit test changes

* WIP

* Fixed failing tcp transmission unit tests

* Undo commenting few test cases that were commented by mistake

* Fix PR review comments
2023-01-24 16:11:15 +05:30
Monika Singh
964790f76e Fix unit test cases for FreeRTOS_DHCP (#662)
* Fix segmentation Fault
* Fix unit test cases for FreeRTOS_DHCP
2023-01-17 21:56:55 +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
Tony Josi
30b61a28ea Fixed failing test cases for ARP unit tests (#674)
* 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
2023-01-16 16:08:46 +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
Tony Josi
f3b54f9150 Fix failing test cases for DNS unit tests (#663)
* WIP dns test cases

* WIP DNS unit tests, fix failing tests

* Fix failing tests for DNS cache unit tests

* WIP dns unt test cases fix

* WIP dns unt test cases fix

* WIP failing test cases for DNS unit test

* WIP fix failing test cases for DNS callback

* WIP fix dns networking unit tests

* WIP fix failing unit test cases for DNS parser

* WIP fix failing test cases for the DNS parser unit tests

* Fixed failing test cases for the DNS networking unit tests

* WIP fix failing unit test cases for DNS

* Fixed failing test cases for DNS unit tests

* Fixed failing test cases for the DNS unit tests

* Fix failing test cases for the DNS callback unit tests

* Fixed failing test cases for DNS parser and updted the TreatNBNS function

* xDNS_IP_Preference kept xPreferenceIPv4 by default
2023-01-09 08:54:23 +05:30
Monika Singh
b922775946 Fix unit test cases for FreeRTOS_Sockets (#651)
* Fix unit test cases for FreeRTOS_Sockets_TCP_API_utest
* Fix unit test case for FreeRTOS_Sockets_privates_utest
* Fix unit test case for FreeRTOS_Sockets_GenericAPI_utest
* Fix unit test case for FreeRTOS_Sockets_UDP_API_utest
* Update ucASCIIToHex
2023-01-06 17:35:28 +05:30
Tony Josi
e8bec09103 Fix tcp transmission test cases (#657)
* WIP fix tcp transmission utests

* WIP fixing failing test cases for TCP transmission unittests

* Fix issue with tcp test case arguments getting changed when passed to functions

* Fixed failing unit tests for TCP transmission unit tests
2023-01-06 12:35:29 +05:30
Tony Josi
5ff68c779c Fix udp ip failing unit test cases (#647)
* WIP fix failing test cases

* Fixed failing tests for UDP IP unit tests

* Fixed unit tests failures after combining v4 specific source with main udp ip source

* Removing unused code
2023-01-06 12:26:44 +05:30
Tony Josi
afcedead21 Fix build issues for the DNS parser unit tests (#650)
* WIP fix build failure for DNS parser unit tests

* Fixes build issues for dns parser

* Fix build issues DNS parser
2022-12-26 09:07:05 +05:30
Tony Josi
575425866e Fixes the build issue with unit tests for IP timers (#603)
* WIP Fix build for IP ttimers

* Fixed build for IP timers

* removed global config settings specific to ip timers test

* Updating the branch with latestt target branch changes

* Uncrustify: triggered by comment.

Co-authored-by: GitHub Action <action@github.com>
2022-12-22 12:43:54 +05:30
Tony Josi
a967878749 Fixes the build issue with unit tests for ip diffconfig (#624)
* Fixed build issues related to IP diffconfig ut folder

* Updating to lastest target branch changes
2022-12-22 12:43:23 +05:30
Tony Josi
c54475f9b1 Fixes the build issue with unit tests for dhcp (#621)
* Fix DHCP build issues

* WIP fix warnings for DHCP utest

* Updating to latest target branch changes
2022-12-22 12:42:51 +05:30
Monika Singh
4624fb0e00 Remove use of ipconfigCOMPATIBLE_WITH_SINGLE (#646)
As ipconfigCOMPATIBLE_WITH_SINGLE is never enabled and used partially, removing the rest of the instances of the same.
Ran uncrustify.
2022-12-21 20:09:40 +05:30
Tony Josi
7e778de0e0 Fix unit tests for ARP file (#640)
* Fix build issues for arp utests

* Added fix for ARP utests  build failure
2022-12-19 21:54:23 +05:30
xuelix
1b8cb751bb Fixing MISRA violations for FreeRTOS_TCP* files (#620)
Fix TCP compilation errors
Add missing fix of TCP compilation
Update for TCP misra violation fix
2022-12-19 15:34:54 +05:30
Tony Josi
2e4c5a116a Ut build fixes for FreeRTOS_IP file (#623)
Fixed build failure for FreeRTOS_IP unit tests for IPv4
2022-12-19 15:22:21 +05:30
Tony Josi
2b0c174b0c Ut build fix ip utils ipv4 (#605)
* WIP fix build issues

* Edit unit test files to ake it buuildable

* WIP build issues fix

* Fixed IP utils ut build

* Removed update made on the global freertos ip config used by the unit tests

* Updating branch to the latest target branch

* Running uncrustify
2022-12-16 20:53:13 +05:30
Monika Singh
536fab9079 Fix uncrustify erros (#617)
Fix uncrusitfy whitespace errors.
Fix Build error in ARP related files.
2022-12-16 17:12:43 +05:30
Monika Singh
66ca9c2011 Update DNS file to add end point changes (#607)
* Add endpoint changes to DNS files.
* SocketAddress changes
* Update DNS_Parser
* Provide stub for NetworkInterface functions
* Run uncrustify
2022-12-16 16:18:47 +05:30
Tony Josi
a258739e9a Ut build fix udp ip ipv4 (#616)
* WIP udp bui;d fix

* Fixed build isses for UDP utests
2022-12-16 15:55:37 +05:30
Tony Josi
8562669587 Fixing spell check issues (#613) 2022-12-16 14:33:01 +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
Monika Singh
58eab85964 Fix compilation with end point changes (#612)
Add changes to fix compilation with End point changes being added on TCP/UDP.
Run Uncrusitfy.
2022-12-15 22:59:58 +05:30
shubnil
e4f30d681e Changes to incorporate UDP changes for IPv6 (#611) 2022-12-15 21:18:50 +05:30
xuelix
087794a9e5 Fix TCP compilation errors (#610)
* Fix TCP compilation errors

* Add missing fix of TCP compilation
2022-12-15 12:02:17 +05:30
shubnil
6bff70c0e0 IPv6 Changes for TCP protocol (#595)
The change add support for IPv6 anf TCP.
Files modified/added:
    FreeRTOS_TCP_IP.c
    FreeRTOS_TCP_IP_IPV4.c
    FreeRTOS_TCP_IP_IPV6.c
    FreeRTOS_TCP_Reception.c
    FreeRTOS_TCP_State_Handling.c
    FreeRTOS_TCP_State_Handling_IPV4.c
    FreeRTOS_TCP_State_Handling_IPV6.c
    FreeRTOS_TCP_Transmission.c
    FreeRTOS_TCP_Transmission_IPV6.c
    FreeRTOS_TCP_Transmission_IPv4.c
    FreeRTOS_TCP_Utils.c
    FreeRTOS_TCP_Utils_IPV4.c
    FreeRTOS_TCP_Utils_IPV6.c
2022-12-14 11:35:15 -08:00
Monika Singh
70492ce2b4 Fix Compilation Errors (#609)
Fix compilation errors after adding Endpoint changes in ARP file.
Run uncrustify.
2022-12-14 23:27:58 +05:30