Difference between revisions of "Unit IP"
From Ultibo.org
Line 36: | Line 36: | ||
! '''Note''' | ! '''Note''' | ||
| None documented | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''IP 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 CheckIP(ABuffer:Pointer):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Verify that the packet is a valid IP 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 GetIPHeaderOffset(ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Start of the IP 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 GetIPHeaderLength(ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Size of IP 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 GetIPOptionsLength(ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Size of IP Options (Header - IP_HEADER_SIZE)</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 GetIPDataOffset(ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Start of IP Packet Data (Length of IP 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 GetIPDataLength(ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Return Size of IP Packet Data (IP TotalLength - IP 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 ChecksumIPRecv(ABuffer:Pointer; AOffset,ALength:Word):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Validate the IP 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 /> | ||
+ | <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 ChecksumIPSend(AHeader,AOptions:Pointer; ALength:Word):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Checksum the IP Header and Options on Send</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 | ||
|- | |- | ||
|} | |} |
Revision as of 02:10, 17 October 2016
Return to Unit Reference
Description
To be documented
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
procedure IPInit;
Description: To be documented
Note | None documented |
---|
IP functions
function CheckIP(ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid IP packet
Buffer | Complete packet without Adapter header |
---|
function GetIPHeaderOffset(ABuffer:Pointer):Word;
Description: Return Start of the IP Header (Start of Packet)
Buffer | Complete packet including Transport header |
---|
function GetIPHeaderLength(ABuffer:Pointer):Word;
Description: Return Size of IP Header (Including Options)
Buffer | Complete packet including Transport header |
---|
function GetIPOptionsLength(ABuffer:Pointer):Word;
Description: Return Size of IP Options (Header - IP_HEADER_SIZE)
Buffer | Complete packet including Transport header |
---|
function GetIPDataOffset(ABuffer:Pointer):Word;
Description: Return Start of IP Packet Data (Length of IP Header)
Buffer | Complete packet including Transport header |
---|
function GetIPDataLength(ABuffer:Pointer):Word;
Description: Return Size of IP Packet Data (IP TotalLength - IP Header)
Buffer | Complete packet including Transport header |
---|
function ChecksumIPRecv(ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Validate the IP Header and Options Checksum on Receive
Buffer | Complete packet including Transport header |
---|
function ChecksumIPSend(AHeader,AOptions:Pointer; ALength:Word):Word;
Description: Checksum the IP Header and Options on Send
Buffer | Complete packet including Transport header |
---|
Return to Unit Reference