tasklwIP - A Lightweight TCP/IP stack - Tasks: task #9032, Provide means to get Version of...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #9032: Provide means to get Version of Stack and submodules

Submitter:  TabascoEye <tabascoeye>
Submitted:  Wed 21 Jan 2009 02:45:15 PM UTC
   
 
Category:  None Should Start On:  Wed 21 Jan 2009 12:00:00 AM UTC
Should be Finished on:  Wed 21 Jan 2009 12:00:00 AM UTC Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Percent Complete:  0%
Open/Closed:  Closed Planned Release:  1.3.1
Effort:  0.00

Jump to the original submission

Sun 15 Feb 2009 08:45:15 PM UTC, comment #7: 

done that.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 13 Feb 2009 09:39:35 AM UTC, comment #6: 

Looks good, thanks everyone for sorting this out.

Kieran Mansley <kieranm>
Group Member
Fri 13 Feb 2009 08:22:37 AM UTC, comment #5: 


> The LWIP_VERSION macro is broken for a 16-bit platform. The
> shift left 24 and 16 will drop the high order bits.


D'oh! Thanks for checking that, I should have thought of that after talking about it on the other bug/patch this week...

About the version after release, I also thought of that and I guess  x.y.z+1 RC 0 is the best we can do, together with #define LWIP_RC_DEVELOPMENT 0. I'll ad that. Thanks for sharing your thoughts.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 12 Feb 2009 09:34:02 PM UTC, comment #4: 

The LWIP_VERSION macro is broken for a 16-bit platform. The shift left 24 and 16 will drop the high order bits.

I suggest changing the macro by adding UL to the first two shift factors, forcing a 32-bit shift operation.

#define LWIP_VERSION (LWIP_VERSION_MAJOR << 24UL | LWIP_VERSION_MINOR << 16UL |
LWIP_VERSION_REVISION << 8 | LWIP_VERSION_RC)

Alternatively, typecast at least the major and minor versions to u32_t before doing the shift.


A query: what will be the version number of LWIP immediately after an official release, when the first post-release change has been applied in CVS? Will this mechanism require the version number of LWIP (at CVS-HEAD) to immediately change to x.y.z+1 RC 0 as soon as the first patch is applied?

I also suggest that LWIP_VERSION_RC value of 0 should mean this is NOT a release candidate, but just early accumulation of patches prior to approaching a release. LWIP_VERSION_RC of 1 through 254 can be release candidates, and 255 is the final release. This would mean a comment change and definition of a new constant, perhaps

#define LWIP_RC_DEVELOPMENT 0

David Empson <dempson>
Thu 12 Feb 2009 09:03:15 PM UTC, comment #3: 

I've checked this in to init.h (I thought that's the best place for it, since we don't have an lwip.h file):

/** X.x.x: Major version of the stack */
#define LWIP_VERSION_MAJOR      1
/** x.X.x: Minor version of the stack */
#define LWIP_VERSION_MINOR      3
/** x.x.X: Revision of the stack */
#define LWIP_VERSION_REVISION   1
/** For release candidates, this is set to 0..255
  For official releases, this is set to 255 (i.e. LWIP_RC_RELEASE) /
#define LWIP_VERSION_RC         0

/** LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases */
#define LWIP_RC_RELEASE    255

/** Provides the version of the stack */
#define LWIP_VERSION   (LWIP_VERSION_MAJOR << 24   | LWIP_VERSION_MINOR << 16 |
                        LWIP_VERSION_REVISION << 8 | LWIP_VERSION_RC)


So I guess we can close this now. If someone thinks different, speak up! :-)

Simon Goldschmidt <goldsimon>
Group administrator
Wed 11 Feb 2009 07:05:56 AM UTC, comment #2: 

That would be OK for me, although I don't know whether it is really useful: what would we set this value to for CVS?

Simon Goldschmidt <goldsimon>
Group administrator
Tue 10 Feb 2009 09:50:44 PM UTC, comment #1: 


> #define LWIP_VERSION 0x00XXYYZZ /* XX=major, YY=minor, ZZ=revision


Release Cantidates / Beta versions would not fit in this.

Does anybody care?

In case, how about:
#define LWIP_VERSION (mayor<<24 | minor<<16 | rev<<8 | rc)
where:
rc < 255 -> release candidate number
rc == 255 -> this is a final release

Luca Ceresoli <lucaceresoli>
Wed 21 Jan 2009 02:45:15 PM UTC, original submission:  

As discussed on lwip-devel, LwIP should provide a mechanism in code that returns the Version number of the Stack and/or Submodules/APIs of the Stack.

e.g.
#define LWIP_VERSION 0x00XXYYZZ /* XX=major, YY=minor, ZZ=revision

This form has been chosen for simple integer comaprison between version numbers.

TabascoEye <tabascoeye>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dempson (Posted a comment)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by lucaceresoli (Posted a comment)
  • -email is unavailable- added by kieranm (Updated the item)
  • -email is unavailable- added by tabascoeye (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-02-12 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2009-01-21 kieranm Planned ReleaseNone 1.3.1

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code