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

25 Commits

Author SHA1 Message Date
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
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
Soren Ptak
ecd1307f1e Uncrustify PR Check Update (#969)
* Update uncrustify to use version other repos use, clean up the way it runs, formatting changes to needed files
* Moving the lexicon.txt to where it lives in all other repos
* Removing executable permissions from .c files
---------
2023-07-20 16:21:57 -07:00
ActoryOu
04afe5f5b5 [IPv6] Fix coverity (#933)
* Fix coverity

* Fix UT

* Fix build combination

* Suppress rule 17.2

* Fix 11.3 and 15.7 violations
2023-06-26 11:18:05 +05:30
kar-rahul-aws
07af934526 Add CBMC proofs for DHCPv6ProcessEndPoint (#913)
* Add CBMCproofs  or DHCPv6

* Force push

* Fix spell check

* Fix formatting

* Fix vDHCPv6ProcessEndPoint

* prvDHCPv6Analyse

* Fix vDHCPv6Process

* Fix DHCPv6HandleOption

* Update endpoint

* adding declaration to function.

* Update comment

* Update vDHCPv6Process to return in case of static ip is used

* Update comments

* Address comment

* Update spell checker

* Update comment

---------

Co-authored-by: ActoryOu <ousc@amazon.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
2023-06-22 22:53:42 +05:30
kar-rahul-aws
c30b2ef09c [DHCPv6] Add CBMC test for xDHCPv6Process_PassReplyToEndPoint & prvSendDHCPMessage (#909)
* Add cbmc proof

* Force push

* Fix formatting

* Fix build error

* Formatting fix

Co-authored-by: ActoryOu <jay2002824@gmail.com>

* Formatting suggestion fix

Co-authored-by: ActoryOu <jay2002824@gmail.com>

* Removing unnecessary comment

Co-authored-by: ActoryOu <jay2002824@gmail.com>

* Removing unnecessary comment

Co-authored-by: ActoryOu <jay2002824@gmail.com>

* add CBMC proof for xDHCPv6Process_PassReplyToEndPoint

* fix unit tests, coverage, refactor

---------

Co-authored-by: ActoryOu <jay2002824@gmail.com>
Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
2023-06-22 18:56:27 +05:30
ActoryOu
8c86e2be02 [IPv6] Add Unit Test for FreeRTOS_DHCPv6. (#857)
* Basic DHCPv6 UT framework.

* Add test cases for eGetDHCPv6State

* Add reset test case

* Add test cases for solicit happy path.

* Refine test flow

* Add test cases for advertise.

* Add final timeout & test case on waiting reply.

* Add DHCP address lease unit test case

* Add test case for socket creation failed.

* Disable debug print

* Fix coverage scan

* Add test cases for wrong msg type & transaction ID.

* Add more error handling case.

* Add test cases for prvIsOptionLengthValid

* Rename test case

* Add test case for prvDHCPv6_handleStatusCode

* Add test cases for vDHCPv6ProcessEndPoint_HandleReply

* Add test case for xDHCPv6ProcessEndPoint_HandleAdvertise

* Add test case for xDHCPv6ProcessEndPoint_HandleState

* Refine again.

* Refine again.

* Remove fall back function, not implemented for IPv6.

* Remove unnecessary check

* Add expect state mismatch test.

* Add test cases for create/close sockets.

* Add error handling and UT

* Ignore unknown sub-option.

* Add coverage for prvStateName

* Fix corner case for sub-option.

* Fix spelling & build

* Code beautify and remove unnecessary define

* Remove list_macros.h in DHCPv6 unit test.
2023-05-17 14:33:58 +08:00
ActoryOu
082da9c33d [IPv6] added client DUID check back. (#838)
* Add client DUID check back.
2023-04-19 16:02:14 +08:00
Monika Singh
e219a77b40 Fix build error of unused parameters 2023-04-18 16:11:53 +00:00
Monika Singh
3cffc74ed7 Merge branch 'dev/IPv6_integration' into newdev 2023-04-18 21:34:18 +05:30
ActoryOu
b893d9c00e [IPv6] Check option length in DHCPv6. (#832)
* Add option length check.

* Check buffer boundary in option status code

* Reduce array size in prvDHCPv6_handleStatusCode.

* Cast structure type for xApplicationDHCPHook_Multi.

* Use IP_Address_t in DHCPMessage_IPv6_t and fix coverity.

---------

Co-authored-by: Monika Singh <108652024+moninom1@users.noreply.github.com>
2023-04-18 21:59:42 +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
Monika Singh
7ac0b651f1 Fix build error 2023-04-18 11:00:00 +00:00
ActoryOu
f25b154e28 Fix build check. 2023-04-14 11:11:59 +00:00
ActoryOu
746feda908 Check DHCPv6 option length. 2023-04-14 11:02:46 +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
Monika Singh
e1a31323aa Fix compilation when ipconfigIPv4_BACKWARD_COMPATIBLE is enabled (#780)
* Fix compilation when ipconfigIPv4_BACKWARD_COMPATIBLE = 1

* Fix uncrustify error
2023-03-13 17:10:13 +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
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
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
xuelix
f29870920d Fixing MISRA violation for FreeRTOS_IP*, FreeRTOS_DHCP* (#604)
* Fixing MISRA violation for FreeRTOS_IP*, FreeRTOS_DHCP*
* remove temp change
2022-12-14 09:19:08 +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
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