#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/rad_assert.h>
#include <freeradius-devel/exfile.h>
#include <sys/uio.h>
Go to the source code of this file.
Data Structures | |
struct | linelog_conn |
struct | linelog_instance_t |
linelog module instance More... | |
struct | linelog_instance_t.file |
struct | linelog_instance_t.syslog |
struct | linelog_instance_t.unix_sock |
struct | linelog_net |
Macros | |
#define | VECTOR_INCREMENT 20 |
Typedefs | |
typedef struct linelog_conn | linelog_conn_t |
typedef struct linelog_instance_t | linelog_instance_t |
linelog module instance More... | |
typedef struct linelog_net | linelog_net_t |
Enumerations | |
enum | linelog_dst_t { LINELOG_DST_INVALID = 0, LINELOG_DST_FILE, LINELOG_DST_SYSLOG, LINELOG_DST_UNIX, LINELOG_DST_UDP, LINELOG_DST_TCP } |
Functions | |
static int | _mod_conn_free (linelog_conn_t *conn) |
static size_t | linelog_escape_func (UNUSED REQUEST *request, char *out, size_t outlen, char const *in, UNUSED void *arg) |
Escape unprintable characters. More... | |
static void * | mod_conn_create (TALLOC_CTX *ctx, void *instance, struct timeval const *timeout) |
static int | mod_detach (void *instance) |
static rlm_rcode_t | mod_do_linelog (void *instance, REQUEST *request) CC_HINT(nonnull) |
Write a linelog message. More... | |
static int | mod_instantiate (CONF_SECTION *conf, void *instance) |
Variables | |
static const CONF_PARSER | file_config [] |
static FR_NAME_NUMBER const | linelog_dst_table [] |
static const CONF_PARSER | module_config [] |
module_t | rlm_linelog |
static const CONF_PARSER | syslog_config [] |
static const CONF_PARSER | tcp_config [] |
static const CONF_PARSER | udp_config [] |
static const CONF_PARSER | unix_config [] |
struct linelog_conn |
Definition at line 122 of file rlm_linelog.c.
Data Fields | ||
---|---|---|
int | sockfd | File descriptor associated with socket. |
struct linelog_instance_t |
linelog module instance
Definition at line 80 of file rlm_linelog.c.
Data Fields | ||
---|---|---|
CONF_SECTION * | cs | CONF_SECTION to use as the root for log_ref lookups. |
char const * | delimiter |
Line termination string (usually ). |
size_t | delimiter_len | Length of line termination string. |
struct linelog_instance_t | file | |
linelog_dst_t | log_dst | Logging destination. |
char const * | log_dst_str | Logging destination string. |
vp_tmpl_t * | log_ref | Path to a CONF_PAIR (to use as the source of log messages). |
vp_tmpl_t * | log_src | Source of log messages. |
char const * | name | Module instance name. |
fr_connection_pool_t * | pool | Connection pool instance. |
struct linelog_instance_t | syslog | |
linelog_net_t | tcp | TCP server. |
linelog_net_t | udp | UDP server. |
struct linelog_instance_t | unix_sock |
struct linelog_instance_t.file |
Definition at line 101 of file rlm_linelog.c.
Data Fields | ||
---|---|---|
exfile_t * | ef | Exclusive file access handle. |
bool | escape | Do filename escaping, yes / no. |
xlat_escape_t | escape_func | Escape function. |
gid_t | group | Resolved gid. |
char const * | group_str | Group to set on new files. |
char const * | name | File to write to. |
uint32_t | permissions | Permissions to use when creating new files. |
struct linelog_instance_t.syslog |
Definition at line 95 of file rlm_linelog.c.
Data Fields | ||
---|---|---|
char const * | facility | Syslog facility string. |
int | priority | Bitwise | of severity and facility. |
char const * | severity | Syslog severity string. |
struct linelog_instance_t.unix_sock |
Definition at line 111 of file rlm_linelog.c.
Data Fields | ||
---|---|---|
char const * | path | Where the UNIX socket lives. |
struct timeval | timeout | How long to wait for read/write operations. |
struct linelog_net |
Definition at line 71 of file rlm_linelog.c.
Data Fields | ||
---|---|---|
fr_ipaddr_t | dst_ipaddr | Network server. |
uint16_t | port | Network port. |
fr_ipaddr_t | src_ipaddr | Send requests from a given src_ipaddr. |
struct timeval | timeout | How long to wait for read/write operations. |
#define VECTOR_INCREMENT 20 |
typedef struct linelog_conn linelog_conn_t |
typedef struct linelog_instance_t linelog_instance_t |
linelog module instance
typedef struct linelog_net linelog_net_t |
enum linelog_dst_t |
Enumerator | |
---|---|
LINELOG_DST_INVALID | |
LINELOG_DST_FILE |
Log to a file. |
LINELOG_DST_SYSLOG |
Log to syslog. |
LINELOG_DST_UNIX |
Log via Unix socket. |
LINELOG_DST_UDP |
Log via UDP. |
LINELOG_DST_TCP |
Log via TCP. |
Definition at line 52 of file rlm_linelog.c.
|
static |
Definition at line 198 of file rlm_linelog.c.
|
static |
Escape unprintable characters.
\\n
.\\r
.\<oct><oct><oct>.
request | The current request. |
out | Where to write the escaped string. |
outlen | Length of the output buffer. |
in | String to escape. |
arg | unused. |
Definition at line 442 of file rlm_linelog.c.
|
static |
Definition at line 206 of file rlm_linelog.c.
|
static |
|
static |
Write a linelog message.
Write a log message to syslog or a flat file.
instance | of rlm_linelog. |
request | The current request. |
Definition at line 513 of file rlm_linelog.c.
|
static |
|
static |
Definition at line 127 of file rlm_linelog.c.
|
static |
Definition at line 61 of file rlm_linelog.c.
|
static |
Definition at line 169 of file rlm_linelog.c.
module_t rlm_linelog |
Definition at line 838 of file rlm_linelog.c.
|
static |
Definition at line 135 of file rlm_linelog.c.
|
static |
Definition at line 153 of file rlm_linelog.c.
|
static |
Definition at line 146 of file rlm_linelog.c.
|
static |
Definition at line 141 of file rlm_linelog.c.