The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Tracking RADUS client packets. More...
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/util/rb.h>
#include <freeradius-devel/io/application.h>
#include <freeradius-devel/util/dlist.h>
#include <freeradius-devel/util/debug.h>
#include "track.h"
#include "rlm_radius.h"
Go to the source code of this file.
Functions | |
int | _radius_track_entry_release (char const *file, int line, radius_track_entry_t **te_to_free) |
Release a tracking entry. More... | |
static int | _radius_track_entry_release_on_free (radius_track_entry_t ***te_p) |
Ensures the entry is released when the ctx passed to radius_track_entry_reserve is freed. 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 *tt, bool flag) |
Use Request Authenticator (or not) as an Identifier. More... | |
static int8_t | te_cmp (void const *one, void const *two) |
Compare two radius_track_entry_t. More... | |
Tracking RADUS client packets.
Definition in file track.c.
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.
|
static |
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 | ||
) |