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

Master IO handler. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/io/schedule.h>
#include <freeradius-devel/io/application.h>
#include <freeradius-devel/util/trie.h>
#include <freeradius-devel/util/talloc.h>
+ Include dependency graph for master.h:

Go to the source code of this file.

Data Structures

struct  fr_io_instance_t
 The master IO instance. More...
 
struct  fr_io_track_s
 

Typedefs

typedef struct fr_io_client_s fr_io_client_t
 
typedef struct fr_io_track_s fr_io_track_t
 

Functions

int fr_master_io_listen (fr_io_instance_t *io, fr_schedule_t *sc, size_t default_message_size, size_t num_messages)
 
fr_trie_tfr_master_io_network (TALLOC_CTX *ctx, int af, fr_ipaddr_t *allow, fr_ipaddr_t *deny)
 Create a trie from arrays of allow / deny IP addresses. More...
 
fr_io_track_tfr_master_io_track_alloc (fr_listen_t *li, fr_client_t *client, fr_ipaddr_t const *src_ipaddr, int src_port, fr_ipaddr_t const *dst_ipaddr, int dst_port)
 

Variables

fr_app_io_t fr_master_app_io
 

Detailed Description

Master IO handler.

Id
b529dc111611d22530837d001975acb7b307a55d

Definition in file master.h.


Data Structure Documentation

◆ fr_io_instance_t

struct fr_io_instance_t

The master IO instance.

This structure is the instance data for the "master" IO handler. The structure is exposed for simplicity right now. It may be made private in the future.

The fr_master_io_listen() should be used to create a listener from this structure.

Note that most entries of this structure MUST be initialized before fr_master_io_listen() is called. That function only creates the listener, and adds it to the scheduler.

Definition at line 72 of file master.h.

+ Collaboration diagram for fr_io_instance_t:
Data Fields
fr_app_t * app main protocol handler
void * app_instance instance data for main protocol handler
fr_app_io_t const * app_io Easy access to the app_io handle.
CONF_SECTION * app_io_conf Easy access to the app_io's config section.
void * app_io_instance Easy access to the app_io instance.
fr_time_delta_t check_interval polling for closed sockets
fr_time_delta_t cleanup_delay for Access-Request packets
module_list_t * clients Holds client modules created to represent sockets created as clients connect to the listener.
bool dynamic_clients do we have dynamic clients.
fr_time_delta_t idle_timeout for dynamic clients
int ipproto IP proto by number.
uint32_t max_clients maximum number of dynamic clients to allow
uint32_t max_connections maximum number of connections to allow
uint32_t max_pending_packets maximum number of pending packets
module_instance_t * mi our parent mi
fr_time_delta_t nak_lifetime lifetime of NAKed clients
fr_trie_t const * networks trie of allowed networks
CONF_SECTION * server_cs server CS for this listener
module_instance_t * submodule As provided by the transport_parse callback.

Broken out into the app_io_* fields below for convenience.

◆ fr_io_track_s

struct fr_io_track_s

Definition at line 40 of file master.h.

+ Collaboration diagram for fr_io_track_s:
Data Fields
fr_io_address_t const * address of this packet.. shared between multiple packets
fr_io_client_t * client client handling this packet.
bool discard whether or not we discard the packet
bool do_not_respond don't respond
fr_time_t dynamic timestamp for packet doing dynamic client definition
fr_event_timer_t const * ev when we clean up this tracking entry
fr_time_t expires when this packet expires
bool finished are we finished the request?
fr_rb_node_t node rbtree node in the tracking tree.
uint8_t * packet really a tracking structure, not a packet
int packets number of packets using this entry
uint8_t * reply reply packet (if any)
size_t reply_len length of reply, or 1 for "do not reply"
fr_time_t timestamp when this packet was received

Typedef Documentation

◆ fr_io_client_t

Definition at line 1 of file master.h.

◆ fr_io_track_t

typedef struct fr_io_track_s fr_io_track_t

Function Documentation

◆ fr_master_io_listen()

int fr_master_io_listen ( fr_io_instance_t io,
fr_schedule_t sc,
size_t  default_message_size,
size_t  num_messages 
)

Definition at line 2931 of file master.c.

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

◆ fr_master_io_network()

fr_trie_t* fr_master_io_network ( TALLOC_CTX *  ctx,
int  af,
fr_ipaddr_t allow,
fr_ipaddr_t deny 
)

Create a trie from arrays of allow / deny IP addresses.

Parameters
ctxthe talloc ctx
afthe address family to allow
allowthe array of IPs / networks to allow. MUST be talloc'd
denythe array of IPs / networks to deny. MAY be NULL, MUST be talloc'd
Returns
  • fr_trie_t on success
  • NULL on error

Definition at line 2752 of file master.c.

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

◆ fr_master_io_track_alloc()

fr_io_track_t* fr_master_io_track_alloc ( fr_listen_t li,
fr_client_t client,
fr_ipaddr_t const *  src_ipaddr,
int  src_port,
fr_ipaddr_t const *  dst_ipaddr,
int  dst_port 
)

Definition at line 3098 of file master.c.

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

Variable Documentation

◆ fr_master_app_io

fr_app_io_t fr_master_app_io
extern

Definition at line 3139 of file master.c.