Difference between revisions of "Unit TCP"

From Ultibo.org
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 22: Line 22:
 
TCP Send and Recv do not use a block buffer as per UDP etc. Instead the data for each Segment is stored in memory (TCP_MAX_MSS) allocated with the Segment. The Free and Used values still track the amount of data in the buffer but this method allows OOB data to be handled correctly.
 
TCP Send and Recv do not use a block buffer as per UDP etc. Instead the data for each Segment is stored in memory (TCP_MAX_MSS) allocated with the Segment. The Free and Used values still track the amount of data in the buffer but this method allows OOB data to be handled correctly.
  
TCP Sequence numbers are compared using modulo 2^32 arithmetic. The following calculations provide the neccessary handling of wraparound etc.
+
TCP Sequence numbers are compared using modulo 2^32 arithmetic. The following calculations provide the necessary handling of wraparound etc.
  
 
LT  = (A - B) < 0
 
LT  = (A - B) < 0
Line 412: Line 412:
  
  
'''TCP protocol transport'''
+
'''TCP specific classes'''
  
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
<code>TTCPProtocolTransport = class(TProtocolTransport)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create;</code>
+
| [[TTCPProtocolTransport|<code>TTCPProtocolTransport = class(TProtocolTransport)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>Socket:TTCPSocket;</code>
+
| Socket for responding to non matched segments
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''TCP protocol'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TTCPProtocol = class(TNetworkProtocol)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(AManager:TProtocolManager; const AName:String);</code>
+
| [[TTCPProtocol|<code>TTCPProtocol = class(TNetworkProtocol)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FNextPort:Word;</code>
+
| &nbsp;
+
|-
+
| <code>FMinBacklog:Integer;</code>
+
| &nbsp;
+
|-
+
| <code>FMaxBacklog:Integer;</code>
+
| &nbsp;
+
|-
+
| <code>FReceiveBacklog:Integer;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function PacketHandler(AHandle:THandle; ASource,ADest,APacket:Pointer; ASize:Integer; ABroadcast:Boolean):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function SegmentHandler(ASocket:TTCPSocket; ASource,ADest,APacket:Pointer; ASize:Integer):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ResetHandler(ASocket:TTCPSocket; ASource,ADest,APacket:Pointer; ASize:Integer):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CloneSocket(ASocket:TTCPSocket; ALocalAddress,ARemoteAddress:Pointer; ALocalPort,ARemotePort:Word; ALock:Boolean; AState:LongWord):TTCPSocket;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetTCPOptionsSize(ASocket:TTCPSocket; AOptions:Pointer):Word;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateTCPOptions(ASocket:TTCPSocket; AOptions:Pointer; AFlags:Byte):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function HandleTCPOptions(ASocket:TTCPSocket; AOptions:Pointer; AFlags:Byte):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function InsertTCPOption(ASocket:TTCPSocket; AOptions:Pointer; AOption:Byte):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ExtractTCPOption(ASocket:TTCPSocket; AOptions:Pointer; AOption:Byte):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SendReset(ASocket:TTCPSocket):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function SendAcknowledge(ASocket:TTCPSocket):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SendSegment(ASocket:TTCPSocket; ASource,ADest:Pointer; ASourcePort,ADestPort:Word; ASequence,AAcknowledge:LongWord; AWindow,AUrgent:Word; AFlags:Byte; AOptions,AData:Pointer; ASize:Integer):Integer;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function AddTransport(ATransport:TNetworkTransport):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function RemoveTransport(ATransport:TNetworkTransport):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function OpenPort(ASocket:TProtocolSocket; APort:Word):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ClosePort(ASocket:TProtocolSocket):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function FindPort(APort:Word; AWrite,ALock:Boolean):TProtocolPort; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function FindSocket(AFamily,AStruct,AProtocol:Word; ALocalAddress,ARemoteAddress:Pointer; ALocalPort,ARemotePort:Word; ABroadcast,AListen,ALock:Boolean; AState:LongWord):TProtocolSocket; override;</code>
+
| &nbsp;
+
|-
+
| <code>procedure FlushSockets(All:Boolean); override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SelectCheck(ASource,ADest:PFDSet; ACode:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function SelectWait(ASocket:TProtocolSocket; ACode:Integer; ATimeout:LongWord):Integer; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function Accept(ASocket:TProtocolSocket; ASockAddr:PSockAddr; AAddrLength:PInteger):TProtocolSocket; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Bind(ASocket:TProtocolSocket; var ASockAddr:TSockAddr; AAddrLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseSocket(ASocket:TProtocolSocket):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Connect(ASocket:TProtocolSocket; var ASockAddr:TSockAddr; AAddrLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function IoctlSocket(ASocket:TProtocolSocket; ACmd:DWORD; var AArg:u_long):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetPeerName(ASocket:TProtocolSocket; var ASockAddr:TSockAddr; var AAddrLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSockName(ASocket:TProtocolSocket; var ASockAddr:TSockAddr; var AAddrLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSockOpt(ASocket:TProtocolSocket; ALevel,AOptName:Integer; AOptValue:PChar; var AOptLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Listen(ASocket:TProtocolSocket; ABacklog:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Recv(ASocket:TProtocolSocket; var ABuffer; ALength,AFlags:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function RecvFrom(ASocket:TProtocolSocket; var ABuffer; ALength,AFlags:Integer; var AFromAddr:TSockAddr; var AFromLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Select(ANfds:Integer; AReadfds,AWritefds,AExceptfds:PFDSet; ATimeout:PTimeVal):LongInt; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Send(ASocket:TProtocolSocket; var ABuffer; ALength,AFlags:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function SendTo(ASocket:TProtocolSocket; var ABuffer; ALength,AFlags:Integer; var AToAddr:TSockAddr; AToLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function SetSockOpt(ASocket:TProtocolSocket; ALevel,AOptName:Integer; AOptValue:PChar; AOptLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Shutdown(ASocket:TProtocolSocket; AHow:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Socket(AFamily,AStruct,AProtocol:Integer):TProtocolSocket; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function StartProtocol:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function StopProtocol:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ProcessProtocol:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ProcessSockets:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ProcessSocket(ASocket:TProtocolSocket):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''TCP socket'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TTCPSocket = class(TProtocolSocket)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|Note: SOCK_STREAM
+
| [[TTCPSocket|<code>TTCPSocket = class(TProtocolSocket)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>constructor Create(AProtocol:TNetworkProtocol; ATransport:TNetworkTransport);</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FBackLog:Integer;</code>
+
| Backlog size of Listen/Accept Queue
+
|-
+
| <code>FListener:TProtocolSocket;</code>
+
| The Listener socket for this socket (If applicable)
+
|-
+
| <code>FAcceptQueue:TSocketList;</code>
+
| Sockets waiting for connection Accept
+
|-
+
| <code>FReceiveQueue:TSocketList;</code>
+
| Sockets waiting for SYN/ACK handshake
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FSendData:TTCPSendBuffer;</code>
+
| &nbsp;
+
|-
+
| <code>FRecvData:TTCPRecvBuffer;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>procedure SetBackLog(ABackLog:Integer);</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetListener(AListener:TProtocolSocket);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property BackLog:Integer read FBackLog write SetBackLog;</code>
+
| &nbsp;
+
|-
+
| <code>property Listener:TProtocolSocket read FListener write SetListener;</code>
+
| &nbsp;
+
|-
+
| <code>property AcceptQueue:TSocketList read FAcceptQueue;</code>
+
| &nbsp;
+
|-
+
| <code>property ReceiveQueue:TSocketList read FReceiveQueue;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property SendData:TTCPSendBuffer read FSendData;</code>
+
| &nbsp;
+
|-
+
| <code>property RecvData:TTCPRecvBuffer read FRecvData;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetOption(ALevel,AOptName:Integer; AOptValue:PChar; var AOptLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function SetOption(ALevel,AOptName:Integer; AOptValue:PChar; AOptLength:Integer):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function IoCtl(ACommand:DWORD; var AArgument:u_long):Integer; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function IsConnected(ALocalAddress,ARemoteAddress:Pointer; ALocalPort,ARemotePort:Word; ABroadcast:Boolean):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function IsListening(ALocalAddress,ARemoteAddress:Pointer; ALocalPort,ARemotePort:Word; ABroadcast:Boolean):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Listen:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function Connect:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function Reconnect:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function Disconnect:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Accept(APeek,ALock:Boolean; AState:LongWord):TTCPSocket;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function RecvSegment(ASequence,AAcknowledge:LongWord; AWindow,AUrgent:Word; AFlags:Byte; AData:Pointer; ASize:Word):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function SendSegment(var ASequence,AAcknowledge:LongWord; var AWindow,AUrgent:Word; var AFlags:Byte; var AData:Pointer; var ASize:Word):Boolean;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''TCP state'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TTCPState = class(TProtocolState)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create;</code>
+
| [[TTCPState|<code>TTCPState = class(TProtocolState)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FState:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>procedure SetState(AState:LongWord);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetListening:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetListening(AValue:Boolean);</code>
+
| &nbsp;
+
|-
+
| <code>function GetEstablished:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetEstablished(AValue:Boolean);</code>
+
| &nbsp;
+
|-
+
| <code>function GetClosed:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetClosed(AValue:Boolean);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSynchronized:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property State:LongWord read FState write SetState;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Listening:Boolean read GetListening write SetListening;</code>
+
| &nbsp;
+
|-
+
| <code>property Established:Boolean read GetEstablished write SetEstablished;</code>
+
| &nbsp;
+
|-
+
| <code>property Closed:Boolean read GetClosed write SetClosed;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Synchronized:Boolean read GetSynchronized;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''TCP options'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TTCPOptions = class(TProtocolOptions)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|Note: For Get/Set Options Level = TCP_PROTO Option = TCP_NODELAY, TCP_MAXSEG etc
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>constructor Create;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FMemory:TMemoryStream;</code>
+
| &nbsp;
+
|-
+
| <code>FOptions:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FMaxSeg:Word;</code>
+
| MSS Option in TCP Header (MSS we send to Remote)
+
|-
+
| <code>FWindowScale:Byte;</code>
+
| Window Scale Option in TCP Header (Window Scale we send to Remote)
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>procedure SetMaxSeg(AMaxSeg:Word);</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetWindowScale(AWindowScale:Byte);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetOptions:Pointer;</code>
+
| &nbsp;
+
|-
+
| <code>function GetNoDelay:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetNoDelay(ANoDelay:Boolean);</code>
+
| &nbsp;
+
|-
+
| <code>function GetNoPush:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetNoPush(ANoPush:Boolean);</code>
+
| &nbsp;
+
|-
+
| <code>function GetNoOpt:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetNoOpt(ANoOpt:Boolean);</code>
+
| &nbsp;
+
|-
+
| <code>function GetBsdUrgent:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetBsdUrgent(ABsdUrgent:Boolean);</code>
+
| &nbsp;
+
|-
+
| <code>function GetNoSack:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetNoSack(ANoSack:Boolean);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property MaxSeg:Word read FMaxSeg write SetMaxSeg;</code>
+
| &nbsp;
+
|-
+
| <code>property WindowScale:Byte read FWindowScale write SetWindowScale;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Options:Pointer read GetOptions;</code>
+
| &nbsp;
+
|-
+
| <code>property NoDelay:Boolean read GetNoDelay write SetNoDelay;</code>
+
| Determines if we Delay small segments until previous sends are ACKed
+
|-
+
| <code>property NoPush:Boolean read GetNoPush write SetNoPush;</code>
+
| &nbsp;
+
|-
+
| <code>property NoOpt:Boolean read GetNoOpt write SetNoOpt;</code>
+
| &nbsp;
+
|-
+
| <code>property BsdUrgent:Boolean read GetBsdUrgent write SetBsdUrgent;</code>
+
| &nbsp;
+
 
|-
 
|-
| <code>property NoSack:Boolean read GetNoSack write SetNoSack;</code>
+
| [[TTCPOptions|<code>TTCPOptions = class(TProtocolOptions)</code>]]
| Determines if we send SACKOK to Remote
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''TCP send buffer'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TTCPSendBuffer = class(TSocketBuffer)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ASocket:TTransportSocket);</code>
+
| [[TTCPSendBuffer|<code>TTCPSendBuffer = class(TSocketBuffer)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FFirst:PTCPSegment;</code>
+
| Pointer to First Segment
+
|-
+
| <code>FLast:PTCPSegment;</code>
+
| Pointer to Last Segment
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddSegment(ASequence:LongWord; AFlags:Byte; ASize:Word):PTCPSegment;</code>
+
| &nbsp;
+
|-
+
| <code>function RemoveSegment(ASegment:PTCPSegment):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure FlushSegments(All:Boolean);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>procedure SetSize(ASize:LongWord); override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>StartSequence:LongWord;</code>
+
| Initial Sequence number of Local (ISS)
+
|-
+
| <code>NextSequence:LongWord;</code>
+
| Next Sequence number to Send (SND.NXT
+
|-
+
| <code>LastSequence:LongWord;</code>
+
| Last Sequence number in Buffer
+
|-
+
| <code>LastAcknowledge:LongWord;</code>
+
| Last Acknowledged number from Remote (SND.UNA)
+
Note: LastAcknowledge is the NextSequence that Remote expects to Receive or the first Unacknowledged Sequence number. If LastAcknowledge equals NextSequence all segments have been Acknowledged LastSequence is the last sequence in our buffer to send. If NextSequence equals LastSequence there is no more data to send.
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>UrgentPointer:LongWord;</code>
+
| (SND.UP)
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>MaxSeg:Word;</code>
+
| Remote Max Segment Size (Learned from Remote)
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>WindowSize:LongWord;</code>
+
| Remote Window Size (SND.WND)
+
|-
+
| <code>WindowScale:Byte;</code>
+
| Remote Window Scale
+
|-
+
| <code>WindowTimeout:Int64;</code>
+
| Timeout for probing small/zero Window
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>CongestionWindow:Word;</code>
+
| Slow Start Window Size
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>SynSequence:LongWord;</code>
+
| Sequence number of our SYN
+
|-
+
| <code>FinSequence:LongWord;</code>
+
| Sequence number of our FIN
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>WindowSequence:LongWord;</code>
+
| Sequence number of last Window update (SND.WL1)
+
|-
+
| <code>WindowAcknowledge:LongWord;</code>
+
| Acknowledge number of last Window update (SND.WL2)
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>NoPush:Boolean;</code>
+
| Disable Push on final segment
+
|-
+
| <code>NoSack:Boolean;</code>
+
| Selective Ack not in use
+
|-
+
| <code>NoNagle:Boolean;</code>
+
| Nagle not in use
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>VjSa:LongWord;</code>
+
| VJ's alg, standard average
+
|-
+
| <code>VjSd:LongWord;</code>
+
| VJ's alg, standard deviation
+
|-
+
| <code>VjLast:LongWord;</code>
+
| VJ's alg, last transmit time
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CheckIdle:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SynAcknowledged:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function FinAcknowledged:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function TestAcknowledge(AAcknowledge:LongWord):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function CheckAcknowledge(AAcknowledge:LongWord):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ValidateAcknowledge(AAcknowledge:LongWord):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function WriteData(var ABuffer; ASize,AFlags:Integer):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Finish:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function Synchronize:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ReadSegment(var ASequence:LongWord; var AUrgent:Word; var AFlags:Byte; var AData:Pointer; var ASize:Word; AForce:Boolean):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function AcknowledgeSegments(ASequence,AAcknowledge:LongWord; AWindow:Word):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function TimestampSegment(AOptions:Pointer; var AOffset:Word):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function SelectiveAckSegments(AOptions:Pointer; var AOffset:Word; ASize:Byte):Boolean;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''TCP receive buffer'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TTCPRecvBuffer = class(TSocketBuffer)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ASocket:TTransportSocket);</code>
+
| [[TTCPRecvBuffer|<code>TTCPRecvBuffer = class(TSocketBuffer)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FUrgent:LongWord;</code>
+
| Number of OOB bytes readable from Buffer
+
|-
+
| <code>FAvailable:LongWord;</code>
+
| Number of bytes readable from Buffer
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FFirst:PTCPSegment;</code>
+
| Pointer to First Segment
+
|-
+
| <code>FLast:PTCPSegment;</code>
+
| Pointer to Last Segment
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function DelayOverride(ASegment:PTCPSegment):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSegment(ASequence:LongWord; ALength:Word):PTCPSegment;</code>
+
| &nbsp;
+
|-
+
| <code>function GetPrevious(ASequence:LongWord; ALength:Word):PTCPSegment;</code>
+
| &nbsp;
+
|-
+
| <code>function GetOverlapped(ASequence:LongWord; ALength:Word):PTCPSegment;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddSegment(APrev:PTCPSegment; ASequence:LongWord; AFlags:Byte; ASize:Word):PTCPSegment;</code>
+
| &nbsp;
+
|-
+
| <code>function RemoveSegment(ASegment:PTCPSegment):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>procedure FlushSegments(All:Boolean);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>procedure SetSize(ASize:LongWord); override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>StartSequence:LongWord;</code>
+
| Initial Sequence number of Remote (IRS)
+
|-
+
| <code>NextSequence:LongWord;</code>
+
| Next Sequence number to Receive (RCV.NXT)
+
|-
+
| <code>LastSequence:LongWord;</code>
+
| Last Sequence number in Buffer (Including Unacknowledged data)
+
|-
+
| <code>LastAcknowledge:LongWord;</code>
+
| Last Acknowledged number to Remote
+
Note: NextSequence is the next byte we expect to Receive from Remote. LastAcknowledge will be the first Unacknowledged Seqeunce number of the Remote. LastSequence is the last sequence we have received from the Remote. If NextSequence equals LastSequence and LastAcknowledge equals NextSequence all segments have been Acknowledged.
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>UrgentPointer:LongWord;</code>
+
| (RCV.UP)
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>MaxSeg:Word;</code>
+
| Local Max Segment Size
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>WindowSize:LongWord;</code>
+
| Local Window Size (RCV.WND)
+
|-
+
| <code>WindowScale:Byte;</code>
+
| Local Window Scale
+
|-
+
| <code>LastWindow:LongWord;</code>
+
| Last Window value sent to Remote
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>SynSequence:LongWord;</code>
+
| Sequence number of remote SYN
+
|-
+
| <code>FinSequence:LongWord;</code>
+
| Sequence number of remote FIN
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>NoSack:Boolean;</code>
+
| Selective Ack not in use
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CheckIdle:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetUrgent:LongWord;</code>
+
| &nbsp;
+
|-
+
| <code>function GetAvailable:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SynReceived:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function FinReceived:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CheckSequence(ASequence:LongWord; ASize:Word):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ReadData(var ABuffer; var ASize:Integer; AFlags:Integer):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function WriteSegment(ASequence:LongWord; AUrgent:Word; AFlags:Byte; AData:Pointer; ASize:Word):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function AcknowledgeSegments(var AAcknowledge:LongWord; var AWindow:Word; AForce:Boolean):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function TimestampSegment(AOptions:Pointer; var AOffset:Word):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function SelectiveAckSegments(AOptions:Pointer; var AOffset:Word):Boolean;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div> 
 
 
<br />
 
<br />
  
Line 1,277: Line 467:
 
<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;"
|-
+
|-https://ultibo.org/wiki/Unit_Sockets#
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,293: Line 483:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Buffer'''
+
! Buffer
 
| The complete packet including Transport header
 
| The complete packet including Transport header
 
|-
 
|-
Line 1,305: Line 495:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Buffer'''
+
! Buffer
 
| The complete packet including Transport header
 
| The complete packet including Transport header
 
|-
 
|-
Line 1,317: Line 507:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Buffer'''
+
! Buffer
 
| The complete packet including Transport header
 
| The complete packet including Transport header
 
|-
 
|-
Line 1,329: Line 519:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Buffer'''
+
! Buffer
 
| The complete packet including Transport header
 
| The complete packet including Transport header
 
|-
 
|-
Line 1,341: Line 531:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Buffer'''
+
! Buffer
 
| The complete packet including Transport header
 
| The complete packet including Transport header
 
|-
 
|-
Line 1,353: Line 543:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Buffer'''
+
! Buffer
 
| The complete packet including Transport header
 
| The complete packet including Transport header
 
|-
 
|-
Line 1,365: Line 555:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,377: Line 567:
 
{| 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 01:38, 30 May 2018

Return to Unit Reference


Description


Ultibo TCP (Transmission Control Protocol) unit

Notes:

Segment handling:

Send adds new segments to the end of the list only accepts ACKs for whole segments.

Recv adds/inserts segments in correct SEQ order accepts overlapping segments only sends ACKs for whole segments.

Send will coalesce small data writes into larger segments if options allow this.

Recv will store the segments exactly as received.


TCP Send and Recv do not use a block buffer as per UDP etc. Instead the data for each Segment is stored in memory (TCP_MAX_MSS) allocated with the Segment. The Free and Used values still track the amount of data in the buffer but this method allows OOB data to be handled correctly.

TCP Sequence numbers are compared using modulo 2^32 arithmetic. The following calculations provide the necessary handling of wraparound etc.

LT = (A - B) < 0

LEQ = (A - B) <= 0

GT = (A - B) > 0

GEQ = (A - B) >= 0


See GlobalSock.pas for actual functions that implement this.

Constants



TCP specific constants TCP_*
Note: Some TCP definitions are in the Protocol or IP modules
 
TCP_PROTOCOL_NAME = 'TCP';  
 
TCP_TIMER_INTERVAL = 1; 1ms timer interval for TCP
 
MIN_TCP_PACKET = 20; Not Counting Adapter and Transport Header
MAX_TCP_PACKET = 1480; Not Counting Adapter and Transport Header
 
TCP_DEFAULT_MSS = 536; Default Segment Size for TCP (576 - TCP - IP)
TCP_MAX_MSS = 1460; Max Segment Size for TCP (1500 - TCP - IP)
 
TCP_MAX_LIFETIME = 120000; Max Segment Lifetime (2 minutes)
 
TCP_TIMEOUT = 0; Wait forever on a TCP Read/Write
TCP_BUFFER_SIZE = 262144; 65536; TCP Send/Receive Buffer Sizes
TCP_WINDOW_SIZE = 64240; Sliding Window Receive Size (44 x MSS)
TCP_INITIAL_WINDOW = 8192; Initial Window to advertise in SYN packet
 
TCP_TIMEOUT_OFFSET = 10; How much time offset to allow from the designated value
 
TCP_ADVERT_TIMEOUT = 100; Time to wait before sending a window size update after closing the receive window
 
TCP_WINDOW_TIMEOUT = 5000; Time to wait before probing small/zero Window
TCP_ACK_TIMEOUT = 200; Max Delayed Ack Time
 
TCP_CONNECT_COUNT = 3; Number of Connect retries (on RST) before Failure
TCP_RESTART_TIMEOUT = 400; Timeout between Connect retries (Milliseconds)
 
TCP_RETRY_COUNT = 10; Number of Retransmits before Reset
 
TCP_RETRY_TIMEOUT:array[1..TCP_RETRY_COUNT] of LongWord = (250,500,1000,2000,4000,8000,15000,30000,60000,120000);
 
TCP_KEEPALIVE_COUNT = 3; Number of Failed Keepalives before Reset
 
TCP_KEEPALIVE_TIMEOUT:array[1..TCP_KEEPALIVE_COUNT] of LongWord = (600000,60000,60000);
 
TCP_MAX_PORT = 65536;  
 
TCP_HEADER_SIZE = 20; SizeOf(TTCPHeader) Does Not Allow for Options
TCP_OPTIONS_SIZE = 40; Maximum Allowed Options
 
TCP_SEGMENT_SIZE = 68; SizeOf(TTCPSegment) Including TSocketTimerItem


TCP socket state TCP_STATE_*
TCP_STATE_LISTEN = 0; listening for connection
TCP_STATE_SYNSENT = 1; SYN sent, active open
TCP_STATE_SYNREC = 2; SYN received, SYNACK sent
TCP_STATE_ESTAB = 3; established
TCP_STATE_FINWAIT1 = 4; sent FIN
TCP_STATE_FINWAIT2 = 5; sent FIN, received FINACK
TCP_STATE_CLOSWAIT = 6; received FIN waiting for close
TCP_STATE_CLOSING = 7; sent FIN, received FIN (waiting for FINACK)
TCP_STATE_LASTACK = 8; FIN received, FINACK + FIN sent
TCP_STATE_TIMEWAIT = 9; dally after sending final FINACK
TCP_STATE_CLOSED = 10; FINACK received


TCP header option TCPOPT_*
TCPOPT_EOL = 0; end-of-option list
TCPOPT_NOP = 1; no-operation
TCPOPT_MAXSEG = 2; maximum segment size
TCPOPT_WINDOW = 3; window scale factor (rfc1072)
TCPOPT_SACKOK = 4; selective ack ok (rfc1072)
TCPOPT_SACK = 5; selective ack (rfc1072)
TCPOPT_ECHO = 6; echo (rfc1072)
TCPOPT_ECHOREPLY = 7; echo (rfc1072)
TCPOPT_TIMESTAMP = 8; timestamps (rfc1323)
TCPOPT_CC = 11; T/TCP CC options (rfc1644)
TCPOPT_CCNEW = 12; T/TCP CC options (rfc1644)
TCPOPT_CCECHO = 13; T/TCP CC options (rfc1644)


TCP header flag TCP_FLAG_*
TCP_FLAG_FIN = $01;  
TCP_FLAG_SYN = $02;  
TCP_FLAG_RST = $04;  
TCP_FLAG_PUSH = $08;  
TCP_FLAG_ACK = $10;  
TCP_FLAG_URG = $20;  
TCP_FLAG_MASK = $3F;  
 
Van Jacobson's Algorithm; max std. average and std. deviation
MAX_VJSA = 80000;  
MAX_VJSD = 20000;  
INIT_VJSA = 220;  


TCP port TCP_PORT_*
TCP_PORT_START = 49152; First dynamic port (Previously 1024) As per IANA assignment
TCP_PORT_STOP = 65534; Last dynamic port (Previously 5000) Short of IANA assignment to allow for rollover


Type definitions



TCP header

PTCPHeader = ^TTCPHeader;

TTCPHeader = packed record

Note: Some TCP definitions are in the Protocol or IP modules
Note: 20 Bytes unless TCP Options are added
SourcePort:Word; Network Order
DestPort:Word; Network Order
Sequence:LongWord; First Sequence number in Data
Acknowledge:LongWord; Next Sequence number expected
HeaderLength:Byte; Number of 32 bit words in Header and Options (Bits 4-7 Reserved)
Flags:Byte; Flags for TCP Control (Bits 1-2 Reserved)
WindowSize:Word; Max 65536 (See WindowScale for higher values)
Checksum:Word; As per standard (Header, Options and Data)
Urgent:Word;  

TCP segment

PTCPSegment = ^TTCPSegment;

TTCPSegment = record

Note: 48 Bytes (Used by TCPSendBuffer/TCPRecvBuffer)
Size:Word; Size of Segment Data (Can be zero)
Data:Pointer; Pointer to Data in Buffer (Can be nil)
FirstSequence:LongWord; Start Sequence of Data
LastSequence:LongWord; End Sequence of Data (including Control bits)(actually the Start Sequence of next Segment)
 
Control:Word; Control Bits on this segment (SYN/FIN/URG) (Send/Recv)
Transferred:WordBool; Data has been Transferred to/from Buffer (Send/Recv)
Acknowledged:WordBool; Data has been Acknowledged (Send/Recv)
SelectiveAck:WordBool; Data has been Selective Acknowledged (Send/Recv)
RoundTripTime:Int64;  
 
Count:Word; Transmit Count (Send)
Timeout:Int64; Transmit (Send)/Acknowledge (Recv) Timeout
Prev:PTCPSegment; Pointer to Prev Segment
Next:PTCPSegment; Pointer to Next Segment
 
Item:TSocketTimerItem; Socket Timer Item for this Segment


Class definitions



TCP specific classes

TTCPProtocolTransport = class(TProtocolTransport)
TTCPProtocol = class(TNetworkProtocol)
TTCPSocket = class(TProtocolSocket)
TTCPState = class(TProtocolState)
TTCPOptions = class(TProtocolOptions)
TTCPSendBuffer = class(TSocketBuffer)
TTCPRecvBuffer = class(TSocketBuffer)


Public variables


None defined

Function declarations



Initialization functions

procedure TCPInit;
Description: To be documented
Note None documented


TCP functions

function CheckTCP(AFamily:Word; ABuffer:Pointer):Boolean;
Description: Verify that the packet is a valid TCP packet
Buffer The complete packet including Transport header


function GetTCPHeaderOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
Buffer The complete packet including Transport header


function GetTCPHeaderLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
Buffer The complete packet including Transport header


function GetTCPOptionsLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
Buffer The complete packet including Transport header


function GetTCPDataOffset(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
Buffer The complete packet including Transport header


function GetTCPDataLength(AFamily:Word; ABuffer:Pointer):Word;
Description: To be documented
Buffer The complete packet including Transport header


function ChecksumTCPRecv(AFamily:Word; APseudo:PIPPseudo; ABuffer:Pointer; AOffset,ALength:Word):Word;
Description: Validate the Checksum of TCP Pseudo, Header and Data on Receive
Note None documented


function ChecksumTCPSend(AFamily:Word; APseudo:PIPPseudo; AHeader:PTCPHeader; AOptions,AData:Pointer; AOptionsLength,ADataLength:Word):Word;
Description: Checksum the TCP Pseudo, Header, Options and Data on Send
Note None documented


Return to Unit Reference