The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Typedefs | Functions | Variables
main_config.h File Reference

Structures and prototypes for map functions. More...

#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/server/tmpl.h>
#include <freeradius-devel/util/dict.h>
+ Include dependency graph for main_config.h:

Go to the source code of this file.

Data Structures

struct  main_config_s
 Main server configuration. More...
 

Macros

#define MAX_REQUEST_TIME   30
 Default maximum request time. More...
 

Typedefs

typedef struct main_config_s main_config_t
 

Functions

void hup_logfile (main_config_t *config)
 
main_config_tmain_config_alloc (TALLOC_CTX *ctx)
 Allocate a main_config_t struct, setting defaults. More...
 
void main_config_dict_dir_set (main_config_t *config, char const *path)
 Set the global dictionary directory. More...
 
int main_config_exclusive_proc (main_config_t *config)
 Check to see if we're the only process using this configuration file (or PID file if specified) More...
 
int main_config_exclusive_proc_child (main_config_t const *config)
 
void main_config_exclusive_proc_done (main_config_t const *config)
 
int main_config_free (main_config_t **config)
 
void main_config_hup (main_config_t *config)
 
int main_config_init (main_config_t *config)
 
bool main_config_migrate_option_get (char const *name)
 
void main_config_name_set_default (main_config_t *config, char const *name, bool overwrite_config)
 Set the server name. More...
 
int main_config_parse_option (char const *value)
 
void main_config_raddb_dir_set (main_config_t *config, char const *path)
 Set the global radius config directory. More...
 

Variables

main_config_t const * main_config
 Global configuration singleton. More...
 

Detailed Description

Structures and prototypes for map functions.

Id
be5dd37608b57f159641c00dce570c57dd355f7b

Definition in file main_config.h.


Data Structure Documentation

◆ main_config_s

struct main_config_s

Main server configuration.

The parsed version of the main server config.

Definition at line 51 of file main_config.h.

+ Collaboration diagram for main_config_s:
Data Fields
bool allow_core_dumps Whether the server is allowed to drop a core when receiving a fatal signal.
bool allow_multiple_procs Allow multiple instances of radiusd to run with the same config file.
char const * chroot_dir
bool daemonize Should the server daemonize on startup.
uint32_t debug_level The base log level for the server.
fr_dict_t * dict Main dictionary.
char const * dict_dir Where to load dictionaries from.
bool do_colourise
bool drop_requests Administratively disable request processing.
bool forbid_update forbid "update" sections
bool hostname_lookups
bool ins_countup count up to "max"
uint32_t ins_max max instruction count
char const * lib_dir
char const * local_state_dir
bool log_dates_utc
char const * log_dest
char const * log_dir
char const * log_file
bool log_line_number Log src file/line the message was generated on.
bool log_timestamp
bool log_timestamp_is_set
uint32_t max_networks for the scheduler
fr_time_delta_t max_request_time How long a request can be processed for before timing out.
uint32_t max_requests maximum number of requests outstanding
uint32_t max_workers for the scheduler
int multi_proc_sem_id Semaphore we use to prevent multiple processes running.
char * multi_proc_sem_path Semaphore path.
char const * name Name of the daemon, usually 'radiusd'.
bool overwrite_config_name Overwrite the configured name, as this was specified by the user on the command line.
char const * panic_action Command to execute if the server receives a fatal signal.
char const * pid_file Path to write out PID file.
char const * prefix
char const * radacct_dir
char const * raddb_dir Path to raddb directory.
bool require_enum_prefix require "::" for enum parsing. They're always printed with this
bool reverse_lookups
bool rewrite_update rewrite "update" to be new edit sections
CONF_SECTION * root_cs Root of the server config.
char const * run_dir
char const * sbin_dir
bool spawn_workers Should the server spawn threads.
fr_time_delta_t stats_interval for the scheduler
bool suppress_secrets suppress secrets (or not)
int32_t syslog_facility
bool talloc_memory_report Print a memory report on what's left unfreed.

Can only be used when the server is running in single threaded mode.

size_t talloc_pool_size Size of pool to allocate to hold each request_t.
bool write_pid write the PID file

Macro Definition Documentation

◆ MAX_REQUEST_TIME

#define MAX_REQUEST_TIME   30

Default maximum request time.

Definition at line 35 of file main_config.h.

Typedef Documentation

◆ main_config_t

typedef struct main_config_s main_config_t

Definition at line 1 of file main_config.h.

Function Documentation

◆ hup_logfile()

void hup_logfile ( main_config_t config)

Definition at line 1447 of file main_config.c.

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

◆ main_config_alloc()

main_config_t* main_config_alloc ( TALLOC_CTX *  ctx)

Allocate a main_config_t struct, setting defaults.

Definition at line 1003 of file main_config.c.

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

◆ main_config_dict_dir_set()

void main_config_dict_dir_set ( main_config_t config,
char const *  name 
)

Set the global dictionary directory.

Parameters
[in]configto alter.
[in]nameto set as dict dir root e.g. /usr/local/share/freeradius.

Definition at line 991 of file main_config.c.

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

◆ main_config_exclusive_proc()

int main_config_exclusive_proc ( main_config_t config)

Check to see if we're the only process using this configuration file (or PID file if specified)

Parameters
[in]configspecifying the path to the main config file.
Returns
  • 1 if another process is running with this config file
  • 0 if no other process is running with this config file.
  • -1 on error.

Definition at line 916 of file main_config.c.

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

◆ main_config_exclusive_proc_child()

int main_config_exclusive_proc_child ( main_config_t const *  config)

◆ main_config_exclusive_proc_done()

void main_config_exclusive_proc_done ( main_config_t const *  config)

◆ main_config_free()

int main_config_free ( main_config_t **  config)

Definition at line 1423 of file main_config.c.

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

◆ main_config_hup()

void main_config_hup ( main_config_t config)

Definition at line 1469 of file main_config.c.

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

◆ main_config_init()

int main_config_init ( main_config_t config)

Definition at line 1036 of file main_config.c.

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

◆ main_config_migrate_option_get()

bool main_config_migrate_option_get ( char const *  name)

Definition at line 1546 of file main_config.c.

+ Here is the caller graph for this function:

◆ main_config_name_set_default()

void main_config_name_set_default ( main_config_t config,
char const *  name,
bool  overwrite_config 
)

Set the server name.

Note
Will only add pair if one does not already exist
Parameters
[in]configto alter.
[in]nameto set e.g. "radiusd".
[in]overwrite_configreplace any CONF_PAIRs with this value.

Definition at line 843 of file main_config.c.

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

◆ main_config_parse_option()

int main_config_parse_option ( char const *  value)

Definition at line 1511 of file main_config.c.

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

◆ main_config_raddb_dir_set()

void main_config_raddb_dir_set ( main_config_t config,
char const *  name 
)

Set the global radius config directory.

Parameters
[in]configto alter.
[in]nameto set as dir root e.g. /usr/local/etc/raddb.

Definition at line 862 of file main_config.c.

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

Variable Documentation

◆ main_config

main_config_t const* main_config
extern

Global configuration singleton.

Global configuration singleton.

Definition at line 69 of file main_config.c.