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

29 Commits

Author SHA1 Message Date
Monika Singh
1ceb4f0361 Update according to devIntegration 2023-07-04 05:48:50 +00:00
Monika Singh
1561608af4 Merge branch 'dev/IPv6_integration' into maintry 2023-07-03 09:57:25 +00:00
ActoryOu
8195ff8b78 [IPv6] Add Unit Test for FreeRTOS_UDP_IP & FreeRTOS_UDP_IPv4 (#879)
* Add UDP_IPv4 UT framework

* xProcessReceivedUDPPacket_IPv4

* vProcessGeneratedUDPPacket_IPv4

* full coverage

* File format

* Revert wrongly set on packet

* Fix comments

---------

Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
2023-06-01 10:22:27 +08:00
Tony Josi
1f98752059 Adding IPv4/v6 build level separation: integration branch (#855)
* use matching endpoint instead of first endpoint

* update with @htibosch  latest changes

* fix formatting

* fix misra and spellings

* code clean up

* wip separation IP

* separation IP

* separation IP

* wip buils separation

* fixing unit tests

* fix unit tests

* fix formatting

* wip , next prvProcessNetworkDownEvent

* adding build separation to ip utils

* fix unit tests

* fix formatting

* update xCheckRequiresARPResolution

* update vARPAgeCache

* update vARPAgeCache

* misra checks

* fix formatting

* fix misra

* wip s/w: FreeRTOS_recvfrom

* wip sockets till prvSocketBindAdd

* adding  build separation to FreeRTOS_Sockets.c

* add build config support to FreeRTOS_inet_pton FreeRTOS_inet_ntop FreeRTOS_GetIPType

* adding build config support

* fix build  issues

* check misra

* minor fix

* fix unit tests

* fix unit tests build

* Uncrustify: triggered by comment

* fix formatting

* build separate FreeRTOS_TCP_IP.c

* build separate FreeRTOS_TCP_Reception.c

* misra fix

* build separate FreeRTOS_TCP_State_Handling.c

* build separate FreeRTOS_TCP_Transmission.c

* build separate FreeRTOS_TCP_Transmission.c fix build

* adding build separation for FreeRTOS_TCP_Utils.c and FreeRTOS_TCP_Transmission.c

* fix formatting

* UDP: Build Separation Changes

Changes in UDP files to support IPv4 and IPv6 Build Separation.

* fix IPv4 build issues post build sep merge

* IPv4 only build

* more - fix IPv4 build issues post build sep merge

* fix DHCP v4

* fix v6 build

* add v6 build checks

* separate v4v6 tcp files

* fix rebase conflicts

* fix formatting

* fix build when TCP disabled

* add more build checks

* adding more ipv4 flags to v4 specific files

* fix udp unit tests

* add build config build tests to CI

* fix formatting

* fix build checks yml

* DNS: Build Separation Changes

Changes for supporting IPv4 and IPv6 build separation in DNS.

* Routing: Build Separtion Changes

Changes for supporting IPv4 and IPv6 build separation in Routing.

* DNS build fix and rebase to latest changes

* fix formatting

* fix unit tests

* fix formatting

* fix MISRA

* updaating ARP functions to be available on all configs

* plus_tcp_demo_cli build config changes

* fix formatting, guard FreeRTOS_FillEndPoint inside ipconfigUSE_IPv4 check

* more build sepration changes to routing

* build separation plus_tcp_demo_cli.c

* fixing issues with routing, fix formatting

* adding pxFindEndpoint of plus_tcp_demo_cli inside ipconfigUSE_IPv6 != 0 check

* minor build fix

* moving usDNSType of endpoint struct out of ipconfigUSE_IPv6 check

* update code to use IP family while using socket APIs

* moving vSetMultiCastIPv4MacAddress to FreeRTOS_IPv4_Utils.c

* fix routing

* build DNS only if IPv4 is enabled

* fix review feedback

* fix build

* fix build

* fix formatting

* fix comment

* fix wrt reeview feedback

* fix unit tests

* cleanup FreeRTOS_MatchingEndpoint

* fix FreeRTOS_MatchingEndpoint to handle cusstom frames

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: shubnil <103672514+shubnil@users.noreply.github.com>
2023-05-09 19:48:59 +05:30
Kody Stribrny
a280275c32 Fix Clang warnings (#809)
Corrects several warnings from Clang flags
for Clang 13.

Inspired by @phelter's bug report
https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/issues/558
2023-03-24 15:19:54 -07:00
Kody Stribrny
e5e84ef23b Correct GCC warnings (#798)
* Correct GCC warnings

Corrects warnings with current GCC flags
for GCC 7.5.0. The only suppressed warning pertains
to function to object pointer conversion which is
required and common for socket callbacks.

* PR feedback

---------

Co-authored-by: Ubuntu <ubuntu@ip-10-0-137-67.ec2.internal>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
2023-03-21 09:32:59 -07:00
Monika Singh
9a955f27ac Add changes for Coverity fix (#729)
* Fix Coverity issues

* Fix Misra 4.4 violation:The comment resembles a code snippet

* Misra: Rule 10.4 violations

* Misra: Rule 11.8 violations

* Misra: Rule 12.1 violations

* Misra: Rule 8.2, 8.4, 8.5, and 8.9 violations

* Misra: Rule 5.3, 5.8, 21.1 and 21.2  violations

* Misra: Rule 5.7 violations

* Misra: Rule 8.3 violations

* Misra: Rule Reverse NULL violations

* Misra: Rule 10.3, 10.8 and 8.13 violations

* Fix 11.3 and suppress 11.4

* Misra: Rule 14.3, 15.7, 17.2 and 17.7 violations

* Misra: Rule 2.2 and 2.7 violation

* Misra: Rule 21.6, 8.5 and 8.13 violation

* Fix UT compilation

* Update comments

* Fix Spell checker

* Update snprintf
2023-02-28 12:55:20 +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
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
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
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
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
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
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
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
Monika Singh
5e56f7739f Add IPv6 data path changes to FreeRTOS_Socket.c (#583)
* Add EndPoint changes to FreeRTOS_Socket.c

* Split Socket.c to IPv4 and IPv6 files

* Combine freertos_sockaddr for IPv4 and IPv6

* Update sendto and recv function to handle IPv4 and IPv6 case

* Run uncrustify
2022-12-05 13:48:17 +05:30
shubnil
c1cb096a90 Revert "Changes to incorporate support for both IPv4 and IPv6 support"
This reverts commit cd11916dd6.
2022-11-15 11:35:40 +05:30
shubnil
cd11916dd6 Changes to incorporate support for both IPv4 and IPv6 support
for UDP protocol.
2022-11-14 23:09:46 +05:30
Monika Singh
902d6bc975 Add Header size functions for IPv6 and IPv4 (#569)
* Add common Header size function for IPv6 and IPv4

* MISRA: Fix rule 1.1, 10.3, 20.9 and suppress rule 20.5

Co-authored-by: Monika Singh <moninom@amazon.com>
2022-11-07 09:59:22 +05:30
Monika Singh
6b20f521dd Add IPv6 specific header files and structures. (#566)
* 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>
2022-11-04 14:03:43 +05:30
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
alfred gedeon
80876f5301 Consolidate all misra inline violation justifications into a single file (#521)
* Consolidate all misra inline violation justification into a single file

* Style: fix formatting error

* Style: fix formatting error

* Fix build error

* fix merge errors

* fix merge conflicts

* Style: improve misra exception file

* Updated the justification for MISRA rule 2.2 violation

* Fix comments and justification for MISRA rule 8.9

* Update justification for MISRA rule 11.3

* Updated wording of violation of rule 11.4 ref 5

* Updated the justification of rule 11.4 ref 29

* Fixed comment and justification for ref 31

* Update rule 11.6

* Fix some violations

* Update justifications of various violations

* Fix formatting

* Remove the previous verison of violation table

* Update formatting to separate reference numbers from the text

* Update ref for rule 2.2 and 8.9

* Update rule 11.3 references

* Added rule 11.4

* Added rule 11.6

* Added rule 11.8

* Update refs in MISRA.md

* Add rule 14.3

* Fix 21.6, 17.2 and 20.10

* Fix spell check

* Fix mis-spelled words and address review comments

* Add link to 8.9

* Add 11.3 link

* Add link for 11.4

* Add links for 14.3

* Add remaining links

* Updated some justifications and simplified code to remove deviation

* Fixed spelling errors

* Fix justification for rule 11.3 violation

* Update the link to be a hyperlink

* Update comments for misaligned access

* Add link to project wide suppression file

* Updated wording in MISRA config

* Fix grammar and reorder file

* Address comments

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2022-07-26 11:30:42 -07:00
xuelix
ab519329f4 Misra rule 11.3, 11.4 suppression and 4.6 fix (#512)
* Misra rule 11.3 inline suppression

* Added several MISRA deviations

* MISRA Rule 11.4 inline suppression

* Misra violation fix 4.6

* Misra rule 1.2 suppression
2022-07-12 14:20:52 -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
alfred gedeon
aeac4fa9ed Misra: Rule 10.4 violations (#495)
* Misra: Rule 10.4 violations

* Style: Fix formatting
2022-07-01 13:28:37 -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