Difference between revisions of "Unit ICMP"
From Ultibo.org
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...") |
|||
(16 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '' | + | '''Ultibo ICMP (Internet Control Message Protocol) 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;">'''ICMP protocol''' <code> ICMP_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 ICMP definitions are in the Protocol or IP modules | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ICMP_PROTOCOL_NAME = 'ICMP';</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;">'''ICMP specific constants''' <code> ICMP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ICMP_TIMEOUT = 0;</code> | ||
+ | | Wait forever on a ICMP Read | ||
+ | |- | ||
+ | | <code>ICMP_BUFFER_SIZE = 65536;</code> | ||
+ | | ICMP Receive Buffer Size | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ICMP_HEADER_SIZE = 8;</code> | ||
+ | | SizeOf(TICMPHeader); ICMP.Solicit | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ICMP_PACKET_SIZE = 8;</code> | ||
+ | | SizeOf(TICMPPacket) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ICMP_ROUTER_TIMEOUT = 60000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | |||
+ | '''ICMP unused header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPUnusedHeader = ^TICMPUnusedHeader;</code> | ||
+ | |||
+ | <code>TICMPUnusedHeader = packed record {Unreachable, TimeExceeded, SourceQuench etc}</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 ICMP definitions are in the Protocol or IP modules | ||
+ | |- | ||
+ | | <code>ICMPType: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>Unused:LongWord;</code> | ||
+ | | 4 Bytes Unused Must be Zero | ||
+ | |- | ||
+ | | <code>IP:TIPHeader;</code> | ||
+ | | IP Header from Original IP Packet | ||
+ | |- | ||
+ | | <code>Data:array[0..7] of Byte;</code> | ||
+ | | 8 Bytes of Original IP Packet Data | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP unreach header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPUnreachHeader = ^TICMPUnreachHeader;</code> | ||
+ | |||
+ | <code>TICMPUnreachHeader = TICMPUnusedHeader; </code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: ICMP_UNREACH | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP expire header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPExpireHeader = ^TICMPExpireHeader;</code> | ||
+ | |||
+ | <code>TICMPExpireHeader = TICMPUnusedHeader;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: ICMP_TIMXCEED | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP quench header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPQuenchHeader = ^TICMPQuenchHeader;</code> | ||
+ | |||
+ | <code>TICMPQuenchHeader = TICMPUnusedHeader;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: ICMP_SOURCEQUENCH | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP pointer header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPPointerHeader = ^TICMPPointerHeader;</code> | ||
+ | |||
+ | <code>TICMPPointerHeader = 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: Param Problem | ||
+ | |- | ||
+ | | <code>ICMPType:Byte;</code> | ||
+ | | ICMP_PARAMPROB etc | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | ICMP_PARAMPROB_OPTABSENT etc | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment checksum of Structure | ||
+ | |- | ||
+ | | <code>Pointer:Byte;</code> | ||
+ | | If Code = 0 Pointer to Byte where Error Occured | ||
+ | |- | ||
+ | | <code>Unused:array[0..2] of Byte;</code> | ||
+ | | 3 Bytes Unused Must be Zero | ||
+ | |- | ||
+ | | <code>IP:TIPHeader;</code> | ||
+ | | IP Header from Original IP Packet | ||
+ | |- | ||
+ | | <code>Data:array[0..7] of Byte;</code> | ||
+ | | 8 Bytes of Original IP Packet Data | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP param header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPParamHeader = ^TICMPParamHeader;</code> | ||
+ | |||
+ | <code>TICMPParamHeader = TICMPPointerHeader;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: ICMP_PARAMPROB | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP IP header | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPIpHeader = ^TICMPIpHeader;</code> | ||
+ | |||
+ | <code>TICMPIpHeader = 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: Redirect | ||
+ | |- | ||
+ | | <code>ICMPType:Byte;</code> | ||
+ | | ICMP_REDIRECT etc | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | ICMP_REDIRECT_NET,ICMP_REDIRECT_HOST etc | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment checksum of Structure | ||
+ | |- | ||
+ | | <code>Gateway:TInAddr;</code> | ||
+ | | Redirect Gateway Address | ||
+ | |- | ||
+ | | <code>IP:TIPHeader;</code> | ||
+ | | IP Header from Original IP Packet | ||
+ | |- | ||
+ | | <code>Data:array[0..7] of Byte;</code> | ||
+ | | 8 Bytes of Original IP Packet Data | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP redirect header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPRedirectHeader = ^TICMPRedirectHeader;</code> | ||
+ | |||
+ | <code>TICMPRedirectHeader = TICMPIpHeader</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: ICMP_REDIRECT | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP echo header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPEchoHeader = ^TICMPEchoHeader;</code> | ||
+ | |||
+ | <code>TICMPEchoHeader = 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: Echo Request/Reply | ||
+ | |- | ||
+ | | <code>ICMPType:Byte;</code> | ||
+ | | ICMP_ECHO,ICMP_ECHOREPLY | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | Always 0 | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment checksum of Structure | ||
+ | |- | ||
+ | | <code>Identifier:Word;</code> | ||
+ | | Increments with each ICMP_ECHO | ||
+ | |- | ||
+ | | <code>Sequence:Word;</code> | ||
+ | | Sequence within an ICMP_ECHO set | ||
+ | |- | ||
+ | | <code>Data:array[0..((MAX_IP_PACKET - 1) - SizeOf(TIPHeader)) - 8] of Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP time stamp header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPTimestampHeader = ^TICMPTimestampHeader;</code> | ||
+ | |||
+ | <code>TICMPTimestampHeader = 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: Timestamp Request/Reply | ||
+ | |- | ||
+ | | <code>ICMPType:Byte;</code> | ||
+ | | ICMP_TSTAMP,ICMP_TSTAMPREPLY | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | Always 0 | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment checksum of Structure | ||
+ | |- | ||
+ | | <code>Identifier:Word;</code> | ||
+ | | Increments with each ICMP_TSTAMP | ||
+ | |- | ||
+ | | <code>Sequence:Word;</code> | ||
+ | | Sequence within an ICMP_TSTAMP set | ||
+ | |- | ||
+ | | <code>Original:LongWord;</code> | ||
+ | | Original Timestamp | ||
+ | |- | ||
+ | | <code>Receive:LongWord;</code> | ||
+ | | Receive Timestamp | ||
+ | |- | ||
+ | | <code>Transmit:LongWord;</code> | ||
+ | | Transmit Timestamp (A sort of Round Trip Time Echo) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP info header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPInfoHeader = ^TICMPInfoHeader;</code> | ||
+ | |||
+ | <code>TICMPInfoHeader = 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: Info Request/Reply | ||
+ | |- | ||
+ | | <code>ICMPType:Byte;</code> | ||
+ | | ICMP_IREQ,ICMP_IREQREPLY | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | Always 0 | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment checksum of Structure | ||
+ | |- | ||
+ | | <code>Identifier:Word;</code> | ||
+ | | Increments with each ICMP_IREQ | ||
+ | |- | ||
+ | | <code>Sequence:Word;</code> | ||
+ | | Sequence within an ICMP_IREQ set (Used to determine Network Number of Local Subnet) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP mask header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPMaskHeader = ^TICMPMaskHeader;</code> | ||
+ | |||
+ | <code>TICMPMaskHeader = 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: Mask Request/Reply | ||
+ | |- | ||
+ | | <code>ICMPType:Byte;</code> | ||
+ | | ICMP_MASKREQ,ICMP_MASKREPLY | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | Always 0 | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment checksum of Structure | ||
+ | |- | ||
+ | | <code>Identifier:Word;</code> | ||
+ | | Increments with each ICMP_MASKREQ | ||
+ | |- | ||
+ | | <code>Sequence:Word;</code> | ||
+ | | Sequence within an ICMP_MASKREQ set | ||
+ | |- | ||
+ | | <code>Mask:TInAddr;</code> | ||
+ | | Subnet Mask of Local Subnet (Used to determine Subnet Mask of Local Subnet) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP router address''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPRouterAddress = ^TICMPRouterAddress;</code> | ||
+ | |||
+ | <code>TICMPRouterAddress = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Address:TInAddr;</code> | ||
+ | | The address of the Router on this subnet | ||
+ | |- | ||
+ | | <code>Level:LongInt;</code> | ||
+ | | The level of preference, higher is better | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP advert header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPAdvertHeader = ^TICMPAdvertHeader;</code> | ||
+ | |||
+ | <code>TICMPAdvertHeader = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ICMPType:Byte;</code> | ||
+ | | ICMP_ROUTERADVERT | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | Always 0 | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment checksum of Structure | ||
+ | |- | ||
+ | | <code>EntryCount:Byte;</code> | ||
+ | | Number of Router Address entries | ||
+ | |- | ||
+ | | <code>EntrySize:Byte;</code> | ||
+ | | Size of each Router Address entry | ||
+ | |- | ||
+ | | <code>Lifetime:Word;</code> | ||
+ | | Lifetime of entries in seconds | ||
+ | |- | ||
+ | | <code>Routers:array[1..EntryCount] of TICMPRouterAddress;</code> | ||
+ | | Used to advertise routers | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP solicit header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPSolicitHeader = ^TICMPSolicitHeader;</code> | ||
+ | |||
+ | <code>TICMPSolicitHeader = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ICMPType:Byte;</code> | ||
+ | | ICMP_ROUTERSOLICIT | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | Always 0 | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment checksum of Structure | ||
+ | |- | ||
+ | | <code>Reserved:LongWord;</code> | ||
+ | | Always 0 (Used to solicit routers) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPHeader = ^TICMPHeader;</code> | ||
+ | |||
+ | <code>TICMPHeader = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>case Integer of</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>0:(Unused:TICMPUnusedHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1:(Unreach:TICMPUnreachHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>2:(Expire:TICMPExpireHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>3:(Quench:TICMPQuenchHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>4:(Pointer:TICMPPointerHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>5:(Param:TICMPParamHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>6:(Ip:TICMPIpHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>7:(Redirect:TICMPRedirectHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>8:(Echo:TICMPEchoHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>9:(Timestamp:TICMPTimestampHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>10:(Info:TICMPInfoHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>11:(Mask:TICMPMaskHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>12:(Advert:TICMPAdvertHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>13:(Solicit:TICMPSolicitHeader);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''ICMP packet''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PICMPPacket = ^TICMPPacket;</code> | ||
+ | |||
+ | <code>TICMPPacket = 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 ICMPBuffer) | ||
+ | |- | ||
+ | | <code>Size:LongWord;</code> | ||
+ | | LongWord to keep size even | ||
+ | |- | ||
+ | | <code>Next:PICMPPacket;</code> | ||
+ | | Followed by RemoteAddress (4 or 16 Bytes) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | === Class definitions === | ||
+ | ---- | ||
+ | |||
+ | |||
+ | '''ICMP specific classes''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TICMPProtocolTransport|<code>TICMPProtocolTransport = class(TProtocolTransport)</code>]] | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TICMPProtocol|<code>TICMPProtocol = class(TNetworkProtocol)</code>]] | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TICMPSocket|<code>TICMPSocket = class(TProtocolSocket)</code>]] | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TICMPBuffer|<code>TICMPBuffer = 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 ICMPInit;</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 /> | ||
+ | |||
+ | '''ICMP 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 CheckICMP(AFamily:Word; ABuffer:Pointer):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Verify that the packet is a valid ICMP 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 GetICMPHeaderOffset(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 GetICMPHeaderLength(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 GetICMPDataOffset(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 GetICMPDataLength(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 ChecksumICMP(AFamily:Word; ABuffer:Pointer; AOffset,ALength:Word):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Checksum the ICMP 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
[hide]Description
Ultibo ICMP (Internet Control Message Protocol) unit
Constants
[Expand]
ICMP protocol
ICMP_PROTOCOL_*
[Expand]
ICMP specific constants
ICMP_*
Type definitions
ICMP unused header
[Expand]
PICMPUnusedHeader = ^TICMPUnusedHeader;
TICMPUnusedHeader = packed record {Unreachable, TimeExceeded, SourceQuench etc}
ICMP unreach header
ICMP expire header
ICMP quench header
ICMP pointer header
ICMP param header
ICMP IP header
ICMP redirect header
ICMP echo header
ICMP time stamp header
ICMP info header
ICMP mask header
ICMP router address
ICMP advert header
ICMP solicit header
ICMP header
ICMP packet
Class definitions
ICMP specific classes
TICMPProtocolTransport = class(TProtocolTransport)
|
TICMPProtocol = class(TNetworkProtocol)
|
TICMPSocket = class(TProtocolSocket)
|
TICMPBuffer = class(TSocketBuffer)
|
Public variables
None defined
Function declarations
Initialization functions
ICMP functions
[Expand]
function CheckICMP(AFamily:Word; ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid ICMP packet
[Expand]
function GetICMPHeaderOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
[Expand]
function GetICMPHeaderLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
[Expand]
function GetICMPDataOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
[Expand]
function GetICMPDataLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
[Expand]
function ChecksumICMP(AFamily:Word; ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Checksum the ICMP Header on Send/Validate the Checksum on Receive
Return to Unit Reference