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...") |
|||
Line 100: | Line 100: | ||
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div> | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div> | ||
|- | |- | ||
− | | | + | | <code>FBroadcastFlag:Boolean;</code> |
+ | | | ||
|- | |- | ||
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>property BroadcastFlag:Boolean read FBroadcastFlag;</code> | ||
+ | | | ||
|- | |- | ||
| <code>function AddTransport(ATransport:TNetworkTransport):Boolean; override;</code> | | <code>function AddTransport(ATransport:TNetworkTransport):Boolean; override;</code> | ||
Line 124: | Line 128: | ||
|- | |- | ||
| <code>function SetConfig(AInitDelay,ARetryCount,ARetryTimeout:LongWord):Boolean; override;</code> | | <code>function SetConfig(AInitDelay,ARetryCount,ARetryTimeout:LongWord):Boolean; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function SetBroadcast(ABroadcastFlag:Boolean):Boolean;</code> | ||
| | | | ||
|- | |- | ||
Line 449: | Line 456: | ||
<pre style="border: 0; padding-bottom:0px;">function TDHCPConfig.SetConfig(AInitDelay,ARetryCount,ARetryTimeout:LongWord):Boolean;</pre> | <pre style="border: 0; padding-bottom:0px;">function TDHCPConfig.SetConfig(AInitDelay,ARetryCount,ARetryTimeout:LongWord):Boolean;</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set Delay, Retry and Timeout for this config</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set Delay, Retry and Timeout for this config</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function TDHCPConfig.SetBroadcast(ABroadcastFlag:Boolean):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Enable or Disable the Broadcast flag option for the DHCP config</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" |
Latest revision as of 03:23, 10 October 2025
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
| |
FBroadcastFlag:Boolean;
|
|
public
| |
property BroadcastFlag:Boolean read FBroadcastFlag;
|
|
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 SetBroadcast(ABroadcastFlag:Boolean):Boolean;
|
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 |
---|
function TDHCPConfig.SetBroadcast(ABroadcastFlag:Boolean):Boolean;
Note | None documented |
---|
Return to Unit Reference