TianoCore EDK2 master
|
#include "Ip6Impl.h"
Go to the source code of this file.
Multicast Listener Discovery support routines.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ip6Mld.c.
EFI_STATUS Ip6CombineGroups | ( | IN OUT IP6_PROTOCOL * | IpInstance, |
IN EFI_IPv6_ADDRESS * | Group | ||
) |
Add a group address to the array of group addresses. The caller should make sure that no duplicated address existed in the array.
[in,out] | IpInstance | Points to an IP6_PROTOCOL instance. |
[in] | Group | The IP6 multicast address to add. |
EFI_OUT_OF_RESOURCES | There are not sufficient resources to complete the operation. |
EFI_SUCCESS | The address is added to the group address array. |
IP6_MLD_GROUP * Ip6CreateMldEntry | ( | IN OUT IP6_SERVICE * | IpSb, |
IN EFI_IPv6_ADDRESS * | MulticastAddr, | ||
IN UINT32 | DelayTimer | ||
) |
Create a IP6_MLD_GROUP list entry node and record to IP6 service binding data.
[in,out] | IpSb | Points to IP6 service binding instance. |
[in] | MulticastAddr | The IPv6 multicast address to be recorded. |
[in] | DelayTimer | The maximum allowed delay before sending a responding report, in units of milliseconds. |
INTN Ip6FindMac | ( | IN IP6_MLD_SERVICE_DATA * | MldCtrl, |
IN EFI_MAC_ADDRESS * | Mac | ||
) |
Count the number of IP6 multicast groups that are mapped to the same MAC address. Several IP6 multicast address may be mapped to the same MAC address.
[in] | MldCtrl | The MLD control block to search in. |
[in] | Mac | The MAC address to search. |
IP6_MLD_GROUP * Ip6FindMldEntry | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IPv6_ADDRESS * | MulticastAddr | ||
) |
Search a IP6_MLD_GROUP list entry node from a list array.
[in] | IpSb | Points to IP6 service binding instance. |
[in] | MulticastAddr | The IPv6 multicast address to be searched. |
EFI_STATUS Ip6Groups | ( | IN IP6_PROTOCOL * | IpInstance, |
IN BOOLEAN | JoinFlag, | ||
IN EFI_IPv6_ADDRESS *GroupAddress | OPTIONAL | ||
) |
Worker function for EfiIp6Groups(). The caller should make sure that the parameters are valid.
[in] | IpInstance | The IP6 child to change the setting. |
[in] | JoinFlag | TRUE to join the group, otherwise leave it. |
[in] | GroupAddress | The target group address. If NULL, leave all the group addresses. |
EFI_ALREADY_STARTED | Wants to join the group, but is already a member of it |
EFI_OUT_OF_RESOURCES | Failed to allocate sufficient resources. |
EFI_DEVICE_ERROR | Failed to set the group configuration. |
EFI_SUCCESS | Successfully updated the group setting. |
EFI_NOT_FOUND | Try to leave the group which it isn't a member. |
EFI_STATUS Ip6InitMld | ( | IN IP6_SERVICE * | IpSb | ) |
Init the MLD data of the IP6 service instance. Configure MNP to receive ALL SYSTEM multicast.
[in] | IpSb | The IP6 service whose MLD is to be initialized. |
EFI_OUT_OF_RESOURCES | There are not sufficient resourcet to complete the operation. |
EFI_SUCCESS | The MLD module successfully initialized. |
EFI_STATUS Ip6JoinGroup | ( | IN IP6_SERVICE * | IpSb, |
IN IP6_INTERFACE * | Interface, | ||
IN EFI_IPv6_ADDRESS * | Address | ||
) |
Join the multicast group on behalf of this IP6 service binding instance.
[in] | IpSb | The IP6 service binding instance. |
[in] | Interface | Points to an IP6_INTERFACE structure. |
[in] | Address | The group address 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 Ip6LeaveGroup | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IPv6_ADDRESS * | Address | ||
) |
Leave the IP6 multicast group.
[in] | IpSb | The IP6 service binding instance. |
[in] | Address | The group address to leave. |
EFI_NOT_FOUND | The IP6 service instance isn't in the group. |
EFI_SUCCESS | Successfully leave the multicast group.. |
Others | Failed to leave the multicast group. |
VOID Ip6MldTimerTicking | ( | IN IP6_SERVICE * | IpSb | ) |
EFI_STATUS Ip6ProcessMldQuery | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IP6_HEADER * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Process the Multicast Listener Query message.
[in] | IpSb | The IP service that received the packet. |
[in] | Head | The IP head of the MLD query packet. |
[in] | Packet | The content of the MLD query packet with IP head removed. |
EFI_SUCCESS | The MLD query packet processed successfully. |
EFI_INVALID_PARAMETER | The packet is invalid. |
Others | Failed to process the packet. |
EFI_STATUS Ip6ProcessMldReport | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IP6_HEADER * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Process the Multicast Listener Report message.
[in] | IpSb | The IP service that received the packet. |
[in] | Head | The IP head of the MLD report packet. |
[in] | Packet | The content of the MLD report packet with IP head removed. |
EFI_SUCCESS | The MLD report packet processed successfully. |
EFI_INVALID_PARAMETER | The packet is invalid. |
EFI_STATUS Ip6RemoveGroup | ( | IN OUT IP6_PROTOCOL * | IpInstance, |
IN EFI_IPv6_ADDRESS * | Group | ||
) |
Remove a group address from the array of group addresses. Although the function doesn't assume the byte order of Group, the network byte order is used by the caller.
[in,out] | IpInstance | Points to an IP6_PROTOCOL instance. |
[in] | Group | The IP6 multicast address to remove. |
EFI_NOT_FOUND | Cannot find the to be removed group address. |
EFI_SUCCESS | The group address was successfully removed. |
EFI_STATUS Ip6SendMldDone | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IPv6_ADDRESS * | MulticastAddr | ||
) |
Generate MLD Done message and send it out to MulticastAddr.
[in] | IpSb | The IP service to send the packet. |
[in] | MulticastAddr | The specific IPv6 multicast address to which the message sender is ceasing to listen. |
EFI_OUT_OF_RESOURCES | There are not sufficient resources to complete the operation. |
EFI_SUCCESS | The MLD report message was successfully sent out. |
EFI_STATUS Ip6SendMldReport | ( | IN IP6_SERVICE * | IpSb, |
IN IP6_INTERFACE *Interface | OPTIONAL, | ||
IN EFI_IPv6_ADDRESS * | MulticastAddr | ||
) |
Generate MLD report message and send it out to MulticastAddr.
[in] | IpSb | The IP service to send the packet. |
[in] | Interface | The IP interface to send the packet. If NULL, a system interface will be selected. |
[in] | MulticastAddr | The specific IPv6 multicast address to which the message sender is listening. |
EFI_OUT_OF_RESOURCES | There are not sufficient resources to complete the operation. |
EFI_SUCCESS | The MLD report message was successfully sent out. |
EFI_STATUS Ip6UpdateDelayTimer | ( | IN IP6_SERVICE * | IpSb, |
IN UINT16 | MaxRespDelay, | ||
IN EFI_IPv6_ADDRESS * | MulticastAddr, | ||
IN OUT IP6_MLD_GROUP * | Group | ||
) |
Set a random value of the delay timer for the multicast address from the range [0, Maximum Response Delay]. If a timer for any address is already running, it is reset to the new random value only if the requested Maximum Response Delay is less than the remaining value of the running timer. If the Query packet specifies a Maximum Response Delay of zero, each timer is effectively set to zero, and the action specified below for timer expiration is performed immediately.
[in] | IpSb | The IP6 service binding instance. |
[in] | MaxRespDelay | The Maximum Response Delay, in milliseconds. |
[in] | MulticastAddr | The multicast address. |
[in,out] | Group | Points to a IP6_MLD_GROUP list entry node. |
EFI_SUCCESS | The delay timer is successfully updated or timer expiration is performed immediately. |
Others | Failed to send out MLD report message. |