Difference between revisions of "Unit DHCP"

From Ultibo.org
Jump to: navigation, search
Line 415: Line 415:
 
----
 
----
  
''To be documented''
+
 
 +
'''DHCP specific types'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PBOOTPHeader = ^TBOOTPHeader;</code>
 +
 
 +
<code>TBOOTPHeader = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Opcode:Byte;</code>
 +
| packet op code / message type
 +
|-
 +
| <code>HardwareType:Byte;</code>
 +
| hardware address type, 1 = 10 mb ethernet
 +
|-
 +
| <code>HardwareLength:Byte;</code>
 +
| hardware address len, eg '6' for 10mb eth
 +
|-
 +
| <code>Hops:Byte;</code>
 +
| client sets to zero, optionally used by gateways in cross-gateway booting
 +
|-
 +
| <code>Identifier:LongWord;</code>
 +
| transaction ID, a random number
 +
|-
 +
| <code>Seconds:Word;</code>
 +
| filled in by client, seconds elapsed since client started trying to boot
 +
|-
 +
| <code>Reserved:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ClientIP:TInAddr;</code>
 +
| client IP address filled in by client if known
 +
|-
 +
| <code>YourIP:TInAddr;</code>
 +
| 'your' (client) IP address filled by server if client doesn't know
 +
|-
 +
| <code>ServerIP:TInAddr;</code>
 +
| server IP address returned in bootreply
 +
|-
 +
| <code>GatewayIP:TInAddr;</code>
 +
| gateway IP address, used in optional cross-gateway booting
 +
|-
 +
| <code>ClientHardware:array[0..15] of Byte;</code>
 +
| client hardware address, filled by client
 +
|-
 +
| <code>ClientHardware:THardwareAddress;</code>
 +
| client hardware address, filled by client
 +
|-
 +
| <code>DummyData:array[0..9] of Byte;</code>
 +
| dummy to fill out remaining bytes of above
 +
|-
 +
| <code>ServerName:array[0..63] of Byte;</code>
 +
| optional server host name, null terminated
 +
|-
 +
| <code>FileName:array[0..127] of Byte;</code>
 +
| boot file name, null terminated string 'generic' name or null in bootrequest, fully qualified directory-path name in bootreply
 +
|-
 +
| <code>VendorData:array[0..63] of Byte;</code>
 +
| optional vendor-specific area
 +
|-
 +
| <code>VendorData:array[0..BOOTP_VENDOR_SIZE - 1] of Byte;</code>
 +
| optional vendor-specific area
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''DHCP header types'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PDHCPHeader = ^TDHCPHeader;</code>
 +
 
 +
<code>TDHCPHeader = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Opcode:Byte;</code>
 +
| packet op code / message type
 +
|-
 +
| <code>HardwareType:Byte;</code>
 +
| hardware address type, 1 = 10 mb ethernet
 +
|-
 +
| <code>HardwareLength:Byte;</code>
 +
| hardware address len, eg '6' for 10mb eth
 +
|-
 +
| <code>Hops:Byte;</code>
 +
| client sets to zero, optionally used by gateways in cross-gateway booting
 +
|-
 +
| <code>Identifier:LongWord;</code>
 +
| transaction ID, a random number
 +
|-
 +
| <code>Seconds:Word;</code>
 +
| filled in by client, seconds elapsed since client started trying to boot
 +
|-
 +
| <code>Flags:Word;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ClientIP:TInAddr;</code>
 +
| client IP address filled in by client if known
 +
|-
 +
| <code>YourIP:TInAddr;</code>
 +
| 'your' (client) IP address filled by server if client doesn't know
 +
|-
 +
| <code>ServerIP:TInAddr;</code>
 +
| server IP address returned in bootreply
 +
|-
 +
| <code>GatewayIP:TInAddr;</code>
 +
| gateway IP address, used in optional cross-gateway booting
 +
|-
 +
| <code>ClientHardware:array[0..15] of Byte;</code>
 +
| client hardware address, filled by client
 +
|-
 +
| <code>ClientHardware:THardwareAddress;</code>
 +
| client hardware address, filled by client
 +
|-
 +
| <code>DummyData:array[0..9] of Byte;</code>
 +
| dummy to fill out remaining bytes of above
 +
|-
 +
| <code>ServerName:array[0..63] of Byte;</code>
 +
| optional server host name, null terminated
 +
|-
 +
| <code>FileName:array[0..127] of Byte;</code>
 +
| boot file name, null terminated string 'generic' name or null in bootrequest, fully qualified directory-path name in bootreply
 +
|-
 +
| <code>Options:array[0..311] of Byte;</code>
 +
| DHCP options area (minimum 312 bytes)
 +
|-
 +
| <code>Options:array[0..DHCP_OPTIONS_SIZE - 1] of Byte;</code>
 +
| DHCP options area (minimum 312 bytes)
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''DHCP client Id types'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PDHCPClientId = ^TDHCPClientId;</code>
 +
 
 +
<code>TDHCPClientId = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>Tag:Byte;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Hardware:THardwareAddress;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Class definitions ===
 
=== Class definitions ===

Revision as of 23:35, 17 January 2017

Return to Unit Reference


Description


Ultibo DHCP/BOOTP Protocol client unit

To be documented

Constants



[Expand]
DHCP specific constants BOOTP_*


[Expand]
BOOTP/DHCP request constants BOOTP_REQUEST*


[Expand]
DHCP message constants DHCP_*


[Expand]
BOOTP/DHCP constants


[Expand]
DHCP flag constants DHCP_FLAG_*


[Expand]
ARP config constants ARP_CONFIG_*


Type definitions



DHCP specific types

[Expand]

PBOOTPHeader = ^TBOOTPHeader;

TBOOTPHeader = packed record

DHCP header types

[Expand]

PDHCPHeader = ^TDHCPHeader;

TDHCPHeader = packed record

DHCP client Id types

[Expand]

PDHCPClientId = ^TDHCPClientId;

TDHCPClientId = packed record


Class definitions


To be documented

Public variables


None defined

Function declarations



Initialization functions

[Expand]
procedure DHCPInit;
Description: To be documented


Return to Unit Reference