All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions | Variables
rlm_sql_db2.c File Reference
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/rad_assert.h>
#include <sys/stat.h>
#include <sql.h>
#include <sqlcli.h>
#include "rlm_sql.h"
+ Include dependency graph for rlm_sql_db2.c:

Go to the source code of this file.

Data Structures

struct  rlm_sql_conn
 

Typedefs

typedef struct rlm_sql_conn rlm_sql_db2_conn_t
 

Functions

static int _sql_socket_destructor (rlm_sql_db2_conn_t *conn)
 
static int sql_affected_rows (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 
static size_t sql_error (TALLOC_CTX *ctx, sql_log_entry_t out[], size_t outlen, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 Retrieves any errors associated with the connection handle. More...
 
static sql_rcode_t sql_fetch_row (rlm_sql_row_t *out, rlm_sql_handle_t *handle, rlm_sql_config_t *config)
 
static sql_rcode_t sql_fields (char const **out[], rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 
static sql_rcode_t sql_finish_query (UNUSED rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 
static sql_rcode_t sql_finish_select_query (rlm_sql_handle_t *handle, rlm_sql_config_t *config)
 
static sql_rcode_t sql_free_result (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 
static int sql_num_fields (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 
static sql_rcode_t sql_query (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config, char const *query)
 
static sql_rcode_t sql_select_query (rlm_sql_handle_t *handle, rlm_sql_config_t *config, char const *query)
 
static sql_rcode_t sql_socket_init (rlm_sql_handle_t *handle, rlm_sql_config_t *config, struct timeval const *timeout)
 

Variables

rlm_sql_module_t rlm_sql_db2
 

Data Structure Documentation

struct rlm_sql_conn

Definition at line 42 of file rlm_sql_db2.c.

Data Fields
SQLHANDLE dbc_handle
SQLHANDLE env_handle
SQLHANDLE stmt

Typedef Documentation

Function Documentation

static int _sql_socket_destructor ( rlm_sql_db2_conn_t conn)
static

Definition at line 48 of file rlm_sql_db2.c.

+ Here is the caller graph for this function:

static int sql_affected_rows ( rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Definition at line 281 of file rlm_sql_db2.c.

static size_t sql_error ( TALLOC_CTX *  ctx,
sql_log_entry_t  out[],
size_t  outlen,
rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Retrieves any errors associated with the connection handle.

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.
handlerlm_sql connection handle.
configrlm_sql config.
Returns
number of errors written to the sql_log_entry_t array.

Definition at line 248 of file rlm_sql_db2.c.

static sql_rcode_t sql_fetch_row ( rlm_sql_row_t out,
rlm_sql_handle_t handle,
rlm_sql_config_t config 
)
static

Definition at line 182 of file rlm_sql_db2.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_fields ( char const **  out[],
rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Definition at line 144 of file rlm_sql_db2.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_finish_query ( UNUSED rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Definition at line 271 of file rlm_sql_db2.c.

+ Here is the caller graph for this function:

static sql_rcode_t sql_finish_select_query ( rlm_sql_handle_t handle,
rlm_sql_config_t config 
)
static

Definition at line 276 of file rlm_sql_db2.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_free_result ( rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Definition at line 228 of file rlm_sql_db2.c.

static int sql_num_fields ( rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Definition at line 134 of file rlm_sql_db2.c.

+ Here is the caller graph for this function:

static sql_rcode_t sql_query ( rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config,
char const *  query 
)
static

Definition at line 103 of file rlm_sql_db2.c.

+ Here is the caller graph for this function:

static sql_rcode_t sql_select_query ( rlm_sql_handle_t handle,
rlm_sql_config_t config,
char const *  query 
)
static

Definition at line 129 of file rlm_sql_db2.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_socket_init ( rlm_sql_handle_t handle,
rlm_sql_config_t config,
struct timeval const *  timeout 
)
static

Definition at line 62 of file rlm_sql_db2.c.

+ Here is the call graph for this function:

Variable Documentation

rlm_sql_module_t rlm_sql_db2
Initial value:
= {
.name = "rlm_sql_db2",
.sql_socket_init = sql_socket_init,
.sql_query = sql_query,
.sql_select_query = sql_select_query,
.sql_num_fields = sql_num_fields,
.sql_affected_rows = sql_affected_rows,
.sql_fields = sql_fields,
.sql_fetch_row = sql_fetch_row,
.sql_free_result = sql_free_result,
.sql_error = sql_error,
.sql_finish_query = sql_finish_query,
.sql_finish_select_query = sql_finish_select_query
}
static sql_rcode_t sql_socket_init(rlm_sql_handle_t *handle, rlm_sql_config_t *config, struct timeval const *timeout)
Definition: rlm_sql_db2.c:62
static sql_rcode_t sql_free_result(rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Definition: rlm_sql_db2.c:228
static sql_rcode_t sql_finish_select_query(rlm_sql_handle_t *handle, rlm_sql_config_t *config)
Definition: rlm_sql_db2.c:276
static int sql_affected_rows(rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Definition: rlm_sql_db2.c:281
static sql_rcode_t sql_fields(char const **out[], rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Definition: rlm_sql_db2.c:144
static size_t sql_error(TALLOC_CTX *ctx, sql_log_entry_t out[], size_t outlen, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Retrieves any errors associated with the connection handle.
Definition: rlm_sql_db2.c:248
static sql_rcode_t sql_select_query(rlm_sql_handle_t *handle, rlm_sql_config_t *config, char const *query)
Definition: rlm_sql_db2.c:129
static sql_rcode_t sql_query(rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config, char const *query)
Definition: rlm_sql_db2.c:103
static sql_rcode_t sql_fetch_row(rlm_sql_row_t *out, rlm_sql_handle_t *handle, rlm_sql_config_t *config)
Definition: rlm_sql_db2.c:182
static int sql_num_fields(rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Definition: rlm_sql_db2.c:134
static sql_rcode_t sql_finish_query(UNUSED rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Definition: rlm_sql_db2.c:271

Definition at line 293 of file rlm_sql_db2.c.