Difference between revisions of "Unit UDP"
From Ultibo.org
Line 87: | Line 87: | ||
---- | ---- | ||
− | '' | + | |
+ | '''UDP header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUDPHeader = ^TUDPHeader;</code> | ||
+ | |||
+ | <code>TUDPHeader = 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 UDP definitions are in the Protocol or IP modules | ||
+ | |- | ||
+ | |colspan="2"|Note: 8 Bytes | ||
+ | |- | ||
+ | | <code>SourcePort:Word;</code> | ||
+ | | Network Order | ||
+ | |- | ||
+ | | <code>DestPort:Word;</code> | ||
+ | | Network Order | ||
+ | |- | ||
+ | | <code>Length:Word;</code> | ||
+ | | Network Order | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''UDP datagram''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PUDPDatagram = ^TUDPDatagram;</code> | ||
+ | |||
+ | <code>TUDPDatagram = 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 UDPBuffer) | ||
+ | |- | ||
+ | | <code>Size:Word;</code> | ||
+ | | Word to keep size even | ||
+ | |- | ||
+ | | <code>RemotePort:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Next:PUDPDatagram;</code> | ||
+ | | Followed by RemoteAddress (4 or 16 Bytes) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Class definitions === | === Class definitions === |
Revision as of 03:34, 26 January 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo UDP (User Datagram Protocol) unit
To be documented
Constants
[Expand]
UDP specific constants
UDP_*
[Expand]
UDP socket option constants
[Expand]
UDP port constants
UDP_PORT_*
Type definitions
UDP header
UDP datagram
Class definitions
To be documented
Public variables
None defined
Function declarations
Initialization Functions
UDP functions
[Expand]
function CheckUDP(AFamily:Word; ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid UDP packet
[Expand]
function GetUDPHeaderOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
[Expand]
function GetUDPHeaderLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
[Expand]
function GetUDPDataOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
[Expand]
function GetUDPDataLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
[Expand]
function ChecksumUDPRecv(AFamily:Word; APseudo:PIPPseudo; ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Validate the Checksum of UDP Pseudo, Header and Data on Receive
[Expand]
function ChecksumUDPSend(AFamily:Word; APseudo:PIPPseudo; AHeader:PUDPHeader; AData:Pointer; ALength:Word):Word;
Description: Checksum the UDP Pseudo, Header and Data on Send
Return to Unit Reference