networkclient
radius_packet Struct Reference

#include <client.h>

Collaboration diagram for radius_packet:

Data Fields

int sockfd
 
struct sockaddr_storage src
 
struct sockaddr_storage dst
 
socklen_t sizeof_addr
 
const char * secret
 
size_t sizeof_secret
 
unsigned int code
 
int id
 
size_t length
 
uint8_t vector [16]
 
struct timeval timestamp
 
nr_transmit_state_t state
 
int attempts
 
int delay
 
int flags
 
uint8_t * data
 
size_t sizeof_data
 
VALUE_PAIRvps
 

Detailed Description

A structure which describes a RADIUS packet.

In general, it should not be necessary to refererence the elements of this structure.

Field Documentation

int radius_packet::attempts

The number of transmission attempt. Do not modify this field.

Referenced by nr_packet_sign(), nr_socket_send(), and nr_transmit_init().

unsigned int radius_packet::code
int radius_packet::delay

Delay in usec. Do not modify this field

Referenced by nr_transmit_init().

struct sockaddr_storage radius_packet::dst

the packet destination address

Referenced by main(), nr_packet_can_encode(), nr_socket_send(), and nr_track_id_alloc().

const char* radius_packet::secret
socklen_t radius_packet::sizeof_addr

the size of the address field (v4 or v6)

Referenced by nr_socket_recv(), and nr_socket_send().

size_t radius_packet::sizeof_data
size_t radius_packet::sizeof_secret

Length of the shared secret

Referenced by nr_packet_init(), nr_packet_sign(), nr_packet_verify(), and nr_transmit_init().

struct sockaddr_storage radius_packet::src

The socket descriptor The packet source address

Referenced by main(), nr_packet_can_encode(), nr_socket_recv(), and nr_track_id_alloc().

nr_transmit_state_t radius_packet::state

The state of the packet.

The caller needs to set this field to one of NR_TRANSMIT_INITIAL or NR_TRANSMIT_TIMEOUT, depending on what needs to happen. The "when" field must also be filled in by the caller.

The nr_transmit() function updates this to contain one of NR_TRANSMIT_CONTINUE, NR_TRANSMIT_HAVE_RESPONSE, or NR_TRANSMIT_NO_RESPONSE.

Referenced by nr_transmit(), and nr_transmit_init().

struct timeval radius_packet::timestamp

Timestamp of the packet

Referenced by nr_socket_recv_response(), and nr_socket_send().

uint8_t radius_packet::vector[16]

A copy of the authentication vector

Referenced by nr_packet_decode(), nr_packet_sign(), and nr_socket_recv().


The documentation for this struct was generated from the following file: