The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Go to the source code of this file.
Data Structures | |
struct | radius_track_entry_s |
Track one request to a response. More... | |
union | radius_track_entry_s.__unnamed169__ |
struct | radius_track_s |
Macros | |
#define | radius_track_entry_release(_te) _radius_track_entry_release( __FILE__, __LINE__, _te) |
#define | radius_track_entry_reserve(_te_out, _ctx, _tt, _request, _code, _uctx) _radius_track_entry_reserve( __FILE__, __LINE__, _te_out, _ctx, _tt, _request, _code, _uctx) |
Typedefs | |
typedef struct radius_track_entry_s | radius_track_entry_t |
typedef void(* | radius_track_log_extra_t) (fr_log_t const *log, fr_log_type_t log_type, char const *file, int line, radius_track_entry_t *te) |
typedef struct radius_track_s | radius_track_t |
Functions | |
int | _radius_track_entry_release (char const *file, int line, radius_track_entry_t **te) |
Release a tracking entry. More... | |
int | _radius_track_entry_reserve (char const *file, int line, radius_track_entry_t **te_out, TALLOC_CTX *ctx, radius_track_t *tt, request_t *request, uint8_t code, void *uctx)) |
Allocate a tracking entry. More... | |
radius_track_t * | radius_track_alloc (TALLOC_CTX *ctx) |
Create an radius_track_t. More... | |
radius_track_entry_t * | radius_track_entry_find (radius_track_t *tt, uint8_t packet_id, uint8_t const *vector)) |
Find a tracking entry from a request authenticator. More... | |
int | radius_track_entry_update (radius_track_entry_t *te, uint8_t const *vector) |
Update a tracking entry with the authentication vector. More... | |
void | radius_track_state_log (fr_log_t const *log, fr_log_type_t log_type, char const *file, int line, radius_track_t *tt, radius_track_log_extra_t extra) |
Print out the state of every tracking entry. More... | |
void | radius_track_use_authenticator (radius_track_t *te, bool flag) |
Use Request Authenticator (or not) as an Identifier. More... | |
struct radius_track_entry_s |
Data Fields | ||
---|---|---|
union radius_track_entry_s | __unnamed__ | |
radius_track_entry_t *** | binding |
Binding chunk we use to release the entry when its parent is freed. We also zero out the tracking entry field in the parent. |
uint8_t | code | packet code (sigh) |
char const * | file | Where the entry was allocated. |
uint8_t | id | our ID |
int | line | Where the entry was freed. |
fr_rb_node_t | node | Entry in the tracking tree. |
uint64_t | operation | Used to give an idea of the alloc/free timeline. |
request_t * | request | as always... |
radius_track_t * | tt | |
void * | uctx | Result/resumption context. |
union radius_track_entry_s.__unnamed169__ |
Data Fields | ||
---|---|---|
fr_dlist_t | entry | For free list. |
uint8_t | vector[RADIUS_AUTH_VECTOR_LENGTH] | copy of the request authenticator. |
struct radius_track_s |
Data Fields | ||
---|---|---|
fr_dlist_head_t | free_list | so we allocate by least recently used |
radius_track_entry_t | id[UINT8_MAX+1] | which ID was used |
int | next_id | next ID to allocate |
unsigned int | num_requests | number of requests in the allocation |
uint64_t | operation | Incremented each alloc and de-alloc. |
fr_rb_tree_t * | subtree[UINT8_MAX+1] | for Original-Request-Authenticator |
bool | use_authenticator | whether to use the request authenticator as an ID |
#define radius_track_entry_release | ( | _te | ) | _radius_track_entry_release( __FILE__, __LINE__, _te) |
#define radius_track_entry_reserve | ( | _te_out, | |
_ctx, | |||
_tt, | |||
_request, | |||
_code, | |||
_uctx | |||
) | _radius_track_entry_reserve( __FILE__, __LINE__, _te_out, _ctx, _tt, _request, _code, _uctx) |
typedef struct radius_track_entry_s radius_track_entry_t |
typedef void(* radius_track_log_extra_t) (fr_log_t const *log, fr_log_type_t log_type, char const *file, int line, radius_track_entry_t *te) |
typedef struct radius_track_s radius_track_t |
int _radius_track_entry_release | ( | char const * | file, |
int | line, | ||
radius_track_entry_t ** | te_to_free | ||
) |
Release a tracking entry.
[in] | file | Allocation was released in. |
[in] | line | Allocation was released on. |
[in,out] | te_to_free | The radius_track_entry_t allocated via radius_track_entry_reserve. |
Definition at line 209 of file track.c.
int _radius_track_entry_reserve | ( | char const * | file, |
int | line, | ||
radius_track_entry_t ** | te_out, | ||
TALLOC_CTX * | ctx, | ||
radius_track_t * | tt, | ||
request_t * | request, | ||
uint8_t | code, | ||
void * | uctx | ||
) |
Allocate a tracking entry.
[in] | file | The allocation was made in. |
[in] | line | The allocation was made on. |
[out] | te_out | Where the tracking entry should be written. If ctx is not-null, then this pointer must remain valid for the lifetime of the ctx. |
[in] | ctx | If not-null, the tracking entry release will be bound to the lifetime of the talloc chunk. |
[in] | tt | The radius_track_t tracking table. |
[in] | request | The request which will send the proxied packet. |
[in] | code | Of the outbound request. |
[in] | uctx | The context to associate with the request |
Definition at line 109 of file track.c.
radius_track_t* radius_track_alloc | ( | TALLOC_CTX * | ctx | ) |
radius_track_entry_t* radius_track_entry_find | ( | radius_track_t * | tt, |
uint8_t | packet_id, | ||
uint8_t const * | vector | ||
) |
Find a tracking entry from a request authenticator.
tt | The radius_track_t tracking table |
packet_id | The ID from the RADIUS header |
vector | The Request Authenticator (may be NULL) |
Definition at line 338 of file track.c.
int radius_track_entry_update | ( | radius_track_entry_t * | te, |
uint8_t const * | vector | ||
) |
Update a tracking entry with the authentication vector.
te | The radius_track_entry_t, via radius_track_entry_reserve() |
vector | The authentication vector for the packet we're sending |
Definition at line 293 of file track.c.
void radius_track_state_log | ( | fr_log_t const * | log, |
fr_log_type_t | log_type, | ||
char const * | file, | ||
int | line, | ||
radius_track_t * | tt, | ||
radius_track_log_extra_t | extra | ||
) |
Print out the state of every tracking entry.
[in] | log | destination. |
[in] | log_type | Type of log message. |
[in] | file | this function was called in. |
[in] | line | this function was called on. |
[in] | tt | Table to print. |
[in] | extra | Callback function for printing extra detail. |
Definition at line 425 of file track.c.
void radius_track_use_authenticator | ( | radius_track_t * | tt, |
bool | flag | ||
) |