TianoCore EDK2 master
|
#include "Ip6Impl.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | Ip6IcmpReplyEcho (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet) |
EFI_STATUS | Ip6ProcessPacketTooBig (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet) |
EFI_STATUS | Ip6ProcessIcmpError (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet) |
EFI_STATUS | Ip6ProcessIcmpInformation (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet) |
EFI_STATUS | Ip6IcmpHandle (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet) |
VOID | Ip6GetPrefix (IN UINT8 PrefixLength, IN OUT EFI_IPv6_ADDRESS *Prefix) |
BOOLEAN | Ip6IsAnycast (IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *DestinationAddress) |
EFI_STATUS | Ip6SendIcmpError (IN IP6_SERVICE *IpSb, IN NET_BUF *Packet, IN EFI_IPv6_ADDRESS *SourceAddress OPTIONAL, IN EFI_IPv6_ADDRESS *DestinationAddress, IN UINT8 Type, IN UINT8 Code, IN UINT32 *Pointer OPTIONAL) |
Variables | |
EFI_IP6_ICMP_TYPE | mIp6SupportedIcmp [23] |
The ICMPv6 handle routines to process the ICMPv6 control messages.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ip6Icmp.c.
VOID Ip6GetPrefix | ( | IN UINT8 | PrefixLength, |
IN OUT EFI_IPv6_ADDRESS * | Prefix | ||
) |
Retrieve the Prefix address according to the PrefixLength by clear the useless bits.
[in] | PrefixLength | The prefix length of the prefix. |
[in,out] | Prefix | On input, points to the original prefix address with dirty bits; on output, points to the updated address with useless bit clear. |
EFI_STATUS Ip6IcmpHandle | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IP6_HEADER * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Handle the ICMPv6 packet. First validate the message format, then, according to the message types, process it as an informational packet or an error packet.
[in] | IpSb | The IP service that received the packet. |
[in] | Head | The IP head of the ICMPv6 packet. |
[in] | Packet | The content of the ICMPv6 packet with IP head removed. |
EFI_INVALID_PARAMETER | The packet is malformatted. |
EFI_SUCCESS | The ICMPv6 message successfully processed. |
Others | Failed to handle the ICMPv6 packet. |
EFI_STATUS Ip6IcmpReplyEcho | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IP6_HEADER * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Reply an ICMPv6 echo request.
[in] | IpSb | The IP service that received the packet. |
[in] | Head | The IP head of the ICMPv6 informational message. |
[in] | Packet | The content of the ICMPv6 message with the IP head removed. |
EFI_OUT_OF_RESOURCES | Failed to allocate resources. |
EFI_SUCCESS | Successfully answered the ICMPv6 Echo request. |
Others | Failed to answer the ICMPv6 Echo request. |
BOOLEAN Ip6IsAnycast | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IPv6_ADDRESS * | DestinationAddress | ||
) |
Check whether the DestinationAddress is an anycast address.
[in] | IpSb | The IP service that received the packet. |
[in] | DestinationAddress | Points to the Destination Address of the packet. |
TRUE | The DestinationAddress is anycast address. |
FALSE | The DestinationAddress is not anycast address. |
EFI_STATUS Ip6ProcessIcmpError | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IP6_HEADER * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Process the ICMPv6 error packet, and deliver the packet to upper layer.
[in] | IpSb | The IP service that received the packet. |
[in] | Head | The IP head of the ICMPv6 error packet. |
[in] | Packet | The content of the ICMPv6 error with the IP head removed. |
EFI_SUCCESS | The ICMPv6 error processed successfully. |
EFI_INVALID_PARAMETER | The packet is invalid. |
Others | Failed to process the packet. |
EFI_STATUS Ip6ProcessIcmpInformation | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IP6_HEADER * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Process the ICMPv6 informational messages. If it is an ICMPv6 echo request, answer it. If it is a MLD message, trigger MLD routines to process it. If it is a ND message, trigger ND routines to process it. Otherwise, deliver it to upper layer.
[in] | IpSb | The IP service that receivd the packet. |
[in] | Head | The IP head of the ICMPv6 informational packet. |
[in] | Packet | The content of the ICMPv6 informational packet with IP head removed. |
EFI_INVALID_PARAMETER | The packet is invalid. |
EFI_SUCCESS | The ICMPv6 informational message processed. |
Others | Failed to process ICMPv6 informational message. |
EFI_STATUS Ip6ProcessPacketTooBig | ( | IN IP6_SERVICE * | IpSb, |
IN EFI_IP6_HEADER * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Process Packet Too Big message sent by a router in response to a packet that it cannot forward because the packet is larger than the MTU of outgoing link. Since this driver already uses IPv6 minimum link MTU as the maximum packet size, if Packet Too Big message is still received, do not reduce the packet size, but rather include a Fragment header in the subsequent packets.
[in] | IpSb | The IP service that received the packet. |
[in] | Head | The IP head of the ICMPv6 error packet. |
[in] | Packet | The content of the ICMPv6 error with the IP head removed. |
EFI_SUCCESS | The ICMPv6 error processed successfully. |
EFI_OUT_OF_RESOURCES | Failed to finish the operation due to lack of resource. |
EFI_NOT_FOUND | The packet too big message is not sent to us. |
EFI_STATUS Ip6SendIcmpError | ( | IN IP6_SERVICE * | IpSb, |
IN NET_BUF * | Packet, | ||
IN EFI_IPv6_ADDRESS *SourceAddress | OPTIONAL, | ||
IN EFI_IPv6_ADDRESS * | DestinationAddress, | ||
IN UINT8 | Type, | ||
IN UINT8 | Code, | ||
IN UINT32 *Pointer | OPTIONAL | ||
) |
Generate ICMPv6 error message and send it out to DestinationAddress. Currently Destination Unreachable message, Time Exceeded message and Parameter Problem message are supported.
[in] | IpSb | The IP service that received the packet. |
[in] | Packet | The packet which invoking ICMPv6 error. |
[in] | SourceAddress | If not NULL, points to the SourceAddress. Otherwise, the IP layer will select a source address according to the DestinationAddress. |
[in] | DestinationAddress | Points to the Destination Address of the ICMPv6 error message. |
[in] | Type | The type of the ICMPv6 message. |
[in] | Code | The additional level of the ICMPv6 message. |
[in] | Pointer | If not NULL, identifies the octet offset within the invoking packet where the error was detected. |
EFI_INVALID_PARAMETER | The packet is malformatted. |
EFI_OUT_OF_RESOURCES | There is no sufficient resource to complete the operation. |
EFI_SUCCESS | The ICMPv6 message was successfully sent out. |
Others | Failed to generate the ICMPv6 packet. |
EFI_IP6_ICMP_TYPE mIp6SupportedIcmp[23] |