Basic RADIUS client. This class implements a basic RADIUS client. It can send requests to a RADIUS server, taking care of timeouts and retries, and validate its replies.
Variable retries: | |
---|---|
number of times to retry sending a RADIUS request | |
Variable timeout: | |
number of seconds to wait for an answer |
Create a new RADIUS packet. This utility function creates a new RADIUS packet which can be used to communicate with the RADIUS server this client talks to. This is initializing the new packet with the dictionary and secret used for the client.
Returns: | a new empty packet instance |
---|---|
Return type: | pyrad.packet.Packet |
Create a new RADIUS packet. This utility function creates a new RADIUS packet which can be used to communicate with the RADIUS server this client talks to. This is initializing the new packet with the dictionary and secret used for the client.
Returns: | a new empty packet instance |
---|---|
Return type: | pyrad.packet.Packet |
Send a packet to a RADIUS server.
Parameter: | pkt (pyrad.packet.Packet) – the packet to send |
---|---|
Returns: | the reply packet received |
Return type: | pyrad.packet.Packet |
Raises Timeout: | RADIUS server does not reply |
Bind socket to an address. Binding the socket used for communicating to an address can be usefull when working on a machine with multiple addresses.
Parameter: | addr (host,port tuple) – network address (hostname or IP) and port to bind to |
---|