The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions
version.h File Reference

Version checking functions. More...

#include <freeradius-devel/build.h>
#include <freeradius-devel/missing.h>
#include <stdint.h>
+ Include dependency graph for version.h:

Go to the source code of this file.

Macros

#define MAGIC_COMMIT(_x)   ((uint32_t)((0x00000000ffffffff & (_x))))
 
#define MAGIC_PREFIX(_x)   ((uint8_t) ((0xff00000000000000 & (_x)) >> 56))
 
#define MAGIC_PREFIX_DEBUG   01
 
#define MAGIC_VERSION(_x)   ((uint32_t)((0x00ffffff00000000 & (_x)) >> 32))
 
#define RADIUSD_MAGIC_NUMBER   ((uint64_t) HEXIFY2(MAGIC_PREFIX_DEBUG, RADIUSD_VERSION))
 
#define RADIUSD_VERSION_BUILD(_x)
 Create a version string for a utility in the suite of FreeRADIUS utilities. More...
 
#define RADIUSD_VERSION_BUILD_TIMESTAMP   ", built on " __DATE__ " at " __TIME__
 
#define RADIUSD_VERSION_COMMIT_STRING   ""
 
#define RADIUSD_VERSION_DEVELOPER   "DEVELOPER BUILD - "
 

Functions

int fr_check_lib_magic (uint64_t magic)
 Check if the application linking to the library has the correct magic number. More...
 

Detailed Description

Version checking functions.

Definition in file version.h.

Macro Definition Documentation

◆ MAGIC_COMMIT

#define MAGIC_COMMIT (   _x)    ((uint32_t)((0x00000000ffffffff & (_x))))

Definition at line 84 of file version.h.

◆ MAGIC_PREFIX

#define MAGIC_PREFIX (   _x)    ((uint8_t) ((0xff00000000000000 & (_x)) >> 56))

Definition at line 82 of file version.h.

◆ MAGIC_PREFIX_DEBUG

#define MAGIC_PREFIX_DEBUG   01

Definition at line 77 of file version.h.

◆ MAGIC_VERSION

#define MAGIC_VERSION (   _x)    ((uint32_t)((0x00ffffff00000000 & (_x)) >> 32))

Definition at line 83 of file version.h.

◆ RADIUSD_MAGIC_NUMBER

#define RADIUSD_MAGIC_NUMBER   ((uint64_t) HEXIFY2(MAGIC_PREFIX_DEBUG, RADIUSD_VERSION))

Definition at line 81 of file version.h.

◆ 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
#define STRINGIFY(x)
Definition: build.h:195

Create a version string for a utility in the suite of FreeRADIUS utilities.

Parameters
_xutility name

Definition at line 58 of file version.h.

◆ RADIUSD_VERSION_BUILD_TIMESTAMP

#define RADIUSD_VERSION_BUILD_TIMESTAMP   ", built on " __DATE__ " at " __TIME__

Definition at line 49 of file version.h.

◆ RADIUSD_VERSION_COMMIT_STRING

#define RADIUSD_VERSION_COMMIT_STRING   ""

Definition at line 45 of file version.h.

◆ RADIUSD_VERSION_DEVELOPER

#define RADIUSD_VERSION_DEVELOPER   "DEVELOPER BUILD - "

Definition at line 37 of file version.h.

Function Documentation

◆ 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
magicnumber 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.

+ Here is the caller graph for this function: