Listener API. More...
#include <freeradius-devel/pcap.h>
Go to the source code of this file.
Data Structures | |
struct | listen_socket_t |
struct | rad_listen |
Typedefs | |
typedef struct fr_protocol_t | fr_protocol_t |
typedef struct listen_socket_t | listen_socket_t |
typedef void(* | rad_listen_debug_t )(REQUEST *, RADIUS_PACKET *, bool received) |
typedef int(* | rad_listen_decode_t )(rad_listen_t *, REQUEST *) |
typedef int(* | rad_listen_encode_t )(rad_listen_t *, REQUEST *) |
typedef int(* | rad_listen_print_t )(rad_listen_t const *, char *, size_t) |
typedef int(* | rad_listen_recv_t )(rad_listen_t *) |
typedef int(* | rad_listen_send_t )(rad_listen_t *, REQUEST *) |
typedef enum RAD_LISTEN_STATUS | RAD_LISTEN_STATUS |
typedef struct rad_listen | rad_listen_t |
typedef enum RAD_LISTEN_TYPE | RAD_LISTEN_TYPE |
Functions | |
RADCLIENT * | client_listener_find (rad_listen_t *listener, fr_ipaddr_t const *ipaddr, uint16_t src_port) |
int | listen_bootstrap (CONF_SECTION *server, CONF_SECTION *cs, char const *server_name) |
void | listen_free (rad_listen_t **head) |
Free a linked list of listeners. More... | |
int | listen_init (rad_listen_t **head, bool spawn_flag) |
Search for listeners in the server. More... | |
rad_listen_t * | proxy_new_listener (TALLOC_CTX *ctx, home_server_t *home, uint16_t src_port) |
Listener API.
Binds sockets to protocol encoders/decoders.
Definition in file listen.h.
struct listen_socket_t |
Data Fields | ||
---|---|---|
int | broadcast | |
RADCLIENT * | client | |
RADCLIENT_LIST * | clients | |
fr_event_t * | ev | |
home_server_t * | home | |
char const * | interface | |
time_t | last_packet | |
fr_socket_limit_t | limit | |
uint32_t | max_rate | |
fr_ipaddr_t | my_ipaddr | |
uint16_t | my_port | |
time_t | opened | |
fr_ipaddr_t | other_ipaddr | |
uint16_t | other_port | |
RADIUS_PACKET * | packet | |
struct listen_socket_t * | parent | |
int | proto | |
uint32_t | rate_pps_now | |
uint32_t | rate_pps_old | |
time_t | rate_time | |
uint32_t | recv_buff | Socket receive buffer size we only allow configuration of SO_RCVBUF, as SO_SNDBUF controls the maximum datagram size. |
struct rad_listen |
Data Fields | ||
---|---|---|
rbtree_t * | children | |
int | count | |
CONF_SECTION const * | cs | |
void * | data | |
rad_listen_debug_t | debug | |
rad_listen_decode_t | decode | |
bool | dual | |
rad_listen_encode_t | encode | |
int | fd | |
rad_listen_t * | next | |
bool | nodup | |
rad_listen_t * | parent | |
rad_listen_print_t | ||
fr_protocol_t * | proto | |
rad_listen_recv_t | recv | |
rad_listen_send_t | send | |
char const * | server | |
fr_stats_t | stats | |
int | status | |
bool | synchronous | |
RAD_LISTEN_TYPE | type | |
uint32_t | workers |
typedef struct fr_protocol_t fr_protocol_t |
typedef struct listen_socket_t listen_socket_t |
typedef void(* rad_listen_debug_t)(REQUEST *, RADIUS_PACKET *, bool received) |
typedef int(* rad_listen_decode_t)(rad_listen_t *, REQUEST *) |
typedef int(* rad_listen_encode_t)(rad_listen_t *, REQUEST *) |
typedef int(* rad_listen_print_t)(rad_listen_t const *, char *, size_t) |
typedef int(* rad_listen_recv_t)(rad_listen_t *) |
typedef int(* rad_listen_send_t)(rad_listen_t *, REQUEST *) |
typedef enum RAD_LISTEN_STATUS RAD_LISTEN_STATUS |
typedef struct rad_listen rad_listen_t |
typedef enum RAD_LISTEN_TYPE RAD_LISTEN_TYPE |
enum RAD_LISTEN_STATUS |
enum RAD_LISTEN_TYPE |
RADCLIENT* client_listener_find | ( | rad_listen_t * | listener, |
fr_ipaddr_t const * | ipaddr, | ||
uint16_t | src_port | ||
) |
int listen_bootstrap | ( | CONF_SECTION * | server, |
CONF_SECTION * | cs, | ||
char const * | server_name | ||
) |
void listen_free | ( | rad_listen_t ** | head | ) |
int listen_init | ( | rad_listen_t ** | head, |
bool | spawn_workers | ||
) |
Search for listeners in the server.
[out] | head | Where to write listener. Must point to a NULL pointer. |
[in] | spawn_workers | Whether we're spawning child threads. |
Definition at line 3123 of file listen.c.
rad_listen_t* proxy_new_listener | ( | TALLOC_CTX * | ctx, |
home_server_t * | home, | ||
uint16_t | src_port | ||
) |