NetworkPkg/Ip6Dxe/Ip6Icmp.c File Reference


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, IN EFI_IPv6_ADDRESS *DestinationAddress, IN UINT8 Type, IN UINT8 Code, IN UINT32 *Pointer)

Variables

EFI_IP6_ICMP_TYPE mIp6SupportedIcmp [23]

Detailed Description

The ICMPv6 handle routines to process the ICMPv6 control messages.

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

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Function Documentation

VOID Ip6GetPrefix ( IN UINT8  PrefixLength,
IN OUT EFI_IPv6_ADDRESS *  Prefix 
)

Retrieve the Prefix address according to the PrefixLength by clear the useless bits.

Parameters:
[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.

Referenced by Ip6IsAnycast().

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] 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.
Return values:
EFI_INVALID_PARAMETER The packet is malformated.
EFI_SUCCESS The ICMPv6 message successfully processed.
Others Failed to handle the ICMPv6 packet.

References ICMP_V6_ERROR_MAX, Ip6ProcessIcmpError(), and Ip6ProcessIcmpInformation().

Referenced by Ip6AcceptFrame().

EFI_STATUS Ip6IcmpReplyEcho ( IN IP6_SERVICE IpSb,
IN EFI_IP6_HEADER *  Head,
IN NET_BUF *  Packet 
)

Reply an ICMPv6 echo request.

Parameters:
[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.
Return values:
EFI_OUT_OF_RESOURCES Failed to allocate resources.
EFI_SUCCESS Successfully answered the ICMPv6 Echo request.
Others Failed to answer the ICMPv6 Echo request.

References IP6_MAX_HEADLEN, Ip6IsOneOfSetAddress(), Ip6Output(), and Ip6SysPacketSent().

Referenced by Ip6ProcessIcmpInformation().

BOOLEAN Ip6IsAnycast ( IN IP6_SERVICE IpSb,
IN EFI_IPv6_ADDRESS *  DestinationAddress 
)

Check whether the DestinationAddress is an anycast address.

Parameters:
[in] IpSb The IP service that received the packet.
[in] DestinationAddress Points to the Destination Address of the packet.
Return values:
TRUE The DestinationAddress is anycast address.
FALSE The DestinationAddress is not anycast address.

References Ip6FindPrefixListEntry(), Ip6GetPrefix(), _IP6_PREFIX_LIST_ENTRY::Prefix, and _IP6_PREFIX_LIST_ENTRY::PrefixLength.

Referenced by Ip6Output(), and Ip6SendIcmpError().

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.

Parameters:
[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.
Return values:
EFI_SUCCESS The ICMPv6 error processed successfully.
EFI_INVALID_PARAMETER The packet is invalid.
Others Failed to process the packet.

References IP6_GET_CLIP_INFO, Ip6Demultiplex(), and Ip6ProcessPacketTooBig().

Referenced by Ip6IcmpHandle().

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.

Parameters:
[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.
Return values:
EFI_INVALID_PARAMETER The packet is invalid.
EFI_SUCCESS The ICMPv6 informational message processed.
Others Failed to process ICMPv6 informational message.

References IP6_SERVICE_SIGNATURE, Ip6Demultiplex(), Ip6IcmpReplyEcho(), Ip6ProcessMldQuery(), Ip6ProcessMldReport(), Ip6ProcessNeighborAdvertise(), Ip6ProcessNeighborSolicit(), Ip6ProcessRedirect(), and Ip6ProcessRouterAdvertise().

Referenced by Ip6IcmpHandle().

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.

Parameters:
[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.
Return values:
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.

References IP6_ROUTE_ENTRY::Flag, IP6_DIRECT_ROUTE, IP6_MIN_LINK_MTU, IP6_PACKET_TOO_BIG, Ip6CreateRouteEntry(), Ip6FindRouteEntry(), Ip6FreeRouteEntry(), and IP6_ROUTE_ENTRY::Link.

Referenced by Ip6ProcessIcmpError().

EFI_STATUS Ip6SendIcmpError ( IN IP6_SERVICE IpSb,
IN NET_BUF *  Packet,
IN EFI_IPv6_ADDRESS *  SourceAddress,
IN EFI_IPv6_ADDRESS *  DestinationAddress,
IN UINT8  Type,
IN UINT8  Code,
IN UINT32 *  Pointer 
)

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] 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.
Return values:
EFI_INVALID_PARAMETER The packet is malformated.
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.

References Ip6IsAnycast(), Ip6Output(), and Ip6SysPacketSent().

Referenced by Ip6FreeNeighborEntry(), Ip6IsExtsValid(), Ip6IsOptionValid(), and Ip6PacketTimerTicking().


Variable Documentation

EFI_IP6_ICMP_TYPE mIp6SupportedIcmp[23]

Referenced by EfiIp6GetModeData().


Generated on Mon Sep 28 08:49:05 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1