networkclient
|
#include <client.h>
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_PAIR * | vps |
A structure which describes a RADIUS packet.
In general, it should not be necessary to refererence the elements of this structure.
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 |
The RADIUS Packet Code
Referenced by main(), nr_packet_can_encode(), nr_packet_decode(), nr_packet_init(), nr_packet_response_ok(), nr_packet_sign(), nr_socket_recv(), and nr_track_id_alloc().
uint8_t* radius_packet::data |
The raw packet data
Referenced by main(), nr_attr2data(), nr_packet_attr_append(), nr_packet_can_encode(), nr_packet_decode(), nr_packet_encode(), nr_packet_init(), nr_packet_ok(), nr_packet_print_hex(), nr_packet_sign(), nr_packet_verify(), nr_packet_vps_append(), nr_packet_walk(), nr_socket_recv(), nr_socket_send(), and nr_track_id_packet_free().
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().
int radius_packet::flags |
Internal flags. Do not modify this field.
Referenced by nr_packet_attr_append(), nr_packet_decode(), nr_packet_encode(), nr_packet_ok(), nr_packet_print_hex(), nr_packet_sign(), nr_packet_verify(), nr_packet_vps_append(), and nr_socket_send().
int radius_packet::id |
The RADIUS Packet Id
Referenced by main(), nr_packet_can_encode(), nr_packet_decode(), nr_packet_init(), nr_packet_response_ok(), nr_socket_recv(), nr_track_id_alloc(), nr_track_id_realloc(), and nr_track_id_release().
size_t radius_packet::length |
The RADIUS Packet Length. This will be no larger than RADIUS_PACKET::sizeof_data
Referenced by nr_attr2data(), nr_packet_attr_append(), nr_packet_can_encode(), nr_packet_decode(), nr_packet_encode(), nr_packet_init(), nr_packet_ok(), nr_packet_print_hex(), nr_packet_sign(), nr_packet_verify(), nr_packet_vps_append(), nr_packet_walk(), nr_socket_recv(), nr_socket_recv_response(), and nr_socket_send().
const char* radius_packet::secret |
The shared secret
Referenced by main(), nr_packet_init(), nr_packet_sign(), nr_packet_verify(), and nr_transmit_init().
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 of the data buffer
Referenced by main(), nr_packet_attr_append(), nr_packet_can_encode(), nr_packet_init(), nr_packet_sign(), nr_packet_vps_append(), and nr_socket_recv().
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().
int radius_packet::sockfd |
Referenced by main(), nr_socket_recv(), nr_socket_recv_response(), nr_socket_send(), nr_track_id_alloc(), and nr_track_id_release().
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().
VALUE_PAIR* radius_packet::vps |
linked list of VALUE_PAIR
Referenced by main(), nr_packet_decode(), nr_packet_encode(), nr_socket_recv(), and nr_track_id_packet_free().