networkclient
|
Sample code to initialize a RADIUS packet send it to a server. More...
#include <networkradius-devel/client.h>
Functions | |
int | main (int argc, const char *argv[]) |
Sample code to initialize a RADIUS packet send it to a server.
This example initializes a packet, and then adds User-Name and User-Password to it. The resulting packet is then printed to the standard output.
The packet is sent to a server, and waits for a response. It then prints the response.
int main | ( | int | argc, |
const char * | argv[] | ||
) |
References radius_packet::dst, NR_DA_USER_NAME, NR_DA_USER_PASSWORD, nr_ipv42sockaddr(), nr_packet_attr_append(), nr_packet_init(), nr_packet_print_hex(), nr_packet_sign(), nr_socket_open(), nr_socket_recv_response(), nr_socket_send(), nr_strerror(), nr_vp_fprintf_list(), nr_vp_free(), PW_ACCESS_REQUEST, radius_packet::sockfd, radius_packet::src, and radius_packet::vps.