25 RCSID(
"$Id: 170d9d103bbae2f33781296e65eac7197f07f076 $")
27 #include <freeradius-devel/radius/id.h>
51 if (!track)
return NULL;
57 for (i = 0; i < 256; i++) {
71 for (i = 255; i >= 1; i--) {
112 return &track->
id[id];
144 return &track->
id[id];
157 for (i = 0; i < 256; i++) {
163 if (i == 0)
return 0;
void fr_radius_id_push(fr_radius_id_t *track, fr_packet_t const *packet)
De-allocate an ID for a packet, using LRU.
int fr_radius_id_force(fr_radius_id_t *track, int id)
Forces the next ID to be the given one.
fr_radius_id_t * fr_radius_id_alloc(TALLOC_CTX *ctx)
Allocate a tracking structure for one packet code.
fr_radius_id_ctx_t id[256]
pointers to request / reply data
fr_radius_id_ctx_t * fr_radius_id_find(fr_radius_id_t *track, int id)
int num_free_ids
number of used IDs
fr_radius_id_ctx_t * fr_radius_id_pop(fr_radius_id_t *track, fr_packet_t *packet)
Allocate an ID for a packet, using LRU.
fr_packet_t * packet
outgoing packet
uint32_t fr_rand(void)
Return a 32-bit random number.
int id
Packet ID (used to link requests/responses).
#define fr_strerror_const(_msg)