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

Version checking functions. More...

#include <freeradius-devel/server/cf_util.h>
#include <stddef.h>
+ Include dependency graph for dependency.h:

Go to the source code of this file.

Macros

#define RADIUSD_VERSION_STRING   STRINGIFY(RADIUSD_VERSION_MAJOR) "." STRINGIFY(RADIUSD_VERSION_MINOR) "." STRINGIFY(RADIUSD_VERSION_INCRM)
 

Functions

int dependency_feature_add (CONF_SECTION *cs, char const *name, bool enabled)
 Add a feature flag to the main configuration. More...
 
void dependency_features_init (CONF_SECTION *cs)
 Initialise core feature flags. More...
 
int dependency_version_number_add (CONF_SECTION *cs, char const *name, char const *version)
 Add a library/server version pair to the main configuration. More...
 
void dependency_version_numbers_init (CONF_SECTION *cs)
 Initialise core version flags. More...
 
void dependency_version_print (void)
 
int rad_check_lib_magic (uint64_t magic)
 Check if the application linking to the library has the correct magic number. More...
 

Variables

char const * radiusd_version
 
char const * radiusd_version_short
 

Detailed Description

Version checking functions.

Id
f0601287744559918df67a158d9a095c234d5127

Definition in file dependency.h.

Macro Definition Documentation

◆ RADIUSD_VERSION_STRING

#define RADIUSD_VERSION_STRING   STRINGIFY(RADIUSD_VERSION_MAJOR) "." STRINGIFY(RADIUSD_VERSION_MINOR) "." STRINGIFY(RADIUSD_VERSION_INCRM)

Definition at line 39 of file dependency.h.

Function Documentation

◆ dependency_feature_add()

int dependency_feature_add ( CONF_SECTION cs,
char const *  name,
bool  enabled 
)

Add a feature flag to the main configuration.

Add a feature flag (yes/no) to the 'feature' subsection off the main config.

This allows the user to create configurations that work with across multiple environments.

Parameters
[in]csto add feature pair to. May be NULL in which case the cs passed to dependency_feature_init() is used.
[in]nameof feature.
[in]enabledWhether the feature is present/enabled.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 107 of file dependency.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dependency_features_init()

void dependency_features_init ( CONF_SECTION cs)

Initialise core feature flags.

Parameters
csWhere to add the CONF_PAIRS, if null pairs will be added to the 'feature' section of the main config.

Definition at line 177 of file dependency.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dependency_version_number_add()

int dependency_version_number_add ( CONF_SECTION cs,
char const *  name,
char const *  version 
)

Add a library/server version pair to the main configuration.

Add a version number to the 'version' subsection off the main config.

Because of the optimisations in the configuration parser, these may be checked using regular expressions without a performance penalty.

The version pairs are there primarily to work around defects in libraries or the server.

Parameters
[in]csto add feature pair to. May be NULL in which case the cs passed to dependency_feature_init() is used.
[in]nameof library or feature.
[in]versionHumanly readable version text.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 146 of file dependency.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dependency_version_numbers_init()

void dependency_version_numbers_init ( CONF_SECTION cs)

Initialise core version flags.

Parameters
csWhere to add the CONF_PAIRS, if null pairs will be added to the 'version' section of the main config.

Definition at line 335 of file dependency.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dependency_version_print()

void dependency_version_print ( void  )

Definition at line 369 of file dependency.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rad_check_lib_magic()

int rad_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 64 of file dependency.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ radiusd_version

char const* radiusd_version
extern

Definition at line 83 of file radiusd.c.

◆ radiusd_version_short

char const* radiusd_version_short
extern

Definition at line 33 of file dependency.c.