![]() |
The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
|
TACACS+ handler for TCP. More...
#include <netdb.h>#include <freeradius-devel/util/trie.h>#include <freeradius-devel/io/application.h>#include <freeradius-devel/io/listen.h>#include <freeradius-devel/io/schedule.h>#include "proto_tacacs.h"
Include dependency graph for proto_tacacs_tcp.c:Go to the source code of this file.
Data Structures | |
| struct | proto_tacacs_tcp_t |
| struct | proto_tacacs_tcp_thread_t |
Macros | |
| #define | TACACS_MAX_ATTRIBUTES 256 |
Functions | |
| static fr_client_t * | mod_client_find (fr_listen_t *li, fr_ipaddr_t const *ipaddr, int ipproto) |
| static int | mod_connection_set (fr_listen_t *li, fr_io_address_t *connection) |
| static int | mod_fd_set (fr_listen_t *li, int fd) |
| Set the file descriptor for this socket. | |
| static void | mod_hexdump_set (fr_listen_t *li, void *data) |
| static int | mod_instantiate (module_inst_ctx_t const *mctx) |
| static char const * | mod_name (fr_listen_t *li) |
| static void | mod_network_get (int *ipproto, bool *dynamic_clients, fr_trie_t const **trie, void *instance) |
| static int | mod_open (fr_listen_t *li) |
| Open a TCP listener for TACACS+. | |
| static ssize_t | mod_read (fr_listen_t *li, UNUSED void **packet_ctx, fr_time_t *recv_time_p, uint8_t *buffer, size_t buffer_len, size_t *leftover) |
| Read TACACS data from a TCP connection. | |
| static ssize_t | mod_write (fr_listen_t *li, UNUSED void *packet_ctx, UNUSED fr_time_t request_time, uint8_t *buffer, size_t buffer_len, size_t written) |
Variables | |
| static const conf_parser_t | networks_config [] |
| static const char * | packet_name [] |
| fr_app_io_t | proto_tacacs_tcp |
| static const conf_parser_t | tcp_listen_config [] |
TACACS+ handler for TCP.
Definition in file proto_tacacs_tcp.c.
| struct proto_tacacs_tcp_t |
Definition at line 47 of file proto_tacacs_tcp.c.
Collaboration diagram for proto_tacacs_tcp_t:| Data Fields | ||
|---|---|---|
| fr_ipaddr_t * | allow | allowed networks for dynamic clients |
| fr_client_list_t * | clients | local clients |
| CONF_SECTION * | cs | our configuration |
| fr_ipaddr_t * | deny | denied networks for dynamic clients |
| bool | dynamic_clients | whether we have dynamic clients |
| char const * | interface | Interface to bind to. |
| fr_ipaddr_t | ipaddr | IP address to listen on. |
| uint32_t | max_attributes | Limit maximum decodable attributes. |
| uint32_t | max_packet_size | for message ring buffer. |
| uint16_t | port | Port to listen on. |
| char const * | port_name | Name of the port for getservent(). |
| bool | read_hexdump | Do we debug hexdump read packets. |
| uint32_t | recv_buff | How big the kernel's receive buffer should be. |
| bool | recv_buff_is_set | Whether we were provided with a recv_buff. |
| fr_trie_t * | trie | for parsed networks |
| bool | write_hexdump | Do we debug hexdump write packets. |
| struct proto_tacacs_tcp_thread_t |
Definition at line 38 of file proto_tacacs_tcp.c.
Collaboration diagram for proto_tacacs_tcp_thread_t:| Data Fields | ||
|---|---|---|
| fr_io_address_t * | connection | for connected sockets. |
| char const * | name | socket name |
| int | sockfd | |
| fr_stats_t | stats | statistics for this socket |
| #define TACACS_MAX_ATTRIBUTES 256 |
Definition at line 36 of file proto_tacacs_tcp.c.
|
static |
|
static |
Definition at line 335 of file proto_tacacs_tcp.c.
|
static |
Set the file descriptor for this socket.
Definition at line 404 of file proto_tacacs_tcp.c.
Here is the call graph for this function:
|
static |
Definition at line 426 of file proto_tacacs_tcp.c.
|
static |
|
static |
Definition at line 419 of file proto_tacacs_tcp.c.
|
static |
Definition at line 344 of file proto_tacacs_tcp.c.
|
static |
Open a TCP listener for TACACS+.
Definition at line 356 of file proto_tacacs_tcp.c.
Here is the call graph for this function:
|
static |
Read TACACS data from a TCP connection.
| [in] | li | representing a client connection. |
| [in] | packet_ctx | UNUSED. |
| [out] | recv_time_p | When we read the packet. For some protocols we get this for free (but not here). |
| [out] | buffer | to read into. |
| [in] | buffer_len | Maximum length of the buffer. |
| [in,out] | leftover | If the previous read didn't yield a complete packet we will have written how many bytes we read in leftover and returned 0. On the next call, we use the value of leftover to offset the position we start writing into the buffer. *leftover must be subtracted from buffer_len when calculating free space in the buffer. |
Definition at line 131 of file proto_tacacs_tcp.c.
Here is the call graph for this function:
|
static |
Definition at line 263 of file proto_tacacs_tcp.c.
|
static |
Definition at line 75 of file proto_tacacs_tcp.c.
|
static |
Definition at line 105 of file proto_tacacs_tcp.c.
| fr_app_io_t proto_tacacs_tcp |
Definition at line 535 of file proto_tacacs_tcp.c.
|
static |
Definition at line 82 of file proto_tacacs_tcp.c.
1.9.8