pyrad.host
– RADIUS host definition¶
-
class
pyrad.host.
Host
(authport=1812, acctport=1813, dict=None)¶ Generic RADIUS capable host.
Variables: - dict – RADIUS dictionary
- authport – port to listen on for authentication packets
- acctport – port to listen on for accounting packets
-
CreateAcctPacket
(**args)¶ Create a new accounting RADIUS packet. This utility function creates a new accouting 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.AcctPacket
-
CreateAuthPacket
(**args)¶ Create a new authentication RADIUS packet. This utility function creates a new RADIUS authentication 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.AuthPacket
-
CreatePacket
(**args)¶ Create a new RADIUS packet. This utility function creates a new RADIUS authentication 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
-
SendPacket
(fd, pkt)¶ Send a packet.
Parameters: - fd (socket class instance) – socket to send packet with
- pkt (Packet class instance) – packet to send
-
SendReplyPacket
(fd, pkt)¶ Send a packet.
Parameters: - fd (socket class instance) – socket to send packet with
- pkt (Packet class instance) – packet to send