Difference between revisions of "Unit Protocol"

From Ultibo.org
Jump to: navigation, search
 
(15 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
'''Ultibo Network Protocol interface unit'''
+
'''Ultibo Network Protocol Interface unit'''
 
+
''To be documented''
+
  
 
=== Constants ===
 
=== Constants ===
Line 28: Line 26:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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;">'''Protocol timer constants''' <code> SOCKET_TIMER_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Protocol timer key values''' <code> SOCKET_TIMER_KEY_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 45: Line 43:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 header type constants''' <code> ICMP_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Protocol timer flag values''' <code> SOCKET_TIMER_FLAG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SOCKET_TIMER_FLAG_NONE = $00000000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SOCKET_TIMER_FLAG_ACTIVE = $00000001;</code>
 +
| The socket timer item is active in a timer
 +
|-
 +
| <code>SOCKET_TIMER_FLAG_DYNAMIC = $00000002;</code>
 +
| The socket timer item was allocated dynamically
 +
|-
 +
|}
 +
</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 header type''' <code> ICMP_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 98: Line 113:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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 header code constants''' <code> ICMP_UNREACH_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''ICMP header code''' <code> ICMP_UNREACH_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 181: Line 196:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<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;">'''IGMP header type constants''' <code> IGMP_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''IGMP header type''' <code> IGMP_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 252: Line 267:
 
| <code>Key:Integer;</code>
 
| <code>Key:Integer;</code>
 
| Ordering key for timer list
 
| Ordering key for timer list
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| Flags for this timer item
 
|-
 
|-
 
| <code>Socket:TObject;</code>
 
| <code>Socket:TObject;</code>
Line 264: Line 282:
 
|}
 
|}
 
</div></div>
 
</div></div>
 +
 +
'''Protocol callback'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TProtocolCallback = function(AProtocol:TNetworkProtocol):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''Filter callback'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TFilterCallback = function(AFilter:TNetworkFilter):Boolean of object;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''Configuration callback'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TConfigCallback = function(AConfig:TNetworkConfig):Boolean of object; </code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 
<br />
 
<br />
  
Line 269: Line 314:
 
----
 
----
  
''To be documented''
+
 
 +
'''Protocol specific classes'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TProtocolManager|<code>TProtocolManager = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TProtocolTransport|<code>TProtocolTransport = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TNetworkProtocol|<code>TNetworkProtocol = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TSocketTimer|<code>TSocketTimer = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TSocketThread|<code>TSocketThread = class(TThread)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TProtocolPort|<code>TProtocolPort = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TProtocolSocket|<code>TProtocolSocket = class(TTransportSocket)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TProtocolState|<code>TProtocolState = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TProtocolOptions|<code>TProtocolOptions = class(TObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TFilterTransport|<code>TFilterTransport = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TNetworkFilter|<code>TNetworkFilter = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TConfigTransport|<code>TConfigTransport = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TNetworkConfig|<code>TNetworkConfig = class(TListObject)</code>]]
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| [[TNetworkClient|<code>TNetworkClient = class(TListObject)</code>]]
 +
|-
 +
|}
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''None defined''
+
 
 +
'''Protocol specific variables'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>ProtocolManager:TProtocolManager;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===
Line 288: Line 415:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 300: Line 427:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 312: Line 439:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 327: Line 454:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-

Latest revision as of 05:29, 31 August 2021

Return to Unit Reference


Description


Ultibo Network Protocol Interface unit

Constants



[Expand]
Protocol specific constants PROTOCOL_*


[Expand]
Protocol timer key values SOCKET_TIMER_KEY_*


[Expand]
Protocol timer flag values SOCKET_TIMER_FLAG_*


[Expand]
ICMP header type ICMP_*


[Expand]
ICMP header code ICMP_UNREACH_*


[Expand]
IGMP header type IGMP_*


Type definitions



Protocol statistics

[Expand]

PProtocolStatistics = ^TProtocolStatistics;

TProtocolStatistics = record

Socket timer item

[Expand]

PSocketTimerItem = ^TSocketTimerItem;

TSocketTimerItem = record

Protocol callback

TProtocolCallback = function(AProtocol:TNetworkProtocol):Boolean of object;

Filter callback

TFilterCallback = function(AFilter:TNetworkFilter):Boolean of object;

Configuration callback

TConfigCallback = function(AConfig:TNetworkConfig):Boolean of object;


Class definitions



Protocol specific classes

TProtocolManager = class(TObject)
TProtocolTransport = class(TListObject)
TNetworkProtocol = class(TListObject)
TSocketTimer = class(TObject)
TSocketThread = class(TThread)
TProtocolPort = class(TListObject)
TProtocolSocket = class(TTransportSocket)
TProtocolState = class(TObject)
TProtocolOptions = class(TObject)
TFilterTransport = class(TListObject)
TNetworkFilter = class(TListObject)
TConfigTransport = class(TListObject)
TNetworkConfig = class(TListObject)
TNetworkClient = class(TListObject)


Public variables



Protocol specific variables

ProtocolManager:TProtocolManager;


Function declarations



Initialization functions

[Expand]
procedure ProtocolInit;
Description: To be documented


[Expand]
function ProtocolStart:LongWord;
Description: To be documented


[Expand]
function ProtocolStop:LongWord;
Description: To be documented


Protocol helper functions

[Expand]
procedure ProtocolCheckTimer(Data:Pointer);
Description: To be documented


Return to Unit Reference