Difference between revisions of "TDHCPConfig"
(Created page with "Return to Unit DHCP __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collapse...") |
(No difference)
|
Latest revision as of 05:09, 2 May 2018
Return to Unit DHCP
Description
To be documented
Class definitions
TDHCPConfig = class(TNetworkConfig)
constructor Create(AManager:TProtocolManager);
|
|
destructor Destroy; override;
|
|
private
| |
FARP:TARPTransport;
|
|
FUDP:TUDPProtocol;
|
|
function ConfigHandler(AHandle:THandle; AAdapter:TTransportAdapter; ACommand:Word):Boolean;
|
|
function GetDHCPClientId(AAdapter:TTransportAdapter):TDHCPClientId;
|
|
function GetDHCPHeaderSize(AHeader:PDHCPHeader):Integer;
|
|
function CreateDHCPRequest(AHeader:PDHCPHeader; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function CheckDHCPReply(AHeader:PDHCPHeader; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord):Boolean;
|
|
function HandleDHCPReply(AHeader:PDHCPHeader; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; ACommand:Word):Boolean;
|
|
function SendDHCPDiscover(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function SendDHCPRequest(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function SendDHCPDecline(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function SendDHCPRelease(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function SendDHCPInform(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function SendDHCPRenew(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function SendDHCPRebind(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function SendDHCPReboot(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
|
|
function RecvDHCPReply(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACommand:Word):Boolean;
|
|
function InsertDHCPOption(AOption:Byte; AHeader:PDHCPHeader; AValue:Pointer; ASize:Integer):Boolean;
|
|
function ExtractDHCPOption(AOption:Byte; AHeader:PDHCPHeader; AValue:Pointer; var ASize:Integer):Boolean;
|
|
protected
| |
public
| |
function AddTransport(ATransport:TNetworkTransport):Boolean; override;
|
|
function RemoveTransport(ATransport:TNetworkTransport):Boolean; override;
|
|
function StartConfig:Boolean; override;
|
|
function StopConfig:Boolean; override;
|
|
function ProcessConfig:Boolean; override;
|
|
function SetConfig(AInitDelay,ARetryCount,ARetryTimeout:LongWord):Boolean; override;
|
Function declarations
constructor TDHCPConfig.Create(AManager:TProtocolManager);
Note | None documented |
---|
destructor TDHCPConfig.Destroy;
Note | None documented |
---|
function TDHCPConfig.ConfigHandler(AHandle:THandle; AAdapter:TTransportAdapter; ACommand:Word):Boolean;
Handle | The Handle of the Config Transport the request is from |
---|---|
Adapter | The transport adapter to perform configuration on |
Command | The configuration command to perform |
Note | DHCP Handler is structured slightly different to others to account for the multiple types of requests it services
Caller must hold the Adapter lock |
function TDHCPConfig.GetDHCPClientId(AAdapter:TTransportAdapter):TDHCPClientId;
Note | Caller must hold the Adapter lock |
---|
function TDHCPConfig.GetDHCPHeaderSize(AHeader:PDHCPHeader):Integer;
Note | None documented |
---|
function TDHCPConfig.CreateDHCPRequest(AHeader:PDHCPHeader; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | The first four octets of the 'options' field of the DHCP message contain the (decimal) values 99, 130, 83 and 99, respectively.
This is the same magic cookie as is defined in RFC 1497 [17]
|
---|
function TDHCPConfig.CheckDHCPReply(AHeader:PDHCPHeader; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord):Boolean;
Note | The first four octets of the 'options' field of the DHCP message contain the (decimal) values 99, 130, 83 and 99, respectively.
This is the same magic cookie as is defined in RFC 1497 [17]
|
---|
function TDHCPConfig.HandleDHCPReply(AHeader:PDHCPHeader; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; ACommand:Word):Boolean;
Note | Caller must hold the Transport and Adapter locks |
---|
function TDHCPConfig.SendDHCPDiscover(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | Discover uses Broadcast send and ciaddr zero
Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.SendDHCPRequest(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | Request uses Broadcast send and ciaddr zero
Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.SendDHCPDecline(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | Decline uses Broadcast send and ciaddr zero
Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.SendDHCPRelease(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | Release uses Unicast send and ciaddr filled in
Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.SendDHCPInform(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | Inform uses Broadcast send and ciaddr filled in
Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.SendDHCPRenew(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | Renew actually uses Request with Unicast send and ciaddr filled in
Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.SendDHCPRebind(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | Rebind actually uses Request with Broadcast send and ciaddr filled in
Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.SendDHCPReboot(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACount:Word):Boolean;
Note | Reboot actually uses Request with Broadcast send and ciaddr zero
Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.RecvDHCPReply(ASocket:TProtocolSocket; ATransport:TDHCPConfigTransport; AAdapter:TTransportAdapter; AIdentifier:LongWord; ACommand:Word):Boolean;
Note | Caller must hold the Socket, Transport and Adapter locks. |
---|
function TDHCPConfig.InsertDHCPOption(AOption:Byte; AHeader:PDHCPHeader; AValue:Pointer; ASize:Integer):Boolean;
Note | The first four octets of the 'options' field of the DHCP message contain the (decimal) values 99, 130, 83 and 99, respectively.
This is the same magic cookie as is defined in RFC 1497 [17] |
---|
function TDHCPConfig.ExtractDHCPOption(AOption:Byte; AHeader:PDHCPHeader; AValue:Pointer; var ASize:Integer):Boolean;
Note | The first four octets of the 'options' field of the DHCP message contain the (decimal) values 99, 130, 83 and 99, respectively.
This is the same magic cookie as is defined in RFC 1497 [17] |
---|
function TDHCPConfig.AddTransport(ATransport:TNetworkTransport):Boolean;
Transport | The transport to add |
---|
function TDHCPConfig.RemoveTransport(ATransport:TNetworkTransport):Boolean;
Transport | The transport to remove |
---|
function TDHCPConfig.StartConfig:Boolean;
Note | None documented |
---|
function TDHCPConfig.StopConfig:Boolean;
Note | None documented |
---|
function TDHCPConfig.ProcessConfig:Boolean;
Note | None documented |
---|
function TDHCPConfig.SetConfig(AInitDelay,ARetryCount,ARetryTimeout:LongWord):Boolean;
Note | None documented |
---|
Return to Unit Reference