The FreeRADIUS server $Id: f3670dba8951ca10eb4948feb3dc3db9423a334f $
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
rlm_redis_ippool_tool.c File Reference

IP population tool. More...

#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/io/listen.h>
#include <freeradius-devel/unlang/base.h>
#include <freeradius-devel/io/thread.h>
#include "base.h"
#include "redis_ippool.h"
+ Include dependency graph for rlm_redis_ippool_tool.c:

Go to the source code of this file.

Data Structures

struct  ippool_tool_operation_t
 A single pool operation. More...
 

Macros

#define ADD_ACTION(_action)
 
#define EOL   "\n"
 
#define EXIT_WITH_FAILURE
 

Typedefs

typedef enum ippool_tool_action ippool_tool_action_t
 Pool management actions.
 

Enumerations

enum  ippool_tool_action {
  IPPOOL_TOOL_NOOP = 0 ,
  IPPOOL_TOOL_ADD ,
  IPPOOL_TOOL_REMOVE ,
  IPPOOL_TOOL_RELEASE ,
  IPPOOL_TOOL_SHOW ,
  IPPOOL_TOOL_MODIFY ,
  IPPOOL_TOOL_ASSIGN ,
  IPPOOL_TOOL_UNASSIGN
}
 Pool management actions. More...
 

Functions

static bool ipaddr_next (fr_ipaddr_t *ipaddr, fr_ipaddr_t const *end, uint8_t prefix)
 Iterate over range of IP addresses.
 
int main (int argc, char *argv[])
 
static int parse_ip_range (fr_ipaddr_t *start_out, fr_ipaddr_t *end_out, char const *ip_str, uint8_t prefix)
 Convert an IP range or CIDR mask to a start and stop address.
 
static int redis_ippool_get_pools (TALLOC_CTX *ctx, fr_value_box_list_t *list, request_t *request, fr_event_list_t *el)
 Run the redis_ippool.pools.list xlat to fetch the list of pools across the cluster.
 
static int redis_ippool_get_stats (request_t *request, fr_value_box_t *pool_name, CONF_SECTION *section, fr_event_list_t *el)
 Run the redis_ippool.stats module method to fetch pool statistics.
 
static int redis_ippool_show (request_t *request, ippool_tool_operation_t const *op, CONF_SECTION *section, fr_event_list_t *el)
 Run the redis_ippool.show module method to fetch lease details.
 
static request_trequest_from_internal (TALLOC_CTX *ctx)
 
static int run_xlat (TALLOC_CTX *ctx, fr_value_box_list_t *list, request_t *request, fr_sbuff_t *xlat, fr_event_list_t *el)
 
static uint32_t uint32_gen_mask (uint8_t bits)
 
static NEVER_RETURNS void usage (int ret)
 
static int xlat_add_lease (TALLOC_CTX *ctx, fr_value_box_list_t *list, request_t *request, ippool_tool_operation_t *op, fr_event_list_t *el)
 
static int xlat_assign_lease (TALLOC_CTX *ctx, fr_value_box_list_t *list, request_t *request, ippool_tool_operation_t *op, char const *owner, fr_event_list_t *el)
 
static int xlat_modify_lease (TALLOC_CTX *ctx, fr_value_box_list_t *list, request_t *request, ippool_tool_operation_t *op, fr_event_list_t *el)
 
static int xlat_release_lease (TALLOC_CTX *ctx, fr_value_box_list_t *list, request_t *request, ippool_tool_operation_t *op, fr_event_list_t *el)
 
static int xlat_remove_lease (TALLOC_CTX *ctx, fr_value_box_list_t *list, request_t *request, ippool_tool_operation_t *op, fr_event_list_t *el)
 
static int xlat_unassign_lease (TALLOC_CTX *ctx, fr_value_box_list_t *list, request_t *request, ippool_tool_operation_t *op, char const *owner, fr_event_list_t *el)
 

Variables

static fr_dict_attr_t const * attr_ippool
 
static fr_dict_attr_t const * attr_ippool_lease
 
static fr_dict_attr_t const * attr_ippool_lease_active
 
static fr_dict_attr_t const * attr_ippool_lease_address
 
static fr_dict_attr_t const * attr_ippool_lease_device
 
static fr_dict_attr_t const * attr_ippool_lease_expires
 
static fr_dict_attr_t const * attr_ippool_lease_gateway
 
static fr_dict_attr_t const * attr_ippool_lease_range
 
static fr_dict_attr_t const * attr_ippool_name
 
static fr_dict_attr_t const * attr_ippool_stats
 
static fr_dict_attr_t const * attr_ippool_stats_dynamic
 
static fr_dict_attr_t const * attr_ippool_stats_dynamic_expire1d
 
static fr_dict_attr_t const * attr_ippool_stats_dynamic_expire1h
 
static fr_dict_attr_t const * attr_ippool_stats_dynamic_expire1m
 
static fr_dict_attr_t const * attr_ippool_stats_dynamic_expire30m
 
static fr_dict_attr_t const * attr_ippool_stats_dynamic_free
 
static fr_dict_attr_t const * attr_ippool_stats_dynamic_total
 
static fr_dict_attr_t const * attr_ippool_stats_static
 
static fr_dict_attr_t const * attr_ippool_stats_static_free
 
static fr_dict_attr_t const * attr_ippool_stats_static_renew1d
 
static fr_dict_attr_t const * attr_ippool_stats_static_renew1h
 
static fr_dict_attr_t const * attr_ippool_stats_static_renew1m
 
static fr_dict_attr_t const * attr_ippool_stats_static_renew30m
 
static fr_dict_attr_t const * attr_ippool_stats_static_total
 
static fr_dict_attr_t const * attr_ippool_stats_total
 
static fr_dict_t const * dict_freeradius
 
static char const * name
 
fr_dict_autoload_t redis_ippool_tool_dict []
 
fr_dict_attr_autoload_t redis_ippool_tool_dict_attr []
 
static char server_conf1 []
 Static server config split into two parts.
 
static char server_conf2 []
 

Detailed Description

IP population tool.

Id
5f274812609cd0d23caa7c04c604e15047cdcf17
Author
Arran Cudbard-Bell

Definition in file rlm_redis_ippool_tool.c.


Data Structure Documentation

◆ ippool_tool_operation_t

struct ippool_tool_operation_t

A single pool operation.

Definition at line 124 of file rlm_redis_ippool_tool.c.

+ Collaboration diagram for ippool_tool_operation_t:
Data Fields
ippool_tool_action_t action What to do to the leases described by net/prefix.
fr_ipaddr_t end End address.
char const * name Original range or CIDR string.
uint8_t const * pool Pool identifier.
size_t pool_len Length of the pool identifier.
uint8_t prefix Prefix - The bits between the address mask, and the prefix form the addresses to be modified in the pool.
uint8_t const * range Range identifier.
size_t range_len Length of the range identifier.
fr_ipaddr_t start Start address.

Macro Definition Documentation

◆ ADD_ACTION

#define ADD_ACTION (   _action)
Value:
do { \
if (p >= end) { \
ERROR("Too many actions, max is " STRINGIFY(sizeof(ops))); \
usage(64); \
} \
p->action = _action; \
p->name = optarg; \
p++; \
need_pool = true; \
} while (0)
#define STRINGIFY(x)
Definition build.h:216

◆ EOL

#define EOL   "\n"

Definition at line 142 of file rlm_redis_ippool_tool.c.

◆ EXIT_WITH_FAILURE

#define EXIT_WITH_FAILURE
Value:
do { \
ret = EXIT_FAILURE; \
goto cleanup; \
} while (0)
static bool cleanup
Definition radsniff.c:59

Definition at line 37 of file rlm_redis_ippool_tool.c.

Typedef Documentation

◆ ippool_tool_action_t

Pool management actions.

Enumeration Type Documentation

◆ ippool_tool_action

Pool management actions.

Enumerator
IPPOOL_TOOL_NOOP 

Do nothing.

IPPOOL_TOOL_ADD 

Add one or more IP addresses.

IPPOOL_TOOL_REMOVE 

Remove one or more IP addresses.

IPPOOL_TOOL_RELEASE 

Release one or more IP addresses.

IPPOOL_TOOL_SHOW 

Show one or more IP addresses.

IPPOOL_TOOL_MODIFY 

Modify attributes of one or more IP addresses.

IPPOOL_TOOL_ASSIGN 

Assign a static IP address to a device.

IPPOOL_TOOL_UNASSIGN 

Remove static IP address assignment.

Definition at line 110 of file rlm_redis_ippool_tool.c.

Function Documentation

◆ ipaddr_next()

static bool ipaddr_next ( fr_ipaddr_t ipaddr,
fr_ipaddr_t const *  end,
uint8_t  prefix 
)
static

Iterate over range of IP addresses.

Mutates the ipaddr passed in, adding one to the prefix bits on each call.

Parameters
[in,out]ipaddrto increment.
[in]endipaddr to stop at.
[in]prefixLength of the prefix.
Returns
  • true if the prefix bits are not high (continue).
  • false if the prefix bits are high (stop).

Definition at line 230 of file rlm_redis_ippool_tool.c.

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

◆ main()

int main ( int argc  ,
char *  argv[] 
)

Definition at line 726 of file rlm_redis_ippool_tool.c.

◆ parse_ip_range()

static int parse_ip_range ( fr_ipaddr_t start_out,
fr_ipaddr_t end_out,
char const *  ip_str,
uint8_t  prefix 
)
static

Convert an IP range or CIDR mask to a start and stop address.

Parameters
[out]start_outWhere to write the start address.
[out]end_outWhere to write the end address.
[in]ip_strUnparsed IP string.
[in]prefixlength of prefixes we'll be allocating.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 362 of file rlm_redis_ippool_tool.c.

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

◆ redis_ippool_get_pools()

static int redis_ippool_get_pools ( TALLOC_CTX *  ctx,
fr_value_box_list_t *  list,
request_t request,
fr_event_list_t el 
)
static

Run the redis_ippool.pools.list xlat to fetch the list of pools across the cluster.

Definition at line 664 of file rlm_redis_ippool_tool.c.

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

◆ redis_ippool_get_stats()

static int redis_ippool_get_stats ( request_t request,
fr_value_box_t pool_name,
CONF_SECTION section,
fr_event_list_t el 
)
static

Run the redis_ippool.stats module method to fetch pool statistics.

Definition at line 283 of file rlm_redis_ippool_tool.c.

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

◆ redis_ippool_show()

static int redis_ippool_show ( request_t request,
ippool_tool_operation_t const *  op,
CONF_SECTION section,
fr_event_list_t el 
)
static

Run the redis_ippool.show module method to fetch lease details.

Definition at line 315 of file rlm_redis_ippool_tool.c.

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

◆ request_from_internal()

static request_t * request_from_internal ( TALLOC_CTX *  ctx)
static

Definition at line 671 of file rlm_redis_ippool_tool.c.

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

◆ run_xlat()

static int run_xlat ( TALLOC_CTX *  ctx,
fr_value_box_list_t *  list,
request_t request,
fr_sbuff_t xlat,
fr_event_list_t el 
)
static

Definition at line 525 of file rlm_redis_ippool_tool.c.

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

◆ uint32_gen_mask()

static uint32_t uint32_gen_mask ( uint8_t  bits)
static

Definition at line 213 of file rlm_redis_ippool_tool.c.

+ Here is the caller graph for this function:

◆ usage()

static NEVER_RETURNS void usage ( int  ret)
static

Definition at line 173 of file rlm_redis_ippool_tool.c.

◆ xlat_add_lease()

static int xlat_add_lease ( TALLOC_CTX *  ctx,
fr_value_box_list_t *  list,
request_t request,
ippool_tool_operation_t op,
fr_event_list_t el 
)
static

Definition at line 562 of file rlm_redis_ippool_tool.c.

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

◆ xlat_assign_lease()

static int xlat_assign_lease ( TALLOC_CTX *  ctx,
fr_value_box_list_t *  list,
request_t request,
ippool_tool_operation_t op,
char const *  owner,
fr_event_list_t el 
)
static

Definition at line 628 of file rlm_redis_ippool_tool.c.

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

◆ xlat_modify_lease()

static int xlat_modify_lease ( TALLOC_CTX *  ctx,
fr_value_box_list_t *  list,
request_t request,
ippool_tool_operation_t op,
fr_event_list_t el 
)
static

Definition at line 613 of file rlm_redis_ippool_tool.c.

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

◆ xlat_release_lease()

static int xlat_release_lease ( TALLOC_CTX *  ctx,
fr_value_box_list_t *  list,
request_t request,
ippool_tool_operation_t op,
fr_event_list_t el 
)
static

Definition at line 598 of file rlm_redis_ippool_tool.c.

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

◆ xlat_remove_lease()

static int xlat_remove_lease ( TALLOC_CTX *  ctx,
fr_value_box_list_t *  list,
request_t request,
ippool_tool_operation_t op,
fr_event_list_t el 
)
static

Definition at line 583 of file rlm_redis_ippool_tool.c.

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

◆ xlat_unassign_lease()

static int xlat_unassign_lease ( TALLOC_CTX *  ctx,
fr_value_box_list_t *  list,
request_t request,
ippool_tool_operation_t op,
char const *  owner,
fr_event_list_t el 
)
static

Definition at line 648 of file rlm_redis_ippool_tool.c.

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

Variable Documentation

◆ attr_ippool

fr_dict_attr_t const* attr_ippool
static

Definition at line 51 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_lease

fr_dict_attr_t const* attr_ippool_lease
static

Definition at line 53 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_lease_active

fr_dict_attr_t const* attr_ippool_lease_active
static

Definition at line 55 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_lease_address

fr_dict_attr_t const* attr_ippool_lease_address
static

Definition at line 54 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_lease_device

fr_dict_attr_t const* attr_ippool_lease_device
static

Definition at line 57 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_lease_expires

fr_dict_attr_t const* attr_ippool_lease_expires
static

Definition at line 56 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_lease_gateway

fr_dict_attr_t const* attr_ippool_lease_gateway
static

Definition at line 58 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_lease_range

fr_dict_attr_t const* attr_ippool_lease_range
static

Definition at line 59 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_name

fr_dict_attr_t const* attr_ippool_name
static

Definition at line 52 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats

fr_dict_attr_t const* attr_ippool_stats
static

Definition at line 60 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_dynamic

fr_dict_attr_t const* attr_ippool_stats_dynamic
static

Definition at line 62 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_dynamic_expire1d

fr_dict_attr_t const* attr_ippool_stats_dynamic_expire1d
static

Definition at line 68 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_dynamic_expire1h

fr_dict_attr_t const* attr_ippool_stats_dynamic_expire1h
static

Definition at line 67 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_dynamic_expire1m

fr_dict_attr_t const* attr_ippool_stats_dynamic_expire1m
static

Definition at line 65 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_dynamic_expire30m

fr_dict_attr_t const* attr_ippool_stats_dynamic_expire30m
static

Definition at line 66 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_dynamic_free

fr_dict_attr_t const* attr_ippool_stats_dynamic_free
static

Definition at line 64 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_dynamic_total

fr_dict_attr_t const* attr_ippool_stats_dynamic_total
static

Definition at line 63 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_static

fr_dict_attr_t const* attr_ippool_stats_static
static

Definition at line 69 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_static_free

fr_dict_attr_t const* attr_ippool_stats_static_free
static

Definition at line 71 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_static_renew1d

fr_dict_attr_t const* attr_ippool_stats_static_renew1d
static

Definition at line 75 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_static_renew1h

fr_dict_attr_t const* attr_ippool_stats_static_renew1h
static

Definition at line 74 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_static_renew1m

fr_dict_attr_t const* attr_ippool_stats_static_renew1m
static

Definition at line 72 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_static_renew30m

fr_dict_attr_t const* attr_ippool_stats_static_renew30m
static

Definition at line 73 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_static_total

fr_dict_attr_t const* attr_ippool_stats_static_total
static

Definition at line 70 of file rlm_redis_ippool_tool.c.

◆ attr_ippool_stats_total

fr_dict_attr_t const* attr_ippool_stats_total
static

Definition at line 61 of file rlm_redis_ippool_tool.c.

◆ dict_freeradius

fr_dict_t const* dict_freeradius
static

Definition at line 43 of file rlm_redis_ippool_tool.c.

◆ name

char const* name
static

Definition at line 140 of file rlm_redis_ippool_tool.c.

◆ redis_ippool_tool_dict

fr_dict_autoload_t redis_ippool_tool_dict
Initial value:
= {
{ .out = &dict_freeradius, .proto = "freeradius" },
}
#define DICT_AUTOLOAD_TERMINATOR
Definition dict.h:311
static fr_dict_t const * dict_freeradius

Definition at line 46 of file rlm_redis_ippool_tool.c.

◆ redis_ippool_tool_dict_attr

fr_dict_attr_autoload_t redis_ippool_tool_dict_attr
Initial value:
= {
{ .out = &attr_ippool, .name = "IP-Pool", .type = FR_TYPE_TLV, .dict = &dict_freeradius },
{ .out = &attr_ippool_name, .name = "IP-Pool.Name", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
{ .out = &attr_ippool_lease, .name = "IP-Pool.Lease", .type = FR_TYPE_TLV, .dict = &dict_freeradius },
{ .out = &attr_ippool_lease_address, .name = "IP-Pool.Lease.Address", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
{ .out = &attr_ippool_lease_active, .name = "IP-Pool.Lease.Active", .type = FR_TYPE_BOOL, .dict = &dict_freeradius },
{ .out = &attr_ippool_lease_expires, .name = "IP-Pool.Lease.Expires", .type = FR_TYPE_DATE, .dict = &dict_freeradius },
{ .out = &attr_ippool_lease_device, .name = "IP-Pool.Lease.Device", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
{ .out = &attr_ippool_lease_gateway, .name = "IP-Pool.Lease.Gateway", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
{ .out = &attr_ippool_lease_range, .name = "IP-Pool.Lease.Range", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats, .name = "IP-Pool.Stats", .type = FR_TYPE_TLV, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_total, .name = "IP-Pool.Stats.Total", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_dynamic, .name = "IP-Pool.Stats.Dynamic", .type = FR_TYPE_TLV, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_dynamic_total, .name = "IP-Pool.Stats.Dynamic.Total", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_dynamic_free, .name = "IP-Pool.Stats.Dynamic.Free", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_dynamic_expire1m, .name = "IP-Pool.Stats.Dynamic.Expire-1m", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_dynamic_expire30m, .name = "IP-Pool.Stats.Dynamic.Expire-30m", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_dynamic_expire1h, .name = "IP-Pool.Stats.Dynamic.Expire-1h", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_dynamic_expire1d, .name = "IP-Pool.Stats.Dynamic.Expire-1d", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_static, .name = "IP-Pool.Stats.Static", .type = FR_TYPE_TLV, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_static_total, .name = "IP-Pool.Stats.Static.Total", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_static_free, .name = "IP-Pool.Stats.Static.Free", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_static_renew1m, .name = "IP-Pool.Stats.Static.Renew-1m", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_static_renew30m, .name = "IP-Pool.Stats.Static.Renew-30m", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_static_renew1h, .name = "IP-Pool.Stats.Static.Renew-1h", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
{ .out = &attr_ippool_stats_static_renew1d, .name = "IP-Pool.Stats.Static.Renew-1d", .type = FR_TYPE_UINT64, .dict = &dict_freeradius },
}
@ FR_TYPE_TLV
Contains nested attributes.
@ FR_TYPE_STRING
String of printable characters.
@ FR_TYPE_DATE
Unix time stamp, always has value >2^31.
@ FR_TYPE_UINT64
64 Bit unsigned integer.
@ FR_TYPE_BOOL
A truth value.
static fr_dict_attr_t const * attr_ippool_stats_dynamic_expire1d
static fr_dict_attr_t const * attr_ippool_stats_static_renew1m
static fr_dict_attr_t const * attr_ippool_stats_static
static fr_dict_attr_t const * attr_ippool_stats_static_renew1h
static fr_dict_attr_t const * attr_ippool_stats_dynamic_free
static fr_dict_attr_t const * attr_ippool_stats_static_renew30m
static fr_dict_attr_t const * attr_ippool_stats_dynamic_expire1m
static fr_dict_attr_t const * attr_ippool_lease_device
static fr_dict_attr_t const * attr_ippool_stats_dynamic_expire30m
static fr_dict_attr_t const * attr_ippool_lease_gateway
static fr_dict_attr_t const * attr_ippool_stats_static_total
static fr_dict_attr_t const * attr_ippool_name
static fr_dict_attr_t const * attr_ippool_stats_static_free
static fr_dict_attr_t const * attr_ippool_lease
static fr_dict_attr_t const * attr_ippool_lease_active
static fr_dict_attr_t const * attr_ippool
static fr_dict_attr_t const * attr_ippool_stats_dynamic
static fr_dict_attr_t const * attr_ippool_lease_address
static fr_dict_attr_t const * attr_ippool_lease_expires
static fr_dict_attr_t const * attr_ippool_lease_range
static fr_dict_attr_t const * attr_ippool_stats
static fr_dict_attr_t const * attr_ippool_stats_dynamic_expire1h
static fr_dict_attr_t const * attr_ippool_stats_static_renew1d
static fr_dict_attr_t const * attr_ippool_stats_dynamic_total
static fr_dict_attr_t const * attr_ippool_stats_total

Definition at line 78 of file rlm_redis_ippool_tool.c.

◆ server_conf1

char server_conf1[]
static
Initial value:
=
"thread { num_workers = 1}" EOL
"trigger { }" EOL
"client test { ipaddr = 127.0.0.1; secret = supersecret }" EOL
"modules {" EOL
" redis_ippool {" EOL
" owner = request.IP-Pool.Lease.Device" EOL
" pool_name = control.IP-Pool.Name" EOL
" requested_address = IP-Pool.Lease.Address[*]" EOL
" redis {" EOL
" virtual_server = redis" EOL
" pool { start = 0 }" EOL
#define EOL

Static server config split into two parts.

The command line provided server value is inserted between the two sections, along with an optional $INCLUDE if the -f option is provided

Definition at line 149 of file rlm_redis_ippool_tool.c.

◆ server_conf2

char server_conf2[]
static
Initial value:
=
" }" EOL
" }" EOL
"}" EOL
"server redis { namespace = redis } " EOL
"server default {" EOL
" namespace = radius" EOL
" recv Access-Request { redis_ippool.stats }" EOL
" recv Accounting-Request { redis_ippool.show }" EOL
"}"

Definition at line 162 of file rlm_redis_ippool_tool.c.