All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
radeapclient.c File Reference
#include <freeradius-devel/libradius.h>
#include <ctype.h>
#include <assert.h>
#include <freeradius-devel/conf.h>
#include <freeradius-devel/md5.h>
#include "eap_types.h"
#include "eap_sim.h"
+ Include dependency graph for radeapclient.c:

Go to the source code of this file.

Data Structures

struct  rc_eap_context
 
union  rc_eap_context.eap
 
struct  rc_eap_md5_context
 
struct  rc_eap_sim_context
 Structure which contains EAP context, necessary to perform the full EAP transaction. More...
 
struct  rc_input_vps
 Structure which holds an input vps entry (read from file or stdin), and linkage to previous / next entries. More...
 
struct  rc_input_vps_list
 Structure which holds a list of available input vps. More...
 
struct  rc_stats
 Structure which holds global statistics information. More...
 
struct  rc_transaction
 Structure which holds a transaction: sent packet, reply received... More...
 
struct  rc_wf_stats
 Structure which holds per-workflow statistics information. More...
 

Macros

#define ELAPSED   rc_print_elapsed(ch_elapsed, 3)
 
#define LG_PAD_STATS   20
 
#define LG_PAD_WF_TYPES   25
 
#define STATS_INC(_stat_type)
 
#define USEC   1000000
 

Typedefs

typedef struct rc_eap_context rc_eap_context_t
 
typedef struct rc_eap_md5_context rc_eap_md5_context_t
 
typedef struct rc_eap_sim_context rc_eap_sim_context_t
 Structure which contains EAP context, necessary to perform the full EAP transaction. More...
 
typedef struct rc_input_vps_list rc_input_vps_list_t
 
typedef struct rc_input_vps rc_input_vps_t
 
typedef struct rc_stats rc_stats_t
 Structure which holds global statistics information. More...
 
typedef struct rc_transaction rc_transaction_t
 
typedef struct rc_wf_stats rc_wf_stats_t
 Structure which holds per-workflow statistics information. More...
 

Enumerations

enum  rc_wf_type_t {
  RC_WF_ALL = 0,
  RC_WF_ACCESS_REQUEST_ACCEPT,
  RC_WF_COA_REQUEST_ACK,
  RC_WF_EAP_REQUEST_SUCCESS,
  RC_WF_ACCOUNTING_REQUEST_RESPONSE,
  RC_WF_MAX
}
 Define workflow types (transactions for which we got a response) More...
 

Functions

int main (int argc, char **argv)
 
rlm_rcode_t process_authorize (UNUSED int type, UNUSED REQUEST *request)
 
int rad_virtual_server (REQUEST UNUSED *request)
 
static void rc_add_socket (fr_ipaddr_t *src_ipaddr, uint16_t src_port, fr_ipaddr_t *dst_ipaddr, uint16_t dst_port)
 Allocate a new socket, and add it to the packet list. More...
 
static void rc_add_vps_entry (rc_input_vps_list_t *list, rc_input_vps_t *entry)
 Add an allocated rc_input_vps_t entry to the tail of the list. More...
 
static void rc_build_eap_context (rc_transaction_t *trans)
 Map EAP methods and build EAP-Message (if EAP is involved). More...
 
static void rc_cleanresp (RADIUS_PACKET *resp)
 
static void rc_deallocate_id (rc_transaction_t *trans)
 Deallocate RADIUS packet ID. More...
 
static void rc_do_progress_stat (void)
 Display simple progress statistics. More...
 
static void rc_evcb_packet_timeout (void *ctx, UNUSED struct timeval *now)
 Event callback: packet timeout. More...
 
static void rc_evcb_progress_stat (void UNUSED *ctx, UNUSED struct timeval *now)
 Event callback: report progress statistics. More...
 
static void rc_evprep_packet_timeout (rc_transaction_t *trans)
 Prepare event: packet timeout. More...
 
static void rc_evprep_progress_stat (void)
 Prepare event: report progress statistics. More...
 
static void rc_finish_transaction (rc_transaction_t *trans)
 Terminate a transaction. More...
 
static void rc_float_to_timeval (struct timeval *tv, float f_val)
 Convert a float to struct timeval. More...
 
static PW_CODE rc_get_code (uint16_t port)
 Resolve a port to a request type. More...
 
static uint32_t rc_get_elapsed (void)
 Get elapsed time (in ms). More...
 
static void rc_get_radius_port (PW_CODE type, uint16_t *port)
 Set a port from the request type if we don't already have one. More...
 
static float rc_get_start_rate (void)
 Compute the started transactions rate /s. More...
 
static float rc_get_wf_rate (rc_wf_type_t i)
 Compute the rate /s of a given workflow type. More...
 
static uint16_t rc_getport (char const *name)
 Get port number for a given service name. More...
 
static int rc_init_packet (rc_transaction_t *trans)
 Perform packet initialization for a transaction. More...
 
static rc_transaction_trc_init_transaction (TALLOC_CTX *ctx)
 Grab an element from the input list. More...
 
static int rc_load_input (TALLOC_CTX *ctx, char const *filename, rc_input_vps_list_t *list, uint32_t max_entries)
 Load input entries (list of vps) from a file or stdin, and add them to the list. More...
 
static uint32_t rc_loop_events (void)
 Trigger all armed events for which time is reached. More...
 
static uint32_t rc_loop_recv (void)
 Receive loop. More...
 
static uint32_t rc_loop_start_transactions (void)
 Loop starting new transactions, until a limit is reached (max parallelism, or no more input available.) More...
 
static void rc_main_loop (void)
 Main loop: Handle events. More...
 
static int rc_map_eap_methods (RADIUS_PACKET *req)
 Given a radius request with some attributes in the EAP range, build them all into a single EAP-Message body. More...
 
static int rc_map_eapsim_types (RADIUS_PACKET *r)
 
static char * rc_print_elapsed (char *out, uint8_t decimals)
 Print a elapsed time buffer (SS.uuuuuu). More...
 
static char * rc_print_hexstr (char *pch_out, const uint8_t *in, int size, int separ_i, char sep)
 Print a "hexstring" buffer (with optional separator each N octets) More...
 
static void rc_print_wf_stats (FILE *fp)
 Print per-workflow detailed statistics. More...
 
static int rc_process_eap_challenge (rc_eap_context_t *eap_context, RADIUS_PACKET *req, RADIUS_PACKET *rep)
 We got an EAP-Request/Sim/Challenge message in a legal state. More...
 
static int rc_process_eap_start (rc_eap_context_t *eap_context, RADIUS_PACKET *req, RADIUS_PACKET *rep)
 We got an EAP-Request/Sim/Start message in a legal state. More...
 
static uint32_t rc_rate_limit (bool *do_limit)
 Compute maximum number of new requests that can be started while conforming to the specified rate limit. More...
 
static int rc_recv_one_packet (struct timeval *tv_wait_time)
 Receive one packet, maybe. More...
 
static void rc_resolve_hostname (char *server_arg)
 Resolve server hostname. More...
 
static int rc_respond_eap_md5 (rc_eap_context_t *eap_context, RADIUS_PACKET *req, RADIUS_PACKET *rep)
 
static int rc_respond_eap_sim (rc_eap_context_t *eap_context, RADIUS_PACKET *req, RADIUS_PACKET *resp)
 This runs the EAP-SIM client state machine. More...
 
static int rc_send_one_packet (rc_transaction_t *trans, RADIUS_PACKET **packet_p)
 Send one packet for a transaction. More...
 
static int rc_send_transaction_packet (rc_transaction_t *trans, RADIUS_PACKET **packet_p)
 Send current packet of a transaction. More...
 
static void rc_summary (void)
 Do summary / statistics (if asked for). More...
 
static float rc_timeval_to_float (struct timeval *tv)
 Convert a struct timeval to float. More...
 
static void rc_unmap_eap_methods (RADIUS_PACKET *rep)
 Given a radius request with an EAP-Message body, decode its specific attributes. More...
 
static int rc_unmap_eapsim_types (RADIUS_PACKET *r)
 
static void rc_wf_stat_update (rc_transaction_t *trans, rc_wf_type_t wf_type)
 Update per-workflow statistics (number of transactions, rtt min, max, and cumulated). More...
 
static rc_input_vps_trc_yank_vps_entry (rc_input_vps_t *entry)
 Remove a selected rc_input_vps_t entry from its current list. More...
 
void set_radius_dir (TALLOC_CTX *ctx, char const *path)
 Set the global radius config directory. More...
 
static void NEVER_RETURNS usage (void)
 Display usage and exit. More...
 

Variables

static TALLOC_CTX * autofree
 
static char ch_elapsed [12+1]
 
static bool do_output = true
 
static bool do_summary = false
 
static fr_event_list_tev_list = NULL
 list of armed events. More...
 
static char filesecret [256]
 
static int force_af = AF_UNSPEC
 
static int ipproto = IPPROTO_UDP
 
main_config_t main_config
 Main server configuration. More...
 
static uint32_t num_finished = 0
 number of finished transactions. More...
 
static uint32_t num_input = 0
 number of input entries loaded. More...
 
static uint32_t num_ongoing = 0
 number of ongoing transactions. More...
 
static unsigned int num_sockets = 0
 number of allocated sockets. More...
 
static uint32_t num_started = 0
 number of transactions started. More...
 
static uint32_t num_trans = 0
 number of transactions initialized. More...
 
static int packet_code = PW_CODE_UNDEFINED
 
static uint32_t parallel = 1
 
static fr_packet_list_tpl = NULL
 list of outgoing packets. More...
 
static char const * progname = "radeapclient"
 
static float progress_interval = 0
 
static char const * radius_dir = NULL
 
char const * radiusd_version
 
static uint32_t rate_limit = 0
 
static rc_input_vps_list_t rc_vps_list_in
 list of available input vps entries. More...
 
static char const * rc_wf_types [RC_WF_MAX]
 
static unsigned int recycle_count = 1
 
static unsigned int retries = 3
 
static char const * secret = NULL
 
static bool server_addr_init = false
 
static fr_ipaddr_t server_ipaddr
 
static uint16_t server_port = 0
 
int sha1_data_problems
 
static rc_stats_t stats
 
static float timeout = 5
 
static struct timeval tv_end
 
static struct timeval tv_progress_interval
 
static struct timeval tv_start
 
static struct timeval tv_timeout
 

Data Structure Documentation

struct rc_eap_context

Definition at line 94 of file radeapclient.c.

Data Fields
union rc_eap_context eap
int eap_type contains the EAP-Type
char password[256] copy of User-Password (or CHAP-Password).
union rc_eap_context.eap

Definition at line 97 of file radeapclient.c.

Data Fields
rc_eap_md5_context_t md5
rc_eap_sim_context_t sim
struct rc_eap_md5_context

Definition at line 90 of file radeapclient.c.

Data Fields
int tried
struct rc_eap_sim_context

Structure which contains EAP context, necessary to perform the full EAP transaction.

Definition at line 86 of file radeapclient.c.

+ Collaboration diagram for rc_eap_sim_context:
Data Fields
struct eapsim_keys keys
struct rc_input_vps

Structure which holds an input vps entry (read from file or stdin), and linkage to previous / next entries.

Definition at line 115 of file radeapclient.c.

+ Collaboration diagram for rc_input_vps:
Data Fields
rc_input_vps_list_t * list the list to which this entry belongs (NULL for an unchained entry).
rc_input_vps_t * next
uint32_t num The number (within the file) of the input we're reading.
rc_input_vps_t * prev
uint32_t recycle number of times this input has been used to start a transaction.
VALUE_PAIR * vps_in the list of attribute/value pairs.
struct rc_input_vps_list

Structure which holds a list of available input vps.

Definition at line 106 of file radeapclient.c.

+ Collaboration diagram for rc_input_vps_list:
Data Fields
rc_input_vps_t * head
uint32_t size
rc_input_vps_t * tail
struct rc_stats

Structure which holds global statistics information.

Definition at line 52 of file radclient.h.

+ Collaboration diagram for rc_stats:
Data Fields
uint64_t accepted Requests to which we received a accept.
uint64_t failed Requests which failed a fitler.
uint64_t lost Requests to which we received no response.
uint32_t nb_eap number of EAP transactions started
uint32_t nb_fail number of failed transactions
uint32_t nb_lost number of packets to which we received no response
uint32_t nb_packets_recv number of packets received
uint32_t nb_packets_retries number of packets retransmissions
uint32_t nb_packets_sent number of packets sent (including retransmissions)
uint32_t nb_started number of transactions started
uint32_t nb_success number of successful transactions
uint64_t passed Requests which passed a filter.
uint64_t rejected Requests to which we received a reject.
rc_wf_stats_t wf_stats[RC_WF_MAX]
struct rc_transaction

Structure which holds a transaction: sent packet, reply received...

Definition at line 131 of file radeapclient.c.

+ Collaboration diagram for rc_transaction:
Data Fields
rc_eap_context_t * eap_context
fr_event_t * event armed event (if any).
uint32_t id id of transaction (0 for the first one).
rc_input_vps_t * input_vps
char const * name Test name (as specified in the request).
uint32_t num_packet number of packets sent for this transaction.
RADIUS_PACKET * packet
char password[256]
RADIUS_PACKET * reply
struct timeval timestamp when the transaction is started.
uint32_t tries
struct rc_wf_stats

Structure which holds per-workflow statistics information.

Definition at line 177 of file radeapclient.c.

Data Fields
uint32_t num
struct timeval tv_rtt_cumul
struct timeval tv_rtt_max
struct timeval tv_rtt_min

Macro Definition Documentation

#define ELAPSED   rc_print_elapsed(ch_elapsed, 3)

Definition at line 220 of file radeapclient.c.

#define LG_PAD_STATS   20

Definition at line 164 of file radeapclient.c.

#define LG_PAD_WF_TYPES   25

Definition at line 165 of file radeapclient.c.

#define STATS_INC (   _stat_type)
Value:
{ \
stats._stat_type ++; \
}
static rc_stats_t stats
Definition: radeapclient.c:206

Definition at line 200 of file radeapclient.c.

#define USEC   1000000

Definition at line 48 of file radeapclient.c.

Typedef Documentation

Structure which contains EAP context, necessary to perform the full EAP transaction.

Definition at line 80 of file radeapclient.c.

typedef struct rc_input_vps rc_input_vps_t

Definition at line 81 of file radeapclient.c.

typedef struct rc_stats rc_stats_t

Structure which holds global statistics information.

Definition at line 82 of file radeapclient.c.

typedef struct rc_wf_stats rc_wf_stats_t

Structure which holds per-workflow statistics information.

Enumeration Type Documentation

Define workflow types (transactions for which we got a response)

Enumerator
RC_WF_ALL 
RC_WF_ACCESS_REQUEST_ACCEPT 
RC_WF_COA_REQUEST_ACK 
RC_WF_EAP_REQUEST_SUCCESS 
RC_WF_ACCOUNTING_REQUEST_RESPONSE 
RC_WF_MAX 

Definition at line 155 of file radeapclient.c.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 2150 of file radeapclient.c.

+ Here is the call graph for this function:

rlm_rcode_t process_authorize ( UNUSED int  type,
UNUSED REQUEST request 
)

Definition at line 281 of file radeapclient.c.

int rad_virtual_server ( REQUEST UNUSED request)

Definition at line 275 of file radeapclient.c.

static void rc_add_socket ( fr_ipaddr_t src_ipaddr,
uint16_t  src_port,
fr_ipaddr_t dst_ipaddr,
uint16_t  dst_port 
)
static

Allocate a new socket, and add it to the packet list.

Definition at line 1322 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_add_vps_entry ( rc_input_vps_list_t list,
rc_input_vps_t entry 
)
static

Add an allocated rc_input_vps_t entry to the tail of the list.

Definition at line 369 of file radeapclient.c.

+ Here is the caller graph for this function:

static void rc_build_eap_context ( rc_transaction_t trans)
static

Map EAP methods and build EAP-Message (if EAP is involved).

Also allocate the EAP context.

Definition at line 668 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_cleanresp ( RADIUS_PACKET resp)
static

Definition at line 775 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_deallocate_id ( rc_transaction_t trans)
static

Deallocate RADIUS packet ID.

Definition at line 1439 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_do_progress_stat ( void  )
static

Display simple progress statistics.

Definition at line 2133 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_evcb_packet_timeout ( void *  ctx,
UNUSED struct timeval *  now 
)
static

Event callback: packet timeout.

Definition at line 1686 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_evcb_progress_stat ( void UNUSED ctx,
UNUSED struct timeval *  now 
)
static

Event callback: report progress statistics.

Definition at line 1722 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_evprep_packet_timeout ( rc_transaction_t trans)
static

Prepare event: packet timeout.

Definition at line 1708 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_evprep_progress_stat ( void  )
static

Prepare event: report progress statistics.

Definition at line 1733 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_finish_transaction ( rc_transaction_t trans)
static

Terminate a transaction.

Definition at line 750 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_float_to_timeval ( struct timeval *  tv,
float  f_val 
)
static

Convert a float to struct timeval.

Definition at line 353 of file radeapclient.c.

+ Here is the caller graph for this function:

static PW_CODE rc_get_code ( uint16_t  port)
static

Resolve a port to a request type.

Definition at line 1918 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint32_t rc_get_elapsed ( void  )
static

Get elapsed time (in ms).

Definition at line 2088 of file radeapclient.c.

+ Here is the caller graph for this function:

static void rc_get_radius_port ( PW_CODE  type,
uint16_t *  port 
)
static

Set a port from the request type if we don't already have one.

Definition at line 1886 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static float rc_get_start_rate ( void  )
static

Compute the started transactions rate /s.

Definition at line 2108 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static float rc_get_wf_rate ( rc_wf_type_t  i)
static

Compute the rate /s of a given workflow type.

Definition at line 2120 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint16_t rc_getport ( char const *  name)
static

Get port number for a given service name.

Definition at line 1874 of file radeapclient.c.

+ Here is the caller graph for this function:

static int rc_init_packet ( rc_transaction_t trans)
static

Perform packet initialization for a transaction.

Definition at line 495 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static rc_transaction_t* rc_init_transaction ( TALLOC_CTX *  ctx)
static

Grab an element from the input list.

Initialize a new transaction context, using this element.

Definition at line 701 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_load_input ( TALLOC_CTX *  ctx,
char const *  filename,
rc_input_vps_list_t list,
uint32_t  max_entries 
)
static

Load input entries (list of vps) from a file or stdin, and add them to the list.

They will be used to initiate transactions.

Definition at line 435 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint32_t rc_loop_events ( void  )
static

Trigger all armed events for which time is reached.

Definition at line 1752 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint32_t rc_loop_recv ( void  )
static

Receive loop.

Handle incoming packets, until nothing more is received.

Definition at line 1773 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint32_t rc_loop_start_transactions ( void  )
static

Loop starting new transactions, until a limit is reached (max parallelism, or no more input available.)

Definition at line 1827 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_main_loop ( void  )
static

Main loop: Handle events.

Receive and process responses. Start new transactions. Until we're done.

Definition at line 1851 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_map_eap_methods ( RADIUS_PACKET req)
static

Given a radius request with some attributes in the EAP range, build them all into a single EAP-Message body.

If there are multiple eligibles EAP-Type, the first one is picked. Function returns 0 if no EAP is involved, or the EAP-Type otherwise.

Definition at line 2421 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_map_eapsim_types ( RADIUS_PACKET r)
static

Definition at line 2565 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* rc_print_elapsed ( char *  out,
uint8_t  decimals 
)
static

Print a elapsed time buffer (SS.uuuuuu).

Definition at line 306 of file radeapclient.c.

static char* rc_print_hexstr ( char *  pch_out,
const uint8_t *  in,
int  size,
int  separ_i,
char  sep 
)
static

Print a "hexstring" buffer (with optional separator each N octets)

Definition at line 333 of file radeapclient.c.

+ Here is the caller graph for this function:

static void rc_print_wf_stats ( FILE *  fp)
static

Print per-workflow detailed statistics.

Definition at line 2020 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_process_eap_challenge ( rc_eap_context_t eap_context,
RADIUS_PACKET req,
RADIUS_PACKET rep 
)
static

We got an EAP-Request/Sim/Challenge message in a legal state.

use the RAND challenge to produce the SRES result, and then use that to generate a new MAC.

for the moment, we ignore the RANDs, then just plug in the SRES values.

Definition at line 977 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_process_eap_start ( rc_eap_context_t eap_context,
RADIUS_PACKET req,
RADIUS_PACKET rep 
)
static

We got an EAP-Request/Sim/Start message in a legal state.

pick a supported version, put it into the reply, and insert a nonce.

Definition at line 805 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint32_t rc_rate_limit ( bool *  do_limit)
static

Compute maximum number of new requests that can be started while conforming to the specified rate limit.

Definition at line 1785 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_recv_one_packet ( struct timeval *  tv_wait_time)
static

Receive one packet, maybe.

Definition at line 1478 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_resolve_hostname ( char *  server_arg)
static

Resolve server hostname.

Definition at line 1941 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_respond_eap_md5 ( rc_eap_context_t eap_context,
RADIUS_PACKET req,
RADIUS_PACKET rep 
)
static

Definition at line 1243 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_respond_eap_sim ( rc_eap_context_t eap_context,
RADIUS_PACKET req,
RADIUS_PACKET resp 
)
static

This runs the EAP-SIM client state machine.

the request is from the server. the reponse is to the server.

Definition at line 1132 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_send_one_packet ( rc_transaction_t trans,
RADIUS_PACKET **  packet_p 
)
static

Send one packet for a transaction.

Definition at line 1351 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_send_transaction_packet ( rc_transaction_t trans,
RADIUS_PACKET **  packet_p 
)
static

Send current packet of a transaction.

Arm timeout event.

Definition at line 1424 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_summary ( void  )
static

Do summary / statistics (if asked for).

Definition at line 2058 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static float rc_timeval_to_float ( struct timeval *  tv)
static

Convert a struct timeval to float.

Definition at line 362 of file radeapclient.c.

+ Here is the caller graph for this function:

static void rc_unmap_eap_methods ( RADIUS_PACKET rep)
static

Given a radius request with an EAP-Message body, decode its specific attributes.

Definition at line 2496 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int rc_unmap_eapsim_types ( RADIUS_PACKET r)
static

Definition at line 2582 of file radeapclient.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void rc_wf_stat_update ( rc_transaction_t trans,
rc_wf_type_t  wf_type 
)
static

Update per-workflow statistics (number of transactions, rtt min, max, and cumulated).

Definition at line 1991 of file radeapclient.c.

+ Here is the caller graph for this function:

static rc_input_vps_t* rc_yank_vps_entry ( rc_input_vps_t entry)
static

Remove a selected rc_input_vps_t entry from its current list.

Definition at line 391 of file radeapclient.c.

+ Here is the caller graph for this function:

void set_radius_dir ( TALLOC_CTX *  ctx,
char const *  path 
)

Set the global radius config directory.

(copied from main/mainconfig.c)

Definition at line 291 of file radeapclient.c.

+ Here is the caller graph for this function:

static void NEVER_RETURNS usage ( void  )
static

Display usage and exit.

Definition at line 248 of file radeapclient.c.

+ Here is the caller graph for this function:

Variable Documentation

TALLOC_CTX* autofree
static

Definition at line 205 of file radeapclient.c.

char ch_elapsed[12+1]
static

Definition at line 219 of file radeapclient.c.

bool do_output = true
static

Definition at line 71 of file radeapclient.c.

bool do_summary = false
static

Definition at line 72 of file radeapclient.c.

fr_event_list_t* ev_list = NULL
static

list of armed events.

Definition at line 218 of file radeapclient.c.

char filesecret[256]
static

Definition at line 73 of file radeapclient.c.

int force_af = AF_UNSPEC
static

Definition at line 222 of file radeapclient.c.

int ipproto = IPPROTO_UDP
static

Definition at line 223 of file radeapclient.c.

Main server configuration.

Definition at line 55 of file radeapclient.c.

uint32_t num_finished = 0
static

number of finished transactions.

Definition at line 213 of file radeapclient.c.

uint32_t num_input = 0
static

number of input entries loaded.

Definition at line 209 of file radeapclient.c.

uint32_t num_ongoing = 0
static

number of ongoing transactions.

Definition at line 212 of file radeapclient.c.

unsigned int num_sockets = 0
static

number of allocated sockets.

Definition at line 217 of file radeapclient.c.

uint32_t num_started = 0
static

number of transactions started.

Definition at line 211 of file radeapclient.c.

uint32_t num_trans = 0
static

number of transactions initialized.

Definition at line 210 of file radeapclient.c.

int packet_code = PW_CODE_UNDEFINED
static

Definition at line 227 of file radeapclient.c.

uint32_t parallel = 1
static

Definition at line 64 of file radeapclient.c.

fr_packet_list_t* pl = NULL
static

list of outgoing packets.

Definition at line 216 of file radeapclient.c.

char const* progname = "radeapclient"
static

Definition at line 54 of file radeapclient.c.

float progress_interval = 0
static

Definition at line 74 of file radeapclient.c.

char const* radius_dir = NULL
static

Definition at line 76 of file radeapclient.c.

char const* radiusd_version
Initial value:
= "FreeRADIUS Version " RADIUSD_VERSION_STRING
", built on " __DATE__ " at " __TIME__

Definition at line 57 of file radeapclient.c.

uint32_t rate_limit = 0
static

Definition at line 65 of file radeapclient.c.

rc_input_vps_list_t rc_vps_list_in
static

list of available input vps entries.

Definition at line 215 of file radeapclient.c.

char const* rc_wf_types[RC_WF_MAX]
static
Initial value:
= {
"(All)",
"Access-Request - Accept",
"CoA-Request - Ack",
"EAP Request - Success",
"Accounting-Request - Response"
}

Definition at line 167 of file radeapclient.c.

unsigned int recycle_count = 1
static

Definition at line 69 of file radeapclient.c.

unsigned int retries = 3
static

Definition at line 66 of file radeapclient.c.

char const* secret = NULL
static

Definition at line 70 of file radeapclient.c.

bool server_addr_init = false
static

Definition at line 225 of file radeapclient.c.

fr_ipaddr_t server_ipaddr
static

Definition at line 224 of file radeapclient.c.

uint16_t server_port = 0
static

Definition at line 226 of file radeapclient.c.

int sha1_data_problems
rc_stats_t stats
static

Definition at line 206 of file radeapclient.c.

float timeout = 5
static

Definition at line 67 of file radeapclient.c.

struct timeval tv_end
static

Definition at line 208 of file radeapclient.c.

struct timeval tv_progress_interval
static

Definition at line 75 of file radeapclient.c.

struct timeval tv_start
static

Definition at line 207 of file radeapclient.c.

struct timeval tv_timeout
static

Definition at line 68 of file radeapclient.c.