Difference between revisions of "Unit IPv6"
From Ultibo.org
Line 111: | Line 111: | ||
---- | ---- | ||
− | '' | + | |
+ | '''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> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </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"| | ||
+ | |- | ||
+ | | <code>Id:LongWord;</code> | ||
+ | | IP6 Id | ||
+ | |- | ||
+ | | <code>Dest:TIn6Addr;</code> | ||
+ | | IP6 Dest | ||
+ | |- | ||
+ | | <code>Source:TIn6Addr;</code> | ||
+ | | IP6 Source | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <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 === | === Class definitions === |
Revision as of 03:02, 20 January 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo IPv6 (Internet Protocol version 6) unit
To be documented
Constants
[Expand]
IPv6 specific constants
IP6_TRANSPORT_*
[Expand]
IP6 constants
IP6_HEADER_*
[Expand]
IP6 extension header constants
IP6_HEADER_*
Type definitions
IPv6 header
IPv6 extension header
IPv6 pseudo
IPv6 fragment
IPv6 packet
Class definitions
To be documented
Public variables
None defined
Function declarations
Initialization functions
IPv6 functions
[Expand]
function CheckIP6(ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid IP6 packet
[Expand]
function GetIP6HeaderOffset(ABuffer:Pointer):Word;
Description: Return Start of the IP6 Header (Start of Packet)
[Expand]
function GetIP6HeaderLength(ABuffer:Pointer):Word;
Description: Return Size of IP6 Header (Including Options)
[Expand]
function GetIP6DataOffset(ABuffer:Pointer):Word;
Description: Return Start of IP6 Packet Data (Length of IP6 Header)
[Expand]
function GetIP6DataLength(ABuffer:Pointer):Word;
Description: Return Size of IP6 Packet Data (IP6 TotalLength - IP6 Header)
[Expand]
function ChecksumIP6(ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Validate the IP6 Header and Options Checksum on Receive
Return to Unit Reference