]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option...
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Oct 2012 08:23:41 +0000 (08:23 +0000)
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Oct 2012 08:23:41 +0000 (08:23 +0000)
2. Retrieve the IP information after iSCSI TCPv6 connection established and fill it into iBFT table.
3. Generate a random IAID for each NIC port to require different IPv6 address in PXE driver.
4. Update function EfiMtftp6Configure() and Mtftp6RrqHandleOack() to allocate at most one UdpIo.
5. Fix a typo from “destory” to “destroy” in network code.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13859 6f19259b-4bc3-4df7-8a09-765794883524

50 files changed:
MdeModulePkg/Include/Library/UdpIoLib.h
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c
MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h
MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h
MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c
MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c
MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h
MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c
NetworkPkg/Application/Ping6/Ping6.c
NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c
NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
NetworkPkg/IScsiDxe/IScsiIbft.c
NetworkPkg/IScsiDxe/IScsiImpl.h
NetworkPkg/IScsiDxe/IScsiMisc.h
NetworkPkg/IScsiDxe/IScsiProto.c
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
NetworkPkg/Ip6Dxe/Ip6Driver.c
NetworkPkg/Ip6Dxe/Ip6Driver.h
NetworkPkg/Ip6Dxe/Ip6If.c
NetworkPkg/Ip6Dxe/Ip6Impl.c
NetworkPkg/Ip6Dxe/Ip6Nd.c
NetworkPkg/Ip6Dxe/Ip6Nd.h
NetworkPkg/Mtftp6Dxe/Mtftp6Driver.c
NetworkPkg/Mtftp6Dxe/Mtftp6Impl.c
NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h
NetworkPkg/Mtftp6Dxe/Mtftp6Rrq.c
NetworkPkg/TcpDxe/SockImpl.c
NetworkPkg/TcpDxe/SockInterface.c
NetworkPkg/TcpDxe/Socket.h
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c
NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c
NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
NetworkPkg/UefiPxeBcDxe/PxeBcImpl.h
ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c

index 32d61e505a3f1eee4414880ca10a36954b28d55d..e0b44ce18e6a3c93ab2c8259c4d759d367e73065 100644 (file)
@@ -2,7 +2,7 @@
   This library is used to share code between UEFI network stack modules.\r
   It provides the helper routines to access UDP service. It is used by both DHCP and MTFTP.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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<BR>\r
@@ -137,7 +137,7 @@ struct _UDP_IO {
   UINT8                     UdpVersion;\r
 \r
   //\r
-  // Handle used to create/destory UDP child\r
+  // Handle used to create/destroy UDP child\r
   //\r
   EFI_HANDLE                Controller;\r
   EFI_HANDLE                Image;\r
index f74dcdaeae860f94a2ab0133298934bb71cffc01..956f733400baf26f1319540b323cb0535eb82227 100644 (file)
@@ -1829,7 +1829,7 @@ NetLibCreateServiceChild (
 \r
 \r
 /**\r
-  Destory a child of the service that is identified by ServiceBindingGuid.\r
+  Destroy a child of the service that is identified by ServiceBindingGuid.\r
 \r
   Get the ServiceBinding Protocol first, then use it to destroy a child.\r
 \r
@@ -1838,10 +1838,10 @@ NetLibCreateServiceChild (
   @param[in]   Controller            The controller which has the service installed.\r
   @param[in]   Image                 The image handle used to open service.\r
   @param[in]   ServiceBindingGuid    The service's Guid.\r
-  @param[in]   ChildHandle           The child to destory.\r
+  @param[in]   ChildHandle           The child to destroy.\r
 \r
-  @retval EFI_SUCCESS           The child is successfully destoried.\r
-  @retval Others                Failed to destory the child.\r
+  @retval EFI_SUCCESS           The child is successfully destroyed.\r
+  @retval Others                Failed to destroy the child.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1875,7 +1875,7 @@ NetLibDestroyServiceChild (
   }\r
 \r
   //\r
-  // destory the child\r
+  // destroy the child\r
   //\r
   Status = Service->DestroyChild (Service, ChildHandle);\r
   return Status;\r
index bb3955949c4cc0972ee9582ff6a3e32c8a1522c7..e1d72f3f1c68929721a7ce4a56b918951ffc9f11 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Help functions to access UDP service, it is used by both the DHCP and MTFTP.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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<BR>\r
@@ -804,7 +804,7 @@ UdpIoFreeIo (
     }\r
 \r
     //\r
-    // Close then destory the Udp4 child\r
+    // Close then destroy the Udp4 child\r
     //\r
     gBS->CloseProtocol (\r
            UdpIo->UdpHandle,\r
@@ -827,7 +827,7 @@ UdpIoFreeIo (
     }\r
 \r
     //\r
-    // Close then destory the Udp6 child\r
+    // Close then destroy the Udp6 child\r
     //\r
     gBS->CloseProtocol (\r
            UdpIo->UdpHandle,\r
index cd4fbbd196a46deeed74ad1e09009c95d80ce3b1..8a773d9461e52e3fd06dea4417200047c4790cdf 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
@@ -146,11 +146,11 @@ DhcpConfigUdpIo (
 \r
 \r
 /**\r
-  Destory the DHCP service. The Dhcp4 service may be partly initialized,\r
+  Destroy the DHCP service. The Dhcp4 service may be partly initialized,\r
   or partly destroyed. If a resource is destroyed, it is marked as so in\r
   case the destroy failed and being called again later.\r
 \r
-  @param[in]  DhcpSb                 The DHCP service instance to destory.\r
+  @param[in]  DhcpSb                 The DHCP service instance to destroy.\r
 \r
   @retval EFI_SUCCESS            Always return success.\r
 \r
@@ -212,7 +212,7 @@ Dhcp4CreateService (
 \r
   DhcpSb->Signature       = DHCP_SERVICE_SIGNATURE;\r
   DhcpSb->ServiceState    = DHCP_UNCONFIGED;\r
-  DhcpSb->InDestory       = FALSE;\r
+  DhcpSb->InDestroy       = FALSE;\r
   DhcpSb->Controller      = Controller;\r
   DhcpSb->Image           = ImageHandle;\r
   InitializeListHead (&DhcpSb->Children);\r
@@ -414,7 +414,7 @@ Dhcp4DriverBindingStop (
 \r
   DhcpSb = DHCP_SERVICE_FROM_THIS (ServiceBinding);\r
 \r
-  if (DhcpSb->InDestory) {\r
+  if (DhcpSb->InDestroy) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -422,8 +422,8 @@ Dhcp4DriverBindingStop (
 \r
   if (NumberOfChildren == 0) {\r
 \r
-    DhcpSb->InDestory    = TRUE;\r
-    DhcpSb->ServiceState = DHCP_DESTORY;\r
+    DhcpSb->InDestroy    = TRUE;\r
+    DhcpSb->ServiceState = DHCP_DESTROY;\r
 \r
     gBS->UninstallProtocolInterface (\r
            NicHandle,\r
@@ -436,7 +436,7 @@ Dhcp4DriverBindingStop (
     FreePool (DhcpSb);\r
   } else {\r
     //\r
-    // Don't use NET_LIST_FOR_EACH_SAFE here, Dhcp4ServiceBindingDestoryChild\r
+    // Don't use NET_LIST_FOR_EACH_SAFE here, Dhcp4ServiceBindingDestroyChild\r
     // may cause other child to be deleted.\r
     //\r
     while (!IsListEmpty (&DhcpSb->Children)) {\r
@@ -473,7 +473,7 @@ DhcpInitProtocol (
   InitializeListHead (&Instance->Link);\r
   Instance->Handle            = NULL;\r
   Instance->Service           = DhcpSb;\r
-  Instance->InDestory         = FALSE;\r
+  Instance->InDestroy         = FALSE;\r
   Instance->CompletionEvent   = NULL;\r
   Instance->RenewRebindEvent  = NULL;\r
   Instance->Token             = NULL;\r
@@ -640,15 +640,15 @@ Dhcp4ServiceBindingDestroyChild (
   //\r
   // A child can be destroyed more than once. For example,\r
   // Dhcp4DriverBindingStop will destroy all of its children.\r
-  // when caller driver is being stopped, it will destory the\r
+  // when caller driver is being stopped, it will destroy the\r
   // dhcp child it opens.\r
   //\r
-  if (Instance->InDestory) {\r
+  if (Instance->InDestroy) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
-  Instance->InDestory = TRUE;\r
+  Instance->InDestroy = TRUE;\r
 \r
   //\r
   // Close the Udp4 protocol.\r
@@ -670,7 +670,7 @@ Dhcp4ServiceBindingDestroyChild (
                   );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    Instance->InDestory = FALSE;\r
+    Instance->InDestroy = FALSE;\r
 \r
     gBS->RestoreTPL (OldTpl);\r
     return Status;\r
index 438f4cddf7ec880106a6fcc18ab1a1eef54cfa7d..08faff020609c0dbca8edd1ab7e003c73ec2f7eb 100644 (file)
@@ -6,7 +6,7 @@
   RFC 1534: Interoperation Between DHCP and BOOTP\r
   RFC 3396: Encoding Long Options in DHCP.\r
   \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
@@ -48,12 +48,12 @@ typedef struct _DHCP_PROTOCOL DHCP_PROTOCOL;
 // The state of the DHCP service. It starts as UNCONFIGED. If\r
 // and active child configures the service successfully, it\r
 // goes to CONFIGED. If the active child configures NULL, it\r
-// goes back to UNCONFIGED. It becomes DESTORY if it is (partly)\r
-// destoried.\r
+// goes back to UNCONFIGED. It becomes DESTROY if it is (partly)\r
+// destroyed.\r
 //\r
 #define DHCP_UNCONFIGED          0\r
 #define DHCP_CONFIGED            1\r
-#define DHCP_DESTORY             2\r
+#define DHCP_DESTROY             2\r
 \r
 \r
 struct _DHCP_PROTOCOL {\r
@@ -63,7 +63,7 @@ struct _DHCP_PROTOCOL {
   EFI_HANDLE                        Handle;\r
   DHCP_SERVICE                      *Service;\r
 \r
-  BOOLEAN                           InDestory;\r
+  BOOLEAN                           InDestroy;\r
 \r
   EFI_EVENT                         CompletionEvent;\r
   EFI_EVENT                         RenewRebindEvent;\r
@@ -83,8 +83,8 @@ struct _DHCP_SERVICE {
   UINT32                        Signature;\r
   EFI_SERVICE_BINDING_PROTOCOL  ServiceBinding;\r
 \r
-  INTN                          ServiceState; // CONFIGED, UNCONFIGED, and DESTORY\r
-  BOOLEAN                       InDestory;\r
+  INTN                          ServiceState; // CONFIGED, UNCONFIGED, and DESTROY\r
+  BOOLEAN                       InDestroy;\r
 \r
   EFI_HANDLE                    Controller;\r
   EFI_HANDLE                    Image;\r
index b3ac646446687834fed7a5ee0ee5760b121bde43..19ad101d5404d812998568727fdbb7175f43e72c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   EFI DHCP protocol implementation.\r
   \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
@@ -972,11 +972,11 @@ DhcpInput (
   DhcpSb  = (DHCP_SERVICE *) Context;\r
 \r
   //\r
-  // Don't restart receive if error occurs or DHCP is destoried.\r
+  // Don't restart receive if error occurs or DHCP is destroyed.\r
   //\r
   if (EFI_ERROR (IoStatus)) {\r
     return ;\r
-  } else if (DhcpSb->ServiceState == DHCP_DESTORY) {\r
+  } else if (DhcpSb->ServiceState == DHCP_DESTROY) {\r
     NetbufFree (UdpPacket);\r
     return ;\r
   }\r
index 2d69dcfe37fd8f385eebb45b7029a7893ed626a7..4ce85a3f51823d86d2ac12d000b84d9c683b7d11 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for IP4 driver.\r
 \r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -118,7 +118,7 @@ Ip4DriverBindingSupported (
   Clean up a IP4 service binding instance. It will release all\r
   the resource allocated by the instance. The instance may be\r
   partly initialized, or partly destroyed. If a resource is\r
-  destroyed, it is marked as that in case the destory failed and\r
+  destroyed, it is marked as that in case the destroy failed and\r
   being called again later.\r
 \r
   @param[in]  IpSb               The IP4 serviceing binding instance to clean up\r
@@ -176,7 +176,7 @@ Ip4CreateService (
   IpSb->ServiceBinding.CreateChild  = Ip4ServiceBindingCreateChild;\r
   IpSb->ServiceBinding.DestroyChild = Ip4ServiceBindingDestroyChild;\r
   IpSb->State                       = IP4_SERVICE_UNSTARTED;\r
-  IpSb->InDestory                   = FALSE;\r
+  IpSb->InDestroy                   = FALSE;\r
 \r
   IpSb->NumChildren                 = 0;\r
   InitializeListHead (&IpSb->Children);\r
@@ -315,7 +315,7 @@ ON_ERROR:
   Clean up a IP4 service binding instance. It will release all\r
   the resource allocated by the instance. The instance may be\r
   partly initialized, or partly destroyed. If a resource is\r
-  destroyed, it is marked as that in case the destory failed and\r
+  destroyed, it is marked as that in case the destroy failed and\r
   being called again later.\r
 \r
   @param[in]  IpSb               The IP4 serviceing binding instance to clean up\r
@@ -581,7 +581,7 @@ Ip4DriverBindingStop (
 \r
     OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
-    if (IpSb->Ip4Config != NULL && (IpSb->State != IP4_SERVICE_DESTORY)) {\r
+    if (IpSb->Ip4Config != NULL && (IpSb->State != IP4_SERVICE_DESTROY)) {\r
 \r
       IpSb->Ip4Config->Stop (IpSb->Ip4Config);\r
 \r
@@ -651,7 +651,7 @@ Ip4DriverBindingStop (
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
-  if (IpSb->InDestory) {\r
+  if (IpSb->InDestroy) {\r
     gBS->RestoreTPL (OldTpl);\r
     return EFI_SUCCESS;\r
   }\r
@@ -668,10 +668,10 @@ Ip4DriverBindingStop (
       goto ON_ERROR;\r
     }\r
 \r
-    IpSb->InDestory = TRUE;\r
+    IpSb->InDestroy = TRUE;\r
 \r
     State           = IpSb->State;\r
-    IpSb->State     = IP4_SERVICE_DESTORY;\r
+    IpSb->State     = IP4_SERVICE_DESTROY;\r
 \r
     //\r
     // Clear the variable data.\r
@@ -696,10 +696,10 @@ Ip4DriverBindingStop (
 \r
     FreePool (IpSb);\r
   } else if (NumberOfChildren == 0) {\r
-    IpSb->InDestory = TRUE;\r
+    IpSb->InDestroy = TRUE;\r
 \r
     State           = IpSb->State;\r
-    IpSb->State     = IP4_SERVICE_DESTORY;\r
+    IpSb->State     = IP4_SERVICE_DESTROY;\r
 \r
     //\r
     // Clear the variable data.\r
@@ -912,18 +912,18 @@ Ip4ServiceBindingDestroyChild (
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
   //\r
-  // A child can be destoried more than once. For example,\r
-  // Ip4DriverBindingStop will destory all of its children.\r
-  // when UDP driver is being stopped, it will destory all\r
+  // A child can be destroyed more than once. For example,\r
+  // Ip4DriverBindingStop will destroy all of its children.\r
+  // when UDP driver is being stopped, it will destroy all\r
   // the IP child it opens.\r
   //\r
-  if (IpInstance->State == IP4_STATE_DESTORY) {\r
+  if (IpInstance->State == IP4_STATE_DESTROY) {\r
     gBS->RestoreTPL (OldTpl);\r
     return EFI_SUCCESS;\r
   }\r
 \r
   State             = IpInstance->State;\r
-  IpInstance->State = IP4_STATE_DESTORY;\r
+  IpInstance->State = IP4_STATE_DESTROY;\r
 \r
   //\r
   // Close the Managed Network protocol.\r
index d97ab412cb33367a83125e3c38192545de603315..224244164e41a7b1b5385036b3372157debd05c9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement IP4 pesudo interface.\r
   \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -745,10 +745,10 @@ Ip4FreeInterface (
   }\r
 \r
   //\r
-  // Destory the interface if this is the last IP instance that\r
+  // Destroy the interface if this is the last IP instance that\r
   // has the address. Remove all the system transmitted packets\r
   // from this interface, cancel the receive request if there is\r
-  // one, and destory the ARP requests.\r
+  // one, and destroy the ARP requests.\r
   //\r
   Ip4CancelFrames (Interface, EFI_ABORTED, Ip4CancelInstanceFrame, NULL);\r
   Ip4CancelReceive (Interface);\r
index d35e5688c5ab30b3eb7d682575f7f076802b429e..998fb25bc5f4ab9418e01a0abe2e7b755f542bcc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definition for IP4 pesudo interface structure.\r
   \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -154,7 +154,7 @@ struct _IP4_INTERFACE {
   BOOLEAN                       Configured;\r
 \r
   //\r
-  // Handle used to create/destory ARP child. All the IP children\r
+  // Handle used to create/destroy ARP child. All the IP children\r
   // share one MNP which is owned by IP service binding.\r
   //\r
   EFI_HANDLE                    Controller;\r
index 2cad1f3bb97e03b03d1c60e37e41421f0bd29dde..f4ce3ea025866b28ceae11222b2e24e08852816c 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -1256,7 +1256,7 @@ EfiIp4Configure (
     Status = Ip4CleanProtocol (IpInstance);\r
 \r
     //\r
-    // Don't change the state if it is DESTORY, consider the following\r
+    // Don't change the state if it is DESTROY, consider the following\r
     // valid sequence: Mnp is unloaded-->Ip Stopped-->Udp Stopped,\r
     // Configure (ThisIp, NULL). If the state is changed to UNCONFIGED,\r
     // the unload fails miserably.\r
index 86e6385ecf5fc642ade37a2f2440e4f1600268a1..563cf7f91ff28ab505944f5443db43f2451da59b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Ip4 internal functions and type defintions.\r
   \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -50,23 +50,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // The state of IP4 protocol. It starts from UNCONFIGED. if it is\r
 // successfully configured, it goes to CONFIGED. if configure NULL\r
-// is called, it becomes UNCONFIGED again. If (partly) destoried, it\r
-// becomes DESTORY.\r
+// is called, it becomes UNCONFIGED again. If (partly) destroyed, it\r
+// becomes DESTROY.\r
 //\r
 #define IP4_STATE_UNCONFIGED    0\r
 #define IP4_STATE_CONFIGED      1\r
-#define IP4_STATE_DESTORY       2\r
+#define IP4_STATE_DESTROY       2\r
 \r
 //\r
 // The state of IP4 service. It starts from UNSTARTED. It transits\r
 // to STARTED if autoconfigure is started. If default address is\r
-// configured, it becomes CONFIGED. and if partly destoried, it goes\r
-// to DESTORY.\r
+// configured, it becomes CONFIGED. and if partly destroyed, it goes\r
+// to DESTROY.\r
 //\r
 #define IP4_SERVICE_UNSTARTED   0\r
 #define IP4_SERVICE_STARTED     1\r
 #define IP4_SERVICE_CONFIGED    2\r
-#define IP4_SERVICE_DESTORY     3\r
+#define IP4_SERVICE_DESTROY     3\r
 \r
 \r
 ///\r
@@ -160,7 +160,7 @@ struct _IP4_SERVICE {
   UINT32                          Signature;\r
   EFI_SERVICE_BINDING_PROTOCOL    ServiceBinding;\r
   INTN                            State;\r
-  BOOLEAN                         InDestory;\r
+  BOOLEAN                         InDestroy;\r
 \r
   //\r
   // List of all the IP instances and interfaces, and default\r
index 0990d1803588f98a1abb0ad9ab26c861de01154d..bd15fc2e176c4939579a5877dfc4828370eac21c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   IP4 input process.\r
   \r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -845,7 +845,7 @@ Ip4AccpetFrame (
   IpSb   = (IP4_SERVICE *) Context;\r
   Option = NULL;\r
 \r
-  if (EFI_ERROR (IoStatus) || (IpSb->State == IP4_SERVICE_DESTORY)) {\r
+  if (EFI_ERROR (IoStatus) || (IpSb->State == IP4_SERVICE_DESTROY)) {\r
     goto DROP;\r
   }\r
 \r
index 1c74b5b08344cf9014df2ce341f51991f1f2b9da..2a12b1d5e7c21c13fa58f3357e514770257db754 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of Mtftp drivers.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
@@ -159,7 +159,7 @@ Mtftp4CreateService (
 \r
   MtftpSb->Signature      = MTFTP4_SERVICE_SIGNATURE;\r
   MtftpSb->ServiceBinding = gMtftp4ServiceBindingTemplete;\r
-  MtftpSb->InDestory      = FALSE;\r
+  MtftpSb->InDestroy      = FALSE;\r
   MtftpSb->ChildrenNum    = 0;\r
   InitializeListHead (&MtftpSb->Children);\r
 \r
@@ -374,7 +374,7 @@ Mtftp4DriverBindingStop (
 \r
   MtftpSb = MTFTP4_SERVICE_FROM_THIS (ServiceBinding);\r
 \r
-  if (MtftpSb->InDestory) {\r
+  if (MtftpSb->InDestroy) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -382,7 +382,7 @@ Mtftp4DriverBindingStop (
 \r
   if (NumberOfChildren == 0) {\r
 \r
-    MtftpSb->InDestory = TRUE;\r
+    MtftpSb->InDestroy = TRUE;\r
 \r
     gBS->UninstallProtocolInterface (\r
            NicHandle,\r
@@ -429,7 +429,7 @@ Mtftp4InitProtocol (
   InitializeListHead (&Instance->Link);\r
   CopyMem (&Instance->Mtftp4, &gMtftp4ProtocolTemplate, sizeof (Instance->Mtftp4));\r
   Instance->State     = MTFTP4_STATE_UNCONFIGED;\r
-  Instance->InDestory = FALSE;\r
+  Instance->InDestroy = FALSE;\r
   Instance->Service   = MtftpSb;\r
 \r
   InitializeListHead (&Instance->Blocks);\r
@@ -548,14 +548,14 @@ ON_ERROR:
 \r
 \r
 /**\r
-  Destory one of the service binding's child.\r
+  Destroy one of the service binding's child.\r
 \r
   @param  This                   The service binding instance\r
-  @param  ChildHandle            The child handle to destory\r
+  @param  ChildHandle            The child handle to destroy\r
 \r
   @retval EFI_INVALID_PARAMETER  The parameter is invaid.\r
-  @retval EFI_UNSUPPORTED        The child may have already been destoried.\r
-  @retval EFI_SUCCESS            The child is destoried and removed from the\r
+  @retval EFI_UNSUPPORTED        The child may have already been destroyed.\r
+  @retval EFI_SUCCESS            The child is destroyed and removed from the\r
                                  parent's child list.\r
 \r
 **/\r
@@ -599,11 +599,11 @@ Mtftp4ServiceBindingDestroyChild (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (Instance->InDestory) {\r
+  if (Instance->InDestroy) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
-  Instance->InDestory = TRUE;\r
+  Instance->InDestroy = TRUE;\r
 \r
   //\r
   // Close the Udp4 protocol.\r
@@ -625,7 +625,7 @@ Mtftp4ServiceBindingDestroyChild (
                   );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    Instance->InDestory = FALSE;\r
+    Instance->InDestroy = FALSE;\r
     return Status;\r
   }\r
 \r
index 392ea51668995a42b1a8b7e9d2b0e79d00d7feb5..63828bd43359a507c1f79648a0b57bc1b1f633bb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Mtftp drivers function header.\r
   \r
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
@@ -113,14 +113,14 @@ Mtftp4ServiceBindingCreateChild (
   );\r
 \r
 /**\r
-  Destory one of the service binding's child.\r
+  Destroy one of the service binding's child.\r
 \r
   @param  This                   The service binding instance\r
-  @param  ChildHandle            The child handle to destory\r
+  @param  ChildHandle            The child handle to destroy\r
 \r
   @retval EFI_INVALID_PARAMETER  The parameter is invaid.\r
-  @retval EFI_UNSUPPORTED        The child may have already been destoried.\r
-  @retval EFI_SUCCESS            The child is destoried and removed from the\r
+  @retval EFI_UNSUPPORTED        The child may have already been destroyed.\r
+  @retval EFI_SUCCESS            The child is destroyed and removed from the\r
                                  parent's child list.\r
 \r
 **/\r
index 3c68235d4236fc76c6de28f37f0f59850f44c3b3..5183e1a5b3b13b80d87a51b10fd06355e812271a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Interface routine for Mtftp4.\r
   \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
@@ -1073,7 +1073,7 @@ EfiMtftp4Poll (
 \r
   if (Instance->State == MTFTP4_STATE_UNCONFIGED) {\r
     return EFI_NOT_STARTED;\r
-  } else if (Instance->State == MTFTP4_STATE_DESTORY) {\r
+  } else if (Instance->State == MTFTP4_STATE_DESTROY) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
index 502fcaa53a3d8482e2576487fd4a326887060791..41f524abb0a2fd939fa802e8b9f15e446112a5ec 100644 (file)
@@ -9,7 +9,7 @@
   RFC2348 - TFTP Blocksize Option\r
   RFC2349 - TFTP Timeout Interval and Transfer Size Options\r
   \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
@@ -59,7 +59,7 @@ typedef struct _MTFTP4_PROTOCOL MTFTP4_PROTOCOL;
 \r
 #define MTFTP4_STATE_UNCONFIGED     0\r
 #define MTFTP4_STATE_CONFIGED       1\r
-#define MTFTP4_STATE_DESTORY        2\r
+#define MTFTP4_STATE_DESTROY        2\r
 \r
 ///\r
 /// Mtftp service block\r
@@ -68,7 +68,7 @@ struct _MTFTP4_SERVICE {
   UINT32                        Signature;\r
   EFI_SERVICE_BINDING_PROTOCOL  ServiceBinding;\r
 \r
-  BOOLEAN                       InDestory;\r
+  BOOLEAN                       InDestroy;\r
 \r
   UINT16                        ChildrenNum;\r
   LIST_ENTRY                    Children;\r
@@ -99,7 +99,7 @@ struct _MTFTP4_PROTOCOL {
   EFI_MTFTP4_PROTOCOL           Mtftp4;\r
 \r
   INTN                          State;\r
-  BOOLEAN                       InDestory;\r
+  BOOLEAN                       InDestroy;\r
 \r
   MTFTP4_SERVICE                *Service;\r
   EFI_HANDLE                    Handle;\r
index c627a140a89060a80cd6d03221b494e9f39a9952..2e31643821305d5961319f8864aa921645e5824e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of the Socket.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -739,7 +739,7 @@ SockDestroy (
 \r
   }\r
   //\r
-  // Destory the RcvBuffer Queue and SendBuffer Queue\r
+  // Destroy the RcvBuffer Queue and SendBuffer Queue\r
   //\r
   NetbufQueFree (Sock->RcvBuffer.DataQueue);\r
   NetbufQueFree (Sock->SndBuffer.DataQueue);\r
@@ -754,7 +754,7 @@ SockDestroy (
 \r
     DEBUG (\r
       (EFI_D_INFO,\r
-      "SockDestory: Delete a unaccepted socket from parent"\r
+      "SockDestroy: Delete a unaccepted socket from parent"\r
       "now conncnt is %d\n",\r
       Sock->Parent->ConnCnt)\r
       );\r
index d17bfa8b9d22c7ea1c679ece807597505c5140bc..ac36460da8d5a7f8fb427f4c7bd30ebca8ad03a1 100644 (file)
@@ -131,7 +131,7 @@ SockBufferToken (
 \r
 \r
 /**\r
-  Destory the socket Sock and its associated protocol control block.\r
+  Destroy the socket Sock and its associated protocol control block.\r
 \r
   @param  Sock                 The socket to be destroyed.\r
 \r
index 0317efa3229da4568c47a756e3fecaae1d826f59..b8ace790ca0994df61c98673608832c8814056a8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Socket header file.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -723,7 +723,7 @@ SockCreateChild (
   );\r
 \r
 /**\r
-  Destory the socket Sock and its associated protocol control block.\r
+  Destroy the socket Sock and its associated protocol control block.\r
 \r
   @param  Sock                 The socket to be destroyed.\r
 \r
index 5f3d9135474259f4b4e36a0317b83f906be92fe1..fa3594d36b0e17a9f71e79d1d0bea666a33a4d1d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Support for PxeBc dhcp functions.\r
 \r
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2012, 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
@@ -203,7 +203,7 @@ PxeBcParseCachedDhcpPacket (
             (Offer->Dhcp4.Header.BootFileName[0] != 0)) {\r
     //\r
     // If the bootfile is not present and bootfilename is present in dhcp packet, just parse it.\r
-    // And do not count dhcp option header, or else will destory the serverhostname.\r
+    // And do not count dhcp option header, or else will destroy the serverhostname.\r
     //\r
     Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] = (EFI_DHCP4_PACKET_OPTION *) (&Offer->Dhcp4.Header.BootFileName[0] -\r
                                             OFFSET_OF (EFI_DHCP4_PACKET_OPTION, Data[0]));\r
index e0f6cd89e56d149a1798446b6513e4f2ef94f45e..0de332fcce456f70f14be225c06a465968b8080f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation for Ping6 application.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -802,13 +802,13 @@ ON_ERROR:
 }\r
 \r
 /**\r
-  Destory the IP6 instance.\r
+  Destroy the IP6 instance.\r
 \r
   @param[in]    Private    The pointer of PING6_PRIVATE_DATA.\r
 \r
 **/\r
 VOID\r
-Ping6DestoryIp6Instance (\r
+Ping6DestroyIp6Instance (\r
   IN PING6_PRIVATE_DATA    *Private\r
   )\r
 {\r
@@ -1019,7 +1019,7 @@ ON_EXIT:
     }\r
 \r
     if (Private->Ip6ChildHandle != NULL) {\r
-      Ping6DestoryIp6Instance (Private);\r
+      Ping6DestroyIp6Instance (Private);\r
     }\r
 \r
     FreePool (Private);\r
index b789f2a478194d0ec3907a9f080e2fcf60921ec1..346986bd159cebb0d22fb3b9ee0db997ed4c1c62 100644 (file)
@@ -82,7 +82,7 @@ Dhcp6ConfigureUdpIo (
 \r
 \r
 /**\r
-  Destory the Dhcp6 service. The Dhcp6 service may be partly initialized,\r
+  Destroy the Dhcp6 service. The Dhcp6 service may be partly initialized,\r
   or partly destroyed. If a resource is destroyed, it is marked as such in\r
   case the destroy failed and being called again later.\r
 \r
@@ -95,7 +95,7 @@ Dhcp6DestroyService (
   )\r
 {\r
   //\r
-  // All children instances should have been already destoryed here.\r
+  // All children instances should have been already destroyed here.\r
   //\r
   ASSERT (Service->NumOfChild == 0);\r
 \r
@@ -155,7 +155,7 @@ Dhcp6CreateService (
   // Initialize the fields of the new Dhcp6 service.\r
   //\r
   Dhcp6Srv->Signature       = DHCP6_SERVICE_SIGNATURE;\r
-  Dhcp6Srv->InDestory       = FALSE;\r
+  Dhcp6Srv->InDestroy       = FALSE;\r
   Dhcp6Srv->Controller      = Controller;\r
   Dhcp6Srv->Image           = ImageHandle;\r
   Dhcp6Srv->Xid             = (0xffffff & NET_RANDOM (NetRandomInitSeed ()));\r
@@ -294,7 +294,7 @@ Dhcp6CreateInstance (
   Dhcp6Ins->Signature       = DHCP6_INSTANCE_SIGNATURE;\r
   Dhcp6Ins->UdpSts          = EFI_ALREADY_STARTED;\r
   Dhcp6Ins->Service         = Service;\r
-  Dhcp6Ins->InDestory       = FALSE;\r
+  Dhcp6Ins->InDestroy       = FALSE;\r
   Dhcp6Ins->MediaPresent    = TRUE;\r
 \r
   CopyMem (\r
@@ -528,7 +528,7 @@ Dhcp6DriverBindingStop (
 \r
   Service = DHCP6_SERVICE_FROM_THIS (ServiceBinding);\r
 \r
-  if (Service->InDestory) {\r
+  if (Service->InDestroy) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -536,9 +536,9 @@ Dhcp6DriverBindingStop (
 \r
   if (NumberOfChildren == 0) {\r
     //\r
-    // Destory the service itself if no child instance left.\r
+    // Destroy the service itself if no child instance left.\r
     //\r
-    Service->InDestory = TRUE;\r
+    Service->InDestroy = TRUE;\r
 \r
     Status = gBS->UninstallProtocolInterface (\r
                     NicHandle,\r
@@ -547,7 +547,7 @@ Dhcp6DriverBindingStop (
                     );\r
 \r
     if (EFI_ERROR (Status)) {\r
-      Service->InDestory = FALSE;\r
+      Service->InDestroy = FALSE;\r
       goto ON_EXIT;\r
     }\r
 \r
@@ -555,7 +555,7 @@ Dhcp6DriverBindingStop (
 \r
   } else {\r
     //\r
-    // Destory all the children instances before destory the service.\r
+    // Destroy all the children instances before destroy the service.\r
     //\r
     while (!IsListEmpty (&Service->Child)) {\r
       Instance = NET_LIST_HEAD (&Service->Child, DHCP6_INSTANCE, Link);\r
@@ -747,13 +747,13 @@ Dhcp6ServiceBindingDestroyChild (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (Instance->InDestory) {\r
+  if (Instance->InDestroy) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
-  Instance->InDestory = TRUE;\r
+  Instance->InDestroy = TRUE;\r
 \r
   Status = gBS->CloseProtocol (\r
                   Service->UdpIo->UdpHandle,\r
@@ -763,7 +763,7 @@ Dhcp6ServiceBindingDestroyChild (
                   );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    Instance->InDestory = FALSE;\r
+    Instance->InDestroy = FALSE;\r
     gBS->RestoreTPL (OldTpl);\r
     return Status;\r
   }\r
@@ -778,7 +778,7 @@ Dhcp6ServiceBindingDestroyChild (
                   );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    Instance->InDestory = FALSE;\r
+    Instance->InDestroy = FALSE;\r
     gBS->RestoreTPL (OldTpl);\r
     return Status;\r
   }\r
index 0e206cd504ece25dfdd8631af05bf21afb745588..d4e9746be8cbd512e4c8cc0f35e777598281f48d 100644 (file)
@@ -246,7 +246,7 @@ struct _DHCP6_INSTANCE {
   UINT8                         AdPref;\r
   EFI_IPv6_ADDRESS              *Unicast;\r
   EFI_STATUS                    UdpSts;\r
-  BOOLEAN                       InDestory;\r
+  BOOLEAN                       InDestroy;\r
   BOOLEAN                       MediaPresent;\r
   UINT64                        StartTime;\r
 };\r
@@ -266,7 +266,7 @@ struct _DHCP6_SERVICE {
   UINT32                        Xid;\r
   LIST_ENTRY                    Child;\r
   UINTN                         NumOfChild;\r
-  BOOLEAN                       InDestory;\r
+  BOOLEAN                       InDestroy;\r
 };\r
 \r
 /**\r
index 656fd8390844fb9947cb3f7d127c35fb44fe9cef..f2e33f335fc5476196211c94984e90b0e9234fcf 100644 (file)
@@ -52,7 +52,7 @@ Dhcp6EnqueueRetry (
   }\r
 \r
   //\r
-  // Save tx packet pointer, and it will be destoryed when reply received.\r
+  // Save tx packet pointer, and it will be destroyed when reply received.\r
   //\r
   TxCb->TxPacket = Packet;\r
   TxCb->Xid      = Packet->Dhcp6.Header.TransactionId;\r
@@ -2510,7 +2510,7 @@ Dhcp6HandleStateful (
   ClientId = Service->ClientId;\r
   Status   = EFI_SUCCESS;\r
 \r
-  if (Instance->InDestory || Instance->Config == NULL) {\r
+  if (Instance->InDestroy || Instance->Config == NULL) {\r
     goto ON_CONTINUE;\r
   }\r
 \r
@@ -2624,7 +2624,7 @@ Dhcp6HandleStateless (
   IsMatched = FALSE;\r
   InfCb     = NULL;\r
 \r
-  if (Instance->InDestory) {\r
+  if (Instance->InDestroy) {\r
     goto ON_EXIT;\r
   }\r
 \r
index e90c982bc229265c4b93af7aa8e9ed9a8adfc8c8..879d310cc919e3d9f06ba2e682c1ba7fcbdd737d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation for iSCSI Boot Firmware Table publication.\r
 \r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, 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
@@ -310,18 +310,18 @@ IScsiFillNICAndTargetSections (
       //\r
       // Map the various v4 addresses into v6 addresses.\r
       //\r
-      IScsiMapV4ToV6Addr (&NvData->LocalIp, &Nic->Ip);\r
-      IScsiMapV4ToV6Addr (&NvData->Gateway, &Nic->Gateway);\r
+      IScsiMapV4ToV6Addr (&NvData->LocalIp.v4, &Nic->Ip);\r
+      IScsiMapV4ToV6Addr (&NvData->Gateway.v4, &Nic->Gateway);\r
       IScsiMapV4ToV6Addr (&Attempt->PrimaryDns.v4, &Nic->PrimaryDns);\r
       IScsiMapV4ToV6Addr (&Attempt->SecondaryDns.v4, &Nic->SecondaryDns);\r
       IScsiMapV4ToV6Addr (&Attempt->DhcpServer.v4, &Nic->DhcpServer);\r
 \r
     } else if (NvData->IpMode == IP_MODE_IP6 || NvData->IpMode == IP_MODE_AUTOCONFIG) {\r
-      //\r
-      // TODO: The subnet mask/local ip/gateway/dhcpserver for iBFT-IPv6 needs to be \r
-      // confirmed with spec owner.\r
-      //\r
 \r
+      Nic->SubnetMaskPrefixLength = NvData->PrefixLength;\r
+      CopyMem (&Nic->Ip, &NvData->LocalIp, sizeof (EFI_IPv6_ADDRESS));\r
+      CopyMem (&Nic->Gateway, &NvData->Gateway, sizeof (EFI_IPv6_ADDRESS));\r
+      \r
       CopyMem (&Nic->PrimaryDns, &Attempt->PrimaryDns, sizeof (EFI_IPv6_ADDRESS));\r
       CopyMem (&Nic->SecondaryDns, &Attempt->SecondaryDns, sizeof (EFI_IPv6_ADDRESS));\r
       //\r
index ccb83edb843a07259ed34dc6545bdf3c6e2b4321..7c8eb3784208cb3fd76bc66a712de7afd0ab3c2e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The shared head file for iSCSI driver.\r
 \r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, 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
@@ -23,6 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/HiiConfigAccess.h>\r
 \r
+#include <Protocol/Ip6.h>\r
 #include <Protocol/Dhcp4.h>\r
 #include <Protocol/Dhcp6.h>\r
 #include <Protocol/Tcp4.h>\r
index 8646f666a47aa4ec94678451379c4caec39aec02..c9ff96da6cc37991198bab49f1752817a6a9ad4f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Miscellaneous definitions for iSCSI driver.\r
 \r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, 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
@@ -23,14 +23,15 @@ typedef struct _ISCSI_SESSION_CONFIG_NVDATA {
   UINT8             Enabled;\r
   UINT8             IpMode;\r
 \r
-  EFI_IPv4_ADDRESS  LocalIp;\r
+  EFI_IP_ADDRESS    LocalIp;\r
   EFI_IPv4_ADDRESS  SubnetMask;\r
-  EFI_IPv4_ADDRESS  Gateway;\r
+  EFI_IP_ADDRESS    Gateway;\r
 \r
   BOOLEAN           InitiatorInfoFromDhcp;\r
   BOOLEAN           TargetInfoFromDhcp;\r
   CHAR8             TargetName[ISCSI_NAME_MAX_SIZE];\r
   EFI_IP_ADDRESS    TargetIp;\r
+  UINT8             PrefixLength;\r
   UINT8             BootLun[8];\r
 \r
   UINT16            ConnectTimeout; ///< timout value in milliseconds\r
index 72c90a7fe8c997550a639318810964e187b8b1eb..3dabb00d4a614d227ae2e2f33ed14b5b7cde92c4 100644 (file)
@@ -308,6 +308,98 @@ IScsiDestroyConnection (
   FreePool (Conn);\r
 }\r
 \r
+/**\r
+  Retrieve the IPv6 Address/Prefix/Gateway from the established TCP connection, these informations\r
+  will be filled in the iSCSI Boot Firmware Table.\r
+\r
+  @param[in]  Conn             The connection used in the iSCSI login phase.\r
+\r
+  @retval     EFI_SUCCESS      Get the NIC information successfully.\r
+  @retval     Others           Other errors as indicated.\r
+  \r
+**/\r
+EFI_STATUS\r
+IScsiGetIp6NicInfo (\r
+  IN ISCSI_CONNECTION  *Conn\r
+  )\r
+{\r
+  ISCSI_SESSION_CONFIG_NVDATA  *NvData;\r
+  EFI_TCP6_PROTOCOL            *Tcp6;\r
+  EFI_IP6_MODE_DATA            Ip6ModeData;\r
+  EFI_STATUS                   Status;\r
+  EFI_IPv6_ADDRESS             *TargetIp;\r
+  UINTN                        Index;\r
+  UINT8                        SubnetPrefixLength;\r
+  UINTN                        RouteEntry;\r
+\r
+  NvData   = &Conn->Session->ConfigData->SessionConfigData;\r
+  TargetIp = &NvData->TargetIp.v6;\r
+  Tcp6     = Conn->TcpIo.Tcp.Tcp6;\r
+\r
+  ZeroMem (&Ip6ModeData, sizeof (EFI_IP6_MODE_DATA));\r
+  Status = Tcp6->GetModeData (\r
+                   Tcp6,\r
+                   NULL,\r
+                   NULL,\r
+                   &Ip6ModeData,\r
+                   NULL,\r
+                   NULL\r
+                   );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  if (!Ip6ModeData.IsConfigured) {\r
+    Status = EFI_ABORTED;\r
+    goto ON_EXIT;\r
+  }\r
+\r
+  IP6_COPY_ADDRESS (&NvData->LocalIp, &Ip6ModeData.ConfigData.StationAddress);\r
+\r
+  NvData->PrefixLength = 0;\r
+  for (Index = 0; Index < Ip6ModeData.AddressCount; Index++) {\r
+    if (EFI_IP6_EQUAL (&NvData->LocalIp.v6, &Ip6ModeData.AddressList[Index].Address)) {\r
+      NvData->PrefixLength = Ip6ModeData.AddressList[Index].PrefixLength;\r
+      break;\r
+    }\r
+  }\r
+\r
+  SubnetPrefixLength = 0;\r
+  RouteEntry = Ip6ModeData.RouteCount;\r
+  for (Index = 0; Index < Ip6ModeData.RouteCount; Index++) {\r
+    if (NetIp6IsNetEqual (TargetIp, &Ip6ModeData.RouteTable[Index].Destination, Ip6ModeData.RouteTable[Index].PrefixLength)) {\r
+      if (SubnetPrefixLength < Ip6ModeData.RouteTable[Index].PrefixLength) {\r
+        SubnetPrefixLength = Ip6ModeData.RouteTable[Index].PrefixLength;\r
+        RouteEntry = Index;\r
+      }\r
+    }\r
+  }\r
+  if (RouteEntry != Ip6ModeData.RouteCount) {\r
+    IP6_COPY_ADDRESS (&NvData->Gateway, &Ip6ModeData.RouteTable[RouteEntry].Gateway);\r
+  }\r
+\r
+ON_EXIT:\r
+  if (Ip6ModeData.AddressList != NULL) {\r
+    FreePool (Ip6ModeData.AddressList);\r
+  }\r
+  if (Ip6ModeData.GroupTable!= NULL) {\r
+    FreePool (Ip6ModeData.GroupTable);\r
+  }\r
+  if (Ip6ModeData.RouteTable!= NULL) {\r
+    FreePool (Ip6ModeData.RouteTable);\r
+  }\r
+  if (Ip6ModeData.NeighborCache!= NULL) {\r
+    FreePool (Ip6ModeData.NeighborCache);\r
+  }\r
+  if (Ip6ModeData.PrefixTable!= NULL) {\r
+    FreePool (Ip6ModeData.PrefixTable);\r
+  }\r
+  if (Ip6ModeData.IcmpTypeList!= NULL) {\r
+    FreePool (Ip6ModeData.IcmpTypeList);\r
+  }\r
+\r
+  return Status;\r
+}\r
 \r
 /**\r
   Login the iSCSI session.\r
@@ -395,6 +487,10 @@ IScsiSessionLogin (
                     );\r
 \r
     ASSERT_EFI_ERROR (Status);\r
+\r
+    if (mPrivate->Ipv6Flag) {\r
+      Status = IScsiGetIp6NicInfo (Conn);\r
+    }\r
   }\r
 \r
   return Status;\r
index 8b389772d9715a388b90e689f9fab44d35935be3..b9840444bbf9f6412109b88dea4c388c8f08be96 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of EFI IPv6 Configuration Protocol.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -2316,12 +2316,12 @@ Ip6ConfigCleanInstance (
 }\r
 \r
 /**\r
-  Destory the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.\r
+  Destroy the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.\r
 \r
   @param[in, out] Instance    The buffer of IP6_CONFIG_INSTANCE to be freed.\r
 \r
   @retval EFI_SUCCESS         The child was successfully destroyed.\r
-  @retval Others              Failed to destory the child.\r
+  @retval Others              Failed to destroy the child.\r
 \r
 **/\r
 EFI_STATUS\r
index 5ae483931a97940ea5bcccafbd5d3cba000946e8..ccb09ccc77036c8f0c7cc8508cea8320d89a305d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definitions for EFI IPv6 Configuartion Protocol implementation.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -279,12 +279,12 @@ Ip6ConfigCleanInstance (
   );\r
 \r
 /**\r
-  Destory the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.\r
+  Destroy the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.\r
 \r
   @param[in, out] Instance    The buffer of IP6_CONFIG_INSTANCE to be freed.\r
 \r
   @retval EFI_SUCCESS         The child was successfully destroyed.\r
-  @retval Others              Failed to destory the child.\r
+  @retval Others              Failed to destroy the child.\r
   \r
 **/\r
 EFI_STATUS\r
index 502c32bd0d844f5721beadb3dd05f212e89cb607..d242b153df30cb2f4d8fe0aa6991f7c4441ab58c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for IP6 driver.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -94,7 +94,7 @@ Ip6DriverBindingSupported (
   Clean up an IP6 service binding instance. It releases all\r
   the resource allocated by the instance. The instance may be\r
   partly initialized, or partly destroyed. If a resource is\r
-  destroyed, it is marked as that in case the destory failed and\r
+  destroyed, it is marked as that in case the destroy failed and\r
   being called again later.\r
 \r
   @param[in]  IpSb               The IP6 service binding instance to clean up.\r
@@ -852,8 +852,8 @@ Ip6ServiceBindingDestroyChild (
 \r
   //\r
   // A child can be destroyed more than once. For example,\r
-  // Ip6DriverBindingStop will destory all of its children.\r
-  // when UDP driver is being stopped, it will destory all\r
+  // Ip6DriverBindingStop will destroy all of its children.\r
+  // when UDP driver is being stopped, it will destroy all\r
   // the IP child it opens.\r
   //\r
   if (IpInstance->State == IP6_STATE_DESTROY) {\r
index 48ffe7b06b2d51f2aaafcf8a9367fa3cd6510030..4a23d836b8e5c336b9c56175d28c7878fb7897e8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for IP6 driver.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -24,7 +24,7 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gIp6ComponentName2;
   Clean up an IP6 service binding instance. It releases all\r
   the resource allocated by the instance. The instance may be\r
   partly initialized, or partly destroyed. If a resource is\r
-  destroyed, it is marked as that in case the destory failed and\r
+  destroyed, it is marked as that in case the destroy failed and\r
   being called again later.\r
 \r
   @param[in]  IpSb               The IP6 service binding instance to clean up.\r
index 198b547ed27ed08d547c8a2e60e568bf3cd0deac..a93418847948e698f858f174a04909f613e6e4cb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement IP6 pesudo interface.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -314,7 +314,7 @@ Ip6CleanInterface (
   }\r
 \r
   //\r
-  // Destory the interface if this is the last IP instance.\r
+  // Destroy the interface if this is the last IP instance.\r
   // Remove all the system transmitted packets\r
   // from this interface, cancel the receive request if exists.\r
   //\r
index 9775aec7785989e1b425b921217d66f483f7e191..44e0392511c04243b544c8995b8088a1defd2dc8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of EFI_IP6_PROTOCOL protocol interfaces.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -689,7 +689,7 @@ EfiIp6Configure (
     Status = Ip6CleanProtocol (IpInstance);\r
 \r
     //\r
-    // Don't change the state if it is DESTORY, consider the following\r
+    // Don't change the state if it is DESTROY, consider the following\r
     // valid sequence: Mnp is unloaded-->Ip Stopped-->Udp Stopped,\r
     // Configure (ThisIp, NULL). If the state is changed to UNCONFIGED,\r
     // the unload fails miserably.\r
index 4bcf1a6d44a3a118c11b19cdb0a2ae006edf9cea..d510f330c136d0d8179fe0620c0272cfd3ab6b00 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of Neighbor Discovery support routines.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -261,7 +261,7 @@ Ip6CreatePrefixListEntry (
 }\r
 \r
 /**\r
-  Destory a IP6 prefix list entry.\r
+  Destroy a IP6 prefix list entry.\r
 \r
   @param[in]  IpSb              The pointer to IP6_SERVICE instance.\r
   @param[in]  PrefixEntry       The to be destroyed prefix list entry.\r
index 1ec022ba64d7c6ab6589b0c879281bc0f09bcabf..982203ca5ffcea97a61da7fa3d0cba2c3923e589 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definition of Neighbor Discovery support routines.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -336,7 +336,7 @@ Ip6CreatePrefixListEntry (
   );\r
 \r
 /**\r
-  Destory a IP6 prefix list entry.\r
+  Destroy a IP6 prefix list entry.\r
 \r
   @param[in]  IpSb              The pointer to IP6_SERVICE instance.\r
   @param[in]  PrefixEntry       The to be destroyed prefix list entry.\r
index 28aacf198a271609bca383df8466755970ed1bbc..432eea9cd4333f78b851e8c360fd39c75a2d5e7a 100644 (file)
@@ -2,7 +2,7 @@
   Driver Binding functions and Service Binding functions\r
   implementation for Mtftp6 Driver.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -33,7 +33,7 @@ EFI_SERVICE_BINDING_PROTOCOL  gMtftp6ServiceBindingTemplate = {
 \r
 \r
 /**\r
-  Destory the MTFTP6 service. The MTFTP6 service may be partly initialized,\r
+  Destroy the MTFTP6 service. The MTFTP6 service may be partly initialized,\r
   or partly destroyed. If a resource is destroyed, it is marked as such in\r
   case the destroy failed and is called again later.\r
 \r
@@ -46,7 +46,7 @@ Mtftp6DestroyService (
   )\r
 {\r
   //\r
-  // Make sure all children instances have been already destoryed.\r
+  // Make sure all children instances have been already destroyed.\r
   //\r
   ASSERT (Service->ChildrenNum == 0);\r
 \r
@@ -98,7 +98,7 @@ Mtftp6CreateService (
   Mtftp6Srv->Signature      = MTFTP6_SERVICE_SIGNATURE;\r
   Mtftp6Srv->Controller     = Controller;\r
   Mtftp6Srv->Image          = Image;\r
-  Mtftp6Srv->InDestory      = FALSE;\r
+  Mtftp6Srv->InDestroy      = FALSE;\r
   Mtftp6Srv->ChildrenNum    = 0;\r
 \r
   CopyMem (\r
@@ -219,7 +219,7 @@ Mtftp6CreateInstance (
   }\r
 \r
   Mtftp6Ins->Signature = MTFTP6_INSTANCE_SIGNATURE;\r
-  Mtftp6Ins->InDestory = FALSE;\r
+  Mtftp6Ins->InDestroy = FALSE;\r
   Mtftp6Ins->Service   = Service;\r
 \r
   CopyMem (\r
@@ -460,7 +460,7 @@ Mtftp6DriverBindingStop (
 \r
   Service = MTFTP6_SERVICE_FROM_THIS (ServiceBinding);\r
 \r
-  if (Service->InDestory) {\r
+  if (Service->InDestroy) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -468,9 +468,9 @@ Mtftp6DriverBindingStop (
 \r
   if (NumberOfChildren == 0) {\r
     //\r
-    // Destory the Mtftp6 service if there is no Mtftp6 child instance left.\r
+    // Destroy the Mtftp6 service if there is no Mtftp6 child instance left.\r
     //\r
-    Service->InDestory = TRUE;\r
+    Service->InDestroy = TRUE;\r
 \r
     gBS->UninstallProtocolInterface (\r
            NicHandle,\r
@@ -482,7 +482,7 @@ Mtftp6DriverBindingStop (
 \r
   } else {\r
     //\r
-    // Destory the Mtftp6 child instance one by one.\r
+    // Destroy the Mtftp6 child instance one by one.\r
     //\r
     while (!IsListEmpty (&Service->Children)) {\r
       Instance = NET_LIST_HEAD (&Service->Children, MTFTP6_INSTANCE, Link);\r
@@ -657,15 +657,15 @@ Mtftp6ServiceBindingDestroyChild (
   }\r
 \r
   //\r
-  // Check whether the instance already in destory state.\r
+  // Check whether the instance already in Destroy state.\r
   //\r
-  if (Instance->InDestory) {\r
+  if (Instance->InDestroy) {\r
     return EFI_SUCCESS;\r
   }\r
 \r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
 \r
-  Instance->InDestory = TRUE;\r
+  Instance->InDestroy = TRUE;\r
 \r
   gBS->CloseProtocol (\r
          Service->DummyUdpIo->UdpHandle,\r
@@ -684,7 +684,7 @@ Mtftp6ServiceBindingDestroyChild (
                   );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    Instance->InDestory = FALSE;\r
+    Instance->InDestroy = FALSE;\r
     gBS->RestoreTPL (OldTpl);\r
     return Status;\r
   }\r
index 79ae6e0741d0b88397be395d9fff28602cb97f0e..4a4e5b192c27f533c6c4ba36b4b233fbe7186109 100644 (file)
@@ -8,7 +8,7 @@
    RFC2348 - TFTP Blocksize Option\r
    RFC2349 - TFTP Timeout Interval and Transfer Size Options\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -189,13 +189,15 @@ EfiMtftp6Configure (
     // Don't configure the udpio here because each operation might override\r
     // the configuration, so delay udpio configuration in each operation.\r
     //\r
-    Instance->UdpIo = UdpIoCreateIo (\r
-                        Service->Controller,\r
-                        Service->Image,\r
-                        Mtftp6ConfigDummyUdpIo,\r
-                        UDP_IO_UDP6_VERSION,\r
-                        NULL\r
-                        );\r
+    if (Instance->UdpIo == NULL) {\r
+      Instance->UdpIo = UdpIoCreateIo (\r
+                          Service->Controller,\r
+                          Service->Image,\r
+                          Mtftp6ConfigDummyUdpIo,\r
+                          UDP_IO_UDP6_VERSION,\r
+                          NULL\r
+                          );\r
+    }\r
 \r
     if (Instance->UdpIo == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
@@ -620,11 +622,11 @@ EfiMtftp6Poll (
   Instance = MTFTP6_INSTANCE_FROM_THIS (This);\r
 \r
   //\r
-  // Check the instance whether configured or in destory.\r
+  // Check the instance whether configured or in destroy.\r
   //\r
   if (Instance->Config == NULL) {\r
     return EFI_NOT_STARTED;\r
-  } else if (Instance->InDestory) {\r
+  } else if (Instance->InDestroy) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
index 626aea0e34342886be0ac5ab307a5cd23b9aeeaa..68fa0da115983aa5b631a6749864a5a373582cc4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Mtftp6 internal data structure and definition declaration.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved. <BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -94,7 +94,7 @@ struct _MTFTP6_INSTANCE {
   EFI_TPL                       OldTpl;\r
   BOOLEAN                       IsTransmitted;\r
   BOOLEAN                       IsMaster;\r
-  BOOLEAN                       InDestory;\r
+  BOOLEAN                       InDestroy;\r
 };\r
 \r
 //\r
@@ -117,7 +117,7 @@ struct _MTFTP6_SERVICE {
   // mtftp driver and udp driver.\r
   //\r
   UDP_IO                        *DummyUdpIo;\r
-  BOOLEAN                       InDestory;\r
+  BOOLEAN                       InDestroy;\r
 };\r
 \r
 /**\r
index 348a8f29c70fcb13e2f9c4f84292d8f721812f65..7fc613a6652b151fbe9ca9399bc3e3b3f6b8095e 100644 (file)
@@ -547,13 +547,15 @@ Mtftp6RrqHandleOack (
         );\r
 \r
       Instance->McastPort  = ExtInfo.McastPort;\r
-      Instance->McastUdpIo = UdpIoCreateIo (\r
-                               Instance->Service->Controller,\r
-                               Instance->Service->Image,\r
-                               Mtftp6RrqConfigMcastUdpIo,\r
-                               UDP_IO_UDP6_VERSION,\r
-                               Instance\r
-                               );\r
+      if (Instance->McastUdpIo == NULL) {\r
+        Instance->McastUdpIo = UdpIoCreateIo (\r
+                                 Instance->Service->Controller,\r
+                                 Instance->Service->Image,\r
+                                 Mtftp6RrqConfigMcastUdpIo,\r
+                                 UDP_IO_UDP6_VERSION,\r
+                                 Instance\r
+                                 );\r
+      }\r
 \r
       if (Instance->McastUdpIo == NULL) {\r
         return EFI_DEVICE_ERROR;\r
index 7fad042be6b8da42a8a93f7a2036dba5d6b5af6f..f94155640229fcced1441755c0e5665817b276dc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of the Socket.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -787,7 +787,7 @@ SockDestroy (
 \r
   }\r
   //\r
-  // Destory the RcvBuffer Queue and SendBuffer Queue\r
+  // Destroy the RcvBuffer Queue and SendBuffer Queue\r
   //\r
   NetbufQueFree (Sock->RcvBuffer.DataQueue);\r
   NetbufQueFree (Sock->SndBuffer.DataQueue);\r
@@ -802,7 +802,7 @@ SockDestroy (
 \r
     DEBUG (\r
       (EFI_D_WARN,\r
-      "SockDestory: Delete a unaccepted socket from parent now conncnt is %d\n",\r
+      "SockDestroy: Delete a unaccepted socket from parent now conncnt is %d\n",\r
       Sock->Parent->ConnCnt)\r
       );\r
 \r
index ebab8c7f187d678721dec64fc42539d9d7a5bac8..075e9ada6afe200b9b5d3b25918205a4562d7f22 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Interface function of the Socket.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -129,7 +129,7 @@ SockBufferToken (
 }\r
 \r
 /**\r
-  Destory the socket Sock and its associated protocol control block.\r
+  Destroy the socket Sock and its associated protocol control block.\r
 \r
   @param[in, out]  Sock                 The socket to be destroyed.\r
 \r
index a00625244e563c92d31179064f23c0b8befa1797..9e2d907150d5eef1158f5bf65df1551d9cbfad10 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common head file for TCP socket.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -696,7 +696,7 @@ SockCreateChild (
   );\r
 \r
 /**\r
-  Destory the socket Sock and its associated protocol control block.\r
+  Destroy the socket Sock and its associated protocol control block.\r
 \r
   @param[in, out]  Sock                 The socket to be destroyed.\r
 \r
index ecafc86a038780e2e7ac95e6cb7978fe17593dad..23682b2451857bb4dc93cda3f268316858b5eb85 100644 (file)
@@ -532,7 +532,7 @@ PxeBcParseDhcp4Packet (
             (Offer->Dhcp4.Header.BootFileName[0] != 0)) {\r
     //\r
     // If the bootfile is not present and bootfilename is present in DHCPv4 packet, just parse it.\r
-    // Do not count dhcp option header here, or else will destory the serverhostname.\r
+    // Do not count dhcp option header here, or else will destroy the serverhostname.\r
     //\r
     Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] = (EFI_DHCP4_PACKET_OPTION *)\r
                                                 (&Offer->Dhcp4.Header.BootFileName[0] -\r
index 6ab2afa088af05fc5113a25d364211044590e3c9..1eb64a6a0f54d4043f59bee2fef3b90fea952df0 100644 (file)
@@ -1748,7 +1748,7 @@ PxeBcDhcp6Sarr (
   Config.IaInfoEvent           = NULL;\r
   Config.RapidCommit           = FALSE;\r
   Config.ReconfigureAccept     = FALSE;\r
-  Config.IaDescriptor.IaId     = 1;\r
+  Config.IaDescriptor.IaId     = Private->IaId;\r
   Config.IaDescriptor.Type     = EFI_DHCP6_IA_TYPE_NA;\r
   Config.SolicitRetransmission = Retransmit;\r
   Retransmit->Irt              = 4;\r
index 179009f91c600802fb47c0f94ee5027e79ccb0a9..080b751cb19637541e81ef9bdec8db16c3302aaf 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Driver Binding functions implementationfor for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -779,6 +779,7 @@ PxeBcCreateIp6Children (
   EFI_IP6_MODE_DATA               Ip6ModeData;\r
   PXEBC_PRIVATE_PROTOCOL          *Id;\r
   EFI_SIMPLE_NETWORK_PROTOCOL     *Snp;\r
+  UINTN                           Index;\r
 \r
   if (Private->Ip6Nic != NULL) {\r
     //\r
@@ -821,6 +822,16 @@ PxeBcCreateIp6Children (
     goto ON_ERROR;\r
   }\r
 \r
+  //\r
+  // Generate a random IAID for the Dhcp6 assigned address.\r
+  //\r
+  Private->IaId = NET_RANDOM (NetRandomInitSeed ());\r
+  if (Private->Snp != NULL) {\r
+    for (Index = 0; Index < Private->Snp->Mode->HwAddressSize; Index++) {\r
+      Private->IaId |= (Private->Snp->Mode->CurrentAddress.Addr[Index] << ((Index << 3) & 31));\r
+    }  \r
+  }\r
+\r
   //\r
   // Create Mtftp6 child and open Mtftp6 protocol for PxeBc->Mtftp.\r
   //\r
index 5f693729d612d2fa274261c2aadf6f0f8b8518e3..183dc0ced743de24aa6857b4b4b40259b19bc8fd 100644 (file)
@@ -2348,6 +2348,15 @@ EfiPxeLoadFile (
   // Start Pxe Base Code to initialize PXE boot.\r
   //\r
   Status = PxeBc->Start (PxeBc, UsingIpv6);\r
+  if (Status == EFI_ALREADY_STARTED && UsingIpv6 != PxeBc->Mode->UsingIpv6) {\r
+    //\r
+    // PxeBc protocol has already been started but not on the required IP version, restart it.\r
+    //\r
+    Status = PxeBc->Stop (PxeBc);\r
+    if (!EFI_ERROR (Status)) {\r
+      Status = PxeBc->Start (PxeBc, UsingIpv6);\r
+    }\r
+  }\r
   if (Status == EFI_SUCCESS || Status == EFI_ALREADY_STARTED) {\r
     Status = PxeBcLoadBootFile (Private, BufferSize, Buffer);\r
   }\r
index bea4931efbc3ca55624a65167d06999fbae217fe..1d4381a1f5612823ee0a08329599b1e753ab82c8 100644 (file)
@@ -165,6 +165,7 @@ struct _PXEBC_PRIVATE_DATA {
   EFI_IP_ADDRESS                            GatewayIp;\r
   EFI_IP_ADDRESS                            ServerIp;\r
   UINT16                                    CurSrcPort;\r
+  UINT32                                    IaId;\r
 \r
   UINT32                                    Ip4MaxPacketSize;\r
   UINT32                                    Ip6MaxPacketSize;\r
index 7d03b68d91cca4a1a5466823220e9c9b481e9fff..32a4f7fb43ff61666893bf079f2669a71b17b013 100644 (file)
@@ -1042,7 +1042,7 @@ TimeoutToGetMap (
 }\r
 \r
 /**\r
-  Create an IP child, use it to start the auto configuration, then destory it.\r
+  Create an IP child, use it to start the auto configuration, then destroy it.\r
 \r
   @param[in] NicInfo    The pointer to the NIC_INFO of the Nic to be configured.\r
 \r
index f24a55c87a6890ad0a851944006213b6bb6dcab9..fd4aa8d81e7c0ff9609e65280098f1edf772b554 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation for Ping shell command.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -1190,14 +1190,14 @@ ON_ERROR:
 }\r
 \r
 /**\r
-  Destory the IP instance.\r
+  Destroy the IP instance.\r
 \r
   @param[in]    Private    The pointer of PING_PRIVATE_DATA.\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
-Ping6DestoryIp6Instance (\r
+Ping6DestroyIp6Instance (\r
   IN PING_PRIVATE_DATA    *Private\r
   )\r
 {\r
@@ -1414,7 +1414,7 @@ ON_EXIT:
     }\r
 \r
     if (Private->IpChildHandle != NULL) {\r
-      Ping6DestoryIp6Instance (Private);\r
+      Ping6DestroyIp6Instance (Private);\r
     }\r
 \r
     FreePool (Private);\r