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

27 Commits

Author SHA1 Message Date
tony-josi-aws
de3ffd4d69 [AUTO][RELEASE]: Update version number in source files 2024-12-11 04:15:08 +00:00
Holden
1599660ad3 ARP/ND Build Separation (#1175)
* Separate ARP and ND

* Uncrustify: triggered by comment.

* Fully separate ARP & ND

* Fix tracing and config macros

* Fix Build Issues

* Changed resolution enum name

* Add ND Timer event implementation

* Uncrustify: triggered by comment.

* Fix Tests

* Fix Unit Tests

* Uncrustify: triggered by comment.

* Fix CBMC testing

* Fix ARP utest

* Code review suggestion

* In unit-test, define ipconfigIS_ENABLED to nothing to pass compilation.

* Fix UT coverage.

* Fix buffer access issue in UT.

* Fix spelling

* 100% UT coverage

* Review Fixes

* Fix Unit Tests

* Fix Coverage

* Fix CBMC proof for xCheckRequiresARPResolution

* Fix CBMC proof for xCheckRequiresARPResolution and formatting

* Fix build issue with tools/tcp_utilities/http_client_test.c

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
Co-authored-by: ActoryOu <ousc@amazon.com>
2024-11-11 19:49:38 +05:30
Holden
88e1475378 Remove macros ipLOCAL_MAC_ADDRESS and ipLOCAL_IP_ADDRESS_POINTER (#1097)
* remove deprecated ipLOCAL_MAC_ADDRESS

* remove ipLOCAL_IP_ADDRESS_POINTER

* remove xDefaultPartUDPPacketHeader

* Uncrustify: triggered by comment.

* switch remote to local address

* Address Review Comments

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2024-03-20 10:39:47 +05:30
Tony Josi
c91e982b5d Fix build warnings and update CI build checks to cover library header files (#1091)
* fix minor docs formatting with FreeRTOS_get_tx_base

* Fix build with C90

* Add snprintf inside printf flags

* Remove unused code

* Move eGetDHCPState

* Fix eGetDHCPState UTs

* Fix UTs related to dead code removal in FreeRTOS_UDP_IPv6.c

* Remove unused variables

* Uncrustify: triggered by comment

* Address review feedback

* Remove stale comment in the cmake file

---------

Co-authored-by: GitHub Action <action@github.com>
2024-02-05 19:19:22 +05:30
Hein Tibosch
af07ccf4c4 Avoid critical sections where possible (#1063)
* Avoid critical sections where possible

* Repair unit test FreeRTOS_Sockets

---------

Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2024-01-02 12:07:53 +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
574b646147 Fix Clang warnings (#984)
* CMAKe update

* Fix Wdocumentation errors

* Fix Wconditional-uninitialized

* Fix [-Wformat-pedantic

* Fix Wcompound-token-split-by-space and Wgnu-statement-expression

* Add suppression

* Uncrustify: triggered by comment.

* Fix coverity

---------

Co-authored-by: GitHub Action <action@github.com>
2023-07-28 10:25:24 +05:30
Monika Singh
6a0ce6674a Fixes mDNS over IPv6 (#977)
* Add more descriptions of ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM (#947)

* Fixes mDNS over IPv6. (#949)

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: ActoryOu <jay2002824@gmail.com>
Co-authored-by: Monika Singh <moninom@amazon.com>

---------

Co-authored-by: ActoryOu <jay2002824@gmail.com>
Co-authored-by: Emil Popov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
2023-07-24 00:02:54 +05:30
ActoryOu
3d586b6225 [IPv6] Add CBMC test for xProcessReceivedUDPPacket_IPv4 & xProcessReceivedUDPPacket_IPv6 (#899)
* Add IPv6 test for xProcessReceivedUDPPacket

* xProcessReceivedUDPPacket_IPv6
2023-06-19 10:21:55 +08:00
ActoryOu
36173b61c3 [IPv6] Add Unit Test for FreeRTOS_UDP_IPv6. (#869)
* UDPv6 UT basic framework

* xProcessReceivedUDPPacket_IPv6: NULL socket

* xProcessReceivedUDPPacket_IPv6

* vProcessGeneratedUDPPacket_IPv6

* Code beautify

* Spelling
2023-05-23 09:40:10 +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
Tony Josi
8fa0d6b86d Update IPv6 UDP endpoint selection (#853)
* use matching endpoint instead of first endpoint

* update with @htibosch  latest changes

* fix formatting

* fix misra and spellings

* code clean up
2023-05-02 09:38:00 +05:30
Monika Singh
a492abb0a8 Fix Additional Clang warnings
Corrects several warnings from Clang flags
for Clang 13.
2023-04-18 11:00:00 +00:00
ActoryOu
8e7a3fe5a1 Check packet length for IPv6. (#811)
* Check IPv6 packet length.

* Fix unused compile warnings.

* Move xCheckSizeFields to static function and fix unit test cases.

* Add minimum length check for IPv6 transport layer.
2023-04-06 17:09:24 +08:00
ActoryOu
525a4207bb Discard UDPv6 with zero checksum. (#790)
* Reject UDPv6 if checksum is 0.

* Fix MISRA violations.
2023-03-28 14:14:03 +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
Tony Josi
76e880a3bc Minor documentation fix and refactoring changes for DHCP CBMC proofs (#744)
* Minor changes to the CBMC DHCP proof to make the code more readable

* minor documentation fix

* fix unit tests

* Uncrustify: triggered by comment

* minor update

---------

Co-authored-by: GitHub Action <action@github.com>
2023-02-28 15:54:53 +05:30
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
Tony Josi
0e9628796c Fixing doxygen comments (#728)
* updating doxygen config

* fixing doxygen comments

* adding IPv6 files and fixing comments

* fix doxygen cfg and file names in comments

* wip doxygen v6 docs

* adding doxygen comments

* include RA src file to doxgendocs generation

* fix spell check issues

* Uncrustify: triggered by comment.

* fix minor build issue

* fix spell check issues

* Uncrustify: triggered by comment

* fix trailing white space

* 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>

* Fix CBMC proofs for DNS (#718)

* Use CBMC XML output to enable VSCode debugger (#673)

Prior to this commit, CBMC would emit logging information in plain text
format, which does not contain information required for the CBMC VSCode
debugger. This commit makes CBMC use XML instead of plain text.

Co-authored-by: Mark Tuttle <tuttle@acm.org>

* wip

* wip DNSgetHostByName

* wip DNSgetHostByName

* fixed cbmc proof for DNS_ReadNameField

* wip DNSgetHostByName_a_harness

* Fix CBMC prooff for DNSgetHostByName

* wip fix DNSgetHostByName_a CBMC proof

* fixed cbmc target func not called issue in DNSclear

* fixed cbmc target func not called issue in DNSlookup

* fix DNSgetHostByName_a CBMC proof

* update comments

* more asserts

* fixing formatting

* updating as per review comments

* fix dns after review comments

* adding more asserts

* adds more asserts

* minor fix

* fixing comments

* fixing comments

* fixing minor issue

* fixing DNS_ReadReply() signature

* making code more consistant

* adding more  asserts

* making code more consistent

---------

Co-authored-by: Kareem Khazem <karkhaz@amazon.com>
Co-authored-by: Mark Tuttle <tuttle@acm.org>

* Uncrustify: triggered by comment

* fixing formatting

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Monika Singh <108652024+moninom1@users.noreply.github.com>
Co-authored-by: Kareem Khazem <karkhaz@amazon.com>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
2023-02-24 13:58:53 +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
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
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
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
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