TianoCore EDK2 master
|
#include "Ip4Impl.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | Ip4InitIgmp (IN OUT IP4_SERVICE *IpSb) |
IGMP_GROUP * | Ip4FindGroup (IN IGMP_SERVICE_DATA *IgmpCtrl, IN IP4_ADDR Address) |
INTN | Ip4FindMac (IN IGMP_SERVICE_DATA *IgmpCtrl, IN EFI_MAC_ADDRESS *Mac) |
EFI_STATUS | Ip4SendIgmpMessage (IN IP4_SERVICE *IpSb, IN IP4_ADDR Dst, IN UINT8 Type, IN IP4_ADDR Group) |
EFI_STATUS | Ip4SendIgmpReport (IN IP4_SERVICE *IpSb, IN IP4_ADDR Group) |
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) |
Variables | |
UINT32 | mRouteAlertOption = 0x00000494 |
This file implements the RFC2236: IGMP v2.
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ip4Igmp.c.
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.
[in] | Source | The array of group addresses to add to. |
[in] | Count | The number of group addresses in the Source. |
[in] | Addr | The IP4 multicast address to add. |
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
[in] | IgmpCtrl | The IGMP control block to search from. |
[in] | Address | The multicast address to search. |
INTN Ip4FindMac | ( | IN IGMP_SERVICE_DATA * | IgmpCtrl, |
IN EFI_MAC_ADDRESS * | Mac | ||
) |
Count the number of IP4 multicast groups that are mapped to the same MAC address. Several IP4 multicast address may be mapped to the same MAC address.
[in] | IgmpCtrl | The IGMP control block to search in. |
[in] | Mac | The MAC address to search. |
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.
[in] | IpSb | The IP4 service instance that received the message. |
[in] | Head | The IP4 header of the received message. |
[in] | Packet | The IGMP message, without IP4 header. |
EFI_INVALID_PARAMETER | The IGMP message is malformatted. |
EFI_SUCCESS | The IGMP message is successfully processed. |
VOID Ip4IgmpTicking | ( | IN IP4_SERVICE * | IpSb | ) |
The periodical timer function for IGMP. It does the following things:
[in] | IpSb | The IP4 service instance that is ticking. |
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.
[in,out] | IpSb | The IP4 service whose IGMP is to be initialized. |
EFI_SUCCESS | IGMP of the IpSb is successfully initialized. |
EFI_OUT_OF_RESOURCES | Failed to allocate resource to initialize IGMP. |
Others | Failed to initialize the IGMP of IpSb. |
EFI_STATUS Ip4JoinGroup | ( | IN IP4_PROTOCOL * | IpInstance, |
IN IP4_ADDR | Address | ||
) |
Join the multicast group on behalf of this IP4 child
[in] | IpInstance | The IP4 child that wants to join the group. |
[in] | Address | The group to join. |
EFI_SUCCESS | Successfully join the multicast group. |
EFI_OUT_OF_RESOURCES | Failed to allocate resources. |
Others | Failed to join the multicast group. |
EFI_STATUS Ip4LeaveGroup | ( | IN IP4_PROTOCOL * | IpInstance, |
IN IP4_ADDR | Address | ||
) |
Leave the IP4 multicast group on behalf of IpInstance.
[in] | IpInstance | The IP4 child that wants to leave the group address. |
[in] | Address | The group address to leave. |
EFI_NOT_FOUND | The IP4 service instance isn't in the group. |
EFI_SUCCESS | Successfully leave the multicast group. |
Others | Failed to leave the multicast group. |
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.
Groups | The array of group addresses to remove from. |
Count | The number of group addresses in the Groups. |
Addr | The IP4 multicast address to remove. |
EFI_STATUS Ip4SendIgmpMessage | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_ADDR | Dst, | ||
IN UINT8 | Type, | ||
IN IP4_ADDR | Group | ||
) |
Send an IGMP protocol message to the Dst, such as IGMP v1 membership report.
[in] | IpSb | The IP4 service instance that requests the transmission. |
[in] | Dst | The destination to send to. |
[in] | Type | The IGMP message type, such as IGMP v1 membership report. |
[in] | Group | The group address in the IGMP message head. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory to build the message. |
EFI_SUCCESS | The IGMP message is successfully send. |
Others | Failed to send the IGMP message. |
EFI_STATUS Ip4SendIgmpReport | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_ADDR | Group | ||
) |
Send an IGMP membership report. Depends on whether the server is v1 or v2, it will send either a V1 or V2 membership report.
[in] | IpSb | The IP4 service instance that requests the transmission. |
[in] | Group | The group address to report. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory to build the message. |
EFI_SUCCESS | The IGMP report message is successfully send. |
Others | Failed to send the report. |