Difference between revisions of "Unit ICMPv6"
From Ultibo.org
								
												
				 (Created page with "Return to Unit Reference   === Description === ----  ''To be documented''  === Constants === ----  ''To be documented''  === Type definitions === ----  ''To...")  | 
				|||
| (14 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
----  | ----  | ||
| − | ''  | + | '''Ultibo ICMPv6 (Internet Control Message Protocol Version 6) unit'''  | 
=== Constants ===  | === Constants ===  | ||
----  | ----  | ||
| − | ''  | + | |
| + | <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;">'''ICMPv6 protocol''' <code> ICMP6_PROTOCOL_* </code></div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | |colspan="2"|Note: Some ICMPV6 definitions are in the Protocol or IPv6 modules  | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>ICMP6_PROTOCOL_NAME = 'ICMPV6';</code>  | ||
| + | | style="width: 50%;"|   | ||
| + | |-  | ||
| + | |}  | ||
| + | </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;">'''ICMPv6 specific constants''' <code> ICMP6_* </code></div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | | <code>ICMP6_TIMEOUT = 0;</code>  | ||
| + | | Wait forever on a ICMP6 Read  | ||
| + | |-  | ||
| + | | <code>ICMP6_BUFFER_SIZE = 65536;</code>  | ||
| + | | ICMP6 Receive Buffer Size  | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>ICMP6_HEADER_SIZE = 5;</code>  | ||
| + | | SizeOf(TICMP6Header);  | ||
| + | |-  | ||
| + | |colspan="2"|   | ||
| + | |-  | ||
| + | | <code>ICMP6_PACKET_SIZE = 8;</code>  | ||
| + | | SizeOf(TICMP6Packet)  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
=== Type definitions ===  | === Type definitions ===  | ||
----  | ----  | ||
| − | ''  | + | |
| + | '''ICMPv6 header'''  | ||
| + | |||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">  | ||
| + | <code>PICMP6Header = ^TICMP6Header;</code>  | ||
| + | |||
| + | <code>TICMP6Header = 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: Some ICMPv6 definitions are in the Protocol or IPv6 modules  | ||
| + | |-  | ||
| + | | <code>ICMP6Type:Byte;</code>  | ||
| + | | ICMP_UNREACH etc  | ||
| + | |-  | ||
| + | | <code>Code:Byte;</code>  | ||
| + | | ICMP_UNREACH_NET,ICMP_UNREACH_PORT etc  | ||
| + | |-  | ||
| + | | <code>Checksum:Word;</code>  | ||
| + | | 1s Compliment checksum of Structure  | ||
| + | |-  | ||
| + | | <code>CurrentHopLimit:Byte;</code>  | ||
| + | |    | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | |||
| + | '''ICMPv6 packet'''  | ||
| + | |||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">  | ||
| + | <code>PICMP6Packet = ^TICMP6Packet;</code>  | ||
| + | |||
| + | <code>TICMP6Packet = 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: 8 Bytes (Used by ICMP6Buffer)   | ||
| + | |-  | ||
| + | | <code>Size:LongWord;</code>  | ||
| + | | LongWord to keep size even  | ||
| + | |-  | ||
| + | | <code>Next:PICMP6Packet;</code>  | ||
| + | | Followed by RemoteAddress (4 or 16 Bytes)  | ||
| + | |-  | ||
| + | |}  | ||
| + | </div></div>  | ||
| + | <br />  | ||
| + | |||
| + | === Class definitions ===  | ||
| + | ----  | ||
| + | |||
| + | |||
| + | '''ICMPv6 specific classes'''  | ||
| + | |||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"  | ||
| + | |-  | ||
| + | | [[TICMP6ProtocolTransport|<code>TICMP6ProtocolTransport = class(TProtocolTransport)</code>]]  | ||
| + | |-  | ||
| + | |}  | ||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"  | ||
| + | |-  | ||
| + | | [[TICMP6Protocol|<code>TICMP6Protocol = class(TNetworkProtocol)</code>]]  | ||
| + | |-  | ||
| + | |}  | ||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"  | ||
| + | |-  | ||
| + | | [[TICMP6Socket|<code>TICMP6Socket = class(TProtocolSocket)</code>]]  | ||
| + | |-  | ||
| + | |}  | ||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"  | ||
| + | |-  | ||
| + | | [[TICMP6Buffer|<code>TICMP6Buffer = class(TSocketBuffer)</code>]]  | ||
| + | |-  | ||
| + | |}  | ||
| + | <br />  | ||
=== Public variables ===  | === Public variables ===  | ||
----  | ----  | ||
| − | ''  | + | ''None defined''  | 
=== Function declarations ===  | === Function declarations ===  | ||
----  | ----  | ||
| − | |||
| + | '''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 ICMP6Init;</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 />  | ||
| + | |||
| + | '''ICMPv6 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 CheckICMP6(AFamily:Word; ABuffer:Pointer):Boolean;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Verify that the packet is a valid ICMP6 packet</div>  | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">  | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;"  | ||
| + | |-  | ||
| + | ! Buffer  | ||
| + | | The 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 GetICMP6HeaderOffset(AFamily:Word; ABuffer:Pointer):Word;</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  | ||
| + | | The 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 GetICMP6HeaderLength(AFamily:Word; ABuffer:Pointer):Word;</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  | ||
| + | | The 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 GetICMP6DataOffset(AFamily:Word; ABuffer:Pointer):Word;</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  | ||
| + | | The 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 GetICMP6DataLength(AFamily:Word; ABuffer:Pointer):Word;</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  | ||
| + | | The 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 ChecksumICMP6(AFamily:Word; ABuffer:Pointer; AOffset,ALength:Word):Word;</pre>  | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Checksum the ICMP6 Header on Send/Validate the Checksum on Receive</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 />  | ||
Return to [[Unit_Reference|Unit Reference]]  | Return to [[Unit_Reference|Unit Reference]]  | ||
Latest revision as of 05:24, 31 August 2021
Return to Unit Reference
Contents
Description
Ultibo ICMPv6 (Internet Control Message Protocol Version 6) unit
Constants
ICMPv6 protocol 
 ICMP6_PROTOCOL_* | Note: Some ICMPV6 definitions are in the Protocol or IPv6 modules | |
 ICMP6_PROTOCOL_NAME = 'ICMPV6';
 | 
|
ICMPv6 specific constants 
 ICMP6_*  ICMP6_TIMEOUT = 0;
 | 
Wait forever on a ICMP6 Read | 
 ICMP6_BUFFER_SIZE = 65536;
 | 
ICMP6 Receive Buffer Size | 
 ICMP6_HEADER_SIZE = 5;
 | 
SizeOf(TICMP6Header); | 
 ICMP6_PACKET_SIZE = 8;
 | 
SizeOf(TICMP6Packet) | 
Type definitions
ICMPv6 header
PICMP6Header = ^TICMP6Header;
TICMP6Header = packed record
| Note: Some ICMPv6 definitions are in the Protocol or IPv6 modules | |
 ICMP6Type:Byte;
 | 
ICMP_UNREACH etc | 
 Code:Byte;
 | 
ICMP_UNREACH_NET,ICMP_UNREACH_PORT etc | 
 Checksum:Word;
 | 
1s Compliment checksum of Structure | 
 CurrentHopLimit:Byte;
 | 
|
ICMPv6 packet
PICMP6Packet = ^TICMP6Packet;
TICMP6Packet = record
| Note: 8 Bytes (Used by ICMP6Buffer) | |
 Size:LongWord;
 | 
LongWord to keep size even | 
 Next:PICMP6Packet;
 | 
Followed by RemoteAddress (4 or 16 Bytes) | 
Class definitions
ICMPv6 specific classes
 TICMP6ProtocolTransport = class(TProtocolTransport)
 | 
 TICMP6Protocol = class(TNetworkProtocol)
 | 
 TICMP6Socket = class(TProtocolSocket)
 | 
 TICMP6Buffer = class(TSocketBuffer)
 | 
Public variables
None defined
Function declarations
Initialization functions
procedure ICMP6Init;
Description: To be documented
| Note | None documented | 
|---|
ICMPv6 functions
function CheckICMP6(AFamily:Word; ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid ICMP6 packet
| Buffer | The complete packet including Transport header | 
|---|
function GetICMP6HeaderOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
| Buffer | The complete packet including Transport header | 
|---|
function GetICMP6HeaderLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
| Buffer | The complete packet including Transport header | 
|---|
function GetICMP6DataOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
| Buffer | The complete packet including Transport header | 
|---|
function GetICMP6DataLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
| Buffer | The complete packet including Transport header | 
|---|
function ChecksumICMP6(AFamily:Word; ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Checksum the ICMP6 Header on Send/Validate the Checksum on Receive
| Note | None documented | 
|---|
Return to Unit Reference