Allocates an IPv4 address from pools defined in ASN Netvim. More...
#include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h>
#include <freeradius-devel/modpriv.h>
#include <ctype.h>
#include "rlm_sql.h"
Go to the source code of this file.
Data Structures | |
struct | rlm_sqlhpwippool_t |
Macros | |
#define | ASN_IP_POOL_NAME 1 |
#define | MAX_QUERY_LEN 4096 |
#define | RLM_NETVIM_MAX_ROWS 1000000 |
#define | RLM_NETVIM_TMP_PREFIX "auth-tmp-" |
#define | VENDORPEC_ASN 23782 |
Typedefs | |
typedef struct rlm_sqlhpwippool_t | rlm_sqlhpwippool_t |
Functions | |
static rlm_rcode_t | CC_HINT (nonnull) |
static int | mod_instantiate (CONF_SECTION *conf, void *instance) |
static int | nvp_cleanup (rlm_sqlhpwippool_t *data) |
static int | nvp_finish (rlm_sqlhpwippool_t *data, rlm_sql_handle_t *sqlsock) |
static int | nvp_freeclosed (rlm_sqlhpwippool_t *data, rlm_sql_handle_t *sqlsock) |
static int | nvp_query (rlm_sqlhpwippool_t *data, rlm_sql_handle_t *sqlsock, char const *fmt,...) |
static int | nvp_select (rlm_sql_row_t *row, rlm_sqlhpwippool_t *data, rlm_sql_handle_t *sqlsock, char const *fmt,...) |
static int | nvp_select_finish (rlm_sqlhpwippool_t *data, rlm_sql_handle_t *sqlsock) |
static int | nvp_syncfree (rlm_sqlhpwippool_t *data, rlm_sql_handle_t *sqlsock) |
static int | nvp_vquery (rlm_sqlhpwippool_t *data, rlm_sql_handle_t *sqlsock, char const *fmt, va_list ap) |
Variables | |
static CONF_PARSER | module_config [] |
module_t | rlm_sqlhpwippool |
Allocates an IPv4 address from pools defined in ASN Netvim.
Current bugs/limits:
Definition in file rlm_sqlhpwippool.c.
struct rlm_sqlhpwippool_t |
Definition at line 54 of file rlm_sqlhpwippool.c.
Data Fields | ||
---|---|---|
rlm_sql_module_t * | db | |
char const * | db_name | Netvim database. |
uint32_t | free_after | How many seconds an IP should not be used after freeing. |
char const * | myname | Name of this instance. |
bool | no_free_fail | Fail if no free IP addresses found. |
uint32_t | sincesync | req. done so far since last free IP sync. |
rlm_sql_t * | sql_inst | |
char const * | sql_instance_name | rlm_sql instance to use. |
uint32_t | sync_after | How often to sync with radacct. |
#define ASN_IP_POOL_NAME 1 |
Definition at line 45 of file rlm_sqlhpwippool.c.
#define MAX_QUERY_LEN 4096 |
Definition at line 50 of file rlm_sqlhpwippool.c.
#define RLM_NETVIM_MAX_ROWS 1000000 |
Definition at line 47 of file rlm_sqlhpwippool.c.
#define RLM_NETVIM_TMP_PREFIX "auth-tmp-" |
Definition at line 48 of file rlm_sqlhpwippool.c.
#define VENDORPEC_ASN 23782 |
Definition at line 44 of file rlm_sqlhpwippool.c.
typedef struct rlm_sqlhpwippool_t rlm_sqlhpwippool_t |
|
static |
|
static |
|
static |
Definition at line 209 of file rlm_sqlhpwippool.c.
|
static |
|
static |
Definition at line 164 of file rlm_sqlhpwippool.c.
|
static |
Definition at line 101 of file rlm_sqlhpwippool.c.
|
static |
Definition at line 124 of file rlm_sqlhpwippool.c.
|
static |
Definition at line 157 of file rlm_sqlhpwippool.c.
|
static |
Definition at line 186 of file rlm_sqlhpwippool.c.
|
static |
Definition at line 84 of file rlm_sqlhpwippool.c.
|
static |
Definition at line 73 of file rlm_sqlhpwippool.c.
module_t rlm_sqlhpwippool |
Definition at line 746 of file rlm_sqlhpwippool.c.