TIP6Buffer

From Ultibo.org
Revision as of 04:54, 22 May 2018 by Ultibo (Talk | contribs) (Created page with "Return to Unit IPv6 __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collapse...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Return to Unit IPv6


Description


To be documented

Class definitions



TIP6Buffer = class(TTransportBufferEx)

Note: Different to Socket Buffer.
 
constructor Create(ATransport:TNetworkTransport);  
destructor Destroy; override;  
private
FFirst:PIP6Packet;  
FLast:PIP6Packet;  
 
function GetFragment(APacket:PIP6Packet; AOffset:LongWord; ASize:Word):PIP6Fragment;  
function AddFragment(APacket:PIP6Packet; AOffset:LongWord; ASize:Word):PIP6Fragment;  
function RemoveFragment(APacket:PIP6Packet):Boolean;  
procedure FlushFragments(APacket:PIP6Packet);  
public
function GetPacket(AId:LongWord; const ASource,ADest:TIn6Addr; ALock:Boolean):PIP6Packet;  
function AddPacket(AId:LongWord; const ASource,ADest:TIn6Addr; ALock:Boolean):PIP6Packet;  
function RemovePacket(APacket:PIP6Packet):Boolean;  
function UnlockPacket(APacket:PIP6Packet):Boolean;  
procedure FlushPackets(All:Boolean);  
 
function PutHeader(APacket:PIP6Packet; ABuffer:Pointer; ALength:Word):Boolean;  
function PutFragment(APacket:PIP6Packet; ABuffer:Pointer; AOffset,ASize,AFlags:Word):Boolean;  


Function declarations



constructor TIP6Buffer.Create(ATransport:TNetworkTransport);
Description: To be documented
Note None documented


destructor TIP6Buffer.Destroy;
Description: To be documented
Note None documented


function TIP6Buffer.GetFragment(APacket:PIP6Packet; AOffset:LongWord; ASize:Word):PIP6Fragment;
Description: Gets the Fragment with matching Offset and Size if any
Note Caller must hold the Packet lock


function TIP6Buffer.AddFragment(APacket:PIP6Packet; AOffset:LongWord; ASize:Word):PIP6Fragment;
Description: Adds a new Fragment as the Last fragment in the Packet
Note Caller must hold the Packet lock


function TIP6Buffer.RemoveFragment(APacket:PIP6Packet):Boolean;
Description: Removes the First fragment from the Packet
Note Caller must hold the Packet lock


procedure TIP6Buffer.FlushFragments(APacket:PIP6Packet);
Description: Removes all fragments from the Packet
Note Caller must hold the Packet lock


function TIP6Buffer.GetPacket(AId:LongWord; const ASource,ADest:TIn6Addr; ALock:Boolean):PIP6Packet;
Description: Gets the Packet with matching Id, Source and Dest if any
Note None documented


function TIP6Buffer.AddPacket(AId:LongWord; const ASource,ADest:TIn6Addr; ALock:Boolean):PIP6Packet;
Description: Adds a new Packet as the Last packet in the Buffer
Note None documented


function TIP6Buffer.RemovePacket(APacket:PIP6Packet):Boolean;
Description: Removes the Packet from the Buffer and release the memory
Note None documented


function TIP6Buffer.UnlockPacket(APacket:PIP6Packet):Boolean;
Description: Unlock the Packet previously locked by GetPacket or AddPacket
Note None documented


procedure TIP6Buffer.FlushPackets(All:Boolean);
Description: Removes either all packets or packets which have expired
Note None documented


function TIP6Buffer.PutHeader(APacket:PIP6Packet; ABuffer:Pointer; ALength:Word):Boolean;
Description: Copies the Packet header from the Buffer to the Packet
Note Caller must hold the Packet lock


function TIP6Buffer.PutFragment(APacket:PIP6Packet; ABuffer:Pointer; AOffset,ASize,AFlags:Word):Boolean;
Description: Creates a new Fragment and copies the data from the Buffer to the Packet
Note Caller must hold the Packet lock


Return to Unit Reference