![]() |
The FreeRADIUS server $Id: a4e7f8c94e8038b7627bcf52356b7ed15955c1d7 $
|
IP Allocation module with a redis backend. More...
#include <freeradius-devel/server/base.h>#include <freeradius-devel/server/module_rlm.h>#include <freeradius-devel/server/modpriv.h>#include <freeradius-devel/unlang/xlat_func.h>#include <freeradius-devel/util/debug.h>#include <freeradius-devel/util/base16.h>#include <freeradius-devel/util/token.h>#include <freeradius-devel/redis/base.h>#include <freeradius-devel/redis/cluster_async.h>#include "redis_ippool.h"
Include dependency graph for rlm_redis_ippool.c:Go to the source code of this file.
Data Structures | |
| struct | redis_ippool_alloc_call_env_t |
| Call environment used when calling redis_ippool allocate method. More... | |
| struct | redis_ippool_alloc_rctx_t |
| Resume context for async calls to alloc script. More... | |
| struct | redis_ippool_bulk_release_call_env_t |
| Call environment used when calling redis_ippool bulk release method. More... | |
| struct | redis_ippool_info_rctx_t |
| Resume context for methods which retrieve info and produce pairs. More... | |
| struct | redis_ippool_load_rctx_t |
| Resume context for loading scripts in response to NOSCRIPT reply. More... | |
| struct | redis_ippool_release_call_env_t |
| Call environment used when calling redis_ippool release method. More... | |
| struct | redis_ippool_release_rctx_t |
| Resume context for async calls to update script. More... | |
| struct | redis_ippool_show_call_env_t |
| Call environment used when calling redis_ippool show method. More... | |
| struct | redis_ippool_stats_call_env_t |
| Call environment used when calling redis_ippool stats method. More... | |
| struct | redis_ippool_tool_rctx_t |
| Resume context for IP pool updating xlats. More... | |
| struct | redis_ippool_update_call_env_t |
| Call environment used when calling redis_ippool update method. More... | |
| struct | redis_ippool_update_rctx_t |
| Resume context for async calls to update script. More... | |
| struct | redis_pools_list_rctx_t |
| Resume context for pool list module method. More... | |
| struct | redis_wait_rctx_t |
| Resume context for validating WAIT replies. More... | |
| struct | rlm_redis_ippool_t |
| rlm_redis module instance More... | |
| struct | rlm_redis_ippool_thread_t |
Macros | |
| #define | ADD_REDIS_COMMAND(_fmt, ...) |
| #define | CHECK_POOL_NAME |
| #define | EOL "\n" |
| #define | POPULATE_PAIR(_da, _i, _parent) |
| #define | REDIS_IPPOOL_SCRIPT_LOAD(_cmds, _script, _script_len, _ret) |
IP Allocation module with a redis backend.
Performs lease management using a Redis backed.
Creates three types of objects:
{<pool name>:<pool type>}:pool (zset) contains IP addresses with priority set by expiry time.{<pool name>:<pool type>}:ip:<address> (hash) contains four keys{<pool name>:<pool type>}:device:<client id> (string) contains last IP address bound by this client.Definition in file rlm_redis_ippool.c.
| struct redis_ippool_alloc_call_env_t |
Call environment used when calling redis_ippool allocate method.
Definition at line 185 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_alloc_call_env_t:| Data Fields | ||
|---|---|---|
| tmpl_t * | allocated_address_attr | Attribute to populate with allocated IP. |
| fr_value_box_t | association_time |
How log should a device be associated with an IP address. This allows for "sticky" addressing, where the device -> IP association lasts longer than the lease time. |
| tmpl_t * | expiry_attr | Time at which the lease will expire. |
| fr_value_box_t | gateway_id |
Gateway identifier, usually NAS-Identifier or Option 82 gateway. Used for bulk lease cleanups. |
| fr_value_box_t | lease_time | How long an IP address should be allocated for. |
| fr_value_box_t | offer_time | How long we should reserve a lease for during the pre-allocation stage (typically responding to DHCP discover). |
| fr_value_box_t | owner |
Unique lease owner identifier. Could be mac-address or a combination of User-Name and something unique to the device. |
| fr_value_box_t | pool_name | Name of the pool we're allocating IP addresses from. |
| tmpl_t * | range_attr | Attribute to write the range ID to. |
| fr_value_box_t | requested_address | The address the client is requesting. |
| struct redis_ippool_alloc_rctx_t |
Resume context for async calls to alloc script.
Definition at line 236 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_alloc_rctx_t:| Data Fields | ||
|---|---|---|
| fr_redis_async_cmd_t * | cmd | Redis async command. |
| char * | cmd_str | Formatted redis command. |
| fr_redis_command_set_t * | cmds | Command set to be run. |
| redis_ippool_alloc_call_env_t * | env | Callenv for the current allocation. |
| ippool_rcode_t | ret | Return code for the allocation result. |
| redis_wait_rctx_t | wait_rctx | WAIT resume context. |
| struct redis_ippool_bulk_release_call_env_t |
Call environment used when calling redis_ippool bulk release method.
Definition at line 368 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_bulk_release_call_env_t:| Data Fields | ||
|---|---|---|
| fr_value_box_t | gateway_id |
Gateway identifier, usually NAS-Identifier or Option 82 gateway. Used for bulk lease cleanups. |
| fr_value_box_t | pool_name | Name of the pool we're allocating IP addresses from. |
| struct redis_ippool_info_rctx_t |
Resume context for methods which retrieve info and produce pairs.
Definition at line 313 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_info_rctx_t:| Data Fields | ||
|---|---|---|
| fr_redis_async_cmd_t * | cmd | Redis async command. |
| char ** | cmd_str | Formatted redis commands. |
| fr_redis_command_set_t * | cmds | Command set to run. |
| fr_value_box_t ** | lookup | Value boxes holding lookup keys. |
| size_t | lookup_no | Incremented on processing each reply. |
| fr_pair_list_t | results | Temporary list to hold results. |
| struct redis_ippool_load_rctx_t |
Resume context for loading scripts in response to NOSCRIPT reply.
Definition at line 224 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_load_rctx_t:| Data Fields | ||
|---|---|---|
| unlang_module_signal_t | cancel | Cancel function for EVAL command. |
| fr_redis_async_cmd_t * | cmd | Async command for loading script. |
| fr_redis_command_set_t * | cmds | Command set for loading script. |
| fr_redis_async_cmd_t * | eval_cmd | Original EVAL async command which returned NOSCRIPT. |
| void * | eval_rctx | Resume context for original EVAL command. |
| module_method_t | resume | Resume function for EVAL command. |
| struct redis_ippool_release_call_env_t |
Call environment used when calling redis_ippool release method.
Definition at line 286 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_release_call_env_t:| Data Fields | ||
|---|---|---|
| fr_value_box_t | association_time | How long should a device be associated with an IP address. |
| fr_value_box_t | gateway_id |
Gateway identifier, usually NAS-Identifier or Option 82 gateway. Used for bulk lease cleanups. |
| fr_value_box_t | owner |
Unique lease owner identifier. Could be mac-address or a combination of User-Name and something unique to the device. |
| fr_value_box_t | pool_name | Name of the pool we're releasing the IP addresses to. |
| fr_value_box_t | requested_address | Address being released. |
| struct redis_ippool_release_rctx_t |
Resume context for async calls to update script.
Definition at line 331 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_release_rctx_t:| Data Fields | ||
|---|---|---|
| fr_redis_async_cmd_t * | cmd | Redis async command. |
| char * | cmd_str | Formatted redis command. |
| fr_redis_command_set_t * | cmds | Command set to be run. |
| redis_ippool_release_call_env_t * | env | Callenv for the current allocation. |
| ippool_rcode_t | ret | Return code for the allocation result. |
| redis_wait_rctx_t | wait_rctx | WAIT resume context. |
| struct redis_ippool_show_call_env_t |
Call environment used when calling redis_ippool show method.
Definition at line 305 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_show_call_env_t:| Data Fields | ||
|---|---|---|
| fr_value_box_t | pool_name | Name of the pool we're looking up the address in. |
| fr_value_box_list_t | requested_address | Address(es) to fetch details of. |
| struct redis_ippool_stats_call_env_t |
Call environment used when calling redis_ippool stats method.
Definition at line 324 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_stats_call_env_t:| Data Fields | ||
|---|---|---|
| fr_value_box_t | pool_name | Name of the pool we're getting stats for. |
| struct redis_ippool_tool_rctx_t |
Resume context for IP pool updating xlats.
Definition at line 343 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_tool_rctx_t:| Data Fields | ||
|---|---|---|
| uint32_t | changed | Number of changes reported by redis. |
| uint32_t | changes | How many changes are submitted. |
| fr_redis_async_cmd_t * | cmd | Redis async command. |
| char ** | cmd_str | Formatted redis commands for this xlat. |
| fr_redis_command_set_t * | cmds | Redis command set to run. |
| struct redis_ippool_update_call_env_t |
Call environment used when calling redis_ippool update method.
Definition at line 248 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_update_call_env_t:| Data Fields | ||
|---|---|---|
| tmpl_t * | allocated_address_attr | Attribute to populate with allocated IP. |
| fr_value_box_t | association_time | How long should a device be associated with an IP address. |
| tmpl_t * | expiry_attr | Time at which the lease will expire. |
| fr_value_box_t | gateway_id |
Gateway identifier, usually NAS-Identifier or Option 82 gateway. Used for bulk lease cleanups. |
| fr_value_box_t | lease_time | How long an IP address should be allocated for. |
| fr_value_box_t | owner |
Unique lease owner identifier. Could be mac-address or a combination of User-Name and something unique to the device. |
| fr_value_box_t | pool_name | Name of the pool we're allocating IP addresses from. |
| tmpl_t * | range_attr | Attribute to write the range ID to. |
| fr_value_box_t | requested_address | Address being updated. |
| struct redis_ippool_update_rctx_t |
Resume context for async calls to update script.
Definition at line 274 of file rlm_redis_ippool.c.
Collaboration diagram for redis_ippool_update_rctx_t:| Data Fields | ||
|---|---|---|
| fr_redis_async_cmd_t * | cmd | Redis async command. |
| char * | cmd_str | Formatted redis command. |
| fr_redis_command_set_t * | cmds | Command set to be run. |
| redis_ippool_update_call_env_t * | env | Callenv for the current allocation. |
| ippool_rcode_t | ret | Return code for the allocation result. |
| redis_wait_rctx_t | wait_rctx | WAIT resume context. |
| struct redis_pools_list_rctx_t |
Resume context for pool list module method.
Definition at line 353 of file rlm_redis_ippool.c.
Collaboration diagram for redis_pools_list_rctx_t:| Data Fields | ||
|---|---|---|
| fr_redis_async_cmd_t * | cmd | Redis async command. |
| char * | cmd_str | Current preformatted Redis command. |
| fr_redis_command_set_t * | cmds | Command set to be run. |
| TALLOC_CTX * | ctx | Context to allocate pool names in. |
| uint8_t | current_node | Node number currently being queried. |
| char | cursor[19] | Cursor value returned in last result. |
| uint8_t | node_count | How many nodes are in nodes. |
| fr_redis_io_conf_t * | nodes | List of nodes to query. |
| fr_value_box_list_t | pools | Temporary list to store pool names. |
| struct redis_wait_rctx_t |
Resume context for validating WAIT replies.
Definition at line 217 of file rlm_redis_ippool.c.
| Data Fields | ||
|---|---|---|
| bool | fail | |
| int | wait_num | |
| struct rlm_redis_ippool_t |
rlm_redis module instance
Definition at line 127 of file rlm_redis_ippool.c.
Collaboration diagram for rlm_redis_ippool_t:| Data Fields | ||
|---|---|---|
| fr_redis_conf_t | conf |
Connection parameters for the Redis server. Must be first field in this struct. |
| fr_coord_pair_reg_t * | coord_pair_reg | Coord pair registration. |
| fr_coord_reg_t * | coord_reg | Coordinator registration. |
| bool | copy_on_update | Copy the address provided by ip_address to the allocated_address_attr if updates are successful. |
| bool | ipv4_integer | Whether IPv4 addresses should be cast to integers, for renew operations. |
| char const * | name | Instance name. |
| char * | wait_cmd | Preformatted redis "WAIT" command. |
| int | wait_cmd_len | Length of wait_cmd. |
| uint32_t | wait_num | How many slaves we want to acknowledge allocations or updates. |
| fr_time_delta_t | wait_timeout | How long we wait for slaves to acknowledge writing. |
| struct rlm_redis_ippool_thread_t |
Definition at line 152 of file rlm_redis_ippool.c.
Collaboration diagram for rlm_redis_ippool_thread_t:| Data Fields | ||
|---|---|---|
| fr_coord_worker_t * | cw | Coord-worker for fetching cluster map. |
| rlm_redis_ippool_t * | inst | Module instance. |
| fr_redis_ct_t * | rtcluster | Per thread Redis cluster. |
| #define ADD_REDIS_COMMAND | ( | _fmt, | |
| ... | |||
| ) |
Definition at line 2148 of file rlm_redis_ippool.c.
| #define CHECK_POOL_NAME |
Definition at line 1315 of file rlm_redis_ippool.c.
| #define EOL "\n" |
Definition at line 458 of file rlm_redis_ippool.c.
| #define POPULATE_PAIR | ( | _da, | |
| _i, | |||
| _parent | |||
| ) |
| #define REDIS_IPPOOL_SCRIPT_LOAD | ( | _cmds, | |
| _script, | |||
| _script_len, | |||
| _ret | |||
| ) |
Definition at line 1366 of file rlm_redis_ippool.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Increment an IP address by a given number of addresses.
Definition at line 2320 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 914 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Convert the rcode element of a Lua script reply to an ippool_rcode_t.
hiredis returns the rcode as a long long, and ippool_rcode_t has an int8_t underlying type. Assigning the rcode directly would truncate an out of range value into another code, for example 256 into IPPOOL_RCODE_SUCCESS.
For any rcode outside IPPOOL_RCODE_FAIL to IPPOOL_RCODE_SUCCESS, the function logs the rcode and returns IPPOOL_RCODE_FAIL. Otherwise the function returns the rcode as an ippool_rcode_t.
Definition at line 1026 of file rlm_redis_ippool.c.
Here is the caller graph for this function:
|
static |
Enqueue a script to run against a redis cluster.
| [in] | ctx | To allocate redis command set. |
| [out] | out_cmds | Where to write a pointer to the command set. |
| [out] | out_cmd | Where to write a pointer to the async command |
| [in] | request | The current request. |
| [in] | thread | Redis ippool thread |
| [in] | key | to use to determine the cluster node. |
| [in] | key_len | length of the key. |
| [in] | cmd | Pre-formatted redis command to call script |
| [in] | cmd_len | length of the pre-formatted command. |
| [in] | complete | Callback to run when cmd is completed |
| [in] | resume | Resume function to run after script completed. |
| [in] | rctx | to pass to complete and resume. |
Definition at line 985 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Check the requisite number of slaves replicated the lease info.
| request | The current request. |
| cmd | The Redis command triggering this callback |
| reply | we got from the server. |
| rctx | WAIT resume context. |
Definition at line 895 of file rlm_redis_ippool.c.
Here is the caller graph for this function:
|
static |
Definition at line 3194 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
Definition at line 1446 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1455 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 1806 of file rlm_redis_ippool.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 2056 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
Parse the results from Redis SCAN command used to list pools.
Definition at line 1815 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 1702 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1711 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 2081 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2065 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 2209 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
Definition at line 1563 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1572 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:| REDIS_ASYNC_COORD_CALLBACKS | ( | rlm_redis_ippool_thread_t | ) |
|
static |
Common code for adding addresses to a pool.
Definition at line 2632 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2750 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Parse argments provided to IP pool manipulation xlats which work on start and end addresses.
| [in] | request | The current request, for debugging. |
| [out] | prefix_out | Where to write the parsed value of prefix. |
| [out] | step | Where to write the step size for multiple addresses. |
| [out] | num_addr | Where to write the number of addresses |
| [in] | start | The provided start address. |
| [in] | end | The provided end address. |
| [in] | prefix_in | optinal prefix argument. |
Definition at line 2470 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 3069 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2958 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2854 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Callback to process results from allocation script.
Definition at line 1038 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 3094 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Common cancellation function for xlats using redi_ippool_tool_rctx_t.
Definition at line 2530 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Common resume function for pool manipulation xlats.
Where the number of changes is to be returned
Definition at line 2542 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1878 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Enqueue the next SCAN command.
This will either be on the same node, with the cursor value returned by the last SCAN, or starting on a new node.
Definition at line 1931 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1887 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1975 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2010 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1326 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1335 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Common code for modifying the range assigned to addresses.
Definition at line 2977 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Check the return code from an async redis command.
Redirecting to another node in response to ASK / MOVED codes.
Definition at line 1387 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Common code for releasing address assignments.
Definition at line 2873 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Callback to process results from release script.
Definition at line 1283 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Common code for removing addresses from a pool.
Definition at line 2769 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2724 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Parse argments provided to IP pool manipulation xlats which work on subnets.
| [in] | request | The current request, for debugging. |
| [out] | start | Where to write the start address. |
| [out] | end | Where to write the end address. |
| [out] | prefix_out | Where to write the parsed value of prefix. |
| [out] | step | Where to write the step size for multiple addresses. |
| [out] | num_addr | Where to write the number of addresses |
| [in] | subnet | to parse. |
| [in] | prefix_in | optinal prefix argument. |
Definition at line 2354 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 3043 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2933 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 2829 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 3151 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Callback to process results from allocation script.
Definition at line 1193 of file rlm_redis_ippool.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Callback to be used when Redis commands are expected to return an array.
Where the first element is expected to be an integer indicating the number of changes made. Typically this is when a MULTI ... EXEC is used and this parses the reply from EXEC.
Definition at line 2613 of file rlm_redis_ippool.c.
Here is the caller graph for this function:
|
static |
Callback to be used when Redis commands are expected to return a single integer.
With the value indicating the number of changes made.
Definition at line 2593 of file rlm_redis_ippool.c.
Here is the caller graph for this function:
|
static |
Definition at line 69 of file rlm_redis_ippool.c.
|
static |
Definition at line 71 of file rlm_redis_ippool.c.
|
static |
Definition at line 70 of file rlm_redis_ippool.c.
|
static |
Definition at line 73 of file rlm_redis_ippool.c.
|
static |
Definition at line 72 of file rlm_redis_ippool.c.
|
static |
Definition at line 74 of file rlm_redis_ippool.c.
|
static |
Definition at line 75 of file rlm_redis_ippool.c.
|
static |
Definition at line 76 of file rlm_redis_ippool.c.
|
static |
Definition at line 68 of file rlm_redis_ippool.c.
|
static |
Definition at line 77 of file rlm_redis_ippool.c.
|
static |
Definition at line 79 of file rlm_redis_ippool.c.
|
static |
Definition at line 85 of file rlm_redis_ippool.c.
|
static |
Definition at line 84 of file rlm_redis_ippool.c.
|
static |
Definition at line 82 of file rlm_redis_ippool.c.
|
static |
Definition at line 83 of file rlm_redis_ippool.c.
|
static |
Definition at line 81 of file rlm_redis_ippool.c.
|
static |
Definition at line 80 of file rlm_redis_ippool.c.
|
static |
Definition at line 86 of file rlm_redis_ippool.c.
|
static |
Definition at line 88 of file rlm_redis_ippool.c.
|
static |
Definition at line 92 of file rlm_redis_ippool.c.
|
static |
Definition at line 91 of file rlm_redis_ippool.c.
|
static |
Definition at line 89 of file rlm_redis_ippool.c.
|
static |
Definition at line 90 of file rlm_redis_ippool.c.
|
static |
Definition at line 87 of file rlm_redis_ippool.c.
|
static |
Definition at line 78 of file rlm_redis_ippool.c.
|
static |
Definition at line 59 of file rlm_redis_ippool.c.
|
static |
Definition at line 58 of file rlm_redis_ippool.c.
|
static |
Lua script for allocating new leases.
Returns
{ <rcode>[, <ip>][, <range>][, <lease time>][, <counter>] } Definition at line 474 of file rlm_redis_ippool.c.
|
static |
Definition at line 559 of file rlm_redis_ippool.c.
|
static |
Lua script for assigning a static lease.
Checks whether the IP already has a static assignment, and whether the owner is already associated with a different IP.
If check pass, sets the static flag on the IP entry in the ZSET and creates the association between the IP and the owner.
Returns
Definition at line 783 of file rlm_redis_ippool.c.
|
static |
Lua script for releasing leases.
Sets the expiry time to be NOW() - 1 to maximise time between IP address allocations.
Returns
array { <rcode>[, <counter>] } Definition at line 646 of file rlm_redis_ippool.c.
|
static |
Definition at line 692 of file rlm_redis_ippool.c.
|
static |
Lua script for releasing a lease.
Removes the IP entry in the ZSET, then removes the address hash, and the device key if one exists.
Will do nothing if the lease is not found in the ZSET.
Returns
Definition at line 742 of file rlm_redis_ippool.c.
|
static |
Lua script for removing a lease.
Removes the IP entry in the ZSET, then removes the address hash, and the device key if one exists.
Will work with partially removed IP addresses (where the ZSET entry is absent but other elements weren't cleaned up).
Returns
Definition at line 709 of file rlm_redis_ippool.c.
|
static |
Lua script for un-assigning a static lease.
Removes the static flag from the IP entry in the ZSET, then, depending on the remaining time determined by the ZSCORE removes the address hash, and the device key.
Will do nothing if the static assignment does not exist or the IP and device do not match.
Returns
Definition at line 843 of file rlm_redis_ippool.c.
|
static |
Lua script for updating leases.
Returns
array { <rcode>[, <range>] } Definition at line 577 of file rlm_redis_ippool.c.
|
static |
Definition at line 628 of file rlm_redis_ippool.c.
|
static |
Definition at line 163 of file rlm_redis_ippool.c.
|
static |
Definition at line 158 of file rlm_redis_ippool.c.
|
static |
Definition at line 2741 of file rlm_redis_ippool.c.
|
static |
Definition at line 3060 of file rlm_redis_ippool.c.
|
static |
Definition at line 2950 of file rlm_redis_ippool.c.
|
static |
Definition at line 2846 of file rlm_redis_ippool.c.
|
static |
Definition at line 375 of file rlm_redis_ippool.c.
|
static |
Definition at line 3086 of file rlm_redis_ippool.c.
|
static |
Definition at line 430 of file rlm_redis_ippool.c.
|
static |
Definition at line 416 of file rlm_redis_ippool.c.
|
static |
Definition at line 440 of file rlm_redis_ippool.c.
|
static |
Definition at line 450 of file rlm_redis_ippool.c.
|
static |
Definition at line 2716 of file rlm_redis_ippool.c.
|
static |
Definition at line 3035 of file rlm_redis_ippool.c.
|
static |
Definition at line 2926 of file rlm_redis_ippool.c.
|
static |
Definition at line 2822 of file rlm_redis_ippool.c.
|
static |
Definition at line 3144 of file rlm_redis_ippool.c.
|
static |
Definition at line 397 of file rlm_redis_ippool.c.
| module_rlm_t rlm_redis_ippool |
Definition at line 3417 of file rlm_redis_ippool.c.
| fr_dict_autoload_t rlm_redis_ippool_dict |
Definition at line 62 of file rlm_redis_ippool.c.
| fr_dict_attr_autoload_t rlm_redis_ippool_dict_attr |
Definition at line 95 of file rlm_redis_ippool.c.
1.9.8