The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions | Variables
rlm_sql_firebird.c File Reference
#include "sql_fbapi.h"
#include <freeradius-devel/util/debug.h>
#include "rlm_sql_trunk.h"
+ Include dependency graph for rlm_sql_firebird.c:

Go to the source code of this file.

Macros

#define LOG_PREFIX   "sql - firebird"
 

Functions

static void _sql_connection_close (UNUSED fr_event_list_t *el, void *h, UNUSED void *uctx)
 
 CC_NO_UBSAN (function)
 Establish connection to the db. More...
 
static int sql_affected_rows (fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
 Return the number of rows affected by the query (update, or insert) More...
 
static size_t sql_error (UNUSED TALLOC_CTX *ctx, sql_log_entry_t out[], NDEBUG_UNUSED size_t outlen, fr_sql_query_t *query_ctx)
 Retrieves any errors associated with the query context. More...
 
static unlang_action_t sql_fetch_row (rlm_rcode_t *p_result, UNUSED int *priority, UNUSED request_t *request, void *uctx)
 Returns an individual row. More...
 
static sql_rcode_t sql_fields (char const **out[], fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
 Returns name of fields. More...
 
static sql_rcode_t sql_finish_query (fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
 End the query, such as freeing memory or result. More...
 
static sql_rcode_t sql_free_result (fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
 Frees memory allocated for a result set. More...
 
static SQL_QUERY_RESUME void sql_request_complete (UNUSED request_t *request, void *preq, UNUSED void *rctx, UNUSED void *uctx)
 
static void sql_request_fail (UNUSED request_t *request, void *preq, UNUSED void *rctx, UNUSED trunk_request_state_t state, UNUSED void *uctx)
 

Variables

rlm_sql_driver_t rlm_sql_firebird
 
static char tpb []
 

Macro Definition Documentation

◆ LOG_PREFIX

#define LOG_PREFIX   "sql - firebird"

Definition at line 23 of file rlm_sql_firebird.c.

Function Documentation

◆ _sql_connection_close()

static void _sql_connection_close ( UNUSED fr_event_list_t el,
void *  h,
UNUSED void *  uctx 
)
static

Definition at line 68 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ CC_NO_UBSAN()

CC_NO_UBSAN ( function  )

Establish connection to the db.

Definition at line 35 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_affected_rows()

static int sql_affected_rows ( fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

Return the number of rows affected by the query (update, or insert)

Definition at line 293 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_error()

static size_t sql_error ( UNUSED TALLOC_CTX *  ctx,
sql_log_entry_t  out[],
NDEBUG_UNUSED size_t  outlen,
fr_sql_query_t query_ctx 
)
static

Retrieves any errors associated with the query context.

Note
Caller will free any memory allocated in ctx.
Parameters
ctxto allocate temporary error buffers in.
outArray of sql_log_entrys to fill.
outlenLength of out array.
query_ctxQuery context to retrieve error for.
configrlm_sql config.
Returns
number of errors written to the sql_log_entry_t array.

Definition at line 274 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_fetch_row()

static unlang_action_t sql_fetch_row ( rlm_rcode_t p_result,
UNUSED int *  priority,
UNUSED request_t request,
void *  uctx 
)
static

Returns an individual row.

Definition at line 205 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_fields()

static sql_rcode_t sql_fields ( char const **  out[],
fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

Returns name of fields.

Definition at line 184 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_finish_query()

static sql_rcode_t sql_finish_query ( fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

End the query, such as freeing memory or result.

Definition at line 240 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_free_result()

static sql_rcode_t sql_free_result ( fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

Frees memory allocated for a result set.

Definition at line 255 of file rlm_sql_firebird.c.

◆ sql_request_complete()

static SQL_QUERY_RESUME void sql_request_complete ( UNUSED request_t request,
void *  preq,
UNUSED void *  rctx,
UNUSED void *  uctx 
)
static

Definition at line 164 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_request_fail()

static void sql_request_fail ( UNUSED request_t request,
void *  preq,
UNUSED void *  rctx,
UNUSED trunk_request_state_t  state,
UNUSED void *  uctx 
)
static

Definition at line 172 of file rlm_sql_firebird.c.

Variable Documentation

◆ rlm_sql_firebird

rlm_sql_driver_t rlm_sql_firebird
Initial value:
= {
.common = {
.name = "sql_firebird",
},
.sql_query_resume = sql_query_resume,
.sql_select_query_resume = sql_query_resume,
.sql_affected_rows = sql_affected_rows,
.sql_fetch_row = sql_fetch_row,
.sql_fields = sql_fields,
.sql_free_result = sql_free_result,
.sql_error = sql_error,
.sql_finish_query = sql_finish_query,
.sql_finish_select_query = sql_finish_query,
.uses_trunks = true,
.trunk_io_funcs = {
.connection_alloc = sql_trunk_connection_alloc,
.request_mux = sql_trunk_request_mux,
.request_complete = sql_request_complete,
.request_fail = sql_request_fail
}
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:63
#define RLM_SQL_RCODE_FLAGS_ALT_QUERY
Can distinguish between other errors and those.
Definition: rlm_sql.h:172
static size_t sql_error(UNUSED TALLOC_CTX *ctx, sql_log_entry_t out[], NDEBUG_UNUSED size_t outlen, fr_sql_query_t *query_ctx)
Retrieves any errors associated with the query context.
static sql_rcode_t sql_fields(char const **out[], fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
Returns name of fields.
static sql_rcode_t sql_finish_query(fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
End the query, such as freeing memory or result.
static unlang_action_t sql_fetch_row(rlm_rcode_t *p_result, UNUSED int *priority, UNUSED request_t *request, void *uctx)
Returns an individual row.
static SQL_QUERY_RESUME void sql_request_complete(UNUSED request_t *request, void *preq, UNUSED void *rctx, UNUSED void *uctx)
static sql_rcode_t sql_free_result(fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
Frees memory allocated for a result set.
static void sql_request_fail(UNUSED request_t *request, void *preq, UNUSED void *rctx, UNUSED trunk_request_state_t state, UNUSED void *uctx)
static int sql_affected_rows(fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
Return the number of rows affected by the query (update, or insert)

Definition at line 302 of file rlm_sql_firebird.c.

◆ tpb

char tpb[]
static
Initial value:
= {isc_tpb_version3, isc_tpb_wait, isc_tpb_write,
isc_tpb_read_committed, isc_tpb_no_rec_version}

Definition at line 29 of file rlm_sql_firebird.c.