TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip4Igmp.h File Reference

Go to the source code of this file.

Data Structures

struct  IGMP_HEAD
 
struct  IGMP_GROUP
 
struct  IGMP_SERVICE_DATA
 

Macros

#define IGMP_MEMBERSHIP_QUERY   0x11
 
#define IGMP_V1_MEMBERSHIP_REPORT   0x12
 
#define IGMP_V2_MEMBERSHIP_REPORT   0x16
 
#define IGMP_LEAVE_GROUP   0x17
 
#define IGMP_V1ROUTER_PRESENT   400
 
#define IGMP_UNSOLICIATED_REPORT   10
 

Functions

EFI_STATUS Ip4InitIgmp (IN OUT IP4_SERVICE *IpSb)
 
EFI_STATUS Ip4JoinGroup (IN IP4_PROTOCOL *IpInstance, IN IP4_ADDR Address)
 
EFI_STATUS Ip4LeaveGroup (IN IP4_PROTOCOL *IpInstance, IN IP4_ADDR Address)
 
EFI_STATUS Ip4IgmpHandle (IN IP4_SERVICE *IpSb, IN IP4_HEAD *Head, IN NET_BUF *Packet)
 
VOID Ip4IgmpTicking (IN IP4_SERVICE *IpSb)
 
IP4_ADDR * Ip4CombineGroups (IN IP4_ADDR *Source, IN UINT32 Count, IN IP4_ADDR Addr)
 
INTN Ip4RemoveGroupAddr (IN OUT IP4_ADDR *Groups, IN UINT32 Count, IN IP4_ADDR Addr)
 
IGMP_GROUPIp4FindGroup (IN IGMP_SERVICE_DATA *IgmpCtrl, IN IP4_ADDR Address)
 

Detailed Description

Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Ip4Igmp.h.

Macro Definition Documentation

◆ IGMP_LEAVE_GROUP

#define IGMP_LEAVE_GROUP   0x17

Definition at line 17 of file Ip4Igmp.h.

◆ IGMP_MEMBERSHIP_QUERY

#define IGMP_MEMBERSHIP_QUERY   0x11

Definition at line 14 of file Ip4Igmp.h.

◆ IGMP_UNSOLICIATED_REPORT

#define IGMP_UNSOLICIATED_REPORT   10

Definition at line 20 of file Ip4Igmp.h.

◆ IGMP_V1_MEMBERSHIP_REPORT

#define IGMP_V1_MEMBERSHIP_REPORT   0x12

Definition at line 15 of file Ip4Igmp.h.

◆ IGMP_V1ROUTER_PRESENT

#define IGMP_V1ROUTER_PRESENT   400

Definition at line 19 of file Ip4Igmp.h.

◆ IGMP_V2_MEMBERSHIP_REPORT

#define IGMP_V2_MEMBERSHIP_REPORT   0x16

Definition at line 16 of file Ip4Igmp.h.

Function Documentation

◆ Ip4CombineGroups()

IP4_ADDR * Ip4CombineGroups ( IN IP4_ADDR *  Source,
IN UINT32  Count,
IN IP4_ADDR  Addr 
)

Add a group address to the array of group addresses. The caller should make sure that no duplicated address existed in the array. Although the function doesn't assume the byte order of the both Source and Addr, the network byte order is used by the caller.

Parameters
[in]SourceThe array of group addresses to add to.
[in]CountThe number of group addresses in the Source.
[in]AddrThe IP4 multicast address to add.
Returns
NULL if failed to allocate memory for the new groups, otherwise the new combined group addresses.

Definition at line 549 of file Ip4Igmp.c.

◆ Ip4FindGroup()

IGMP_GROUP * Ip4FindGroup ( IN IGMP_SERVICE_DATA IgmpCtrl,
IN IP4_ADDR  Address 
)

Find the IGMP_GROUP structure which contains the status of multicast group Address in this IGMP control block

Parameters
[in]IgmpCtrlThe IGMP control block to search from.
[in]AddressThe multicast address to search.
Returns
NULL if the multicast address isn't in the IGMP control block. Otherwise the point to the IGMP_GROUP which contains the status of multicast group for Address.

Definition at line 89 of file Ip4Igmp.c.

◆ Ip4IgmpHandle()

EFI_STATUS Ip4IgmpHandle ( IN IP4_SERVICE IpSb,
IN IP4_HEAD Head,
IN NET_BUF Packet 
)

Handle the received IGMP message for the IP4 service instance.

Parameters
[in]IpSbThe IP4 service instance that received the message.
[in]HeadThe IP4 header of the received message.
[in]PacketThe IGMP message, without IP4 header.
Return values
EFI_INVALID_PARAMETERThe IGMP message is malformatted.
EFI_SUCCESSThe IGMP message is successfully processed.

Definition at line 401 of file Ip4Igmp.c.

◆ Ip4IgmpTicking()

VOID Ip4IgmpTicking ( IN IP4_SERVICE IpSb)

The periodical timer function for IGMP. It does the following things:

  1. Decrease the Igmpv1QuerySeen to make it possible to refresh the IGMP server type.
  2. Decrease the report timer for each IGMP group in "delaying member" state.
Parameters
[in]IpSbThe IP4 service instance that is ticking.

Definition at line 501 of file Ip4Igmp.c.

◆ Ip4InitIgmp()

EFI_STATUS Ip4InitIgmp ( IN OUT IP4_SERVICE IpSb)

Init the IGMP control data of the IP4 service instance, configure MNP to receive ALL SYSTEM multicast.

Parameters
[in,out]IpSbThe IP4 service whose IGMP is to be initialized.
Return values
EFI_SUCCESSIGMP of the IpSb is successfully initialized.
EFI_OUT_OF_RESOURCESFailed to allocate resource to initialize IGMP.
OthersFailed to initialize the IGMP of IpSb.

Definition at line 29 of file Ip4Igmp.c.

◆ Ip4JoinGroup()

EFI_STATUS Ip4JoinGroup ( IN IP4_PROTOCOL IpInstance,
IN IP4_ADDR  Address 
)

Join the multicast group on behalf of this IP4 child

Parameters
[in]IpInstanceThe IP4 child that wants to join the group.
[in]AddressThe group to join.
Return values
EFI_SUCCESSSuccessfully join the multicast group.
EFI_OUT_OF_RESOURCESFailed to allocate resources.
OthersFailed to join the multicast group.

Definition at line 253 of file Ip4Igmp.c.

◆ Ip4LeaveGroup()

EFI_STATUS Ip4LeaveGroup ( IN IP4_PROTOCOL IpInstance,
IN IP4_ADDR  Address 
)

Leave the IP4 multicast group on behalf of IpInstance.

Parameters
[in]IpInstanceThe IP4 child that wants to leave the group address.
[in]AddressThe group address to leave.
Return values
EFI_NOT_FOUNDThe IP4 service instance isn't in the group.
EFI_SUCCESSSuccessfully leave the multicast group.
OthersFailed to leave the multicast group.

Definition at line 333 of file Ip4Igmp.c.

◆ Ip4RemoveGroupAddr()

INTN Ip4RemoveGroupAddr ( IN OUT IP4_ADDR *  Groups,
IN UINT32  Count,
IN IP4_ADDR  Addr 
)

Remove a group address from the array of group addresses. Although the function doesn't assume the byte order of the both Groups and Addr, the network byte order is used by the caller.

Parameters
GroupsThe array of group addresses to remove from.
CountThe number of group addresses in the Groups.
AddrThe IP4 multicast address to remove.
Returns
The number of group addresses in the Groups after remove. It is Count if the Addr isn't in the Groups.

Definition at line 584 of file Ip4Igmp.c.