The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
file.h File Reference
#include "rlm_linelog.h"
+ Include dependency graph for file.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rlm_linelog_file_entry_t
 
struct  rlm_linelog_file_s
 
struct  rlm_linelog_thread_t
 linelog module thread specific structure More...
 

Typedefs

typedef struct linelog_write_uctx_s linelog_write_uctx_t
 
typedef struct rlm_linelog_file_s rlm_linelog_file_t
 

Enumerations

enum  linelog_buffer_action_t {
  LINELOG_BUFFER_WRITE_FAIL = -1 ,
  LINELOG_BUFFER_WRITE_YIELD = 0 ,
  LINELOG_BUFFER_WRITE_DONE = 1
}
 

Functions

void file_batching_mod_handle_signal (module_ctx_t const *mctx, request_t *request, fr_signal_t action)
 
unlang_action_t file_batching_mod_resume (unlang_result_t *p_result, module_ctx_t const *mctx, request_t *request)
 
void file_batching_xlat_handle_signal (xlat_ctx_t const *xctx, request_t *request, fr_signal_t action)
 
xlat_action_t file_batching_xlat_resume (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in)
 
linelog_buffer_action_t file_enqueue_write (rlm_linelog_file_entry_t **entry_p, module_ctx_t const *mctx, linelog_call_env_t const *call_env, request_t *request, struct iovec *vector_p, size_t vector_len)
 
void file_thread_init (rlm_linelog_thread_t *thread, fr_timer_list_t *tl)
 

Data Structure Documentation

◆ rlm_linelog_file_entry_t

struct rlm_linelog_file_entry_t

Definition at line 34 of file file.h.

+ Collaboration diagram for rlm_linelog_file_entry_t:
Data Fields
size_t data_len How much data this entry holds in the sbuff.
int error Error code if the write failed.
bool failed Write failed.
rlm_linelog_file_t * file The file being written to.
request_t * request The request that created the data.

◆ rlm_linelog_file_s

struct rlm_linelog_file_s

Definition at line 44 of file file.h.

+ Collaboration diagram for rlm_linelog_file_s:
Data Fields
fr_dbuff_t dbuff Talloced, dynamically resized dbuff containing all of the linelog content to write out.
rlm_linelog_file_entry_t entry[] Array of metadata for each pending write.
rlm_linelog_file_entry_t * entry_last Last entry in the array.
rlm_linelog_file_entry_t * entry_p Last entry we wrote to.
fr_timer_t * expiry When we should cleanup file metadata due to inactivity.
char const * filename Talloced filename string.
fr_value_box_t * log_header Header to prepend to each log line.
rlm_linelog_t const * mod_inst Module instance this file belongs to.
fr_dbuff_uctx_talloc_t tctx Talloc context for the dbuff.
rlm_linelog_thread_t * thread_inst Thread instance this file belongs to.
fr_timer_t * write When we need to write out any pending data in the buffer.

◆ rlm_linelog_thread_t

struct rlm_linelog_thread_t

linelog module thread specific structure

Definition at line 27 of file file.h.

+ Collaboration diagram for rlm_linelog_thread_t:
Data Fields
fr_hash_table_t * file_table Hash table of files.
fr_timer_list_t * tl Timer list for this thread.

Typedef Documentation

◆ linelog_write_uctx_t

typedef struct linelog_write_uctx_s linelog_write_uctx_t

Definition at line 42 of file file.h.

◆ rlm_linelog_file_t

Definition at line 32 of file file.h.

Enumeration Type Documentation

◆ linelog_buffer_action_t

Enumerator
LINELOG_BUFFER_WRITE_FAIL 

Writing buffered data failed.

LINELOG_BUFFER_WRITE_YIELD 

Writing buffered data yielded.

LINELOG_BUFFER_WRITE_DONE 

Writing buffered data completed.

Definition at line 59 of file file.h.

Function Documentation

◆ file_batching_mod_handle_signal()

void file_batching_mod_handle_signal ( module_ctx_t const *  mctx,
request_t request,
fr_signal_t  action 
)

Definition at line 87 of file file.c.

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

◆ file_batching_mod_resume()

unlang_action_t file_batching_mod_resume ( unlang_result_t p_result,
module_ctx_t const *  mctx,
request_t request 
)

◆ file_batching_xlat_handle_signal()

void file_batching_xlat_handle_signal ( xlat_ctx_t const *  xctx,
request_t request,
fr_signal_t  action 
)

Definition at line 92 of file file.c.

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

◆ file_batching_xlat_resume()

xlat_action_t file_batching_xlat_resume ( TALLOC_CTX *  ctx,
fr_dcursor_t out,
xlat_ctx_t const *  xctx,
request_t request,
fr_value_box_list_t *  in 
)

◆ file_enqueue_write()

linelog_buffer_action_t file_enqueue_write ( rlm_linelog_file_entry_t **  entry_p,
module_ctx_t const *  mctx,
linelog_call_env_t const *  call_env,
request_t request,
struct iovec *  vector_p,
size_t  vector_len 
)

Definition at line 270 of file file.c.

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

◆ file_thread_init()

void file_thread_init ( rlm_linelog_thread_t thread,
fr_timer_list_t tl 
)

Definition at line 358 of file file.c.

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