2 Header file for ICMPv6 protocol.
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __EFI_IP6_ICMP_H__
11 #define __EFI_IP6_ICMP_H__
13 #define ICMP_V6_DEFAULT_CODE 0
15 #define ICMP_V6_ERROR_MAX 127
18 // ICMPv6 message classes, each class of ICMPv6 message shares
19 // a common message format. INVALID_MESSAGE is only a flag.
21 #define ICMP_V6_INVALID_MESSAGE 0
22 #define ICMP_V6_ERROR_MESSAGE 1
23 #define ICMP_V6_INFORMATION_MESSAGE 2
26 extern EFI_IP6_ICMP_TYPE mIp6SupportedIcmp
[];
29 Handle the ICMPv6 packet. First validate the message format,
30 then, according to the message types, process it as an informational packet or
33 @param[in] IpSb The IP service that received the packet.
34 @param[in] Head The IP head of the ICMPv6 packet.
35 @param[in] Packet The content of the ICMPv6 packet with IP head
38 @retval EFI_INVALID_PARAMETER The packet is malformated.
39 @retval EFI_SUCCESS The ICMPv6 message successfully processed.
40 @retval Others Failed to handle the ICMPv6 packet.
46 IN EFI_IP6_HEADER
*Head
,
51 Check whether the DestinationAddress is an anycast address.
53 @param[in] IpSb The IP service that received the packet.
54 @param[in] DestinationAddress Points to the Destination Address of the packet.
56 @retval TRUE The DestinationAddress is anycast address.
57 @retval FALSE The DestinationAddress is not anycast address.
63 IN EFI_IPv6_ADDRESS
*DestinationAddress
67 Generate ICMPv6 error message and send it out to DestinationAddress. Currently
68 Destination Unreachable message, Time Exceeded message and Parameter Problem
69 message are supported.
71 @param[in] IpSb The IP service that received the packet.
72 @param[in] Packet The packet which invoking ICMPv6 error.
73 @param[in] SourceAddress If not NULL, points to the SourceAddress.
74 Otherwise, the IP layer will select a source address
75 according to the DestinationAddress.
76 @param[in] DestinationAddress Points to the Destination Address of the ICMPv6
78 @param[in] Type The type of the ICMPv6 message.
79 @param[in] Code The additional level of the ICMPv6 message.
80 @param[in] Pointer If not NULL, identifies the octet offset within
81 the invoking packet where the error was detected.
83 @retval EFI_INVALID_PARAMETER The packet is malformated.
84 @retval EFI_OUT_OF_RESOURCES There is no sufficient resource to complete the
86 @retval EFI_SUCCESS The ICMPv6 message was successfully sent out.
87 @retval Others Failed to generate the ICMPv6 packet.
94 IN EFI_IPv6_ADDRESS
*SourceAddress OPTIONAL
,
95 IN EFI_IPv6_ADDRESS
*DestinationAddress
,
98 IN UINT32
*Pointer OPTIONAL