X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FIp4Dxe%2FIp4Icmp.h;h=f9db6a3da4fd78f750b48cd9616d6edc4e1a3708;hp=7999b2e306463ddbbb80946c11c91e9d2feefa0b;hb=3e8c18da0441069591e5aa218f378001b29512dd;hpb=83cbd279b64f3081af5c06d50fa26e15a99fc066 diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h index 7999b2e306..f9db6a3da4 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h @@ -1,6 +1,7 @@ /** @file - -Copyright (c) 2005 - 2006, Intel Corporation + Header file for ICMP protocol. + +Copyright (c) 2005 - 2006, 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 @@ -9,22 +10,12 @@ 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. - -Module Name: - - Ip4Icmp.h - -Abstract: - - Header file for ICMP protocol. - - **/ #ifndef __EFI_IP4_ICMP_H__ #define __EFI_IP4_ICMP_H__ -enum { +typedef enum { // // ICMP type definations // @@ -80,7 +71,7 @@ enum { ICMP_INVALID_MESSAGE = 0, ICMP_ERROR_MESSAGE = 1, ICMP_QUERY_MESSAGE = 2 -}; +} ICMP_ENUM_TYPES; typedef struct { UINT8 IcmpType; @@ -90,10 +81,25 @@ typedef struct { extern IP4_ICMP_CLASS mIcmpClass[]; extern EFI_IP4_ICMP_TYPE mIp4SupportedIcmp[]; +/** + Handle the ICMP packet. First validate the message format, + then according to the message types, process it as query or + error packet. + + @param[in] IpSb The IP service that receivd the packet + @param[in] Head The IP head of the ICMP query packet + @param[in] Packet The content of the ICMP query with IP head + removed. + + @retval EFI_INVALID_PARAMETER The packet is malformated. + @retval EFI_SUCCESS The ICMP message is successfully processed. + @retval Others Failed to handle ICMP packet. + +**/ EFI_STATUS Ip4IcmpHandle ( - IN IP4_SERVICE *IpSb, - IN IP4_HEAD *Header, - IN NET_BUF *Packet + IN IP4_SERVICE *IpSb, + IN IP4_HEAD *Head, + IN NET_BUF *Packet ); #endif