Unit IGMP - Ultibo.org

Return to Unit Reference

Description


Ultibo IGMP (Internet Group Management Protocol) unit

Constants


IGMP protocol IGMP_PROTOCOL_*

Note: Some IGMP definitions are in the Protocol or IP modules
 
IGMP_PROTOCOL_NAME = 'IGMP';  

IGMP specific constants IGMP_*

IGMP_TIMEOUT = 0; Wait forever on a IGMP Read
IGMP_BUFFER_SIZE = 65536; IGMP Receive Buffer Size
 
IGMP_HEADER_SIZE = 8; SizeOf(TIGMPHeader);
 
IGMP_PACKET_SIZE = 8; SizeOf(TIGMPPacket)
 
IGMP_QUERY_TIMEOUT = 5000;  
IGMP_REPORT_TIMEOUT = 5000;  
 
IGMP_TRANSMIT_COUNT = 3;  

Type definitions



IGMP header

PIGMPHeader = ^TIGMPHeader;

TIGMPHeader = packed record

Note: Some IGMP definitions are in the Protocol or IP modules
IGMPType:Byte; type of IGMP message
RespTime:Byte; Query only otherwise 0 (Always zero in Version 1 (Assume 100))
Checksum:Word; 1s Compliment IP-style checksum
Address:TInAddr; group address being reported or queried (zero for "General" queries)

IGMP packet

PIGMPPacket = ^TIGMPPacket;

TIGMPPacket = record

Note: 8 Bytes (Used by IGMPBuffer)
Size:LongWord; LongWord to keep size even
Next:PIGMPPacket; Followed by RemoteAddress (4 or 16 Bytes)

Class definitions



IGMP specific classes

Public variables


None defined

Function declarations



Initialization functions

procedure IGMPInit;

Description: To be documented

IGMP functions

function CheckIGMP(AFamily:Word; ABuffer:Pointer):Boolean;

Description: Verify that the packet is a valid IGMP packet

Buffer The complete packet including Transport header
function GetIGMPHeaderOffset(AFamily:Word; ABuffer:Pointer):Word;

Description: To be documented

Buffer The complete packet including Transport header
function GetIGMPHeaderLength(AFamily:Word; ABuffer:Pointer):Word;

Description: To be documented

Buffer The complete packet including Transport header
function GetIGMPDataOffset(AFamily:Word; ABuffer:Pointer):Word;

Description: To be documented

Buffer The complete packet including Transport header
function GetIGMPDataLength(AFamily:Word; ABuffer:Pointer):Word;

Description: To be documented

Buffer The complete packet including Transport header
function ChecksumIGMP(AFamily:Word; ABuffer:Pointer; AOffset,ALength:Word):Word;

Description: Checksum the IGMP Header on Send/Validate the Checksum on Receive

Note Checksum is calculated on the whole packet (Header and Data)

Return to Unit Reference