Inconsistencies with IP version format/styling in new +TCP library?

Hi all,

Something Ive noticed in the new FreeRTOS+TCP library is inconsistent use of the letter “v” to indicate the IP version of a file, setting, function call etc.

Sometimes I see a capital V used and other times lower case v.

For example, we have files named FreeRTOS_TCP_IP_IPV4.c and FreeRTOS_UDP_IPv4.c.

Various settings may be referred to as IPv4, but then a call to a function may be IPV4 or IPv4 such as vProcessGeneratedUDPPacket_IPv4 or prvTCPReturnPacket_IPV4.

This also applies to IPv6 counterparts.

This is a stylistic nightmare and makes it difficult to know which V youre supposed to be using and when, and is quite frustrating to navigate.

As a network engineer by trade (I play software engineer as a hobbyist), we use the lowercase “v” when referring to IP versions so my suggestion would be to standardise on that format/style as it is consistent with industry usage.

Is this something that can be fixed, or is this too baked in now?

Traditionally, all macros have been written in capitals, and so have abbreviations like TCP and IP.
Also, by tradition, we’ve been using the words IPv4 and IPv4, even in macros.

So please, send a proposal for possible changes!

1 Like

Hi @tomstorey

Thank you for reporting the issue. We have created a patch for File names to follow IPv4 or IPv6 - Update File names by moninom1 · Pull Request #989 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub

As @htibosch mentioned, For all the functions names and other changes, it would be great if you could help in contributing.

Let us know how you feel about it.

Thank you.

1 Like


I’ll take some more time to have a look over things more closely, and taking into consideration the basic styling rules that @htibosch mentioned about macros etc I’ll try and come up with some sort of proposal and perhaps a list of changes (pull request?). :slight_smile:

1 Like

@tomstorey Yeah that would be really great. Thank you :slightly_smiling_face:

Sorry for the delay in getting this done! I havent forgotten. :slight_smile:

I’ve just been struggling for a while with some crashing issues which I had to fix before I could make much more progress with anything else.

I think Ive now got that under enough control and have managed to build a working driver for my ethernet controller using +TCP v3, so now that I know things do actually work I’ll take another stab at v4.

Thank you for reporting back.