]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Library / DxeIpIoLib / DxeIpIoLib.c
index 032545b32baed319c1e1b1313926e63be3d67b0e..5b637341365014e82a45e51972e38da7e13c3798 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   IpIo Library.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+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
 http://opensource.org/licenses/bsd-license.php\r
@@ -24,12 +24,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/DpcLib.h>\r
 \r
 \r
-LIST_ENTRY  mActiveIpIoList = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED LIST_ENTRY  mActiveIpIoList = {\r
   &mActiveIpIoList,\r
   &mActiveIpIoList\r
 };\r
 \r
-EFI_IP4_CONFIG_DATA  mIp4IoDefaultIpConfigData = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_IP4_CONFIG_DATA  mIp4IoDefaultIpConfigData = {\r
   EFI_IP_PROTO_UDP,\r
   FALSE,\r
   TRUE,\r
@@ -46,7 +46,7 @@ EFI_IP4_CONFIG_DATA  mIp4IoDefaultIpConfigData = {
   0\r
 };\r
 \r
-EFI_IP6_CONFIG_DATA  mIp6IoDefaultIpConfigData = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_IP6_CONFIG_DATA  mIp6IoDefaultIpConfigData = {\r
   EFI_IP_PROTO_UDP,\r
   FALSE,\r
   TRUE,\r
@@ -60,7 +60,7 @@ EFI_IP6_CONFIG_DATA  mIp6IoDefaultIpConfigData = {
   0\r
 };\r
 \r
-ICMP_ERROR_INFO  mIcmpErrMap[10] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED ICMP_ERROR_INFO  mIcmpErrMap[10] = {\r
   {FALSE, TRUE }, // ICMP_ERR_UNREACH_NET\r
   {FALSE, TRUE }, // ICMP_ERR_UNREACH_HOST\r
   {TRUE,  TRUE }, // ICMP_ERR_UNREACH_PROTOCOL\r
@@ -73,7 +73,7 @@ ICMP_ERROR_INFO  mIcmpErrMap[10] = {
   {FALSE, TRUE }  // ICMP_ERR_PARAMPROB\r
 };\r
 \r
-ICMP_ERROR_INFO  mIcmp6ErrMap[10] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED ICMP_ERROR_INFO  mIcmp6ErrMap[10] = {\r
   {FALSE, TRUE}, // ICMP6_ERR_UNREACH_NET\r
   {FALSE, TRUE}, // ICMP6_ERR_UNREACH_HOST\r
   {TRUE,  TRUE}, // ICMP6_ERR_UNREACH_PROTOCOL\r
@@ -587,6 +587,7 @@ IpIoIcmpHandler (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 IpIoExtFree (\r
   IN VOID  *Event\r
   )\r
@@ -1029,7 +1030,7 @@ IpIoListenHandlerDpc (
 \r
   if (IpIo->IpVersion == IP_VERSION_4) {\r
     if ((EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress) != 0) &&\r
-      !Ip4IsUnicast (EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), 0)) {\r
+      !NetIp4IsUnicast (EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), 0)) {\r
     //\r
     // The source address is not zero and it's not a unicast IP address, discard it.\r
     //\r
@@ -1057,10 +1058,11 @@ IpIoListenHandlerDpc (
   Session.Source.Addr[0] = EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress);\r
   Session.Dest.Addr[0]   = EFI_IP4 (RxData->Ip4RxData.Header->DestinationAddress);\r
   Session.IpHdr.Ip4Hdr   = RxData->Ip4RxData.Header;\r
+  Session.IpHdrLen       = RxData->Ip4RxData.HeaderLength;\r
   Session.IpVersion      = IP_VERSION_4;\r
   } else {\r
 \r
-    if (!Ip6IsValidUnicast(&RxData->Ip6RxData.Header->SourceAddress)) {\r
+    if (!NetIp6IsValidUnicast(&RxData->Ip6RxData.Header->SourceAddress)) {\r
       goto CleanUp;\r
     }\r
     \r
@@ -1093,6 +1095,7 @@ IpIoListenHandlerDpc (
       sizeof(EFI_IPv6_ADDRESS)\r
       );\r
     Session.IpHdr.Ip6Hdr = RxData->Ip6RxData.Header;\r
+    Session.IpHdrLen     = RxData->Ip6RxData.HeaderLength;\r
     Session.IpVersion    = IP_VERSION_6;\r
   } \r
 \r
@@ -2010,10 +2013,9 @@ IpIoFindSender (
 \r
   @param[in]   IcmpError             IcmpError Type.\r
   @param[in]   IpVersion             The version of the IP protocol to use,\r
-                                     either IPv4 or IPv6.\r
-  \r
-  @param[out]  IsHard                Whether it is a hard error.\r
-  @param[out]  Notify                Whether it need to notify SockError.\r
+                                     either IPv4 or IPv6. \r
+  @param[out]  IsHard                If TRUE, indicates that it is a hard error.\r
+  @param[out]  Notify                If TRUE, SockError needs to be notified.\r
 \r
   @return ICMP Error Status, such as EFI_NETWORK_UNREACHABLE.\r
 \r