VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/Ip6Dxe/Ip6Icmp.h

Last change on this file was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 3.4 KB
Line 
1/** @file
2 Header file for ICMPv6 protocol.
3
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#ifndef __EFI_IP6_ICMP_H__
11#define __EFI_IP6_ICMP_H__
12
13#define ICMP_V6_DEFAULT_CODE 0
14
15#define ICMP_V6_ERROR_MAX 127
16
17//
18// ICMPv6 message classes, each class of ICMPv6 message shares
19// a common message format. INVALID_MESSAGE is only a flag.
20//
21#define ICMP_V6_INVALID_MESSAGE 0
22#define ICMP_V6_ERROR_MESSAGE 1
23#define ICMP_V6_INFORMATION_MESSAGE 2
24
25extern EFI_IP6_ICMP_TYPE mIp6SupportedIcmp[];
26
27/**
28 Handle the ICMPv6 packet. First validate the message format,
29 then, according to the message types, process it as an informational packet or
30 an error packet.
31
32 @param[in] IpSb The IP service that received the packet.
33 @param[in] Head The IP head of the ICMPv6 packet.
34 @param[in] Packet The content of the ICMPv6 packet with IP head
35 removed.
36
37 @retval EFI_INVALID_PARAMETER The packet is malformatted.
38 @retval EFI_SUCCESS The ICMPv6 message successfully processed.
39 @retval Others Failed to handle the ICMPv6 packet.
40
41**/
42EFI_STATUS
43Ip6IcmpHandle (
44 IN IP6_SERVICE *IpSb,
45 IN EFI_IP6_HEADER *Head,
46 IN NET_BUF *Packet
47 );
48
49/**
50 Check whether the DestinationAddress is an anycast address.
51
52 @param[in] IpSb The IP service that received the packet.
53 @param[in] DestinationAddress Points to the Destination Address of the packet.
54
55 @retval TRUE The DestinationAddress is anycast address.
56 @retval FALSE The DestinationAddress is not anycast address.
57
58**/
59BOOLEAN
60Ip6IsAnycast (
61 IN IP6_SERVICE *IpSb,
62 IN EFI_IPv6_ADDRESS *DestinationAddress
63 );
64
65/**
66 Generate ICMPv6 error message and send it out to DestinationAddress. Currently
67 Destination Unreachable message, Time Exceeded message and Parameter Problem
68 message are supported.
69
70 @param[in] IpSb The IP service that received the packet.
71 @param[in] Packet The packet which invoking ICMPv6 error.
72 @param[in] SourceAddress If not NULL, points to the SourceAddress.
73 Otherwise, the IP layer will select a source address
74 according to the DestinationAddress.
75 @param[in] DestinationAddress Points to the Destination Address of the ICMPv6
76 error message.
77 @param[in] Type The type of the ICMPv6 message.
78 @param[in] Code The additional level of the ICMPv6 message.
79 @param[in] Pointer If not NULL, identifies the octet offset within
80 the invoking packet where the error was detected.
81
82 @retval EFI_INVALID_PARAMETER The packet is malformatted.
83 @retval EFI_OUT_OF_RESOURCES There is no sufficient resource to complete the
84 operation.
85 @retval EFI_SUCCESS The ICMPv6 message was successfully sent out.
86 @retval Others Failed to generate the ICMPv6 packet.
87
88**/
89EFI_STATUS
90Ip6SendIcmpError (
91 IN IP6_SERVICE *IpSb,
92 IN NET_BUF *Packet,
93 IN EFI_IPv6_ADDRESS *SourceAddress OPTIONAL,
94 IN EFI_IPv6_ADDRESS *DestinationAddress,
95 IN UINT8 Type,
96 IN UINT8 Code,
97 IN UINT32 *Pointer OPTIONAL
98 );
99
100#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette