The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Enumerations | Functions
retry.h File Reference

Boxed value structures and functions to manipulate them. More...

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

Go to the source code of this file.

Data Structures

struct  fr_retry_config_t
 
struct  fr_retry_t
 

Macros

#define RETRY_INIT   { fr_time_delta_wrap(0), fr_time_delta_wrap(0), fr_time_delta_wrap(0), 0 }
 

Enumerations

enum  fr_retry_state_t {
  FR_RETRY_CONTINUE = 0 ,
  FR_RETRY_MRC ,
  FR_RETRY_MRD
}
 

Functions

void fr_retry_init (fr_retry_t *r, fr_time_t now, fr_retry_config_t const *config)
 Initialize a retransmission counter. More...
 
fr_retry_state_t fr_retry_next (fr_retry_t *r, fr_time_t now)
 Initialize a retransmission counter. More...
 

Detailed Description

Boxed value structures and functions to manipulate them.

Definition in file retry.h.


Data Structure Documentation

◆ fr_retry_config_t

struct fr_retry_config_t

Definition at line 32 of file retry.h.

+ Collaboration diagram for fr_retry_config_t:
Data Fields
fr_time_delta_t irt Initial transmission time.
uint32_t mrc Maximum retransmission count.
fr_time_delta_t mrd Maximum retransmission duration.
fr_time_delta_t mrt Maximum retransmission time.

◆ fr_retry_t

struct fr_retry_t

Definition at line 41 of file retry.h.

+ Collaboration diagram for fr_retry_t:
Data Fields
fr_retry_config_t const * config master configuration
uint32_t count number of sent packets
fr_time_t next when the next timer should be set
uint32_t replies number of responses received.
fr_time_delta_t rt retransmit interval
fr_time_t start when we started the retransmission
fr_time_t updated last update, really a cached "now".

Macro Definition Documentation

◆ RETRY_INIT

#define RETRY_INIT   { fr_time_delta_wrap(0), fr_time_delta_wrap(0), fr_time_delta_wrap(0), 0 }

Definition at line 39 of file retry.h.

Enumeration Type Documentation

◆ fr_retry_state_t

Enumerator
FR_RETRY_CONTINUE 
FR_RETRY_MRC 

reached maximum retransmission count

FR_RETRY_MRD 

reached maximum retransmission duration

Definition at line 55 of file retry.h.

Function Documentation

◆ fr_retry_init()

void fr_retry_init ( fr_retry_t r,
fr_time_t  now,
fr_retry_config_t const *  config 
)

Initialize a retransmission counter.

Parameters
[in,out]rthe retransmission structure
nowwhen the retransmission starts
configthe counters to track. They shouldn't change while the retransmission is happening

Definition at line 36 of file retry.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_retry_next()

fr_retry_state_t fr_retry_next ( fr_retry_t r,
fr_time_t  now 
)

Initialize a retransmission counter.

Parameters
[in,out]rthe retransmission structure
nowthe current time
Returns
  • FR_RETRTY_CONTINUE - continue retransmitting
  • FR_RETRY_MRC - stop, maximum retransmission count has been reached
  • FR_RETRY_MDR - stop, maximum retransmission duration has been reached.

Definition at line 84 of file retry.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: