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

Check version numbers of dependencies. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/tls/openssl_user_macros.h>
+ Include dependency graph for dependency.c:

Go to the source code of this file.

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

static CONF_SECTIONdefault_feature_cs
 Default configuration section to add features to. More...
 
static CONF_SECTIONdefault_version_cs
 Default configuration section to add features to. More...
 
static USES_APPLE_DEPRECATED_API uint64_t libmagic = RADIUSD_MAGIC_NUMBER
 
char const * radiusd_version_short = STRINGIFY(RADIUSD_VERSION_MAJOR) "." STRINGIFY(RADIUSD_VERSION_MINOR) "." STRINGIFY(RADIUSD_VERSION_INCRM)
 
static char const * spaces = " "
 

Detailed Description

Check version numbers of dependencies.

Id
2c9af55db2d575a91d8388066c875be03ab530a9

Definition in file dependency.c.

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

◆ default_feature_cs

CONF_SECTION* default_feature_cs
static

Default configuration section to add features to.

Definition at line 35 of file dependency.c.

◆ default_version_cs

CONF_SECTION* default_version_cs
static

Default configuration section to add features to.

Definition at line 36 of file dependency.c.

◆ libmagic

USES_APPLE_DEPRECATED_API uint64_t libmagic = RADIUSD_MAGIC_NUMBER
static

Definition at line 32 of file dependency.c.

◆ radiusd_version_short

char const* radiusd_version_short = STRINGIFY(RADIUSD_VERSION_MAJOR) "." STRINGIFY(RADIUSD_VERSION_MINOR) "." STRINGIFY(RADIUSD_VERSION_INCRM)

Definition at line 33 of file dependency.c.

◆ spaces

char const* spaces = " "
static

Definition at line 364 of file dependency.c.