From 466f4e699c94799304503eb0d35948030a25d760 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 12 Feb 2009 21:00:11 +0000 Subject: [PATCH] Added LWIP_VERSION to get the current version of the stack (implements task #9032: Provide means to get Version of Stack and submodules) --- CHANGELOG | 3 +++ src/include/lwip/init.h | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 08c045b2..ba69cb48 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,9 @@ HISTORY ++ New features: + 2009-02-12 Simon Goldschmidt + * init.h: Added LWIP_VERSION to get the current version of the stack + 2009-02-11 Simon Goldschmidt (suggested by Gottfried Spitaler) * opt.h, memp.h/.c: added MEMP_MEM_MALLOC to use mem_malloc/mem_free instead of the pool allocator (can save code size with MEM_LIBC_MALLOC if libc-malloc diff --git a/src/include/lwip/init.h b/src/include/lwip/init.h index c0869cfd..3429e78a 100644 --- a/src/include/lwip/init.h +++ b/src/include/lwip/init.h @@ -38,6 +38,23 @@ extern "C" { #endif +/** 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) + /* Modules initialization */ void lwip_init(void);