TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip6Icmp.h File Reference

Go to the source code of this file.

Macros

#define ICMP_V6_DEFAULT_CODE   0
 
#define ICMP_V6_ERROR_MAX   127
 
#define ICMP_V6_INVALID_MESSAGE   0
 
#define ICMP_V6_ERROR_MESSAGE   1
 
#define ICMP_V6_INFORMATION_MESSAGE   2
 

Functions

EFI_STATUS Ip6IcmpHandle (IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
 
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 []
 

Detailed Description

Header file for ICMPv6 protocol.

Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Ip6Icmp.h.

Macro Definition Documentation

◆ ICMP_V6_DEFAULT_CODE

#define ICMP_V6_DEFAULT_CODE   0

Definition at line 13 of file Ip6Icmp.h.

◆ ICMP_V6_ERROR_MAX

#define ICMP_V6_ERROR_MAX   127

Definition at line 15 of file Ip6Icmp.h.

◆ ICMP_V6_ERROR_MESSAGE

#define ICMP_V6_ERROR_MESSAGE   1

Definition at line 22 of file Ip6Icmp.h.

◆ ICMP_V6_INFORMATION_MESSAGE

#define ICMP_V6_INFORMATION_MESSAGE   2

Definition at line 23 of file Ip6Icmp.h.

◆ ICMP_V6_INVALID_MESSAGE

#define ICMP_V6_INVALID_MESSAGE   0

Definition at line 21 of file Ip6Icmp.h.

Function Documentation

◆ Ip6IcmpHandle()

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.

Parameters
[in]IpSbThe IP service that received the packet.
[in]HeadThe IP head of the ICMPv6 packet.
[in]PacketThe content of the ICMPv6 packet with IP head removed.
Return values
EFI_INVALID_PARAMETERThe packet is malformatted.
EFI_SUCCESSThe ICMPv6 message successfully processed.
OthersFailed to handle the ICMPv6 packet.

Definition at line 402 of file Ip6Icmp.c.

◆ Ip6IsAnycast()

BOOLEAN Ip6IsAnycast ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS DestinationAddress 
)

Check whether the DestinationAddress is an anycast address.

Parameters
[in]IpSbThe IP service that received the packet.
[in]DestinationAddressPoints to the Destination Address of the packet.
Return values
TRUEThe DestinationAddress is anycast address.
FALSEThe DestinationAddress is not anycast address.

Definition at line 506 of file Ip6Icmp.c.

◆ Ip6SendIcmpError()

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.

Parameters
[in]IpSbThe IP service that received the packet.
[in]PacketThe packet which invoking ICMPv6 error.
[in]SourceAddressIf not NULL, points to the SourceAddress. Otherwise, the IP layer will select a source address according to the DestinationAddress.
[in]DestinationAddressPoints to the Destination Address of the ICMPv6 error message.
[in]TypeThe type of the ICMPv6 message.
[in]CodeThe additional level of the ICMPv6 message.
[in]PointerIf not NULL, identifies the octet offset within the invoking packet where the error was detected.
Return values
EFI_INVALID_PARAMETERThe packet is malformatted.
EFI_OUT_OF_RESOURCESThere is no sufficient resource to complete the operation.
EFI_SUCCESSThe ICMPv6 message was successfully sent out.
OthersFailed to generate the ICMPv6 packet.

Definition at line 564 of file Ip6Icmp.c.

Variable Documentation

◆ mIp6SupportedIcmp

EFI_IP6_ICMP_TYPE mIp6SupportedIcmp[]
extern

Definition at line 13 of file Ip6Icmp.c.