The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Functions
rb_expire.c File Reference

Red/black expiry tree implementation. More...

#include <freeradius-devel/util/rb_expire.h>
+ Include dependency graph for rb_expire.c:

Go to the source code of this file.

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)
 

Detailed Description

Red/black expiry tree implementation.

Definition in file rb_expire.c.

Function Documentation

◆ fr_rb_expire_insert()

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".

Parameters
[in]expireto search/insert into.
[in]datato find.
[in]nowthe current time
Returns
  • true if data was inserted.
  • false if data already existed and was not inserted.

Definition at line 39 of file rb_expire.c.

+ Here is the call graph for this function:

◆ fr_rb_expire_update()

void fr_rb_expire_update ( fr_rb_expire_t expire,
void *  data,
fr_time_t  now 
)

Definition at line 55 of file rb_expire.c.

+ Here is the call graph for this function: