TianoCore EDK2 master
|
#include "Ip4Impl.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | Ip4ProcessIcmpRedirect (IN IP4_SERVICE *IpSb, IN IP4_HEAD *Head, IN NET_BUF *Packet, IN IP4_ICMP_ERROR_HEAD *Icmp) |
EFI_STATUS | Ip4ProcessIcmpError (IN IP4_SERVICE *IpSb, IN IP4_HEAD *Head, IN NET_BUF *Packet) |
EFI_STATUS | Ip4IcmpReplyEcho (IN IP4_SERVICE *IpSb, IN IP4_HEAD *Head, IN NET_BUF *Packet) |
EFI_STATUS | Ip4ProcessIcmpQuery (IN IP4_SERVICE *IpSb, IN IP4_HEAD *Head, IN NET_BUF *Packet) |
EFI_STATUS | Ip4IcmpHandle (IN IP4_SERVICE *IpSb, IN IP4_HEAD *Head, IN NET_BUF *Packet) |
Variables | |
IP4_ICMP_CLASS | mIcmpClass [] |
EFI_IP4_ICMP_TYPE | mIp4SupportedIcmp [23] |
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ip4Icmp.c.
EFI_STATUS Ip4IcmpHandle | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_HEAD * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Handle the ICMP packet. First validate the message format, then according to the message types, process it as query or error packet.
[in] | IpSb | The IP4 service that receivd the packet. |
[in] | Head | The IP4 head of the ICMP query packet. |
[in] | Packet | The content of the ICMP query with IP4 head removed. |
EFI_INVALID_PARAMETER | The packet is malformatted. |
EFI_SUCCESS | The ICMP message is successfully processed. |
Others | Failed to handle ICMP packet. |
EFI_STATUS Ip4IcmpReplyEcho | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_HEAD * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Replay an ICMP echo request.
[in] | IpSb | The IP4 service that receivd the packet |
[in] | Head | The IP4 head of the ICMP error packet |
[in] | Packet | The content of the ICMP error with IP4 head removed. |
EFI_OUT_OF_RESOURCES | Failed to allocate resource. |
EFI_SUCCESS | The ICMP Echo request is successfully answered. |
Others | Failed to answer the ICMP echo request. |
EFI_STATUS Ip4ProcessIcmpError | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_HEAD * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Process the ICMP error packet. If it is an ICMP redirect packet, update call Ip4ProcessIcmpRedirect to update the IP instance's route cache, otherwise, deliver the packet to upper layer.
[in] | IpSb | The IP4 service that received the packet. |
[in] | Head | The IP4 head of the ICMP error packet |
[in] | Packet | The content of the ICMP error with IP4 head removed. |
EFI_SUCCESS | The ICMP error is processed successfully. |
EFI_INVALID_PARAMETER | The packet is invalid |
Others | Failed to process the packet. |
EFI_STATUS Ip4ProcessIcmpQuery | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_HEAD * | Head, | ||
IN NET_BUF * | Packet | ||
) |
Process the ICMP query message. If it is an ICMP echo request, answer it. Otherwise deliver it to upper layer.
[in] | IpSb | The IP4 service that receivd the packet |
[in] | Head | The IP4 head of the ICMP query packet |
[in] | Packet | The content of the ICMP query with IP4 head removed. |
EFI_INVALID_PARAMETER | The packet is invalid |
EFI_SUCCESS | The ICMP query message is processed |
Others | Failed to process ICMP query. |
EFI_STATUS Ip4ProcessIcmpRedirect | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_HEAD * | Head, | ||
IN NET_BUF * | Packet, | ||
IN IP4_ICMP_ERROR_HEAD * | Icmp | ||
) |
Process the ICMP redirect. Find the instance then update its route cache.
All kinds of redirect is treated as host redirect as specified by RFC1122 3.3.1.2: "Since the subnet mask appropriate to the destination address is generally not known, a Network Redirect message SHOULD be treated identically to a Host Redirect message;"
[in] | IpSb | The IP4 service binding instance that received the packet. |
[in] | Head | The IP head of the received ICMPpacket. |
[in] | Packet | The content of the ICMP redirect packet with IP head removed. |
[in] | Icmp | The buffer to store the ICMP error message if something is wrong. |
EFI_INVALID_PARAMETER | The parameter is invalid |
EFI_SUCCESS | Successfully updated the route caches |
IP4_ICMP_CLASS mIcmpClass[] |
EFI_IP4_ICMP_TYPE mIp4SupportedIcmp[23] |