Difference between revisions of "Unit UDP"
From Ultibo.org
| Line 10: | Line 10: | ||
---- | ---- | ||
| − | '' | + | |
| + | <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;">'''UDP specific constants''' <code> UDP_* </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 UDP definitions are in the Protocol or IP modules | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>UDP_PROTOCOL_NAME = 'UDP';</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>MIN_UDP_PACKET = 8;</code> | ||
| + | | Not Counting Adapter and Transport Header | ||
| + | |- | ||
| + | | <code>MAX_UDP_PACKET = 8192;</code> | ||
| + | | Not Counting Adapter and Transport Header | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>UDP_TIMEOUT = 0;</code> | ||
| + | | Wait forever on a UDP Read | ||
| + | |- | ||
| + | | <code>UDP_BUFFER_SIZE = 65536;</code> | ||
| + | | UDP Receive Buffer Size | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>UDP_MAX_PORT = 65536;</code> | ||
| + | | | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>UDP_HEADER_SIZE = 8;</code> | ||
| + | | SizeOf(TUDPHeader); | ||
| + | |- | ||
| + | |colspan="2"| | ||
| + | |- | ||
| + | | <code>UDP_DATAGRAM_SIZE = 8;</code> | ||
| + | | SizeOf(TUDPDatagram) | ||
| + | |- | ||
| + | |} | ||
| + | </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;">'''UDP socket option constants'''</div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | |colspan="2"|See Sockets.pas | ||
| + | |- | ||
| + | |} | ||
| + | </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;">'''UDP port constants''' <code> UDP_PORT_* </code></div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | | <code>UDP_PORT_START = 49152;</code> | ||
| + | | First dynamic port (Previously 1024) As per IANA assignment | ||
| + | |- | ||
| + | | <code>UDP_PORT_STOP = 65534;</code> | ||
| + | | Last dynamic port (Previously 5000) Short of IANA assignment to allow for rollover | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
=== Type definitions === | === Type definitions === | ||
Revision as of 05:49, 16 December 2016
Return to Unit Reference
Description
To be documented
Constants
UDP specific constants
UDP_* | Note: Some UDP definitions are in the Protocol or IP modules | |
UDP_PROTOCOL_NAME = 'UDP';
|
|
MIN_UDP_PACKET = 8;
|
Not Counting Adapter and Transport Header |
MAX_UDP_PACKET = 8192;
|
Not Counting Adapter and Transport Header |
UDP_TIMEOUT = 0;
|
Wait forever on a UDP Read |
UDP_BUFFER_SIZE = 65536;
|
UDP Receive Buffer Size |
UDP_MAX_PORT = 65536;
|
|
UDP_HEADER_SIZE = 8;
|
SizeOf(TUDPHeader); |
UDP_DATAGRAM_SIZE = 8;
|
SizeOf(TUDPDatagram) |
UDP socket option constants
| See Sockets.pas |
UDP port constants
UDP_PORT_* UDP_PORT_START = 49152;
|
First dynamic port (Previously 1024) As per IANA assignment |
UDP_PORT_STOP = 65534;
|
Last dynamic port (Previously 5000) Short of IANA assignment to allow for rollover |
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization Functions
procedure UDPInit;
Description: To be documented
| Note | None documented |
|---|
UDP functions
function CheckUDP(AFamily:Word; ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid UDP packet
| Buffer | The complete packet including Transport header |
|---|---|
| Note | If checksum is zero then no checksum was added, return True |
function GetUDPHeaderOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
| Buffer | The complete packet including Transport header |
|---|
function GetUDPHeaderLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
| Buffer | The complete packet including Transport header |
|---|
function GetUDPDataOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
| Buffer | The complete packet including Transport header |
|---|
function GetUDPDataLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
| Buffer | The complete packet including Transport header |
|---|
function ChecksumUDPRecv(AFamily:Word; APseudo:PIPPseudo; ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Validate the Checksum of UDP Pseudo, Header and Data on Receive
| Note | None documented |
|---|
function ChecksumUDPSend(AFamily:Word; APseudo:PIPPseudo; AHeader:PUDPHeader; AData:Pointer; ALength:Word):Word;
Description: Checksum the UDP Pseudo, Header and Data on Send
| Note | None documented |
|---|
Return to Unit Reference