Version checking functions.
More...
#include <freeradius-devel/build.h>
#include <freeradius-devel/missing.h>
#include <stdint.h>
Go to the source code of this file.
|
int | fr_check_lib_magic (uint64_t magic) |
| Check if the application linking to the library has the correct magic number. More...
|
|
Version checking functions.
- Copyright
- 2016 The FreeRADIUS server project
-
2016 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
Definition in file version.h.
◆ MAGIC_COMMIT
◆ MAGIC_PREFIX
#define MAGIC_PREFIX |
( |
|
_x | ) |
((uint8_t) ((0xff00000000000000 & (_x)) >> 56)) |
◆ MAGIC_PREFIX_DEBUG
◆ MAGIC_VERSION
#define MAGIC_VERSION |
( |
|
_x | ) |
((uint32_t)((0x00ffffff00000000 & (_x)) >> 32)) |
◆ RADIUSD_MAGIC_NUMBER
◆ RADIUSD_VERSION_BUILD
#define RADIUSD_VERSION_BUILD |
( |
|
_x | ) |
|
Value: RADIUSD_VERSION_DEVELOPER \
_x " version " \
STRINGIFY(RADIUSD_VERSION_MAJOR)
"." STRINGIFY(RADIUSD_VERSION_MINOR)
"." STRINGIFY(RADIUSD_VERSION_INCRM) \
RADIUSD_VERSION_COMMIT_STRING \
", for host " HOSTINFO \
RADIUSD_VERSION_BUILD_TIMESTAMP
Create a version string for a utility in the suite of FreeRADIUS utilities.
- Parameters
-
Definition at line 58 of file version.h.
◆ RADIUSD_VERSION_BUILD_TIMESTAMP
#define RADIUSD_VERSION_BUILD_TIMESTAMP ", built on " __DATE__ " at " __TIME__ |
◆ RADIUSD_VERSION_COMMIT_STRING
#define RADIUSD_VERSION_COMMIT_STRING "" |
◆ RADIUSD_VERSION_DEVELOPER
#define RADIUSD_VERSION_DEVELOPER "DEVELOPER BUILD - " |
◆ fr_check_lib_magic()
int fr_check_lib_magic |
( |
uint64_t |
magic | ) |
|
Check if the application linking to the library has the correct magic number.
- Parameters
-
magic | number as defined by RADIUSD_MAGIC_NUMBER |
- Returns
- 0 on success.
- -1 on prefix mismatch.
- -2 on version mismatch.
- -3 on commit mismatch.
Definition at line 40 of file version.c.