Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't Fragment Flags patch. #179

Merged
merged 9 commits into from
Feb 3, 2021
Merged

Don't Fragment Flags patch. #179

merged 9 commits into from
Feb 3, 2021

Conversation

evpopov
Copy link
Contributor

@evpopov evpopov commented Jan 26, 2021

IP fragmentation tweaks as discussed in https://forums.freertos.org/t/freertos-tcp-do-not-fragment-flag/11616/3

Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

Related Issue

None

…ccessible to all protocols

Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.
@evpopov evpopov requested a review from a team as a code owner January 26, 2021 20:12
@evpopov
Copy link
Contributor Author

evpopov commented Jan 26, 2021

Would someone please explain why the formatting check is failing?
I can't figure out what I did wrong. Is it the use of tabs instead of spaces for indentation?

Please also let me know if I did anything wrong as this is my first ever pull request.

@AniruddhaKanhere
Copy link
Member

Hello @evpopov!
First of all, thanks a lot for this PR.
The formatting check is failing since there are tabs instead of spaces (and maybe something else is not proper as well). We use uncrustify to check and format the code. The config file to be used is the one present in tools/uncrustify.cfg.

If you would like me to push the changes to make the tests pass, then let me know and I'll do it for you. :)

@evpopov
Copy link
Contributor Author

evpopov commented Jan 27, 2021

Aniruddha,
Thanks for the clarification. Please go ahead and push the changes as it will take me until tomorrow to get to work, get familiar with uncrustify and do with another commit.
I plan on submitting a few "actual" improvements in the near future. I'm using this fairly simple patch to get my feet wet and get a feel for the overall process.

Thanks again.

Comment on lines -118 to -127
#if ( ipconfigETHERNET_DRIVER_FILTERS_PACKETS == 0 )
#if ( ipconfigBYTE_ORDER == pdFREERTOS_LITTLE_ENDIAN )
/** @brief The bits in the two byte IP header field that make up the fragment offset value. */
#define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0xff0f )
#else
/** @brief The bits in the two byte IP header field that make up the fragment offset value. */
#define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0x0fff )
#endif /* ipconfigBYTE_ORDER */
#endif /* ipconfigETHERNET_DRIVER_FILTERS_PACKETS */

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was expanded with more definitions and moved to FreeRTOS_IP_Private.h so that those defines are accessible to al IP-based protocols.

@evpopov
Copy link
Contributor Author

evpopov commented Jan 27, 2021

Hello @evpopov!
First of all, thanks a lot for this PR.
The formatting check is failing since there are tabs instead of spaces (and maybe something else is not proper as well). We use uncrustify to check and format the code. The config file to be used is the one present in tools/uncrustify.cfg.

If you would like me to push the changes to make the tests pass, then let me know and I'll do it for you. :)

I tried.... I ran uncrustify on all the files that I've touched with the config file from tool, and pushed to github.
I would appreciate it if you could let me know what I am missing.... Uncrustify changed the files as you can see in the latest commit, but the checks fail and I can understand exactly what the error is so I can fix it.

Thanks

@AniruddhaKanhere
Copy link
Member

Hello @evpopov,
Apologies for the bit late reply. I have uncrustified the files now as you can see with the last commit.

I ran uncrustify on all the files that I've touched with the config file from tool.

While it is absolutely okay and viable to check and uncrustify the files manually one by one, I find that tedious and error-prone. I generally go to the root directory of the git repository and use something like this to get all the files:
find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} +

I would appreciate it if you could let me know what I am missing

The formatting changes done by uncrustify depends on the version of uncrustify you use as far as I can tell. I am (and FreeRTOS+TCP is) using version 0.66.1_f. Which one were you using?

Copy link
Member

@AniruddhaKanhere AniruddhaKanhere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @evpopov,

Please see the comments.
@htibosch - what do you think about the comments I have? Did I miss something?

#define ipFRAGMENT_FLAGS_MORE_FRAGMENTS ( ( uint16_t ) 0x0020 )
#else
/* The bits in the two byte IP header field that make up the fragment offset value. */
#define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0x0fff )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to this RFC, the flags field is 3 bits long and the offset field is 13 bits long. Would it be more proper to make this 0x1fff instead of what it is now?

Consider a scenario where the value of these 2 bytes in an incoming IP packet is 0x1000 (this would be the last fragment since the MF flag is not set and the offset is 0x1000 octets - should not be supported), it would pass the check you have modified in FreeRTOS_IP.c with the flags as they are now.

if( ( ( pxIPHeader->usFragmentOffset & ipFRAGMENT_OFFSET_BIT_MASK ) != 0U ) || ( ( pxIPHeader->usFragmentOffset & ipFRAGMENT_FLAGS_MORE_FRAGMENTS ) != 0U ) )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are absolutely right. I totally missed that. the offset mask is definitely 0x1FFF and 0xFF1F respectively.

/* The bits in the two byte IP header field that make up the fragment offset value. */
#define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0x0fff )
/* The bits in the two byte IP header field that make up the flags value. */
#define ipFRAGMENT_FLAGS_BIT_MASK ( ( uint16_t ) 0xf000 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, should this be made 0xe000?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely! Totally my bad. Flags mask should be 0xE000 and 0x00E0 respectively

Comment on lines 421 to 423
#define ipFRAGMENT_OFFSET_BIT_MASK ( ( uint16_t ) 0xff0f )
/* The bits in the two byte IP header field that make up the flags value. */
#define ipFRAGMENT_FLAGS_BIT_MASK ( ( uint16_t ) 0x00f0 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comments on the Big-endian version. Maybe apply the same suggestion here?

FreeRTOS_IP.c Outdated
Comment on lines 1848 to 1849
* flag on outgoing IP frames. The first fragment coming in will have its
* "more fragments" flag set and later fragments will have a non-zero offset. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the comment here. Very helpful and explanatory. But I think that we might be able to make it a bit more accurate as so:

Suggested change
* flag on outgoing IP frames. The first fragment coming in will have its
* "more fragments" flag set and later fragments will have a non-zero offset. */
* flag on outgoing IP frames. All but the last fragment coming in will have their
* "more fragments" flag set and the last fragment will have a non-zero offset. */

What do you think?

@evpopov
Copy link
Contributor Author

evpopov commented Jan 29, 2021

Hello @evpopov,
Apologies for the bit late reply. I have uncrustified the files now as you can see with the last commit.

I ran uncrustify on all the files that I've touched with the config file from tool.

While it is absolutely okay and viable to check and uncrustify the files manually one by one, I find that tedious and error-prone. I generally go to the root directory of the git repository and use something like this to get all the files:
find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} +

I would appreciate it if you could let me know what I am missing

The formatting changes done by uncrustify depends on the version of uncrustify you use as far as I can tell. I am (and FreeRTOS+TCP is) using version 0.66.1_f. Which one were you using?

I am sure I'm using a newer version. I believe it's 0.72 and I though it wouldn't be a problem when I downloaded it, but I guess I was wrong. I will get 0.66.1_f ( hopefully it's available for windows)

@htibosch
Copy link
Contributor

I will get 0.66.1_f ( hopefully it's available for windows)

Sure it is available, e.g. at Sourceforge.
I run version 0.67 as follows: uncrustify.exe -c c:\config\uncrustify.cfg -f source.c > source.new.

About your patch: when applying it, all outgoing packets will advertise that IP-fragmentation is not allowed.

If the MTU of a router is too small, the packet will be dropped, and an ICMP packet will inform the sender about this event.
However, FreeRTOS+TCP does not yet recognise this type of ICMP message.

So I'm afraid that we will get complaints from users if the DONT FRAGMENT flags will be set unconditionally.

I would like to see that the new feature is configurable through FreeRTOSIPConfig.h, defaulting to zero in FreeRTOSIPConfigDefaults.h, for instance:

    #define ipconfigADVERTISE_DONT_FRAGMENT_FLAG   0

@evpopov
Copy link
Contributor Author

evpopov commented Jan 29, 2021

I will get 0.66.1_f ( hopefully it's available for windows)

Sure it is available, e.g. at Sourceforge.
I run version 0.67 as follows: uncrustify.exe -c c:\config\uncrustify.cfg -f source.c > source.new.

About your patch: when applying it, all outgoing packets will advertise that IP-fragmentation is not allowed.

If the MTU of a router is too small, the packet will be dropped, and an ICMP packet will inform the sender about this event.
However, FreeRTOS+TCP does not yet recognise this type of ICMP message.

So I'm afraid that we will get complaints from users if the DONT FRAGMENT flags will be set unconditionally.

I would like to see that the new feature is configurable through FreeRTOSIPConfig.h, defaulting to zero in FreeRTOSIPConfigDefaults.h, for instance:

    #define ipconfigADVERTISE_DONT_FRAGMENT_FLAG   0

Hein,
If you recall our discussion here, I originally had a define, but you suggested I submit the PR without even bothering with a define.

I just tried uncrustify again ( with the proper version this time ) and it appears to work properly now.
I will fix the masks, add a configuration define with a default value and push again. Hopefully if I understand how GitHub works, even if I push on my fork, we will see the new commit in this PR.

@htibosch
Copy link
Contributor

but you suggested I submit the PR without even bothering with a define.

Sorry, yes, you are right! Only after reading the RFC's, i realised that this flag will also affect the behaviour of all routers involved, I thought the flag would only have a meaning to the peer at the other side.

So yes, introducing ipconfigFORCE_IP_DONT_FRAGMENT is a good idea.

Otherwise, I'm all happy with your patch, thanks!

@hs2gh
Copy link
Contributor

hs2gh commented Jan 29, 2021

Hi @evpopov ,
I'd like to follow @AniruddhaKanhere advise to ditch my PR since yours covers my relevant changes.
Would you mind to add the 'U'nsigned specifier to the defines where missing ? I think it's better to have consistently typed literals.
Thanks !

AniruddhaKanhere and others added 2 commits January 29, 2021 08:58
…0xF000 -> 0x1FFF and 0xE000 )

Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere
@htibosch
Copy link
Contributor

@evpopov one advice: you cloned the repo, and then you made changes to the main branch.
I think that it is more practical to create a new branch for each new PR. These PR branches will only be temporal, you can delete them as soon as the PR has been merged.

Your main branch will always be a copy of the main branch in the Github repo.. When you see changes, you can do a new pull.

fixes a typo in FreeRTOSIPConfigDefaults.h
@evpopov
Copy link
Contributor Author

evpopov commented Jan 29, 2021

@evpopov one advice: you cloned the repo, and then you made changes to the main branch.
I think that it is more practical to create a new branch for each new PR. These PR branches will only be temporal, you can delete them as soon as the PR has been merged.

Your main branch will always be a copy of the main branch in the Github repo.. When you see changes, you can do a new pull.

Ok. I was left with the impression that I was supposed to do the PR on main. My bad. So if I understand you correctly, next time I want to do a PR, I would:

  • fork the repo
  • checkout main ( or multi if that's what I need )
  • make a new branch with a descriptive name
  • push mu changes in the new branch
  • submit a PR for this new branch
  • when the PR is merged, just clean everything up in my fork.
    Is that what you'd call a more "normal" workflow?

@AniruddhaKanhere
Copy link
Member

Ok. I was left with the impression that I was supposed to do the PR on main. My bad. So if I understand you correctly, next time I want to do a PR, I would:

  • fork the repo
  • checkout main ( or multi if that's what I need )
  • make a new branch with a descriptive name
  • push mu changes in the new branch
  • submit a PR for this new branch
  • when the PR is merged, just clean everything up in my fork.
    Is that what you'd call a more "normal" workflow?

Indeed. That is what the "correct" or at least the conventional workflow is.
After all this, If you see more changes on the main branch of FreeRTOS+TCP, you can pull them to your fork :)

@htibosch
Copy link
Contributor

Is that what you'd call a more "normal" workflow?

I think that is all correct what you write. I normally have a single clone of FreeRTOS-Plus-TCP. When I change code of main branch, I can only use the clone for a single PR. I will need main to create a next branch, and a next one. And so main must always be up-to-date with the original.

In stead, when I use a new branch for each PR, I can have several outstanding PR's at a time, using the same clone. Some will make it, others will be dropped.

htibosch
htibosch previously approved these changes Jan 29, 2021
Copy link
Contributor

@htibosch htibosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the comment in FreeRTOSIPConfigDefaults.h is quite long. Otherwise I approve of this PR, thank you for this.

@evpopov evpopov closed this Jan 29, 2021
@evpopov evpopov reopened this Jan 29, 2021
@evpopov
Copy link
Contributor Author

evpopov commented Jan 29, 2021

I think that the comment in FreeRTOSIPConfigDefaults.h is quite long. Otherwise I approve of this PR, thank you for this.

Done
And I apologize for closing and reopening the PR. I clicked the wrong button.

@evpopov
Copy link
Contributor Author

evpopov commented Jan 29, 2021

but you suggested I submit the PR without even bothering with a define.

Sorry, yes, you are right! Only after reading the RFC's, i realised that this flag will also affect the behaviour of all routers involved, I thought the flag would only have a meaning to the peer at the other side.

So yes, introducing ipconfigFORCE_IP_DONT_FRAGMENT is a good idea.

Otherwise, I'm all happy with your patch, thanks!

@htibosch I somehow missed that comment. If you want me to rename the define from ipconfigADVERTISE_DONT_FRAGMENT_FLAG to my original ipconfigFORCE_IP_DONT_FRAGMENT, I can do this on Monday.
Just let me know or feel free make whatever changes you feel should be made.

@htibosch
Copy link
Contributor

And I apologize for closing and reopening the PR. I clicked the wrong button.

That also happened many times to me, no problem.

rename the define from ipconfigADVERTISE_DONT_FRAGMENT_FLAG
to my original ipconfigFORCE_IP_DONT_FRAGMENT

Your original is also good, thanks.

@evpopov : I am curious what was you motivation to set this DONT_FRAGMENT flag? Did you observe problems when it was not set?

@evpopov
Copy link
Contributor Author

evpopov commented Jan 30, 2021

Your original is also good, thanks.

@evpopov : I am curious what was you motivation to set this DONT_FRAGMENT flag? Did you observe problems when it was not set?

@htibosch I will go back to the original "FORCE" wording then and push first thing on Monday.

As far as my motivation.... I've been working with lwip and FreeRTOS+TCP to develop industrial controllers for conveyors for the past 15 years The companies that I've worked for have been fairly small and the importance of that will become apparent in a bit.
I have had 2 occasions where the device on the other side of the wire would simply ignore the packets of my devices. In the first case it was one of Allen Bradley's PLCs (10-12 years ago) and I happened to have a PC tool that spoke the same protocol and the PC tool would talk to the PLC in question while the PLC ignored my device's packets. The only difference was the DF bit in my packets was clear. Forcing the DF bit in lwip ( at that time ) corrected the issue. The second occasion that somebody's device was ignoring my packets it was the intuition from the first experience that hinted to that "if everything is triple-checked and my packets are still not causing a response", I should try the DF bit. This was about 3-4 years ago but the offending device escapes me...
It is very frustrating to find something like that, and I'd say that discarding packets simply because the DF bit was clear is a definite fault of the discarding device, however when that device is produced by a big and slow-moving company, I can't depend on them to fix their issue in a timely manner. It's simply impossible for a small company to take a stand and blame the big company while it's own customers are asking and waiting for you to produce firmware that connects to the offending device. I just force the DF bit and move on. These two experiences are why I have to force DF in my line of work. It was important to me to add this option upstream of my repos because that way I don't have to drag my patches with me every time I pull.

Nowadays I see a lot of "normal" traffic even from PCs stacks that support fragmentations us the DF bit. Look at your web browser traffic and you will probably see a DF bit in both the requests and responses. I don't know why it's being set when a PC has plenty of resources to handle fragments, but that traffic ( to me ) is a hint that nowadays, most networks along the route support 1518 byte frames and if all networks are the same, then fragmentation would be obsolete. Fragmentation also poses a security risk because it can hide maliciously-constructed frames from being easily detected and dropped before they reach their destination. It's quite common for firewalls to drop fragments because they can't fully inspect the frame.
It is because of this last paragraph that I personally consider setting the bit to be the "safe" default behavior. I fully understand that the team here would probably be skeptical and would prefer the default behavior to match the older versions, so I haven't voiced that option until now. I can just set the my define and take my own risks however small they are.

I hope you enjoyed my little tirade. I have a couple more improvements in my work repos that I plan on proposing later because this is a great piece of code and I'd love to help improve it.

@htibosch
Copy link
Contributor

Thanks for the explanation, that is clear. Actually we should have this interesting discussion on the FreeRTOS forum.
Maybe next time, we can first have a discussion there, before proceeding to Github.

most networks along the route support 1518 byte frames and if all

I tested that a couple of years ago, but my 1514-byte packets would be dropped along the path.
It was decided to limit the MSS for Internet communication to:

#define tcpREDUCED_MSS_THROUGH_INTERNET    ( 1400 )

This length turned out to be small enough to always be accepted.

a security risk because it can hide maliciously-constructed frames from being easily detected

That is why FreeRTOS+TCP stopped supporting IP-fragmentation a couple of years ago.

I can just set the my define and take my own risks however small they are.

One more idea: we can also add a property to the socket, which can be set with a new socket option:

#define FREERTOS_SO_FORCE_DONT_FRAGMENT      ( 19 )

We could keep the default off.

The reason for this proposal is that I wonder if some users want to use both, depending on the protocol or on the socket. The new socket option gives that flexibility.

this is a great piece of code and I'd love to help improve it.

Good to hear that, thanks!

@htibosch
Copy link
Contributor

htibosch commented Feb 2, 2021

I will get 0.66.1_f ( hopefully it's available for windows)

Sure it is available, e.g. at Sourceforge.
I run version 0.67 as follows: uncrustify.exe -c c:\config\uncrustify.cfg -f source.c > source.new.

A small correction: uncrustify.0.66.1.exe gives better results as there are small differences with version 0.67.

@evpopov
Copy link
Contributor Author

evpopov commented Feb 2, 2021

Ok, changed to uncrustify 0.66.1 and did the last renaming.
Guys, if nobody has any objections, let's try and leave this at it's current state. I'm getting very side-tracked at work.
@htibosch , I'm having doubts about the socket option idea, but as you suggested, let's continue that discussion in the forum I'll write something up there in the next couple of days after I put some more though into MTUs, MSS, socket options, etc.

@AniruddhaKanhere AniruddhaKanhere merged commit 7df143c into FreeRTOS:main Feb 3, 2021
AniruddhaKanhere added a commit that referenced this pull request Feb 24, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Include ICMP checksum

* Uncrustify

* Update ci.yml

* Spell check

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
gkwicker added a commit that referenced this pull request Mar 3, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
gkwicker added a commit that referenced this pull request Mar 22, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update proof to use assert with readability check

* Revert ci.yml changes

* Remove unwanted changes

* Null check

* Fix adding NULL checks

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
gkwicker added a commit that referenced this pull request Mar 23, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

* First commit

* Cleanup

* Update: working version

* Coverage of eARPGetCacheEntry

* Update

* Unit-test and clenaup

* 100% line and function coverage

* Uncrustify and update

* 100% all coverage

* Move files to correct location

* Fix tests

* uncrustified

* Update ci.yml

* Update

* uncrustify and update after Hein's comments

* Empty commit

* Clenaup after @yanjos-dev's review

* Update CI

* Cleanup - pass 1

* Remove gdb

* Uncrustify

* Remove litani changes

* Clean up

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
AniruddhaKanhere added a commit that referenced this pull request Apr 8, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Make some code changes as a precursor for unit-testing

* remove unused file

* Fixed failing checks

* Fixed CBMC proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
AniruddhaKanhere added a commit that referenced this pull request Aug 8, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* parent be9fe45d8ec440f7750de0f4870b28de39b10a3b
author Hein Tibosch <hein_tibosch@yahoo.es> 1609879469 +0800
committer Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> 1619029134 -0700

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Create uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

* Remove unused file

Include ICMP while calculating IP header checksum (#198)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Include ICMP checksum

* Uncrustify

* Update ci.yml

* Spell check

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add comment to CI.yml

fix compiler warnings about casting to format string (#197)

* fix compiler warnings about casting to format string

Fix various warnings like:

/FreeRTOS-Plus-TCP/FreeRTOS_IP.c: In function 'FreeRTOS_strerror_r':
/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3395:60: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
             ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int32_t ) xErrnum );
                                                           ~^   ~~~~~~~~~~~~~~~~~~~
                                                           %ld

* explicitly cast arguments to format string

This should hopefully make the format string compatible
with all architectures.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Added git-secrets check to Github actions (#201)

Add header file to socket.h so that it can be compiled on its own (#204)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

User hook function for handling unsupported Ethernet frames (#200)

* Adds an optional user hook that gets called for all unhandled Ethernet frames.

* re-wording

* Fix spell check

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Limit the number of attempts to resolve an address in xARPWaitResolution() (#206)

Co-authored-by: Hein Tibosch <hein@htibosch.net>

Update litani submodule to version 1.6.0 (#210)

[CBMC] Add assert with readability check (#214)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update proof to use assert with readability check

* Revert ci.yml changes

* Remove unwanted changes

* Null check

* Fix adding NULL checks

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add unit-tests for FreeRTOS_ARP.c (#209)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

* First commit

* Cleanup

* Update: working version

* Coverage of eARPGetCacheEntry

* Update

* Unit-test and clenaup

* 100% line and function coverage

* Uncrustify and update

* 100% all coverage

* Move files to correct location

* Fix tests

* uncrustified

* Update ci.yml

* Update

* uncrustify and update after Hein's comments

* Empty commit

* Clenaup after @yanjos-dev's review

* Update CI

* Cleanup - pass 1

* Remove gdb

* Uncrustify

* Remove litani changes

* Clean up

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

DHCP unit test (#211)

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Repair buffer leak when replying to NBNS requests (#215)

* Repair buffer leak when replying to NBNS requests

* Applied Uncrustify

* Variable 'pxNewBuffer' was out of scope

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Static allocation, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) (#217)

* Static allocation of tasks and queues, if configSUPPORT_STATIC_ALLOCATION == 1 (#208)

Is not added to any ported network interfaced.

* Build-check fix

* Uncrustify

* Uncrustify v2

* Update FreeRTOS_IP.c

Co-authored-by: Christian Jensen <tajen@oxyguard.dk>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Add a method to obtain the handle of the FreeRTOS+TCP IP task (#222)

* Add a method to obtain the handle of the FreeRTOS+TCP IP task

* Added the modified FreeRTOS_IP.c

* Update lexicon.txt

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Code changes for unit-testing (#223)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Make some code changes as a precursor for unit-testing

* remove unused file

* Fixed failing checks

* Fixed CBMC proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Use an infinite timeout in FreeRTOS_closesocket when called from a user task (#226)

Reformat MPS2_AN385 network driver (#224)

* Update the MPS2_AN385 network driver so it conforms to the +TCP coding and style guide.

* Update smsc9220_eth_drv.c

Remove #warning message erroneously left in.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Uncrustify.

Uncrustify again.

Before sending a challenge ACK, check the sequence number more properly (#225)

* Before sending a challenge ACK, check the sequence number more properly

* Make xSequenceLessThan and xSequenceGreaterThan public functions

* Extended comments on two public functions.

* Fix Spell check

* Although no changes were made to MPS2_AN385, some formatting changes to that driver

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Fix Some warnings

* merge tcp_mem_stats

* Add check

* Add 'UL' to an uint32_t value

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
AniruddhaKanhere added a commit that referenced this pull request Aug 12, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* parent be9fe45d8ec440f7750de0f4870b28de39b10a3b
author Hein Tibosch <hein_tibosch@yahoo.es> 1609879469 +0800
committer Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> 1619029134 -0700

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Create uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

* Remove unused file

Include ICMP while calculating IP header checksum (#198)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Include ICMP checksum

* Uncrustify

* Update ci.yml

* Spell check

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add comment to CI.yml

fix compiler warnings about casting to format string (#197)

* fix compiler warnings about casting to format string

Fix various warnings like:

/FreeRTOS-Plus-TCP/FreeRTOS_IP.c: In function 'FreeRTOS_strerror_r':
/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3395:60: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
             ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int32_t ) xErrnum );
                                                           ~^   ~~~~~~~~~~~~~~~~~~~
                                                           %ld

* explicitly cast arguments to format string

This should hopefully make the format string compatible
with all architectures.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Added git-secrets check to Github actions (#201)

Add header file to socket.h so that it can be compiled on its own (#204)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

User hook function for handling unsupported Ethernet frames (#200)

* Adds an optional user hook that gets called for all unhandled Ethernet frames.

* re-wording

* Fix spell check

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Limit the number of attempts to resolve an address in xARPWaitResolution() (#206)

Co-authored-by: Hein Tibosch <hein@htibosch.net>

Update litani submodule to version 1.6.0 (#210)

[CBMC] Add assert with readability check (#214)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update proof to use assert with readability check

* Revert ci.yml changes

* Remove unwanted changes

* Null check

* Fix adding NULL checks

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add unit-tests for FreeRTOS_ARP.c (#209)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

* First commit

* Cleanup

* Update: working version

* Coverage of eARPGetCacheEntry

* Update

* Unit-test and clenaup

* 100% line and function coverage

* Uncrustify and update

* 100% all coverage

* Move files to correct location

* Fix tests

* uncrustified

* Update ci.yml

* Update

* uncrustify and update after Hein's comments

* Empty commit

* Clenaup after @yanjos-dev's review

* Update CI

* Cleanup - pass 1

* Remove gdb

* Uncrustify

* Remove litani changes

* Clean up

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

DHCP unit test (#211)

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Repair buffer leak when replying to NBNS requests (#215)

* Repair buffer leak when replying to NBNS requests

* Applied Uncrustify

* Variable 'pxNewBuffer' was out of scope

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Static allocation, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) (#217)

* Static allocation of tasks and queues, if configSUPPORT_STATIC_ALLOCATION == 1 (#208)

Is not added to any ported network interfaced.

* Build-check fix

* Uncrustify

* Uncrustify v2

* Update FreeRTOS_IP.c

Co-authored-by: Christian Jensen <tajen@oxyguard.dk>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Add a method to obtain the handle of the FreeRTOS+TCP IP task (#222)

* Add a method to obtain the handle of the FreeRTOS+TCP IP task

* Added the modified FreeRTOS_IP.c

* Update lexicon.txt

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Code changes for unit-testing (#223)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Make some code changes as a precursor for unit-testing

* remove unused file

* Fixed failing checks

* Fixed CBMC proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Use an infinite timeout in FreeRTOS_closesocket when called from a user task (#226)

Reformat MPS2_AN385 network driver (#224)

* Update the MPS2_AN385 network driver so it conforms to the +TCP coding and style guide.

* Update smsc9220_eth_drv.c

Remove #warning message erroneously left in.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Uncrustify.

Uncrustify again.

Before sending a challenge ACK, check the sequence number more properly (#225)

* Before sending a challenge ACK, check the sequence number more properly

* Make xSequenceLessThan and xSequenceGreaterThan public functions

* Extended comments on two public functions.

* Fix Spell check

* Although no changes were made to MPS2_AN385, some formatting changes to that driver

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Fix Some warnings

* merge tcp_mem_stats

* Disallow octal IP-addresses

* Uncrustified

* Clear the output variable

* Add unit-tests for pton4

* Uncrustified

* Updated log messages

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
AniruddhaKanhere added a commit that referenced this pull request Sep 9, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* parent be9fe45d8ec440f7750de0f4870b28de39b10a3b
author Hein Tibosch <hein_tibosch@yahoo.es> 1609879469 +0800
committer Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> 1619029134 -0700

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Create uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

* Remove unused file

Include ICMP while calculating IP header checksum (#198)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Include ICMP checksum

* Uncrustify

* Update ci.yml

* Spell check

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add comment to CI.yml

fix compiler warnings about casting to format string (#197)

* fix compiler warnings about casting to format string

Fix various warnings like:

/FreeRTOS-Plus-TCP/FreeRTOS_IP.c: In function 'FreeRTOS_strerror_r':
/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3395:60: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
             ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int32_t ) xErrnum );
                                                           ~^   ~~~~~~~~~~~~~~~~~~~
                                                           %ld

* explicitly cast arguments to format string

This should hopefully make the format string compatible
with all architectures.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Added git-secrets check to Github actions (#201)

Add header file to socket.h so that it can be compiled on its own (#204)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

User hook function for handling unsupported Ethernet frames (#200)

* Adds an optional user hook that gets called for all unhandled Ethernet frames.

* re-wording

* Fix spell check

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Limit the number of attempts to resolve an address in xARPWaitResolution() (#206)

Co-authored-by: Hein Tibosch <hein@htibosch.net>

Update litani submodule to version 1.6.0 (#210)

[CBMC] Add assert with readability check (#214)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update proof to use assert with readability check

* Revert ci.yml changes

* Remove unwanted changes

* Null check

* Fix adding NULL checks

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add unit-tests for FreeRTOS_ARP.c (#209)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

* First commit

* Cleanup

* Update: working version

* Coverage of eARPGetCacheEntry

* Update

* Unit-test and clenaup

* 100% line and function coverage

* Uncrustify and update

* 100% all coverage

* Move files to correct location

* Fix tests

* uncrustified

* Update ci.yml

* Update

* uncrustify and update after Hein's comments

* Empty commit

* Clenaup after @yanjos-dev's review

* Update CI

* Cleanup - pass 1

* Remove gdb

* Uncrustify

* Remove litani changes

* Clean up

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

DHCP unit test (#211)

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Repair buffer leak when replying to NBNS requests (#215)

* Repair buffer leak when replying to NBNS requests

* Applied Uncrustify

* Variable 'pxNewBuffer' was out of scope

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Static allocation, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) (#217)

* Static allocation of tasks and queues, if configSUPPORT_STATIC_ALLOCATION == 1 (#208)

Is not added to any ported network interfaced.

* Build-check fix

* Uncrustify

* Uncrustify v2

* Update FreeRTOS_IP.c

Co-authored-by: Christian Jensen <tajen@oxyguard.dk>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Add a method to obtain the handle of the FreeRTOS+TCP IP task (#222)

* Add a method to obtain the handle of the FreeRTOS+TCP IP task

* Added the modified FreeRTOS_IP.c

* Update lexicon.txt

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Code changes for unit-testing (#223)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Make some code changes as a precursor for unit-testing

* remove unused file

* Fixed failing checks

* Fixed CBMC proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Use an infinite timeout in FreeRTOS_closesocket when called from a user task (#226)

Reformat MPS2_AN385 network driver (#224)

* Update the MPS2_AN385 network driver so it conforms to the +TCP coding and style guide.

* Update smsc9220_eth_drv.c

Remove #warning message erroneously left in.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Uncrustify.

Uncrustify again.

Before sending a challenge ACK, check the sequence number more properly (#225)

* Before sending a challenge ACK, check the sequence number more properly

* Make xSequenceLessThan and xSequenceGreaterThan public functions

* Extended comments on two public functions.

* Fix Spell check

* Although no changes were made to MPS2_AN385, some formatting changes to that driver

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Fix Some warnings

* merge tcp_mem_stats

* remove typo

* Update vSocketWakeupUser Proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
n9wxu pushed a commit that referenced this pull request Dec 27, 2021
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* parent be9fe45d8ec440f7750de0f4870b28de39b10a3b
author Hein Tibosch <hein_tibosch@yahoo.es> 1609879469 +0800
committer Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> 1619029134 -0700

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Create uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

* Remove unused file

Include ICMP while calculating IP header checksum (#198)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Include ICMP checksum

* Uncrustify

* Update ci.yml

* Spell check

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add comment to CI.yml

fix compiler warnings about casting to format string (#197)

* fix compiler warnings about casting to format string

Fix various warnings like:

/FreeRTOS-Plus-TCP/FreeRTOS_IP.c: In function 'FreeRTOS_strerror_r':
/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3395:60: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
             ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int32_t ) xErrnum );
                                                           ~^   ~~~~~~~~~~~~~~~~~~~
                                                           %ld

* explicitly cast arguments to format string

This should hopefully make the format string compatible
with all architectures.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Added git-secrets check to Github actions (#201)

Add header file to socket.h so that it can be compiled on its own (#204)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

User hook function for handling unsupported Ethernet frames (#200)

* Adds an optional user hook that gets called for all unhandled Ethernet frames.

* re-wording

* Fix spell check

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Limit the number of attempts to resolve an address in xARPWaitResolution() (#206)

Co-authored-by: Hein Tibosch <hein@htibosch.net>

Update litani submodule to version 1.6.0 (#210)

[CBMC] Add assert with readability check (#214)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update proof to use assert with readability check

* Revert ci.yml changes

* Remove unwanted changes

* Null check

* Fix adding NULL checks

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add unit-tests for FreeRTOS_ARP.c (#209)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

* First commit

* Cleanup

* Update: working version

* Coverage of eARPGetCacheEntry

* Update

* Unit-test and clenaup

* 100% line and function coverage

* Uncrustify and update

* 100% all coverage

* Move files to correct location

* Fix tests

* uncrustified

* Update ci.yml

* Update

* uncrustify and update after Hein's comments

* Empty commit

* Clenaup after @yanjos-dev's review

* Update CI

* Cleanup - pass 1

* Remove gdb

* Uncrustify

* Remove litani changes

* Clean up

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

DHCP unit test (#211)

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Repair buffer leak when replying to NBNS requests (#215)

* Repair buffer leak when replying to NBNS requests

* Applied Uncrustify

* Variable 'pxNewBuffer' was out of scope

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Static allocation, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) (#217)

* Static allocation of tasks and queues, if configSUPPORT_STATIC_ALLOCATION == 1 (#208)

Is not added to any ported network interfaced.

* Build-check fix

* Uncrustify

* Uncrustify v2

* Update FreeRTOS_IP.c

Co-authored-by: Christian Jensen <tajen@oxyguard.dk>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Add a method to obtain the handle of the FreeRTOS+TCP IP task (#222)

* Add a method to obtain the handle of the FreeRTOS+TCP IP task

* Added the modified FreeRTOS_IP.c

* Update lexicon.txt

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Code changes for unit-testing (#223)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Make some code changes as a precursor for unit-testing

* remove unused file

* Fixed failing checks

* Fixed CBMC proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Use an infinite timeout in FreeRTOS_closesocket when called from a user task (#226)

Reformat MPS2_AN385 network driver (#224)

* Update the MPS2_AN385 network driver so it conforms to the +TCP coding and style guide.

* Update smsc9220_eth_drv.c

Remove #warning message erroneously left in.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Uncrustify.

Uncrustify again.

Before sending a challenge ACK, check the sequence number more properly (#225)

* Before sending a challenge ACK, check the sequence number more properly

* Make xSequenceLessThan and xSequenceGreaterThan public functions

* Extended comments on two public functions.

* Fix Spell check

* Although no changes were made to MPS2_AN385, some formatting changes to that driver

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Fix Some warnings

* merge tcp_mem_stats

* Add automated uncrustify

* Un-uncrustify

* Uncrustify - manually

* Remove unused comment

* Update user to be github action

* Remove catch_assert from uncrustify

* Add comment to let user know on what to do and run uncrustify a second time

* Return a failure when uncrustify fails

* Add some more info for the user

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
alfred2g pushed a commit to alfred2g/FreeRTOS-Plus-TCP that referenced this pull request Jan 31, 2022
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* parent be9fe45d8ec440f7750de0f4870b28de39b10a3b
author Hein Tibosch <hein_tibosch@yahoo.es> 1609879469 +0800
committer Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> 1619029134 -0700

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Create uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

* Remove unused file

Include ICMP while calculating IP header checksum (#198)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Include ICMP checksum

* Uncrustify

* Update ci.yml

* Spell check

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add comment to CI.yml

fix compiler warnings about casting to format string (#197)

* fix compiler warnings about casting to format string

Fix various warnings like:

/FreeRTOS-Plus-TCP/FreeRTOS_IP.c: In function 'FreeRTOS_strerror_r':
/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3395:60: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
             ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int32_t ) xErrnum );
                                                           ~^   ~~~~~~~~~~~~~~~~~~~
                                                           %ld

* explicitly cast arguments to format string

This should hopefully make the format string compatible
with all architectures.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Added git-secrets check to Github actions (#201)

Add header file to socket.h so that it can be compiled on its own (#204)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

User hook function for handling unsupported Ethernet frames (#200)

* Adds an optional user hook that gets called for all unhandled Ethernet frames.

* re-wording

* Fix spell check

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Limit the number of attempts to resolve an address in xARPWaitResolution() (#206)

Co-authored-by: Hein Tibosch <hein@htibosch.net>

Update litani submodule to version 1.6.0 (#210)

[CBMC] Add assert with readability check (#214)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update proof to use assert with readability check

* Revert ci.yml changes

* Remove unwanted changes

* Null check

* Fix adding NULL checks

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add unit-tests for FreeRTOS_ARP.c (#209)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

* First commit

* Cleanup

* Update: working version

* Coverage of eARPGetCacheEntry

* Update

* Unit-test and clenaup

* 100% line and function coverage

* Uncrustify and update

* 100% all coverage

* Move files to correct location

* Fix tests

* uncrustified

* Update ci.yml

* Update

* uncrustify and update after Hein's comments

* Empty commit

* Clenaup after @yanjos-dev's review

* Update CI

* Cleanup - pass 1

* Remove gdb

* Uncrustify

* Remove litani changes

* Clean up

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

DHCP unit test (#211)

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Repair buffer leak when replying to NBNS requests (#215)

* Repair buffer leak when replying to NBNS requests

* Applied Uncrustify

* Variable 'pxNewBuffer' was out of scope

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Static allocation, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) (#217)

* Static allocation of tasks and queues, if configSUPPORT_STATIC_ALLOCATION == 1 (#208)

Is not added to any ported network interfaced.

* Build-check fix

* Uncrustify

* Uncrustify v2

* Update FreeRTOS_IP.c

Co-authored-by: Christian Jensen <tajen@oxyguard.dk>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Add a method to obtain the handle of the FreeRTOS+TCP IP task (#222)

* Add a method to obtain the handle of the FreeRTOS+TCP IP task

* Added the modified FreeRTOS_IP.c

* Update lexicon.txt

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Code changes for unit-testing (#223)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Make some code changes as a precursor for unit-testing

* remove unused file

* Fixed failing checks

* Fixed CBMC proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Use an infinite timeout in FreeRTOS_closesocket when called from a user task (#226)

Reformat MPS2_AN385 network driver (#224)

* Update the MPS2_AN385 network driver so it conforms to the +TCP coding and style guide.

* Update smsc9220_eth_drv.c

Remove #warning message erroneously left in.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Uncrustify.

Uncrustify again.

Before sending a challenge ACK, check the sequence number more properly (#225)

* Before sending a challenge ACK, check the sequence number more properly

* Make xSequenceLessThan and xSequenceGreaterThan public functions

* Extended comments on two public functions.

* Fix Spell check

* Although no changes were made to MPS2_AN385, some formatting changes to that driver

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Fix Some warnings

* merge tcp_mem_stats

* Add automated uncrustify

* Un-uncrustify

* Uncrustify - manually

* Remove unused comment

* Update user to be github action

* Remove catch_assert from uncrustify

* Add comment to let user know on what to do and run uncrustify a second time

* Return a failure when uncrustify fails

* Add some more info for the user

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
alfred2g pushed a commit to alfred2g/FreeRTOS-Plus-TCP that referenced this pull request Feb 2, 2022
* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* parent be9fe45d8ec440f7750de0f4870b28de39b10a3b
author Hein Tibosch <hein_tibosch@yahoo.es> 1609879469 +0800
committer Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> 1619029134 -0700

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Create uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

* Remove unused file

Include ICMP while calculating IP header checksum (#198)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Include ICMP checksum

* Uncrustify

* Update ci.yml

* Spell check

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add comment to CI.yml

fix compiler warnings about casting to format string (#197)

* fix compiler warnings about casting to format string

Fix various warnings like:

/FreeRTOS-Plus-TCP/FreeRTOS_IP.c: In function 'FreeRTOS_strerror_r':
/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3395:60: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
             ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int32_t ) xErrnum );
                                                           ~^   ~~~~~~~~~~~~~~~~~~~
                                                           %ld

* explicitly cast arguments to format string

This should hopefully make the format string compatible
with all architectures.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Added git-secrets check to Github actions (#201)

Add header file to socket.h so that it can be compiled on its own (#204)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

User hook function for handling unsupported Ethernet frames (#200)

* Adds an optional user hook that gets called for all unhandled Ethernet frames.

* re-wording

* Fix spell check

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Limit the number of attempts to resolve an address in xARPWaitResolution() (#206)

Co-authored-by: Hein Tibosch <hein@htibosch.net>

Update litani submodule to version 1.6.0 (#210)

[CBMC] Add assert with readability check (#214)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update proof to use assert with readability check

* Revert ci.yml changes

* Remove unwanted changes

* Null check

* Fix adding NULL checks

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add unit-tests for FreeRTOS_ARP.c (#209)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

* First commit

* Cleanup

* Update: working version

* Coverage of eARPGetCacheEntry

* Update

* Unit-test and clenaup

* 100% line and function coverage

* Uncrustify and update

* 100% all coverage

* Move files to correct location

* Fix tests

* uncrustified

* Update ci.yml

* Update

* uncrustify and update after Hein's comments

* Empty commit

* Clenaup after @yanjos-dev's review

* Update CI

* Cleanup - pass 1

* Remove gdb

* Uncrustify

* Remove litani changes

* Clean up

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

DHCP unit test (#211)

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Repair buffer leak when replying to NBNS requests (#215)

* Repair buffer leak when replying to NBNS requests

* Applied Uncrustify

* Variable 'pxNewBuffer' was out of scope

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Static allocation, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) (#217)

* Static allocation of tasks and queues, if configSUPPORT_STATIC_ALLOCATION == 1 (#208)

Is not added to any ported network interfaced.

* Build-check fix

* Uncrustify

* Uncrustify v2

* Update FreeRTOS_IP.c

Co-authored-by: Christian Jensen <tajen@oxyguard.dk>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Add a method to obtain the handle of the FreeRTOS+TCP IP task (#222)

* Add a method to obtain the handle of the FreeRTOS+TCP IP task

* Added the modified FreeRTOS_IP.c

* Update lexicon.txt

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Code changes for unit-testing (#223)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Make some code changes as a precursor for unit-testing

* remove unused file

* Fixed failing checks

* Fixed CBMC proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Use an infinite timeout in FreeRTOS_closesocket when called from a user task (#226)

Reformat MPS2_AN385 network driver (#224)

* Update the MPS2_AN385 network driver so it conforms to the +TCP coding and style guide.

* Update smsc9220_eth_drv.c

Remove #warning message erroneously left in.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Uncrustify.

Uncrustify again.

Before sending a challenge ACK, check the sequence number more properly (#225)

* Before sending a challenge ACK, check the sequence number more properly

* Make xSequenceLessThan and xSequenceGreaterThan public functions

* Extended comments on two public functions.

* Fix Spell check

* Although no changes were made to MPS2_AN385, some formatting changes to that driver

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Fix Some warnings

* merge tcp_mem_stats

* Add automated uncrustify

* Un-uncrustify

* Uncrustify - manually

* Remove unused comment

* Update user to be github action

* Remove catch_assert from uncrustify

* Add comment to let user know on what to do and run uncrustify a second time

* Return a failure when uncrustify fails

* Add some more info for the user

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
alfred2g added a commit that referenced this pull request Feb 7, 2022
* ListIntegrationbytes of TCP IP / Option for Copy ClientSocket (#333)

* without the clal of vListInitialiseItem, aren't the list integrity byte set

* We need a option, that the Socketset isn't copyed to the client socket

* Uncrustify again

* Update with suggestions and uncrustify

Co-authored-by: Maurus MH. Hilber <Hilbm@num.s-motion.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* IPv4/single: TCP minimum time for retransmissions (#387)

* IPv4/multi: TCP minimum time for retransmissions

* Corrected typo in a comment

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Advance litani submodule for CBMC proofs (#389)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update ARP cache only when necessary and use ARP cache to translate IP to MAC (#366)

* Update ARP cache only when required

* Uncrustified and added a declaration

* Add ; in declaration

* Update after @htibosch's comments

* Fix unit-tests

* Remove unused variable and add compound block

* Update version number/Manifest/History and Kernel pointer for release (#383)

* Update version/manifest/Kernel pointer

* Always prepare source tree for cbmc proofs (#395)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix constant comparison warnings (#398)

* Remove constant comparision warnings

* Fix formatting and add terminating #endif

* Add Comment triggered uncrustify script (#400)

* Add automated uncrustify

* Un-uncrustify

* Uncrustify - manually

* Remove unused comment

* Update user to be github action

* Remove catch_assert from uncrustify

* Minor changes to the GH action uncrustify (#401)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* parent be9fe45d8ec440f7750de0f4870b28de39b10a3b
author Hein Tibosch <hein_tibosch@yahoo.es> 1609879469 +0800
committer Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> 1619029134 -0700

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

Fix doxygen check (#149)

* Update doxygen version

* update the config file

TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

Create uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

Update uncrustify.yml

* Remove unused file

Include ICMP while calculating IP header checksum (#198)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Include ICMP checksum

* Uncrustify

* Update ci.yml

* Spell check

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add comment to CI.yml

fix compiler warnings about casting to format string (#197)

* fix compiler warnings about casting to format string

Fix various warnings like:

/FreeRTOS-Plus-TCP/FreeRTOS_IP.c: In function 'FreeRTOS_strerror_r':
/FreeRTOS-Plus-TCP/FreeRTOS_IP.c:3395:60: error: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Werror=format=]
             ( void ) snprintf( pcBuffer, uxLength, "Errno %d", ( int32_t ) xErrnum );
                                                           ~^   ~~~~~~~~~~~~~~~~~~~
                                                           %ld

* explicitly cast arguments to format string

This should hopefully make the format string compatible
with all architectures.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

Added git-secrets check to Github actions (#201)

Add header file to socket.h so that it can be compiled on its own (#204)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

User hook function for handling unsupported Ethernet frames (#200)

* Adds an optional user hook that gets called for all unhandled Ethernet frames.

* re-wording

* Fix spell check

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Limit the number of attempts to resolve an address in xARPWaitResolution() (#206)

Co-authored-by: Hein Tibosch <hein@htibosch.net>

Update litani submodule to version 1.6.0 (#210)

[CBMC] Add assert with readability check (#214)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update proof to use assert with readability check

* Revert ci.yml changes

* Remove unwanted changes

* Null check

* Fix adding NULL checks

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Add unit-tests for FreeRTOS_ARP.c (#209)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Add header in the socket file

* Remove unwanted file

* remove unwanted changes

* First commit

* Cleanup

* Update: working version

* Coverage of eARPGetCacheEntry

* Update

* Unit-test and clenaup

* 100% line and function coverage

* Uncrustify and update

* 100% all coverage

* Move files to correct location

* Fix tests

* uncrustified

* Update ci.yml

* Update

* uncrustify and update after Hein's comments

* Empty commit

* Clenaup after @yanjos-dev's review

* Update CI

* Cleanup - pass 1

* Remove gdb

* Uncrustify

* Remove litani changes

* Clean up

* Uncrustify

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

DHCP unit test (#211)

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Repair buffer leak when replying to NBNS requests (#215)

* Repair buffer leak when replying to NBNS requests

* Applied Uncrustify

* Variable 'pxNewBuffer' was out of scope

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Static allocation, if configSUPPORT_STATIC_ALLOCATION == 1 (#208) (#217)

* Static allocation of tasks and queues, if configSUPPORT_STATIC_ALLOCATION == 1 (#208)

Is not added to any ported network interfaced.

* Build-check fix

* Uncrustify

* Uncrustify v2

* Update FreeRTOS_IP.c

Co-authored-by: Christian Jensen <tajen@oxyguard.dk>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Add a method to obtain the handle of the FreeRTOS+TCP IP task (#222)

* Add a method to obtain the handle of the FreeRTOS+TCP IP task

* Added the modified FreeRTOS_IP.c

* Update lexicon.txt

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Code changes for unit-testing (#223)

* Fix compiler warnings when the TCP Window is not used (#124)

* Fix warnings when TCP window is not used

* Uncrustify

* Move local variables to inner loop in prvNetworkInterfaceInput() (#144)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update litani submodule (#147)

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>

* Fix doxygen check (#149)

* Update doxygen version

* update the config file

* TCP_WIN: fix compile warning on x86_64 (#148)

* TCP_WIN: fix compile warning on x86_64

Fix the following warning when building for 64 bit:

warning: conversion from ‘long unsigned int’ to ‘uint32_t’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
             uint32_t ulReturn = ~0UL;
                                 ^

* Update FreeRTOS_TCP_WIN.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix deprecated volatile compound assignment (#152)

* fixed deprecated volatile compound assignment

C++20 deprecates some undefined or unclear use cases of 'volatile' like
compound assignments and compliant compilers warn about those deprecated
operations.

In vStreamBufferMoveMid the deprecated compound assignment and other
direct accesses to volatile 'StreamBuffer_t->uxMid' is replaced using a
local variable stored back when done.

* Uncrustify

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* FreeRTOS_ARP.c : store local addresses only (#120)

* FreeRTOS_ARP.c : store local addresses only

* Added the function xARPWaitResolution()

* Added an entry to lexicon.txt.

* Ran Uncrustify

* Update unit test file

* Update

* Declared xARPWaitResolution() in FreeRTOS_IP.h

* Compare the result of xIsCallingFromIPTask() with pdFALSE in stead of 0

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>

* Remove unnecessary #ifndef (#186)

* Add entropy

* remove warning

* Remove unnecessary ifndef

* Remove unwanted changes

* Don't Fragment Flags patch. (#179)

* Moves all IP flag defines in FreeRTOS_IP_Private.h so that they are accessible to all protocols
Adds definitions for the IP fragmentation flags
Modifies the fragmentation check for incoming frames to drop both the first and later fragments.
Sets the "don't fragment" flag for all outgoing IP frames ( ICMP, DNS, UDP, TCP )
Removes ipGET_UDP_PAYLOAD_OFFSET_FOR_FRAGMENT as it appears obsolete. The stack never outputs fragments.

* Uncrustified

* Uncrustify

* Fixes the fragment offset and fragmentation flags masks ( 0x0FFF and 0xF000 -> 0x1FFF and 0xE000 )
Adds a configuration define ( ipconfigADVERTISE_DONT_FRAGMENT_FLAG ) as suggested by htibosch with a default value of zero for backwards compatibility
Updates the comment that explains the discarding of incoming fragments as discussed with Aniruddha Kanhere

* Adds the 'U' qualifier as requested by hs2gh
fixes a typo in FreeRTOSIPConfigDefaults.h

* Shortens the comment in FreeRTOSIPConfigDefaults as per htibosch's suggestion.

* Renames ipconfigADVERTISE_DONT_FRAGMENT to ipconfigFORCE_IP_DONT_FRAGMENT

* same as last commit, simply forgot to save this before pushing.

Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* fix IP buffer padding check on 64bit (#146)

* fix IP buffer padding check on 64bit

On 64 bit systems, FreeRTOS_IPInit() would assert
ipconfigBUFFER_PADDING was equal to 14 to "make sure there
is enough space in pucEthernetBuffer to store a pointer."

This prevents the driver from requesting additional
padding, so make the assert greater than or equal to 14.

Also use the final ipBUFFER_PADDING value instead of
ipconfigBUFFER_PADDING, which is probably what was
intended?

* Update after comments

Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update readme.md (#189)

Just fixing the "table of 3 types of STH32H7" so that it renders in github webpage.  I had a tough time reading that table until I looked at the md source.
You could also just put code fences around it:
~~~
/**
 * RAM area	H747	H743	H742	Location
 * ------------------------------------------------
 * DTCM		128k	128k	128k	0x20000000
 * AXI-SRAM	511k	511k	384k	0x24000000
 *
 * SRAM1	128k	128k	32k		0x30000000
 * SRAM2	128k	128k	16k		0x30020000
 * SRAM3	32k		32k	 	-		0x30040000
 * SRAM4	64k		64k		64k		0x38000000
 * Backup   SRAM	4k		4k	4k	0x38800000
 */
~~~

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update files referencing aws_application_version.h to use iot_application_version.h (#188)

* Update files referencing aws_application_version.h to use iot_application_version.h

* Remove pic32 ethernet _Command_Version function to remove dependency on iot_application_version.h from amazon-freertos repository.

* Remove function defs from header files (#190)

* Add entropy

* remove warning

* Remove function defs from headers

* Some corrections

* More fixes and uncrustify

* Remove the BaseType min function

* Doxygen

* Fix one CBMC proof

* More cbmc proof fixes

* More cbmc fixes

* Some doxygen additions

* Update last CBMC proof

* Doxygen comments

* Doxygen updates

* Doxygen and spell check

* Spell check and unit-test

* Unit test fix

* Update after comments

* Update 2 after comments

* Move function around

* Uncrustify

* Update after comments

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>

* Do not release a network buffer if it equals to NULL (#191)

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Circumvent Qemu MPS2 networking bug (#142)

* Add support for MPS2 networking with lan9118/lan9220

* Fix uncrustify errors

* Enable network interrupt handling

* Add network interrupt support to Qemu MPS2 AN385

* Fix function comment

* Fix Uncrustify errors

* Fix Uncrustify errors

* Fix Uncrustify Errors

* Fix typo

* Cirumvent Qemu MPS2 network bug

* Remove commented code, add doxygen comment

* Add a project for static analysis (#195)

* Add entropy

* remove warning

* Remove unwanted changes

* Update tcp_mem_stats.c

* Add Coverity

* Remove unused files

* Add some features

* clean up

* More clean up

* Unwanted additions removal

* Clean up

* Add 32-bit compile option

* Update after comments

* Uncrustify

* Create uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Update uncrustify.yml

* Make some code changes as a precursor for unit-testing

* remove unused file

* Fixed failing checks

* Fixed CBMC proof

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: Thomas Pedersen <thomas@ibsgaard.io>
Co-authored-by: Thomas Pedersen <thomas@adapt-ip.com>
Co-authored-by: Hartmut Schaefer <hs2gh@users.noreply.github.com>
Co-authored-by: evpopov <evpopov@gmail.com>
Co-authored-by: Emil Popov <epopov@cardinalkinetic.com>
Co-authored-by: shrewmouse1 <34042878+shrewmouse1@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Use an infinite timeout in FreeRTOS_closesocket when called from a user task (#226)

Reformat MPS2_AN385 network driver (#224)

* Update the MPS2_AN385 network driver so it conforms to the +TCP coding and style guide.

* Update smsc9220_eth_drv.c

Remove #warning message erroneously left in.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

Uncrustify.

Uncrustify again.

Before sending a challenge ACK, check the sequence number more properly (#225)

* Before sending a challenge ACK, check the sequence number more properly

* Make xSequenceLessThan and xSequenceGreaterThan public functions

* Extended comments on two public functions.

* Fix Spell check

* Although no changes were made to MPS2_AN385, some formatting changes to that driver

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Fix Some warnings

* merge tcp_mem_stats

* Add automated uncrustify

* Un-uncrustify

* Uncrustify - manually

* Remove unused comment

* Update user to be github action

* Remove catch_assert from uncrustify

* Add comment to let user know on what to do and run uncrustify a second time

* Return a failure when uncrustify fails

* Add some more info for the user

Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>

* Amended ETH_DMA_IT_xxx flags in ETH_DMA_ALL_INTS (#402)

* Amended ETH_DMA_IT_xxx flags in ETH_DMA_ALL_INTS

according to the ST docs, this is a sticky bit that must be cleared
explicitly even though it is an OR of different other status bits.

* Update NetworkInterface.c

Style: Fix Formatting

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>

* Unit-tests for FreeRTOS_Sockets.c file (#407)

* Initial refactoring commit

* Uncrustified

* Update after some bug fixes

* Fix build issues

* Update build details

* Update with more refactor and first test

* Make builds pass

* Uncrustify/Add unit-test/Remove static qualifier

* Update with ~100% coverage

* ICMP coverage 100%

* Update with some reorganization

* 100% coverage utils and timers

* Add Socket unit-test 70% coverage

* Uncrustify and Add more UT coverage

* 100% coverage

* Uncrustify

* Uncrustify all files

* Try to merge main to this

* Add ignored unit-tests and reorder inclusion order

* Remove commented code from UT

* Remove kernel and stubs from coverage info

* Add briefs to all the functions.

* Update the last functions with briefs

* Uncrustify: triggered by comment.

* Fix spellings

* Break the test file in multiple files

* Fix coverage

* Uncrustify and spell check fix

* IPv4/single: TCP minimum time for retransmissions (#387)

* IPv4/multi: TCP minimum time for retransmissions

* Corrected typo in a comment

Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update version number/Manifest/History and Kernel pointer for release (#383)

* Update version/manifest/Kernel pointer

* First TCP WIN Refactor/UT

* revert kernel head

* Update kernel head

* Update FreeRTOS_IP.c

* Update FreeRTOSIPConfigDefaults.h

* Remove commented code

* Remove _static from source

* Revert _static

* Fix compilation erros when TCP_WIN = 0

Co-authored-by: fireblade156 <90604295+fireblade156@users.noreply.github.com>
Co-authored-by: Maurus MH. Hilber <Hilbm@num.s-motion.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <kanherea@amazon.com>
Co-authored-by: Hein Tibosch <hein_tibosch@yahoo.es>
Co-authored-by: Hein Tibosch <hein@htibosch.net>
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: RAc-GIT <89420813+RAc-GIT@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants