Difference between revisions of "Unit IPv6"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...")
 
 
(11 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo IPv6 (Internet Protocol Version 6) unit'''
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''IPv6 specific constants''' <code> IP6_TRANSPORT_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>IP6_TRANSPORT_NAME = 'IPV6';</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''IPv6 header''' <code> IP6_HEADER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>MIN_IP6_PACKET = 40;</code>
 +
| Not Counting Adapter Header
 +
|-
 +
| <code>MAX_IP6_PACKET = 1500;</code>
 +
| Not Counting Adapter Header
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MAX_FRAG_LIFE = 32000;</code>
 +
| Only wait 32 seconds for the rest of the packet
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IP6_HEADER_SIZE = 40;</code>
 +
| SizeOf(TIP6Header); Does Not Allow for Extensions
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''IPv6 extension header''' <code> IP6_HEADER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|See: https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IP6_HEADER_HOP = 0;</code>
 +
| Hop-by-hop option header
 +
|-
 +
| <code>IP6_HEADER_TCP = 6;</code>
 +
| Next header is a TCP segment (The payload)
 +
|-
 +
| <code>IP6_HEADER_UDP = 17;</code>
 +
| Next header is a UDP message (The payload)
 +
|-
 +
| <code>IP6_HEADER_IPV6 = 41;</code>
 +
| Next header is a IPv6 packet (IPv6 Encapsulation) (The payload)
 +
|-
 +
| <code>IP6_HEADER_ROUTING = 43;</code>
 +
| Next header is a Routing header
 +
|-
 +
| <code>IP6_HEADER_FRAGMENT = 44;</code>
 +
| Next header is a Fragmentation/reassembly header
 +
|-
 +
| <code>IP6_HEADER_GRE = 47;</code>
 +
| Next header is a GRE header
 +
|-
 +
| <code>IP6_HEADER_ESP = 50;</code>
 +
| Next header is a Encapsulating security payload
 +
|-
 +
| <code>IP6_HEADER_AUTH = 51;</code>
 +
| Next header is a Authentication header
 +
|-
 +
| <code>IP6_HEADER_ICMP = 58;</code>
 +
| Next header is a ICMP for IPv6 message
 +
|-
 +
| <code>IP6_HEADER_NONE = 59;</code>
 +
| There is no next header (Do not process payload)
 +
|-
 +
| <code>IP6_HEADER_DEST = 60;</code>
 +
| Next header is a Destination options header
 +
|-
 +
| <code>IP6_HEADER_SCTP = 132;</code>
 +
| Next header is a SCTP message (The payload)
 +
|-
 +
| <code>IP6_HEADER_MOBILITY = 135;</code>
 +
| Next header is a Mobility header
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>IP6_MTU = MAX_IP6_PACKET;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''IPv6 header'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PIP6Header = ^TIP6Header;</code>
 +
 
 +
<code>TIP6Header = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: 40 Bytes
 +
|-
 +
| <code>VersionClassLabel:LongWord;</code>
 +
| Version (4 bits)(Always 6)/Traffic Class (8 bits)/Flow Label (20 bits)
 +
|-
 +
| <code>PayloadLength:Word;</code>
 +
| The size of the payload in octets, including any extension headers (The length is set to zero when a Hop-by-Hop extension header carries a Jumbo Payload option)
 +
|-
 +
| <code>NextHeader:Byte;</code>
 +
| Specifies the type of the next header (When extension headers are present in the packet this field indicates which extension header follows)
 +
|-
 +
| <code>HopLimit:Byte;</code>
 +
| This value is decremented by one at each intermediate node visited by the packet. When the counter reaches 0 the packet is discarded (Replaces the time to live field of IPv4)
 +
|-
 +
| <code>SourceIP:TIn6Addr;</code>
 +
| Source IP
 +
|-
 +
| <code>DestIP:TIn6Addr;</code>
 +
| Destination IP
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''IPv6 extension header'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PIP6ExtensionHeader = ^TIP6ExtensionHeader;</code>
 +
 
 +
<code>TIP6ExtensionHeader = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: 2 Bytes (Common Header of all Extension Headers)
 +
|-
 +
| <code>NextHeader:Byte;</code>
 +
| Specifies the type of the next header (If zero discard the packet)
 +
|-
 +
| <code>ExtensionLength:Byte;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div> 
 +
 
 +
'''IPv6 pseudo'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PIP6Pseudo = ^TIP6Pseudo;</code>
 +
 
 +
<code>TIP6Pseudo = packed record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: ?? Bytes (Used by UDP/TCP Checksum)
 +
|-
 +
| <code>SourceIP:TIn6Addr;</code>
 +
| Source IP
 +
|-
 +
| <code>DestIP:TIn6Addr;</code>
 +
| Destination IP
 +
|-
 +
| <code>Mbz:Byte;</code>
 +
| Must Be Zero
 +
|-
 +
| <code>Protocol:Byte;</code>
 +
| IP6 Protocol Type IPPROTO_UDP, IPPROTO_TCP etc
 +
|-
 +
| <code>Length:Word;</code>
 +
| Length of UDP/TCP Header and Data
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''IPv6 fragment''' 
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PIP6Fragment = ^TIP6Fragment;</code>
 +
 
 +
<code>TIP6Fragment = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: ?? Bytes (Used by Fragment Buffer)
 +
|-
 +
| <code>Offset:LongWord;</code>
 +
| Offset of this Fragment in the Packet
 +
|-
 +
| <code>Size:Word;</code>
 +
| Size of this Fragment
 +
|-
 +
| <code>Prev:PIP6Fragment;</code>
 +
| Pointer to Prev Fragment
 +
|-
 +
| <code>Next:PIP6Fragment;</code>
 +
| Pointer to Next Fragment
 +
|-
 +
|}
 +
</div></div> 
 +
 +
'''IPv6 packet'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PIP6Packet = ^TIP6Packet;</code>
 +
 
 +
<code>TIP6Packet = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Note: ?? Bytes (Used by Fragment Buffer)
 +
|-
 +
| <code>Lock:TMutexHandle;</code>
 +
| Packet Lock
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>Id:LongWord;</code>
 +
| IP6 Id
 +
|-
 +
| <code>Dest:TIn6Addr;</code>
 +
| IP6 Dest
 +
|-
 +
| <code>Source:TIn6Addr;</code>
 +
| IP6 Source
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>Data:Pointer;</code>
 +
| Pointer to Data
 +
|-
 +
| <code>Timeout:Int64;</code>
 +
| Packet Timeout
 +
|-
 +
| <code>Total:Word;</code>
 +
| IP Total Length
 +
|-
 +
| <code>Length:Word;</code>
 +
| IP Header Length
 +
|-
 +
| <code>Received:Word;</code>
 +
| Received Bytes
 +
|-
 +
| <code>Prev:PIP6Packet;</code>
 +
| Pointer to Prev Packet
 +
|-
 +
| <code>Next:PIP6Packet;</code>
 +
| Pointer to Next Packet
 +
|-
 +
| <code>First:PIP6Fragment;</code>
 +
| Pointer to First Fragment
 +
|-
 +
| <code>Last:PIP6Fragment;</code>
 +
| Pointer to Last Fragment
 +
|-
 +
|}
 +
</div></div> 
 +
<br />
 +
 
 +
=== Class definitions ===
 +
----
 +
 
 +
 
 +
'''IPv6 specific classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6Buffer|<code>TIP6Buffer = class(TTransportBufferEx)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6TransportAdapter|<code>TIP6TransportAdapter = class(TTransportAdapter)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6TransportBinding|<code>TIP6TransportBinding = class(TTransportBinding)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6TransportProtocol|<code>TIP6TransportProtocol = class(TTransportProtocol)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6TransportFilter|<code>TIP6TransportFilter = class(TTransportFilter)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6TransportConfig|<code>TIP6TransportConfig = class(TTransportConfig)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6Transport|<code>TIP6Transport = class(TNetworkTransport)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6State|<code>TIP6State = class(TTransportState)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6Options|<code>TIP6Options = class(TTransportOptions)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6HostEntry|<code>TIP6HostEntry = class(THostEntry)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6RouteEntry|<code>TIP6RouteEntry = class(TRouteEntry)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6AddressEntry|<code>TIP6AddressEntry = class(TAddressEntry)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6NetworkEntry|<code>TIP6NetworkEntry = class(TNetworkEntry)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6ServEntry|<code>TIP6ServEntry = class(TServEntry)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TIP6ProtoEntry|<code>TIP6ProtoEntry = class(TProtoEntry)</code>]]
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''None defined''
  
 
=== Function declarations ===
 
=== Function declarations ===
 
----
 
----
  
''To be documented''
 
  
 +
'''Initialization functions'''
 +
 +
<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;">procedure IP6Init;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</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 />
 +
 +
'''IPv6 functions'''
 +
 +
<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 CheckIP6(ABuffer:Pointer):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Verify that the packet is a valid IP6 packet</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Buffer
 +
| Complete packet without Adapter header
 +
|-
 +
|}
 +
</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 GetIP6Protocol(ABuffer:Pointer):Byte;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Buffer
 +
| Complete packet including Transport header
 +
|-
 +
|}
 +
</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 GetIP6HeaderOffset(ABuffer:Pointer):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Start of the IP6 Header (Start of Packet)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Buffer
 +
| Complete packet including Transport header
 +
|-
 +
|}
 +
</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 GetIP6HeaderLength(ABuffer:Pointer):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Size of IP6 Header (Including Options)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Buffer
 +
| Complete packet including Transport header
 +
|-
 +
|}
 +
</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 GetIP6DataOffset(ABuffer:Pointer):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Start of IP6 Packet Data (Length of IP6 Header)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Buffer
 +
| Complete packet including Transport header
 +
|-
 +
|}
 +
</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 GetIP6DataLength(ABuffer:Pointer):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Size of IP6 Packet Data (IP6 TotalLength - IP6 Header)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Buffer
 +
| Complete packet including Transport header
 +
|-
 +
|}
 +
</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 ChecksumIP6(ABuffer:Pointer; AOffset,ALength:Word):Word;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Validate the IP6 Header and Options Checksum on Receive</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Buffer
 +
| Complete packet including Transport header
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Latest revision as of 05:26, 31 August 2021

Return to Unit Reference


Description


Ultibo IPv6 (Internet Protocol Version 6) unit

Constants



IPv6 specific constants IP6_TRANSPORT_*
IP6_TRANSPORT_NAME = 'IPV6';  


IPv6 header IP6_HEADER_*
MIN_IP6_PACKET = 40; Not Counting Adapter Header
MAX_IP6_PACKET = 1500; Not Counting Adapter Header
 
MAX_FRAG_LIFE = 32000; Only wait 32 seconds for the rest of the packet
 
IP6_HEADER_SIZE = 40; SizeOf(TIP6Header); Does Not Allow for Extensions


IPv6 extension header IP6_HEADER_*
See: https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
 
IP6_HEADER_HOP = 0; Hop-by-hop option header
IP6_HEADER_TCP = 6; Next header is a TCP segment (The payload)
IP6_HEADER_UDP = 17; Next header is a UDP message (The payload)
IP6_HEADER_IPV6 = 41; Next header is a IPv6 packet (IPv6 Encapsulation) (The payload)
IP6_HEADER_ROUTING = 43; Next header is a Routing header
IP6_HEADER_FRAGMENT = 44; Next header is a Fragmentation/reassembly header
IP6_HEADER_GRE = 47; Next header is a GRE header
IP6_HEADER_ESP = 50; Next header is a Encapsulating security payload
IP6_HEADER_AUTH = 51; Next header is a Authentication header
IP6_HEADER_ICMP = 58; Next header is a ICMP for IPv6 message
IP6_HEADER_NONE = 59; There is no next header (Do not process payload)
IP6_HEADER_DEST = 60; Next header is a Destination options header
IP6_HEADER_SCTP = 132; Next header is a SCTP message (The payload)
IP6_HEADER_MOBILITY = 135; Next header is a Mobility header
 
IP6_MTU = MAX_IP6_PACKET;  


Type definitions



IPv6 header

PIP6Header = ^TIP6Header;

TIP6Header = packed record

Note: 40 Bytes
VersionClassLabel:LongWord; Version (4 bits)(Always 6)/Traffic Class (8 bits)/Flow Label (20 bits)
PayloadLength:Word; The size of the payload in octets, including any extension headers (The length is set to zero when a Hop-by-Hop extension header carries a Jumbo Payload option)
NextHeader:Byte; Specifies the type of the next header (When extension headers are present in the packet this field indicates which extension header follows)
HopLimit:Byte; This value is decremented by one at each intermediate node visited by the packet. When the counter reaches 0 the packet is discarded (Replaces the time to live field of IPv4)
SourceIP:TIn6Addr; Source IP
DestIP:TIn6Addr; Destination IP

IPv6 extension header

PIP6ExtensionHeader = ^TIP6ExtensionHeader;

TIP6ExtensionHeader = packed record

Note: 2 Bytes (Common Header of all Extension Headers)
NextHeader:Byte; Specifies the type of the next header (If zero discard the packet)
ExtensionLength:Byte;  

IPv6 pseudo

PIP6Pseudo = ^TIP6Pseudo;

TIP6Pseudo = packed record

Note: ?? Bytes (Used by UDP/TCP Checksum)
SourceIP:TIn6Addr; Source IP
DestIP:TIn6Addr; Destination IP
Mbz:Byte; Must Be Zero
Protocol:Byte; IP6 Protocol Type IPPROTO_UDP, IPPROTO_TCP etc
Length:Word; Length of UDP/TCP Header and Data

IPv6 fragment

PIP6Fragment = ^TIP6Fragment;

TIP6Fragment = record

Note: ?? Bytes (Used by Fragment Buffer)
Offset:LongWord; Offset of this Fragment in the Packet
Size:Word; Size of this Fragment
Prev:PIP6Fragment; Pointer to Prev Fragment
Next:PIP6Fragment; Pointer to Next Fragment

IPv6 packet

PIP6Packet = ^TIP6Packet;

TIP6Packet = record

Note: ?? Bytes (Used by Fragment Buffer)
Lock:TMutexHandle; Packet Lock
 
Id:LongWord; IP6 Id
Dest:TIn6Addr; IP6 Dest
Source:TIn6Addr; IP6 Source
 
Data:Pointer; Pointer to Data
Timeout:Int64; Packet Timeout
Total:Word; IP Total Length
Length:Word; IP Header Length
Received:Word; Received Bytes
Prev:PIP6Packet; Pointer to Prev Packet
Next:PIP6Packet; Pointer to Next Packet
First:PIP6Fragment; Pointer to First Fragment
Last:PIP6Fragment; Pointer to Last Fragment


Class definitions



IPv6 specific classes

TIP6Buffer = class(TTransportBufferEx)
TIP6TransportAdapter = class(TTransportAdapter)
TIP6TransportBinding = class(TTransportBinding)
TIP6TransportProtocol = class(TTransportProtocol)
TIP6TransportFilter = class(TTransportFilter)
TIP6TransportConfig = class(TTransportConfig)
TIP6Transport = class(TNetworkTransport)
TIP6State = class(TTransportState)
TIP6Options = class(TTransportOptions)
TIP6HostEntry = class(THostEntry)
TIP6RouteEntry = class(TRouteEntry)
TIP6AddressEntry = class(TAddressEntry)
TIP6NetworkEntry = class(TNetworkEntry)
TIP6ServEntry = class(TServEntry)
TIP6ProtoEntry = class(TProtoEntry)


Public variables


None defined

Function declarations



Initialization functions

procedure IP6Init;
Description: To be documented
Note None documented


IPv6 functions

function CheckIP6(ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid IP6 packet
Buffer Complete packet without Adapter header


function GetIP6Protocol(ABuffer:Pointer):Byte;
Description: To be documented
Buffer Complete packet including Transport header


function GetIP6HeaderOffset(ABuffer:Pointer):Word;
Description: Return Start of the IP6 Header (Start of Packet)
Buffer Complete packet including Transport header


function GetIP6HeaderLength(ABuffer:Pointer):Word;
Description: Return Size of IP6 Header (Including Options)
Buffer Complete packet including Transport header


function GetIP6DataOffset(ABuffer:Pointer):Word;
Description: Return Start of IP6 Packet Data (Length of IP6 Header)
Buffer Complete packet including Transport header


function GetIP6DataLength(ABuffer:Pointer):Word;
Description: Return Size of IP6 Packet Data (IP6 TotalLength - IP6 Header)
Buffer Complete packet including Transport header


function ChecksumIP6(ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Validate the IP6 Header and Options Checksum on Receive
Buffer Complete packet including Transport header


Return to Unit Reference