Difference between revisions of "Unit IGMP"
From Ultibo.org
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...") |
|||
(19 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '' | + | '''Ultibo IGMP (Internet Group Management Protocol) unit''' |
=== Constants === | === Constants === | ||
---- | ---- | ||
− | '' | + | |
+ | <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 protocol''' <code> IGMP_PROTOCOL_* </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 IGMP definitions are in the Protocol or IP modules | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>IGMP_PROTOCOL_NAME = 'IGMP';</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''IGMP specific constants''' <code> IGMP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>IGMP_TIMEOUT = 0;</code> | ||
+ | | Wait forever on a IGMP Read | ||
+ | |- | ||
+ | | <code>IGMP_BUFFER_SIZE = 65536;</code> | ||
+ | | IGMP Receive Buffer Size | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>IGMP_HEADER_SIZE = 8;</code> | ||
+ | | SizeOf(TIGMPHeader); | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>IGMP_PACKET_SIZE = 8;</code> | ||
+ | | SizeOf(TIGMPPacket) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>IGMP_QUERY_TIMEOUT = 5000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IGMP_REPORT_TIMEOUT = 5000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>IGMP_TRANSMIT_COUNT = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | '' | + | |
+ | '''IGMP header''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PIGMPHeader = ^TIGMPHeader;</code> | ||
+ | |||
+ | <code>TIGMPHeader = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | Note: Some IGMP definitions are in the Protocol or IP modules | ||
+ | |- | ||
+ | | <code>IGMPType:Byte;</code> | ||
+ | | type of IGMP message | ||
+ | |- | ||
+ | | <code>RespTime:Byte;</code> | ||
+ | | Query only otherwise 0 (Always zero in Version 1 (Assume 100)) | ||
+ | |- | ||
+ | | <code>Checksum:Word;</code> | ||
+ | | 1s Compliment IP-style checksum | ||
+ | |- | ||
+ | | <code>Address:TInAddr;</code> | ||
+ | | group address being reported or queried (zero for "General" queries) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''IGMP packet''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PIGMPPacket = ^TIGMPPacket;</code> | ||
+ | |||
+ | <code>TIGMPPacket = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: 8 Bytes (Used by IGMPBuffer) | ||
+ | |- | ||
+ | | <code>Size:LongWord;</code> | ||
+ | | LongWord to keep size even | ||
+ | |- | ||
+ | | <code>Next:PIGMPPacket;</code> | ||
+ | | Followed by RemoteAddress (4 or 16 Bytes) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | === Class definitions === | ||
+ | ---- | ||
+ | |||
+ | |||
+ | '''IGMP specific classes''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TIGMPProtocolTransport|<code>TIGMPProtocolTransport = class(TProtocolTransport)</code>]] | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TIGMPProtocol|<code>TIGMPProtocol = class(TNetworkProtocol)</code>]] | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TIGMPGroup|<code>TIGMPGroup = class(TListObject)</code>]] | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TIGMPSocket|<code>TIGMPSocket = class(TProtocolSocket)</code>]] | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | [[TIGMPBuffer|<code>TIGMPBuffer = class(TSocketBuffer)</code>]] | ||
+ | |- | ||
+ | |} | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
---- | ---- | ||
− | '' | + | ''None defined'' |
=== Function declarations === | === Function declarations === | ||
---- | ---- | ||
− | |||
+ | '''Initialization functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure IGMPInit;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''IGMP functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function CheckIGMP(AFamily:Word; ABuffer:Pointer):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Verify that the packet is a valid IGMP packet</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | The complete packet including Transport header | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function GetIGMPHeaderOffset(AFamily:Word; ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | The complete packet including Transport header | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function GetIGMPHeaderLength(AFamily:Word; ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | The complete packet including Transport header | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function GetIGMPDataOffset(AFamily:Word; ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | The complete packet including Transport header | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function GetIGMPDataLength(AFamily:Word; ABuffer:Pointer):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | The complete packet including Transport header | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ChecksumIGMP(AFamily:Word; ABuffer:Pointer; AOffset,ALength:Word):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Checksum the IGMP Header on Send/Validate the Checksum on Receive</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Checksum is calculated on the whole packet (Header and Data) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
Return to [[Unit_Reference|Unit Reference]] | Return to [[Unit_Reference|Unit Reference]] |
Latest revision as of 05:24, 31 August 2021
Return to Unit Reference
Contents
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
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
TIGMPProtocolTransport = class(TProtocolTransport)
|
TIGMPProtocol = class(TNetworkProtocol)
|
TIGMPGroup = class(TListObject)
|
TIGMPSocket = class(TProtocolSocket)
|
TIGMPBuffer = class(TSocketBuffer)
|
Public variables
None defined
Function declarations
Initialization functions
procedure IGMPInit;
Description: To be documented
Note | None 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