The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
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>
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_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. More... | |
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) |
Variables | |
fr_app_io_t | fr_master_app_io |
Master IO handler.
Definition in file master.h.
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.
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. |
struct 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 struct fr_io_client_s fr_io_client_t |
typedef struct fr_io_track_s fr_io_track_t |
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_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.
ctx | the talloc ctx |
af | the address family to allow |
allow | the array of IPs / networks to allow. MUST be talloc'd |
deny | the array of IPs / networks to deny. MAY be NULL, MUST be talloc'd |
Definition at line 2752 of file master.c.
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 | ||
) |
|
extern |