]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h
code scrub fix
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Icmp.h
index 7999b2e306463ddbbb80946c11c91e9d2feefa0b..f9db6a3da4fd78f750b48cd9616d6edc4e1a3708 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
-\r
-Copyright (c) 2005 - 2006, Intel Corporation\r
+  Header file for ICMP protocol.\r
+  \r
+Copyright (c) 2005 - 2006, Intel Corporation.<BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -9,22 +10,12 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-\r
-Module Name:\r
-\r
-  Ip4Icmp.h\r
-\r
-Abstract:\r
-\r
-  Header file for ICMP protocol.\r
-\r
-\r
 **/\r
 \r
 #ifndef __EFI_IP4_ICMP_H__\r
 #define __EFI_IP4_ICMP_H__\r
 \r
-enum {\r
+typedef enum {\r
   //\r
   // ICMP type definations\r
   //\r
@@ -80,7 +71,7 @@ enum {
   ICMP_INVALID_MESSAGE      = 0,\r
   ICMP_ERROR_MESSAGE        = 1,\r
   ICMP_QUERY_MESSAGE        = 2\r
-};\r
+} ICMP_ENUM_TYPES;\r
 \r
 typedef struct {\r
   UINT8                   IcmpType;\r
@@ -90,10 +81,25 @@ typedef struct {
 extern IP4_ICMP_CLASS     mIcmpClass[];\r
 extern EFI_IP4_ICMP_TYPE  mIp4SupportedIcmp[];\r
 \r
+/**\r
+  Handle the ICMP packet. First validate the message format,\r
+  then according to the message types, process it as query or\r
+  error packet.\r
+\r
+  @param[in]  IpSb               The IP service that receivd the packet\r
+  @param[in]  Head               The IP head of the ICMP query packet\r
+  @param[in]  Packet             The content of the ICMP query with IP head\r
+                                 removed.\r
+\r
+  @retval EFI_INVALID_PARAMETER  The packet is malformated.\r
+  @retval EFI_SUCCESS            The ICMP message is successfully processed.\r
+  @retval Others                 Failed to handle ICMP packet.\r
+\r
+**/\r
 EFI_STATUS\r
 Ip4IcmpHandle (\r
-  IN IP4_SERVICE          *IpSb,\r
-  IN IP4_HEAD             *Header,\r
-  IN NET_BUF              *Packet\r
+  IN IP4_SERVICE            *IpSb,\r
+  IN IP4_HEAD               *Head,\r
+  IN NET_BUF                *Packet\r
   );\r
 #endif\r