All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions | Variables
realms.h File Reference

Request forwarding API. More...

Go to the source code of this file.

Data Structures

struct  _realm
 
struct  fr_socket_limit_t
 
struct  home_pool_t
 
struct  home_server
 

Typedefs

typedef struct fr_socket_limit_t fr_socket_limit_t
 
typedef struct home_pool_t home_pool_t
 
typedef enum home_pool_type_t home_pool_type_t
 
typedef struct home_server home_server_t
 
typedef struct _realm REALM
 
typedef struct realm_config realm_config_t
 

Enumerations

enum  home_ping_check_t {
  HOME_PING_CHECK_INVALID = 0,
  HOME_PING_CHECK_NONE,
  HOME_PING_CHECK_STATUS_SERVER,
  HOME_PING_CHECK_REQUEST
}
 
enum  home_pool_type_t {
  HOME_POOL_INVALID = 0,
  HOME_POOL_LOAD_BALANCE,
  HOME_POOL_FAIL_OVER,
  HOME_POOL_CLIENT_BALANCE,
  HOME_POOL_CLIENT_PORT_BALANCE,
  HOME_POOL_KEYED_BALANCE
}
 
enum  home_state_t {
  HOME_STATE_ALIVE = 0,
  HOME_STATE_ZOMBIE,
  HOME_STATE_IS_DEAD,
  HOME_STATE_UNKNOWN
}
 
enum  home_type_t {
  HOME_TYPE_INVALID = 0,
  HOME_TYPE_AUTH,
  HOME_TYPE_ACCT,
  HOME_TYPE_AUTH_ACCT,
  HOME_TYPE_COA
}
 

Functions

home_pool_thome_pool_byname (char const *name, int type)
 
home_server_thome_server_afrom_cs (TALLOC_CTX *ctx, realm_config_t *rc, CONF_SECTION *cs)
 Alloc a new home server defined by a CONF_SECTION. More...
 
home_server_thome_server_byname (char const *name, int type)
 
home_server_thome_server_bynumber (int number)
 
CONF_SECTIONhome_server_cs_afrom_client (CONF_SECTION *client)
 Fixup a client configuration section to specify a home server. More...
 
home_server_thome_server_find (fr_ipaddr_t *ipaddr, uint16_t port, int proto)
 
home_server_thome_server_ldb (char const *realmname, home_pool_t *pool, REQUEST *request)
 
void home_server_update_request (home_server_t *home, REQUEST *request)
 
REALMrealm_find (char const *name)
 
REALMrealm_find2 (char const *name)
 
bool realm_home_server_add (home_server_t *home)
 Add an already allocate home_server_t to the various trees. More...
 
void realm_home_server_sanitize (home_server_t *home, CONF_SECTION *cs)
 
int realm_pool_add (home_pool_t *pool, CONF_SECTION *cs)
 
void realm_pool_free (home_pool_t *pool)
 
int realm_realm_add (REALM *r, CONF_SECTION *cs)
 
void realms_free (void)
 
int realms_init (CONF_SECTION *config)
 

Variables

bool home_servers_udp
 Whether there are any UDP home servers. More...
 

Detailed Description

Request forwarding API.

Id:
9d3cfe787e6b0707c2e5d2f2df8df66a82159af7

Definition in file realms.h.


Data Structure Documentation

struct _realm

Definition at line 178 of file realms.h.

+ Collaboration diagram for _realm:
Data Fields
home_pool_t * acct_pool
home_pool_t * auth_pool
home_pool_t * coa_pool
char const * name
bool strip_realm
struct fr_socket_limit_t

Definition at line 59 of file realms.h.

Data Fields
uint32_t idle_timeout
uint32_t lifetime
uint32_t max_connections
uint32_t max_requests
uint32_t num_connections
uint32_t num_requests
struct home_pool_t

Definition at line 160 of file realms.h.

+ Collaboration diagram for home_pool_t:
Data Fields
CONF_SECTION * cs
home_server_t * fallback
int in_fallback
char const * name
int num_home_servers
home_type_t server_type
home_server_t * servers[1]
time_t time_all_dead
home_pool_type_t type
char const * virtual_server
struct home_server

Definition at line 68 of file realms.h.

+ Collaboration diagram for home_server:
Data Fields
uint32_t coa_irt
uint32_t coa_mrc
uint32_t coa_mrd
uint32_t coa_mrt
CONF_SECTION * cs
uint32_t currently_outstanding
bool dual One of a pair of homeservers on consecutive ports.
fr_stats_ema_t ema
fr_event_t * ev
fr_ipaddr_t ipaddr IP address of home server.
time_t last_failed_open
time_t last_packet_recv
time_t last_packet_sent
fr_socket_limit_t limit
char const * log_name The name used for log messages.
uint32_t max_outstanding Maximum outstanding requests.
uint32_t max_response_timeouts
char const * name Name the server may be referenced by for querying stats or when specifying home servers for a pool.
uint32_t num_pings_to_alive
uint32_t num_received_pings
uint32_t num_sent_pings
int number
char const * parent_server
home_ping_check_t ping_check What method we use to perform the 'ping' none, status-server or fake request.
char const * ping_check_str
uint32_t ping_interval
uint32_t ping_timeout
char const * ping_user_name
char const * ping_user_password
uint16_t port
int proto TCP or UDP.
char const * proto_str String representation of protocol.
uint32_t response_timeouts
struct timeval response_window
uint32_t revive_interval How often we revive it (if it doesn't support pings).
struct timeval revive_time
char const * secret
char const * server For internal proxying.
fr_ipaddr_t src_ipaddr Resolved version of src_ipaddr_str.

Preferred source IP address (useful for multihomed systems).

char const * src_ipaddr_str Need to parse the string specially as it may require a DNS lookup and the address family for that is the same as ipaddr.
int state
fr_stats_t stats
home_type_t type Auth, Acct, CoA etc.
char const * type_str String representation of type.
struct timeval when
uint32_t zombie_period Unresponsive for T, mark it dead.
struct timeval zombie_period_start

Typedef Documentation

typedef struct home_pool_t home_pool_t
typedef struct home_server home_server_t
typedef struct _realm REALM
typedef struct realm_config realm_config_t

Definition at line 190 of file realms.h.

Enumeration Type Documentation

Enumerator
HOME_PING_CHECK_INVALID 
HOME_PING_CHECK_NONE 
HOME_PING_CHECK_STATUS_SERVER 
HOME_PING_CHECK_REQUEST 

Definition at line 45 of file realms.h.

Enumerator
HOME_POOL_INVALID 
HOME_POOL_LOAD_BALANCE 
HOME_POOL_FAIL_OVER 
HOME_POOL_CLIENT_BALANCE 
HOME_POOL_CLIENT_PORT_BALANCE 
HOME_POOL_KEYED_BALANCE 

Definition at line 150 of file realms.h.

Enumerator
HOME_STATE_ALIVE 
HOME_STATE_ZOMBIE 
HOME_STATE_IS_DEAD 
HOME_STATE_UNKNOWN 

Definition at line 52 of file realms.h.

Enumerator
HOME_TYPE_INVALID 
HOME_TYPE_AUTH 

Authentication server.

HOME_TYPE_ACCT 

Accounting server.

HOME_TYPE_AUTH_ACCT 

Authentication and accounting server.

HOME_TYPE_COA 

CoA destination (NAS or Proxy)

Definition at line 34 of file realms.h.

Function Documentation

home_pool_t* home_pool_byname ( char const *  name,
int  type 
)

Definition at line 2704 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

home_server_t* home_server_afrom_cs ( TALLOC_CTX *  ctx,
realm_config_t rc,
CONF_SECTION cs 
)

Alloc a new home server defined by a CONF_SECTION.

Parameters
ctxto allocate home_server_t in.
rcRealm config, may be NULL in which case the global realm_config will be used.
csConfiguration section containing home server parameters.
Returns

Definition at line 569 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

home_server_t* home_server_byname ( char const *  name,
int  type 
)

Definition at line 2679 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

home_server_t* home_server_bynumber ( int  number)

Definition at line 2692 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CONF_SECTION* home_server_cs_afrom_client ( CONF_SECTION client)

Fixup a client configuration section to specify a home server.

This is used to create the equivalent CoA home server entry for a client, so that the server can originate CoA messages.

The server section automatically inherits the following fields from the client:

  • ipaddr/ipv4addr/ipv6addr
  • secret
  • src_ipaddr
Note
new CONF_SECTION will be allocated in the context of the client, but the client C::ONF_SECTION will not be modified.
Parameters
clientCONF_SECTION to inherit values from.
Returns

Definition at line 889 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

home_server_t* home_server_find ( fr_ipaddr_t ipaddr,
uint16_t  port,
int  proto 
)

Definition at line 2660 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

home_server_t* home_server_ldb ( char const *  realmname,
home_pool_t pool,
REQUEST request 
)

Definition at line 2352 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void home_server_update_request ( home_server_t home,
REQUEST request 
)

Definition at line 2285 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

REALM* realm_find ( char const *  name)

Definition at line 2235 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

REALM* realm_find2 ( char const *  name)

Definition at line 2201 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool realm_home_server_add ( home_server_t home)

Add an already allocate home_server_t to the various trees.

Parameters
homeserver to add.
Returns
  • true on success.
  • false on error.

Definition at line 485 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void realm_home_server_sanitize ( home_server_t home,
CONF_SECTION cs 
)

Definition at line 362 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int realm_pool_add ( home_pool_t pool,
CONF_SECTION cs 
)
void realm_pool_free ( home_pool_t pool)

Definition at line 1011 of file realms.c.

+ Here is the caller graph for this function:

int realm_realm_add ( REALM r,
CONF_SECTION cs 
)
void realms_free ( void  )

Definition at line 256 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int realms_init ( CONF_SECTION config)

Definition at line 2070 of file realms.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

bool home_servers_udp

Whether there are any UDP home servers.

Definition at line 38 of file realms.c.