Host
Host
Generic RADIUS capable host.
Source code in pyrad2/host.py
__init__(authport=1812, acctport=1813, coaport=3799, dict=None)
Initializes a host.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
authport
|
int
|
port to listen on for authentication packets |
1812
|
acctport
|
int
|
port to listen on for accounting packets |
1813
|
coaport
|
int
|
port to listen on for CoA packets |
3799
|
dict
|
Dictionary
|
RADIUS dictionary |
None
|
Source code in pyrad2/host.py
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:
Type | Description |
---|---|
Packet
|
pyrad2.packet.Packet: A new empty packet instance. |
Source code in pyrad2/host.py
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:
Type | Description |
---|---|
Packet
|
pyrad2.packet.Packet: A new empty packet instance. |
Source code in pyrad2/host.py
CreateAcctPacket(**args)
Create a new accounting RADIUS packet. This utility function creates a new accounting 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:
Type | Description |
---|---|
Packet
|
packet.Packet: A new empty packet instance. |
Source code in pyrad2/host.py
CreateCoAPacket(**args)
Create a new CoA RADIUS packet. This utility function creates a new CoA 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:
Type | Description |
---|---|
Packet
|
packet.Packet: A new empty packet instance. |
Source code in pyrad2/host.py
SendPacket(fd, pkt)
Send a packet.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fd
|
socket
|
Socket to send packet with |
required |
pkt
|
Packet
|
The packet instance |
required |
SendReplyPacket(fd, pkt)
Send a packet.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fd
|
socket
|
Socket to send packet with |
required |
pkt
|
Packet
|
The packet instance |
required |