The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
RB trees with expiry timers. More...
#include <freeradius-devel/util/rb.h>
#include <freeradius-devel/util/dlist.h>
Go to the source code of this file.
Data Structures | |
struct | fr_rb_expire_node_t |
dlist for expiring old entries More... | |
struct | fr_rb_expire_t |
Macros | |
#define | fr_rb_expire_inline_talloc_init(_expire, _type, _field, _data_cmp, _data_free, _lifetime) |
Functions | |
bool | fr_rb_expire_insert (fr_rb_expire_t *expire, void *data, fr_time_t now) |
Attempt to find current data in the tree, if it does not exist insert it. | |
void | fr_rb_expire_update (fr_rb_expire_t *expire, void *data, fr_time_t now) |
RB trees with expiry timers.
Definition in file rb_expire.h.
struct fr_rb_expire_node_t |
dlist for expiring old entries
This structure should be inside of the
Definition at line 44 of file rb_expire.h.
Data Fields | ||
---|---|---|
fr_dlist_t | entry | |
fr_rb_node_t | node | |
fr_time_t | when |
struct fr_rb_expire_t |
Definition at line 33 of file rb_expire.h.
Data Fields | ||
---|---|---|
fr_dlist_head_t | head | |
fr_time_t | last_expiry | |
fr_time_delta_t | lifetime | |
fr_rb_tree_t | tree |
#define fr_rb_expire_inline_talloc_init | ( | _expire, | |
_type, | |||
_field, | |||
_data_cmp, | |||
_data_free, | |||
_lifetime | |||
) |
Definition at line 50 of file rb_expire.h.
bool fr_rb_expire_insert | ( | fr_rb_expire_t * | expire, |
void * | data, | ||
fr_time_t | now | ||
) |
Attempt to find current data in the tree, if it does not exist insert it.
Any used node will be inserted into the tail of the expire list, and will expire at "now + expire->lifetime".
[in] | expire | to search/insert into. |
[in] | data | to find. |
[in] | now | the current time |
Definition at line 39 of file rb_expire.c.
void fr_rb_expire_update | ( | fr_rb_expire_t * | expire, |
void * | data, | ||
fr_time_t | now | ||
) |