]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Mark the network volatile variables as deprecated in code comments and remove...
authorFu Siyuan <siyuan.fu@intel.com>
Wed, 7 May 2014 06:17:31 +0000 (06:17 +0000)
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 7 May 2014 06:17:31 +0000 (06:17 +0000)
2. Remove the GetTime() call when receiving Udp4/6 packets.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye, Ting <ting.ye@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15497 6f19259b-4bc3-4df7-8a09-765794883524

33 files changed:
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Func.h
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.c
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
MdePkg/Include/Protocol/Ip4.h
MdePkg/Include/Protocol/Ip6.h
MdePkg/Include/Protocol/Tcp4.h
MdePkg/Include/Protocol/Tcp6.h
MdePkg/Include/Protocol/Udp4.h
MdePkg/Include/Protocol/Udp6.h
NetworkPkg/Ip6Dxe/Ip6Common.c
NetworkPkg/Ip6Dxe/Ip6Common.h
NetworkPkg/Ip6Dxe/Ip6Driver.c
NetworkPkg/Ip6Dxe/Ip6Impl.c
NetworkPkg/TcpDxe/TcpDispatcher.c
NetworkPkg/TcpDxe/TcpDriver.c
NetworkPkg/TcpDxe/TcpDriver.h
NetworkPkg/TcpDxe/TcpFunc.h
NetworkPkg/TcpDxe/TcpMisc.c
NetworkPkg/Udp6Dxe/Udp6Driver.c
NetworkPkg/Udp6Dxe/Udp6Impl.c
NetworkPkg/Udp6Dxe/Udp6Impl.h
NetworkPkg/Udp6Dxe/Udp6Main.c

index 16b88aeb85823f65d98bf911e8f300c1b12f47fa..004a8bc7034d0488d5ab5d43e7bfe8796ca1f303 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -267,151 +267,3 @@ Ip4NtohHead (
 \r
   return Head;\r
 }\r
-\r
-\r
-/**\r
-  Set the Ip4 variable data.\r
-  \r
-  Save the list of all of the IPv4 addresses and subnet masks that are currently\r
-  being used to volatile variable storage.\r
-\r
-  @param[in]  IpSb                  Ip4 service binding instance\r
-\r
-  @retval EFI_SUCCESS           Successfully set variable.\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
-  @retval other                 Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Ip4SetVariableData (\r
-  IN IP4_SERVICE  *IpSb\r
-  )\r
-{\r
-  UINT32                 NumConfiguredInstance;\r
-  LIST_ENTRY             *Entry;\r
-  UINTN                  VariableDataSize;\r
-  EFI_IP4_VARIABLE_DATA  *Ip4VariableData;\r
-  EFI_IP4_ADDRESS_PAIR   *Ip4AddressPair;\r
-  IP4_PROTOCOL           *IpInstance;\r
-  CHAR16                 *NewMacString;\r
-  EFI_STATUS             Status;\r
-\r
-  NumConfiguredInstance = 0;\r
-\r
-  //\r
-  // Go through the children list to count the configured children.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &IpSb->Children) {\r
-    IpInstance = NET_LIST_USER_STRUCT_S (Entry, IP4_PROTOCOL, Link, IP4_PROTOCOL_SIGNATURE);\r
-\r
-    if (IpInstance->State == IP4_STATE_CONFIGED) {\r
-      NumConfiguredInstance++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Calculate the size of the Ip4VariableData. As there may be no IP child,\r
-  // we should add extra buffer for the address paris only if the number of configured\r
-  // children is more than 1.\r
-  //\r
-  VariableDataSize = sizeof (EFI_IP4_VARIABLE_DATA);\r
-\r
-  if (NumConfiguredInstance > 1) {\r
-    VariableDataSize += sizeof (EFI_IP4_ADDRESS_PAIR) * (NumConfiguredInstance - 1);\r
-  }\r
-\r
-  Ip4VariableData = AllocatePool (VariableDataSize);\r
-  if (Ip4VariableData == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  Ip4VariableData->DriverHandle = IpSb->Image;\r
-  Ip4VariableData->AddressCount = NumConfiguredInstance;\r
-\r
-  Ip4AddressPair = &Ip4VariableData->AddressPairs[0];\r
-\r
-  //\r
-  // Go through the children list to fill the configured children's address pairs.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &IpSb->Children) {\r
-    IpInstance = NET_LIST_USER_STRUCT_S (Entry, IP4_PROTOCOL, Link, IP4_PROTOCOL_SIGNATURE);\r
-\r
-    if (IpInstance->State == IP4_STATE_CONFIGED) {\r
-      Ip4AddressPair->InstanceHandle       = IpInstance->Handle;\r
-      EFI_IP4 (Ip4AddressPair->Ip4Address) = NTOHL (IpInstance->Interface->Ip);\r
-      EFI_IP4 (Ip4AddressPair->SubnetMask) = NTOHL (IpInstance->Interface->SubnetMask);\r
-\r
-      Ip4AddressPair++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Get the mac string.\r
-  //\r
-  Status = NetLibGetMacString (IpSb->Controller, IpSb->Image, &NewMacString);\r
-  if (EFI_ERROR (Status)) {\r
-    goto ON_ERROR;\r
-  }\r
-\r
-  if (IpSb->MacString != NULL) {\r
-    //\r
-    // The variable is set already, we're going to update it.\r
-    //\r
-    if (StrCmp (IpSb->MacString, NewMacString) != 0) {\r
-      //\r
-      // The mac address is changed, delete the previous variable first.\r
-      //\r
-      gRT->SetVariable (\r
-             IpSb->MacString,\r
-             &gEfiIp4ServiceBindingProtocolGuid,\r
-             EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-             0,\r
-             NULL\r
-             );\r
-    }\r
-\r
-    FreePool (IpSb->MacString);\r
-  }\r
-\r
-  IpSb->MacString = NewMacString;\r
-\r
-  Status = gRT->SetVariable (\r
-                  IpSb->MacString,\r
-                  &gEfiIp4ServiceBindingProtocolGuid,\r
-                  EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-                  VariableDataSize,\r
-                  (VOID *) Ip4VariableData\r
-                  );\r
-\r
-ON_ERROR:\r
-\r
-  FreePool (Ip4VariableData);\r
-\r
-  return Status;\r
-}\r
-\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[in]  IpSb                  Ip4 service binding instance\r
-\r
-**/\r
-VOID\r
-Ip4ClearVariableData (\r
-  IN IP4_SERVICE  *IpSb\r
-  )\r
-{\r
-  ASSERT (IpSb->MacString != NULL);\r
-\r
-  gRT->SetVariable (\r
-         IpSb->MacString,\r
-         &gEfiIp4ServiceBindingProtocolGuid,\r
-         EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-         0,\r
-         NULL\r
-         );\r
-\r
-  FreePool (IpSb->MacString);\r
-  IpSb->MacString = NULL;\r
-}\r
index 64049303e43fd8773681ccb0e963027aa3caf01b..d38857c6771018028381612d621c022065360c9c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common definition for IP4.\r
   \r
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -201,33 +201,4 @@ Ip4NtohHead (
   IN IP4_HEAD           *Head\r
   );\r
 \r
-/**\r
-  Set the Ip4 variable data.\r
-  \r
-  Save the list of all of the IPv4 addresses and subnet masks that are currently\r
-  being used to volatile variable storage.\r
-\r
-  @param[in]  IpSb                  Ip4 service binding instance\r
-\r
-  @retval EFI_SUCCESS           Successfully set variable.\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
-  @retval other                 Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Ip4SetVariableData (\r
-  IN IP4_SERVICE  *IpSb\r
-  );\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[in]  IpSb                  Ip4 service binding instance\r
-\r
-**/\r
-VOID\r
-Ip4ClearVariableData (\r
-  IN IP4_SERVICE  *IpSb\r
-  );\r
-\r
 #endif\r
index 73b4e246e0dc66b50f4bdb4502d6b786d525b87d..4944113e468deaaa747464c24b6ce893aadea83d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for IP4 driver.\r
 \r
-Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -297,8 +297,6 @@ Ip4CreateService (
     IpSb->MaxPacketSize -= NET_VLAN_TAG_LEN;\r
   }\r
   IpSb->OldMaxPacketSize = IpSb->MaxPacketSize;\r
-  IpSb->MacString = NULL;\r
-\r
   *Service = IpSb;\r
   return EFI_SUCCESS;\r
 \r
@@ -519,8 +517,6 @@ Ip4DriverBindingStart (
   //\r
   mIp4Id = (UINT16)NET_RANDOM (NetRandomInitSeed ());\r
 \r
-  Ip4SetVariableData (IpSb);\r
-\r
   return Status;\r
 \r
 UNINSTALL_PROTOCOL:\r
@@ -716,11 +712,6 @@ Ip4DriverBindingStop (
     State           = IpSb->State;\r
     IpSb->State     = IP4_SERVICE_DESTROY;\r
 \r
-    //\r
-    // Clear the variable data.\r
-    //\r
-    Ip4ClearVariableData (IpSb);\r
-\r
     //\r
     // OK, clean other resources then uninstall the service binding protocol.\r
     //\r
@@ -975,9 +966,6 @@ Ip4ServiceBindingDestroyChild (
   }\r
 \r
   Status = Ip4CleanProtocol (IpInstance);\r
-\r
-  Ip4SetVariableData (IpSb);\r
-\r
   if (EFI_ERROR (Status)) {\r
     gBS->InstallMultipleProtocolInterfaces (\r
            &ChildHandle,\r
index cd01685a304e5a6a4dc5940db0872e4d80dae7e2..06a56e1294c37a35cf902a7ce7cc0a79dcb51567 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -701,8 +701,6 @@ Ip4AutoConfigCallBackDpc (
 \r
   IpSb->State = IP4_SERVICE_CONFIGED;\r
 \r
-  Ip4SetVariableData (IpSb);\r
-\r
 ON_EXIT:\r
   FreePool (Data);\r
 }\r
@@ -1312,11 +1310,6 @@ EfiIp4Configure (
   //\r
   Ip4ServiceConfigMnp (IpInstance->Service, FALSE);\r
 \r
-  //\r
-  // Update the variable data.\r
-  //\r
-  Ip4SetVariableData (IpInstance->Service);\r
-\r
 ON_EXIT:\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
index ad8a9276bd78d299128e8b8d4df7aabbf941f8a8..c49e013c8f44e069a1bb751d6781455d2e37a431 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Ip4 internal functions and type defintions.\r
   \r
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -202,11 +202,6 @@ struct _IP4_SERVICE {
   EFI_EVENT                       ReconfigEvent;\r
   EFI_EVENT                       ActiveEvent;\r
 \r
-  //\r
-  // The string representation of the current mac address of the\r
-  // NIC this IP4_SERVICE works on.\r
-  //\r
-  CHAR16                          *MacString;\r
   UINT32                          MaxPacketSize;\r
   UINT32                          OldMaxPacketSize; ///< The MTU before IPsec enable.\r
 };\r
index 93d10c9eb283ac2b6416412096a274b2e6186506..e09d2c9e577f4ec05f091495e8cea1c0d42049a3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Tcp request dispatcher implementation.\r
 \r
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -237,8 +237,6 @@ Tcp4FlushPcb (
              );\r
       FreePool (Sock->DevicePath);\r
     }\r
-\r
-    TcpSetVariableData (TcpProto->TcpService);\r
   }\r
 \r
   NetbufFreeList (&Tcb->SndQue);\r
index 29a0cf76c21b8195dfcf3571bd8246186f7d1df5..30e9406161c0187f3e60203a4becad18878593e1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Tcp driver function.\r
 \r
-Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -418,8 +418,6 @@ Tcp4DriverBindingStart (
 \r
   InitializeListHead (&TcpServiceData->SocketList);\r
 \r
-  TcpSetVariableData (TcpServiceData);\r
-\r
   return EFI_SUCCESS;\r
 \r
 ON_ERROR:\r
@@ -539,11 +537,6 @@ Tcp4DriverBindingStop (
     //\r
     Tcp4DestroyTimer ();\r
 \r
-    //\r
-    // Clear the variable.\r
-    //\r
-    TcpClearVariableData (TcpServiceData);\r
-\r
     if (gTcpControllerNameTable != NULL) {\r
       FreeUnicodeStringTable (gTcpControllerNameTable);\r
       gTcpControllerNameTable = NULL;\r
index 0a106a46fb9f355526781bcc6b63841635e657d4..5fe98d4068d5814675a3379d25a9c38d8339ad69 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Tcp driver function header.\r
 \r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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,7 +48,6 @@ typedef struct _TCP4_SERVICE_DATA {
   IP_IO                         *IpIo;  // IP Io consumed by TCP4\r
   EFI_SERVICE_BINDING_PROTOCOL  Tcp4ServiceBinding;\r
   EFI_HANDLE                    DriverBindingHandle;\r
-  CHAR16                        *MacString;\r
   LIST_ENTRY                    SocketList;\r
 } TCP4_SERVICE_DATA;\r
 \r
index 24e9b5146fd5d8317760982c13bdcedf62cd618e..53b7aac8ae988f9072e97498c4aa5faaae071483 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Tcp function header file.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -764,31 +764,6 @@ TcpBackoffRto (
   IN OUT TCP_CB *Tcb\r
   );\r
 \r
-/**\r
-  Set the Tdp4 variable data.\r
-\r
-  @param  Tcp4Service           Pointer to Tcp4 service data.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
-  @retval other                 Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-TcpSetVariableData (\r
-  IN TCP4_SERVICE_DATA  *Tcp4Service\r
-  );\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param  Tcp4Service           Pointer to Tcp4 service data.\r
-\r
-**/\r
-VOID\r
-TcpClearVariableData (\r
-  IN TCP4_SERVICE_DATA  *Tcp4Service\r
-  );\r
-\r
 /**\r
   Install the device path protocol on the TCP instance.\r
 \r
index bf04b5a55b110bc8d80ab3439241c1c9c09d8153..5b18d20497d782b75152dc5e465336320ce42585 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Misc support routines for tcp.\r
 \r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, 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
@@ -392,7 +392,6 @@ TcpInsertTcb (
   InsertHeadList (Head, &Tcb->List);\r
 \r
   TcpProto = (TCP4_PROTO_DATA *) Tcb->Sk->ProtoReserved;\r
-  TcpSetVariableData (TcpProto->TcpService);\r
 \r
   return 0;\r
 }\r
@@ -878,205 +877,6 @@ TcpOnAppAbort (
   TcpSetState (Tcb, TCP_CLOSED);\r
 }\r
 \r
-\r
-/**\r
-  Set the Tdp4 variable data.\r
-\r
-  @param  Tcp4Service           Pointer to Tcp4 service data.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
-  @retval other                 Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-TcpSetVariableData (\r
-  IN TCP4_SERVICE_DATA  *Tcp4Service\r
-  )\r
-{\r
-  UINT32                  NumConfiguredInstance;\r
-  LIST_ENTRY              *Entry;\r
-  TCP_CB                  *TcpPcb;\r
-  TCP4_PROTO_DATA         *TcpProto;\r
-  UINTN                   VariableDataSize;\r
-  EFI_TCP4_VARIABLE_DATA  *Tcp4VariableData;\r
-  EFI_TCP4_SERVICE_POINT  *Tcp4ServicePoint;\r
-  CHAR16                  *NewMacString;\r
-  EFI_STATUS              Status;\r
-\r
-  NumConfiguredInstance = 0;\r
-\r
-  //\r
-  // Go through the running queue to count the instances.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {\r
-    TcpPcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
-\r
-    TcpProto = (TCP4_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;\r
-\r
-    if (TcpProto->TcpService == Tcp4Service) {\r
-      //\r
-      // This tcp instance belongs to the Tcp4Service.\r
-      //\r
-      NumConfiguredInstance++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Go through the listening queue to count the instances.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {\r
-    TcpPcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
-\r
-    TcpProto = (TCP4_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;\r
-\r
-    if (TcpProto->TcpService == Tcp4Service) {\r
-      //\r
-      // This tcp instance belongs to the Tcp4Service.\r
-      //\r
-      NumConfiguredInstance++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Calculate the size of the Tcp4VariableData. As there may be no Tcp4 child,\r
-  // we should add extra buffer for the service points only if the number of configured\r
-  // children is more than 1.\r
-  //\r
-  VariableDataSize = sizeof (EFI_TCP4_VARIABLE_DATA);\r
-\r
-  if (NumConfiguredInstance > 1) {\r
-    VariableDataSize += sizeof (EFI_TCP4_SERVICE_POINT) * (NumConfiguredInstance - 1);\r
-  }\r
-\r
-  Tcp4VariableData = AllocatePool (VariableDataSize);\r
-  if (Tcp4VariableData == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  Tcp4VariableData->DriverHandle = Tcp4Service->DriverBindingHandle;\r
-  Tcp4VariableData->ServiceCount = NumConfiguredInstance;\r
-\r
-  Tcp4ServicePoint = &Tcp4VariableData->Services[0];\r
-\r
-  //\r
-  // Go through the running queue to fill the service points.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {\r
-    TcpPcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
-\r
-    TcpProto = (TCP4_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;\r
-\r
-    if (TcpProto->TcpService == Tcp4Service) {\r
-      //\r
-      // This tcp instance belongs to the Tcp4Service.\r
-      //\r
-      Tcp4ServicePoint->InstanceHandle          = TcpPcb->Sk->SockHandle;\r
-      CopyMem (&Tcp4ServicePoint->LocalAddress, &TcpPcb->LocalEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
-      Tcp4ServicePoint->LocalPort               = NTOHS (TcpPcb->LocalEnd.Port);\r
-      CopyMem (&Tcp4ServicePoint->RemoteAddress, &TcpPcb->RemoteEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
-      Tcp4ServicePoint->RemotePort              = NTOHS (TcpPcb->RemoteEnd.Port);\r
-\r
-      Tcp4ServicePoint++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Go through the listening queue to fill the service points.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {\r
-    TcpPcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
-\r
-    TcpProto = (TCP4_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;\r
-\r
-    if (TcpProto->TcpService == Tcp4Service) {\r
-      //\r
-      // This tcp instance belongs to the Tcp4Service.\r
-      //\r
-      Tcp4ServicePoint->InstanceHandle          = TcpPcb->Sk->SockHandle;\r
-      CopyMem (&Tcp4ServicePoint->LocalAddress, &TcpPcb->LocalEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
-      Tcp4ServicePoint->LocalPort               = NTOHS (TcpPcb->LocalEnd.Port);\r
-      CopyMem (&Tcp4ServicePoint->RemoteAddress, &TcpPcb->RemoteEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
-      Tcp4ServicePoint->RemotePort              = NTOHS (TcpPcb->RemoteEnd.Port);\r
-\r
-      Tcp4ServicePoint++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Get the mac string.\r
-  //\r
-  Status = NetLibGetMacString (\r
-             Tcp4Service->ControllerHandle,\r
-             Tcp4Service->DriverBindingHandle,\r
-             &NewMacString\r
-             );\r
-  if (EFI_ERROR (Status)) {\r
-    goto ON_ERROR;\r
-  }\r
-\r
-  if (Tcp4Service->MacString != NULL) {\r
-    //\r
-    // The variable is set already, we're going to update it.\r
-    //\r
-    if (StrCmp (Tcp4Service->MacString, NewMacString) != 0) {\r
-      //\r
-      // The mac address is changed, delete the previous variable first.\r
-      //\r
-      gRT->SetVariable (\r
-             Tcp4Service->MacString,\r
-             &gEfiTcp4ServiceBindingProtocolGuid,\r
-             EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-             0,\r
-             NULL\r
-             );\r
-    }\r
-\r
-    FreePool (Tcp4Service->MacString);\r
-  }\r
-\r
-  Tcp4Service->MacString = NewMacString;\r
-\r
-  Status = gRT->SetVariable (\r
-                  Tcp4Service->MacString,\r
-                  &gEfiTcp4ServiceBindingProtocolGuid,\r
-                  EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-                  VariableDataSize,\r
-                  (VOID *) Tcp4VariableData\r
-                  );\r
-\r
-ON_ERROR:\r
-\r
-  FreePool (Tcp4VariableData);\r
-\r
-  return Status;\r
-}\r
-\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param  Tcp4Service           Pointer to Tcp4 service data.\r
-\r
-**/\r
-VOID\r
-TcpClearVariableData (\r
-  IN TCP4_SERVICE_DATA  *Tcp4Service\r
-  )\r
-{\r
-  ASSERT (Tcp4Service->MacString != NULL);\r
-\r
-  gRT->SetVariable (\r
-         Tcp4Service->MacString,\r
-         &gEfiTcp4ServiceBindingProtocolGuid,\r
-         EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-         0,\r
-         NULL\r
-         );\r
-\r
-  FreePool (Tcp4Service->MacString);\r
-  Tcp4Service->MacString = NULL;\r
-}\r
-\r
 /**\r
   Install the device path protocol on the TCP instance.\r
 \r
index 34e15da4328f0a7d8c27f0216a64fc74d8604a2a..faf9ca5e287cb702e466a0c76750cd6f93d628fc 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, 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
@@ -181,8 +181,6 @@ Udp4DriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     Udp4CleanService (Udp4Service);\r
     FreePool (Udp4Service);\r
-  } else {\r
-    Udp4SetVariableData (Udp4Service);\r
   }\r
 \r
   return Status;\r
@@ -268,9 +266,7 @@ Udp4DriverBindingStop (
            &Udp4Service->ServiceBinding,\r
            NULL\r
            );\r
-\r
-    Udp4ClearVariableData (Udp4Service);\r
-\r
\r
     Udp4CleanService (Udp4Service);\r
 \r
     if (gUdpControllerNameTable != NULL) {\r
index 8bba3572a24d590c375636a3f9140b25e0ba100d..ce952b1e2d19b148d41b88a607e682d79768b07e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of the Udp4 protocol.\r
   \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, 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
@@ -1633,8 +1633,6 @@ Udp4Demultiplex (
     }\r
   }\r
 \r
-  gRT->GetTime (&RxData.TimeStamp, NULL);\r
-\r
   Udp4Session                  = &RxData.UdpSession;\r
   Udp4Session->SourcePort      = NTOHS (Udp4Header->SrcPort);\r
   Udp4Session->DestinationPort = NTOHS (Udp4Header->DstPort);\r
@@ -1896,166 +1894,4 @@ Udp4NetVectorExtFree (
   VOID  *Context\r
   )\r
 {\r
-}\r
-\r
-\r
-/**\r
-  Set the Udp4 variable data.\r
-\r
-  @param[in] Udp4Service         Udp4 service data.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to set the\r
-                                 variable.\r
-  @retval EFI_SUCCESS            Set variable successfully.\r
-  @retval other                  Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Udp4SetVariableData (\r
-  IN UDP4_SERVICE_DATA  *Udp4Service\r
-  )\r
-{\r
-  UINT32                  NumConfiguredInstance;\r
-  LIST_ENTRY              *Entry;\r
-  UINTN                   VariableDataSize;\r
-  EFI_UDP4_VARIABLE_DATA  *Udp4VariableData;\r
-  EFI_UDP4_SERVICE_POINT  *Udp4ServicePoint;\r
-  UDP4_INSTANCE_DATA      *Udp4Instance;\r
-  CHAR16                  *NewMacString;\r
-  EFI_STATUS              Status;\r
-\r
-  NumConfiguredInstance = 0;\r
-\r
-  //\r
-  // Go through the children list to count the configured children.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &Udp4Service->ChildrenList) {\r
-    Udp4Instance = NET_LIST_USER_STRUCT_S (\r
-                     Entry,\r
-                     UDP4_INSTANCE_DATA,\r
-                     Link,\r
-                     UDP4_INSTANCE_DATA_SIGNATURE\r
-                     );\r
-\r
-    if (Udp4Instance->Configured) {\r
-      NumConfiguredInstance++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Calculate the size of the Udp4VariableData. As there may be no Udp4 child,\r
-  // we should add extra buffer for the service points only if the number of configured\r
-  // children is more than 1.\r
-  //\r
-  VariableDataSize = sizeof (EFI_UDP4_VARIABLE_DATA);\r
-\r
-  if (NumConfiguredInstance > 1) {\r
-    VariableDataSize += sizeof (EFI_UDP4_SERVICE_POINT) * (NumConfiguredInstance - 1);\r
-  }\r
-\r
-  Udp4VariableData = AllocatePool (VariableDataSize);\r
-  if (Udp4VariableData == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  Udp4VariableData->DriverHandle = Udp4Service->ImageHandle;\r
-  Udp4VariableData->ServiceCount = NumConfiguredInstance;\r
-\r
-  Udp4ServicePoint = &Udp4VariableData->Services[0];\r
-\r
-  //\r
-  // Go through the children list to fill the configured children's address pairs.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &Udp4Service->ChildrenList) {\r
-    Udp4Instance = NET_LIST_USER_STRUCT_S (\r
-                     Entry,\r
-                     UDP4_INSTANCE_DATA,\r
-                     Link,\r
-                     UDP4_INSTANCE_DATA_SIGNATURE\r
-                     );\r
-\r
-    if (Udp4Instance->Configured) {\r
-      Udp4ServicePoint->InstanceHandle = Udp4Instance->ChildHandle;\r
-      Udp4ServicePoint->LocalAddress   = Udp4Instance->ConfigData.StationAddress;\r
-      Udp4ServicePoint->LocalPort      = Udp4Instance->ConfigData.StationPort;\r
-      Udp4ServicePoint->RemoteAddress  = Udp4Instance->ConfigData.RemoteAddress;\r
-      Udp4ServicePoint->RemotePort     = Udp4Instance->ConfigData.RemotePort;\r
-\r
-      Udp4ServicePoint++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Get the mac string.\r
-  //\r
-  Status = NetLibGetMacString (\r
-             Udp4Service->ControllerHandle,\r
-             Udp4Service->ImageHandle,\r
-             &NewMacString\r
-             );\r
-  if (EFI_ERROR (Status)) {\r
-    goto ON_ERROR;\r
-  }\r
-\r
-  if (Udp4Service->MacString != NULL) {\r
-    //\r
-    // The variable is set already, we're going to update it.\r
-    //\r
-    if (StrCmp (Udp4Service->MacString, NewMacString) != 0) {\r
-      //\r
-      // The mac address is changed, delete the previous variable first.\r
-      //\r
-      gRT->SetVariable (\r
-             Udp4Service->MacString,\r
-             &gEfiUdp4ServiceBindingProtocolGuid,\r
-             EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-             0,\r
-             NULL\r
-             );\r
-    }\r
-\r
-    FreePool (Udp4Service->MacString);\r
-  }\r
-\r
-  Udp4Service->MacString = NewMacString;\r
-\r
-  Status = gRT->SetVariable (\r
-                  Udp4Service->MacString,\r
-                  &gEfiUdp4ServiceBindingProtocolGuid,\r
-                  EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-                  VariableDataSize,\r
-                  (VOID *) Udp4VariableData\r
-                  );\r
-\r
-ON_ERROR:\r
-\r
-  FreePool (Udp4VariableData);\r
-\r
-  return Status;\r
-}\r
-\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[[in]  Udp4Service            Udp4 service data.\r
-\r
-**/\r
-VOID\r
-Udp4ClearVariableData (\r
-  IN UDP4_SERVICE_DATA  *Udp4Service\r
-  )\r
-{\r
-  ASSERT (Udp4Service->MacString != NULL);\r
-\r
-  gRT->SetVariable (\r
-         Udp4Service->MacString,\r
-         &gEfiUdp4ServiceBindingProtocolGuid,\r
-         EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-         0,\r
-         NULL\r
-         );\r
-\r
-  FreePool (Udp4Service->MacString);\r
-  Udp4Service->MacString = NULL;\r
-}\r
+}
\ No newline at end of file
index 8142a4640f5e80c040013380a6f5d1040b280fd3..31edfbda43556e8c7223548d742a8c4c83dafbad 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   EFI UDPv4 protocol implementation.\r
    \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, 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
@@ -72,8 +72,6 @@ typedef struct _UDP4_SERVICE_DATA_ {
   IP_IO                         *IpIo;\r
 \r
   EFI_EVENT                     TimeoutEvent;\r
-\r
-  CHAR16                        *MacString;\r
 } UDP4_SERVICE_DATA;\r
 \r
 #define UDP4_INSTANCE_DATA_SIGNATURE  SIGNATURE_32('U', 'd', 'p', 'I')\r
@@ -693,33 +691,5 @@ EFIAPI
 Udp4NetVectorExtFree (\r
   VOID  *Context\r
   );\r
-\r
-/**\r
-  Set the Udp4 variable data.\r
-\r
-  @param[in] Udp4Service         Udp4 service data.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to set the\r
-                                 variable.\r
-  @retval EFI_SUCCESS            Set variable successfully.\r
-  @retval other                  Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Udp4SetVariableData (\r
-  IN UDP4_SERVICE_DATA  *Udp4Service\r
-  );\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[[in]  Udp4Service            Udp4 service data.\r
-\r
-**/\r
-VOID\r
-Udp4ClearVariableData (\r
-  IN UDP4_SERVICE_DATA  *Udp4Service\r
-  );\r
-\r
\r
 #endif\r
-\r
index db1c4fdb87506a49ea73745eb62e65e8954f8528..d33402078f6eece380568b9c6503c304a87dd491 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, 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
@@ -280,9 +280,7 @@ Udp4Configure (
 \r
     ASSERT (IsListEmpty (&Instance->DeliveredDgramQue));\r
   }\r
-\r
-  Udp4SetVariableData (Instance->Udp4Service);\r
-\r
\r
 ON_EXIT:\r
 \r
   gBS->RestoreTPL (OldTpl);\r
index 48bc7a0a4408e19c530c12d0c5548d2d05ac2a82..79a9bcacb05383b27cfe58a3edd0ca2d669d5105 100644 (file)
@@ -3,14 +3,14 @@
   Protocol interface. It is split into the following three main\r
   sections:\r
   - EFI IPv4 Service Binding Protocol\r
-  - EFI IPv4 Variable\r
+  - EFI IPv4 Variable (deprecated in UEFI 2.4B)\r
   - EFI IPv4 Protocol.\r
   The EFI IPv4 Protocol provides basic network IPv4 packet I/O services,\r
   which includes support foR a subset of the Internet Control Message \r
   Protocol (ICMP) and may include support for the Internet Group Management\r
   Protocol (IGMP).\r
   \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -40,13 +40,21 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   }\r
 \r
 typedef struct _EFI_IP4_PROTOCOL EFI_IP4_PROTOCOL;\r
-  \r
+\r
+///\r
+/// EFI_IP4_ADDRESS_PAIR is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
+///\r
 typedef struct {\r
   EFI_HANDLE              InstanceHandle;\r
   EFI_IPv4_ADDRESS        Ip4Address;\r
   EFI_IPv4_ADDRESS        SubnetMask;\r
 } EFI_IP4_ADDRESS_PAIR; \r
 \r
+///\r
+/// EFI_IP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
+///\r
 typedef struct {\r
   EFI_HANDLE              DriverHandle;\r
   UINT32                  AddressCount;\r
index 8c9b990a369282abf0cce89698ffaaa46343ecd7..5d0416d1013d93aeee997e349c84cc872d386496 100644 (file)
@@ -3,14 +3,14 @@
   Protocol interface. It is split into the following three main\r
   sections:\r
   - EFI IPv6 Service Binding Protocol\r
-  - EFI IPv6 Variable\r
+  - EFI IPv6 Variable (deprecated in UEFI 2.4B)\r
   - EFI IPv6 Protocol\r
   The EFI IPv6 Protocol provides basic network IPv6 packet I/O services,\r
   which includes support for Neighbor Discovery Protocol (ND), Multicast\r
   Listener Discovery Protocol (MLD), and a subset of the Internet Control\r
   Message Protocol (ICMPv6).\r
 \r
-  Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2014, 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
@@ -43,7 +43,8 @@
 typedef struct _EFI_IP6_PROTOCOL EFI_IP6_PROTOCOL;\r
 \r
 ///\r
-/// EFI_IP6_ADDRESS_PAIR\r
+/// EFI_IP6_ADDRESS_PAIR is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
 ///\r
 typedef struct{\r
   ///\r
@@ -61,7 +62,8 @@ typedef struct{
 } EFI_IP6_ADDRESS_PAIR;\r
 \r
 ///\r
-/// EFI_IP6_VARIABLE_DATA\r
+/// EFI_IP6_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
 ///\r
 typedef struct {\r
   ///\r
index 55ed10a16203d01a270bf858fdcd2291f8173b31..e27581b1d87d622c25472f51b6c2699a15cc42db 100644 (file)
@@ -4,7 +4,7 @@
   and destroy child of the driver to communicate with other host using TCP protocol.\r
   The EFI TCPv4 Protocol provides services to send and receive data stream.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -35,6 +35,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 typedef struct _EFI_TCP4_PROTOCOL EFI_TCP4_PROTOCOL;\r
 \r
+///\r
+/// EFI_TCP4_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
+///\r
 typedef struct {\r
   EFI_HANDLE              InstanceHandle;\r
   EFI_IPv4_ADDRESS        LocalAddress;\r
@@ -43,6 +47,10 @@ typedef struct {
   UINT16                  RemotePort;\r
 } EFI_TCP4_SERVICE_POINT;\r
 \r
+///\r
+/// EFI_TCP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
+///\r
 typedef struct {\r
   EFI_HANDLE              DriverHandle;\r
   UINT32                  ServiceCount;\r
index 549b2ff64d71c11b213a1bb7bf3ff7bfd285e567..4b9b366242b0be64389ba043b3935ffcf634e5fc 100644 (file)
@@ -4,7 +4,7 @@
   and destroy child of the driver to communicate with other host using TCP protocol.\r
   The EFI TCPv6 Protocol provides services to send and receive data stream.\r
 \r
-  Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2014, 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
@@ -38,7 +38,8 @@
 typedef struct _EFI_TCP6_PROTOCOL EFI_TCP6_PROTOCOL;\r
 \r
 ///\r
-/// EFI_TCP6_SERVICE_POINT\r
+/// EFI_TCP6_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
 ///\r
 typedef struct {\r
   ///\r
@@ -69,7 +70,8 @@ typedef struct {
 } EFI_TCP6_SERVICE_POINT;\r
 \r
 ///\r
-/// EFI_TCP6_VARIABLE_DATA\r
+/// EFI_TCP6_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
 ///\r
 typedef struct {\r
   EFI_HANDLE             DriverHandle; ///< The handle of the driver that creates this entry.\r
index bf3a434f33191f482eb00a749c76ed3a1e1ab30d..dfd550757b2696cdbf2d0404ba91c59b1de13821 100644 (file)
@@ -4,7 +4,7 @@
   The EFI UDPv4 Protocol provides simple packet-oriented services \r
   to transmit and receive UDP packets.  \r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -37,6 +37,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 typedef struct _EFI_UDP4_PROTOCOL EFI_UDP4_PROTOCOL; \r
   \r
+///\r
+/// EFI_UDP4_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
+///\r
 typedef struct {\r
   EFI_HANDLE              InstanceHandle;\r
   EFI_IPv4_ADDRESS        LocalAddress;\r
@@ -45,6 +49,10 @@ typedef struct {
   UINT16                  RemotePort;\r
 } EFI_UDP4_SERVICE_POINT; \r
 \r
+///\r
+/// EFI_UDP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
+///\r
 typedef struct {\r
   EFI_HANDLE              DriverHandle;\r
   UINT32                  ServiceCount;\r
index 11120501129c19885be79dbc6a5d114d8f92d31a..13cce8c4afd4aead8698eb644b5d33e81ed3bb32 100644 (file)
@@ -3,7 +3,7 @@
   the EFI IPv6 Protocol and provides simple packet-oriented services to transmit and receive\r
   UDP packets.\r
 \r
-  Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2014, 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
     0x4f948815, 0xb4b9, 0x43cb, {0x8a, 0x33, 0x90, 0xe0, 0x60, 0xb3, 0x49, 0x55 } \\r
   }\r
 \r
+///\r
+/// EFI_UDP6_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
+///\r
 typedef struct {\r
   ///\r
   /// The EFI UDPv6 Protocol instance handle that is using this address/port pair.\r
@@ -59,6 +63,10 @@ typedef struct {
   UINT16              RemotePort;\r
 } EFI_UDP6_SERVICE_POINT;\r
 \r
+///\r
+/// EFI_UDP6_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
+///\r
 typedef struct {\r
   ///\r
   /// The handle of the driver that creates this entry.\r
index 18ec012a1ed389c7b138868544636303e87d5354..4f71d052bf85c16a2a2b4596cd92257dd1f1922b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of common functions shared by IP6 driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -650,146 +650,6 @@ Ip6GetMulticastMac (
   return Mnp->McastIpToMac (Mnp, TRUE, &EfiIp, Mac);\r
 }\r
 \r
-/**\r
-  Set the Ip6 variable data.\r
-\r
-  @param[in]  IpSb              Points to an IP6 service binding instance.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
-  @retval other                 Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Ip6SetVariableData (\r
-  IN IP6_SERVICE  *IpSb\r
-  )\r
-{\r
-  UINT32                 NumConfiguredInstance;\r
-  LIST_ENTRY             *Entry;\r
-  UINTN                  VariableDataSize;\r
-  EFI_IP6_VARIABLE_DATA  *Ip6VariableData;\r
-  EFI_IP6_ADDRESS_PAIR   *Ip6AddressPair;\r
-  IP6_PROTOCOL           *IpInstance;\r
-  CHAR16                 *NewMacString;\r
-  EFI_STATUS             Status;\r
-\r
-  NumConfiguredInstance = 0;\r
-\r
-  //\r
-  // Go through the children list to count the configured children.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &IpSb->Children) {\r
-    IpInstance = NET_LIST_USER_STRUCT_S (Entry, IP6_PROTOCOL, Link, IP6_PROTOCOL_SIGNATURE);\r
-\r
-    if (IpInstance->State == IP6_STATE_CONFIGED) {\r
-      NumConfiguredInstance++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Calculate the size of the Ip6VariableData. As there may be no IP child,\r
-  // we should add extra buffer for the address paris only if the number of configured\r
-  // children is more than 1.\r
-  //\r
-  VariableDataSize = sizeof (EFI_IP6_VARIABLE_DATA);\r
-\r
-  if (NumConfiguredInstance > 1) {\r
-    VariableDataSize += sizeof (EFI_IP6_ADDRESS_PAIR) * (NumConfiguredInstance - 1);\r
-  }\r
-\r
-  Ip6VariableData = AllocatePool (VariableDataSize);\r
-  if (Ip6VariableData == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  Ip6VariableData->DriverHandle = IpSb->Image;\r
-  Ip6VariableData->AddressCount = NumConfiguredInstance;\r
-\r
-  Ip6AddressPair                = &Ip6VariableData->AddressPairs[0];\r
-\r
-  //\r
-  // Go through the children list to fill the configured children's address pairs.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &IpSb->Children) {\r
-    IpInstance = NET_LIST_USER_STRUCT_S (Entry, IP6_PROTOCOL, Link, IP6_PROTOCOL_SIGNATURE);\r
-\r
-    if (IpInstance->State == IP6_STATE_CONFIGED) {\r
-      Ip6AddressPair->InstanceHandle = IpInstance->Handle;\r
-      Ip6AddressPair->PrefixLength   = IpInstance->PrefixLength;\r
-      IP6_COPY_ADDRESS (&Ip6AddressPair->Ip6Address, &IpInstance->ConfigData.StationAddress);\r
-\r
-      Ip6AddressPair++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Get the mac string.\r
-  //\r
-  Status = NetLibGetMacString (IpSb->Controller, IpSb->Image, &NewMacString);\r
-  if (EFI_ERROR (Status)) {\r
-    goto Exit;\r
-  }\r
-\r
-  if (IpSb->MacString != NULL) {\r
-    //\r
-    // The variable is set already, we're going to update it.\r
-    //\r
-    if (StrCmp (IpSb->MacString, NewMacString) != 0) {\r
-      //\r
-      // The mac address is changed, delete the previous variable first.\r
-      //\r
-      gRT->SetVariable (\r
-             IpSb->MacString,\r
-             &gEfiIp6ServiceBindingProtocolGuid,\r
-             EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-             0,\r
-             NULL\r
-             );\r
-    }\r
-\r
-    FreePool (IpSb->MacString);\r
-  }\r
-\r
-  IpSb->MacString = NewMacString;\r
-\r
-  Status = gRT->SetVariable (\r
-                  IpSb->MacString,\r
-                  &gEfiIp6ServiceBindingProtocolGuid,\r
-                  EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-                  VariableDataSize,\r
-                  (VOID *) Ip6VariableData\r
-                  );\r
-\r
-Exit:\r
-  FreePool (Ip6VariableData);\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[in]  IpSb                  Ip6 service binding instance.\r
-\r
-**/\r
-VOID\r
-Ip6ClearVariableData (\r
-  IN IP6_SERVICE  *IpSb\r
-  )\r
-{\r
-  ASSERT (IpSb->MacString != NULL);\r
-\r
-  gRT->SetVariable (\r
-         IpSb->MacString,\r
-         &gEfiIp6ServiceBindingProtocolGuid,\r
-         EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-         0,\r
-         NULL\r
-         );\r
-\r
-  FreePool (IpSb->MacString);\r
-  IpSb->MacString = NULL;\r
-}\r
-\r
 /**\r
   Convert the multibyte field in IP header's byter order.\r
   In spite of its name, it can also be used to convert from\r
index 9c2ddf4d4e387a14c928ad0e1c292723a9c3390e..488c5b23b72f95d80b2a04257c6589824c625a3c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common definition and functions for IP6 driver.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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,31 +279,6 @@ Ip6RemoveAddr (
   IN UINT8             PrefixLength\r
   );\r
 \r
-/**\r
-  Set the Ip6 variable data.\r
-\r
-  @param[in]  IpSb              Points to an IP6 service binding instance\r
-\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
-  @retval other                 Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Ip6SetVariableData (\r
-  IN IP6_SERVICE  *IpSb\r
-  );\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[in]  IpSb                  Ip6 service binding instance.\r
-\r
-**/\r
-VOID\r
-Ip6ClearVariableData (\r
-  IN IP6_SERVICE  *IpSb\r
-  );\r
-\r
 /**\r
   Get the MAC address for a multicast IP address. Call\r
   Mnp's McastIpToMac to find the MAC address instead of\r
index b9a64a80f8d3773363db1fb11c0af59045075d45..69587849cc7740137a67539958ac2fdf08d246f8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for IP6 driver.\r
 \r
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -573,8 +573,6 @@ Ip6DriverBindingStart (
     //\r
     mIp6Id = NET_RANDOM (NetRandomInitSeed ());\r
 \r
-    Ip6SetVariableData (IpSb);\r
-\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -701,11 +699,6 @@ Ip6DriverBindingStop (
     State           = IpSb->State;\r
     IpSb->State     = IP6_SERVICE_DESTROY;\r
 \r
-    //\r
-    // Clear the variable data.\r
-    //\r
-    Ip6ClearVariableData (IpSb);\r
-\r
     Status = Ip6CleanService (IpSb);\r
     if (EFI_ERROR (Status)) {\r
       IpSb->State = State;\r
@@ -943,9 +936,6 @@ Ip6ServiceBindingDestroyChild (
   }\r
 \r
   Status = Ip6CleanProtocol (IpInstance);\r
-\r
-  Ip6SetVariableData (IpSb);\r
-\r
   if (EFI_ERROR (Status)) {\r
     gBS->InstallMultipleProtocolInterfaces (\r
            &ChildHandle,\r
index 365495a5e448d680e10344965cf3b4a716afd72a..621879b1ea579583af79b1340fb0a7b101a89e13 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of EFI_IP6_PROTOCOL protocol interfaces.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -705,11 +705,6 @@ EfiIp6Configure (
   //\r
   Ip6ServiceConfigMnp (IpInstance->Service, FALSE);\r
 \r
-  //\r
-  // Update the variable data.\r
-  //\r
-  Ip6SetVariableData (IpInstance->Service);\r
-\r
 Exit:\r
   gBS->RestoreTPL (OldTpl);\r
   return Status;\r
index d3d2cb1c3a7d0359c9daef4d2589deccefd77ecd..9fe93f6e8b92f9eb23be1a5eaa06574760bf4189 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of a dispatch routine for processing TCP requests.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -327,8 +327,6 @@ TcpFlushPcb (
       FreePool (Sock->DevicePath);\r
       Sock->DevicePath = NULL;\r
     }\r
-\r
-    TcpSetVariableData (TcpProto->TcpService);\r
   }\r
 \r
   NetbufFreeList (&Tcb->SndQue);\r
index 1f0d3716542c422e4cd62468f24bc0e49b6d5270..ce3dd0be634d71aead735ba31e03628424991104 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The driver binding and service binding protocol for the TCP driver.\r
 \r
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -349,8 +349,6 @@ TcpCreateService (
     goto ON_ERROR;\r
   }\r
 \r
-  TcpSetVariableData (TcpServiceData);\r
-\r
   return EFI_SUCCESS;\r
 \r
 ON_ERROR:\r
@@ -499,11 +497,6 @@ TcpDestroyService (
     //\r
     TcpDestroyTimer ();\r
 \r
-    //\r
-    // Clear the variable.\r
-    //\r
-    TcpClearVariableData (TcpServiceData);\r
-\r
     //\r
     // Release the TCP service data\r
     //\r
index 5208048edff19944ba4ea699b95d3f31a9f5be4e..19dd168e89f19ebec5868d91b59f64d3b4b37310 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The prototype of driver binding and service binding protocol for TCP driver.\r
 \r
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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,6 @@ typedef struct _TCP_SERVICE_DATA {
   UINT8                         IpVersion;\r
   IP_IO                         *IpIo;\r
   EFI_SERVICE_BINDING_PROTOCOL  ServiceBinding;\r
-  CHAR16                        *MacString;\r
   LIST_ENTRY                    SocketList;\r
 } TCP_SERVICE_DATA;\r
 \r
index c23ba94e445578151e9f4a730ec73f7b9ebc4b5c..20761092541bede08d0fdc8ba1d5da0dc5111651 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Declaration of external functions shared in TCP driver.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -276,31 +276,6 @@ TcpResetConnection (
   IN TCP_CB *Tcb\r
   );\r
 \r
-/**\r
-  Set the Tcp variable data.\r
-\r
-  @param[in]  TcpService        Tcp service data.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
-  @retval other                 Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-TcpSetVariableData (\r
-  IN TCP_SERVICE_DATA  *TcpService\r
-  );\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[in]  TcpService            Tcp service data.\r
-\r
-**/\r
-VOID\r
-TcpClearVariableData (\r
-  IN TCP_SERVICE_DATA  *TcpService\r
-  );\r
-\r
 /**\r
   Install the device path protocol on the TCP instance.\r
 \r
index 21bd9dfec1d1d0561b36f175a04e2e309cb451eb..5394f7d1cadceff4f5bc0687a50fcaabd08d9836 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Misc support routines for TCP driver.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -467,7 +467,6 @@ TcpInsertTcb (
   InsertHeadList (Head, &Tcb->List);\r
 \r
   TcpProto = (TCP_PROTO_DATA *) Tcb->Sk->ProtoReserved;\r
-  TcpSetVariableData (TcpProto->TcpService);\r
 \r
   return 0;\r
 }\r
@@ -943,266 +942,6 @@ TcpResetConnection (
   NetbufFree (Nbuf);\r
 }\r
 \r
-/**\r
-  Set the Tcp variable data.\r
-\r
-  @param[in]  TcpService        Tcp service data.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources to set the variable.\r
-  @retval other                 Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-TcpSetVariableData (\r
-  IN TCP_SERVICE_DATA  *TcpService\r
-  )\r
-{\r
-  EFI_GUID                *ServiceBindingGuid;\r
-  UINT32                  NumConfiguredInstance;\r
-  LIST_ENTRY              *Entry;\r
-  TCP_CB                  *TcpPcb;\r
-  TCP_PROTO_DATA          *TcpProto;\r
-  UINTN                   VariableDataSize;\r
-  EFI_TCP4_VARIABLE_DATA  *Tcp4VariableData;\r
-  EFI_TCP4_SERVICE_POINT  *Tcp4ServicePoint;\r
-  EFI_TCP6_VARIABLE_DATA  *Tcp6VariableData;\r
-  EFI_TCP6_SERVICE_POINT  *Tcp6ServicePoint;\r
-  VOID                    *VariableData;\r
-  CHAR16                  *NewMacString;\r
-  EFI_STATUS              Status;\r
-\r
-  if (TcpService->IpVersion == IP_VERSION_4) {\r
-    ServiceBindingGuid = &gEfiTcp4ServiceBindingProtocolGuid;\r
-  } else {\r
-    ServiceBindingGuid = &gEfiTcp6ServiceBindingProtocolGuid;\r
-  }\r
-\r
-  NumConfiguredInstance = 0;\r
-  Tcp4VariableData      = NULL;\r
-  Tcp6VariableData      = NULL;\r
-\r
-  //\r
-  // Go through the running queue to count the instances.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {\r
-    TcpPcb    = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
-\r
-    TcpProto  = (TCP_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;\r
-\r
-    if (TcpProto->TcpService == TcpService) {\r
-      //\r
-      // This tcp instance belongs to the TcpService.\r
-      //\r
-      NumConfiguredInstance++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Go through the listening queue to count the instances.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {\r
-    TcpPcb    = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
-\r
-    TcpProto  = (TCP_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;\r
-\r
-    if (TcpProto->TcpService == TcpService) {\r
-      //\r
-      // This tcp instance belongs to the TcpService.\r
-      //\r
-      NumConfiguredInstance++;\r
-    }\r
-  }\r
-\r
-  Tcp4ServicePoint = NULL;\r
-  Tcp6ServicePoint = NULL;\r
-\r
-  //\r
-  // Calculate the size of the Tcp4VariableData. As there may be no Tcp4 child,\r
-  // we should add extra buffers for the service points only if the number of configured\r
-  // children is more than one.\r
-  //\r
-  if (TcpService->IpVersion == IP_VERSION_4) {\r
-    VariableDataSize = sizeof (EFI_TCP4_VARIABLE_DATA);\r
-\r
-    if (NumConfiguredInstance > 1) {\r
-      VariableDataSize += sizeof (EFI_TCP4_SERVICE_POINT) * (NumConfiguredInstance - 1);\r
-    }\r
-\r
-    Tcp4VariableData = AllocateZeroPool (VariableDataSize);\r
-    if (Tcp4VariableData == NULL) {\r
-      return EFI_OUT_OF_RESOURCES;\r
-    }\r
-\r
-    Tcp4VariableData->DriverHandle  = TcpService->DriverBindingHandle;\r
-    Tcp4VariableData->ServiceCount  = NumConfiguredInstance;\r
-\r
-    Tcp4ServicePoint                = &Tcp4VariableData->Services[0];\r
-    VariableData                    = Tcp4VariableData;\r
-  } else {\r
-    VariableDataSize = sizeof (EFI_TCP6_VARIABLE_DATA);\r
-\r
-    if (NumConfiguredInstance > 1) {\r
-      VariableDataSize += sizeof (EFI_TCP6_SERVICE_POINT) * (NumConfiguredInstance - 1);\r
-    }\r
-\r
-    Tcp6VariableData = AllocateZeroPool (VariableDataSize);\r
-    if (Tcp6VariableData == NULL) {\r
-      return EFI_OUT_OF_RESOURCES;\r
-    }\r
-\r
-    Tcp6VariableData->DriverHandle  = TcpService->DriverBindingHandle;\r
-    Tcp6VariableData->ServiceCount  = NumConfiguredInstance;\r
-\r
-    Tcp6ServicePoint                = &Tcp6VariableData->Services[0];\r
-    VariableData                    = Tcp6VariableData;\r
-  }\r
-\r
-  //\r
-  // Go through the running queue to fill the service points.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {\r
-    TcpPcb    = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
-\r
-    TcpProto  = (TCP_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;\r
-\r
-    if (TcpProto->TcpService == TcpService) {\r
-      //\r
-      // This tcp instance belongs to the TcpService.\r
-      //\r
-      if (TcpService->IpVersion == IP_VERSION_4) {\r
-        Tcp4ServicePoint->InstanceHandle          = TcpPcb->Sk->SockHandle;\r
-        CopyMem (&Tcp4ServicePoint->LocalAddress, &TcpPcb->LocalEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
-        Tcp4ServicePoint->LocalPort               = NTOHS (TcpPcb->LocalEnd.Port);\r
-        CopyMem (&Tcp4ServicePoint->RemoteAddress, &TcpPcb->RemoteEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
-        Tcp4ServicePoint->RemotePort              = NTOHS (TcpPcb->RemoteEnd.Port);\r
-\r
-        Tcp4ServicePoint++;\r
-      } else {\r
-        Tcp6ServicePoint->InstanceHandle          = TcpPcb->Sk->SockHandle;\r
-        IP6_COPY_ADDRESS (&Tcp6ServicePoint->LocalAddress, &TcpPcb->LocalEnd.Ip);\r
-        Tcp6ServicePoint->LocalPort               = NTOHS (TcpPcb->LocalEnd.Port);\r
-        IP6_COPY_ADDRESS (&Tcp6ServicePoint->RemoteAddress, &TcpPcb->RemoteEnd.Ip);\r
-        Tcp6ServicePoint->RemotePort              = NTOHS (TcpPcb->RemoteEnd.Port);\r
-\r
-        Tcp6ServicePoint++;\r
-      }\r
-    }\r
-  }\r
-\r
-  //\r
-  // Go through the listening queue to fill the service points.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {\r
-    TcpPcb    = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
-\r
-    TcpProto  = (TCP_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;\r
-\r
-    if (TcpProto->TcpService == TcpService) {\r
-      //\r
-      // This tcp instance belongs to the TcpService.\r
-      //\r
-      if (TcpService->IpVersion == IP_VERSION_4) {\r
-        Tcp4ServicePoint->InstanceHandle          = TcpPcb->Sk->SockHandle;\r
-        CopyMem (&Tcp4ServicePoint->LocalAddress, &TcpPcb->LocalEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
-        Tcp4ServicePoint->LocalPort               = NTOHS (TcpPcb->LocalEnd.Port);\r
-        CopyMem (&Tcp4ServicePoint->RemoteAddress, &TcpPcb->RemoteEnd.Ip, sizeof (EFI_IPv4_ADDRESS));\r
-        Tcp4ServicePoint->RemotePort              = NTOHS (TcpPcb->RemoteEnd.Port);\r
-\r
-        Tcp4ServicePoint++;\r
-      } else {\r
-        Tcp6ServicePoint->InstanceHandle          = TcpPcb->Sk->SockHandle;\r
-        IP6_COPY_ADDRESS (&Tcp6ServicePoint->LocalAddress, &TcpPcb->LocalEnd.Ip);\r
-        Tcp6ServicePoint->LocalPort               = NTOHS (TcpPcb->LocalEnd.Port);\r
-        IP6_COPY_ADDRESS (&Tcp6ServicePoint->RemoteAddress, &TcpPcb->RemoteEnd.Ip);\r
-        Tcp6ServicePoint->RemotePort              = NTOHS (TcpPcb->RemoteEnd.Port);\r
-\r
-        Tcp6ServicePoint++;\r
-      }\r
-    }\r
-  }\r
-\r
-  //\r
-  // Get the mac string.\r
-  //\r
-  Status = NetLibGetMacString (\r
-             TcpService->ControllerHandle,\r
-             TcpService->DriverBindingHandle,\r
-             &NewMacString\r
-             );\r
-  if (EFI_ERROR (Status)) {\r
-    goto ON_ERROR;\r
-  }\r
-\r
-  if (TcpService->MacString != NULL) {\r
-    //\r
-    // The variable is set already. We're going to update it.\r
-    //\r
-    if (StrCmp (TcpService->MacString, NewMacString) != 0) {\r
-      //\r
-      // The mac address is changed. Delete the previous variable first.\r
-      //\r
-      gRT->SetVariable (\r
-             TcpService->MacString,\r
-             ServiceBindingGuid,\r
-             EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-             0,\r
-             NULL\r
-             );\r
-    }\r
-\r
-    FreePool (TcpService->MacString);\r
-  }\r
-\r
-  TcpService->MacString = NewMacString;\r
-\r
-  Status = gRT->SetVariable (\r
-                  TcpService->MacString,\r
-                  ServiceBindingGuid,\r
-                  EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-                  VariableDataSize,\r
-                  VariableData\r
-                  );\r
-\r
-ON_ERROR:\r
-\r
-  FreePool (VariableData);\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[in]  TcpService            Tcp service data.\r
-\r
-**/\r
-VOID\r
-TcpClearVariableData (\r
-  IN TCP_SERVICE_DATA  *TcpService\r
-  )\r
-{\r
-  EFI_GUID  *ServiceBindingGuid;\r
-\r
-  ASSERT (TcpService->MacString != NULL);\r
-\r
-  if (TcpService->IpVersion == IP_VERSION_4) {\r
-    ServiceBindingGuid = &gEfiTcp4ServiceBindingProtocolGuid;\r
-  } else {\r
-    ServiceBindingGuid = &gEfiTcp6ServiceBindingProtocolGuid;\r
-  }\r
-\r
-  gRT->SetVariable (\r
-         TcpService->MacString,\r
-         ServiceBindingGuid,\r
-         EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-         0,\r
-         NULL\r
-         );\r
-\r
-  FreePool (TcpService->MacString);\r
-  TcpService->MacString = NULL;\r
-}\r
-\r
 /**\r
   Install the device path protocol on the TCP instance.\r
 \r
index 1c2c33336ea2f1ad9c20bbf0b0ea2d78e3b2df60..da2093962a2b51cb234dd034b760cff6aa9003d4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Driver Binding functions and Service Binding functions for the Network driver module.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -165,8 +165,6 @@ Udp6DriverBindingStart (
   if (EFI_ERROR (Status)) {\r
     Udp6CleanService (Udp6Service);\r
     goto EXIT;\r
-  } else {\r
-    Status = Udp6SetVariableData (Udp6Service);\r
   }\r
 \r
 EXIT:\r
@@ -298,9 +296,7 @@ Udp6DriverBindingStop (
            &Udp6Service->ServiceBinding,\r
            NULL\r
            );\r
-\r
-    Udp6ClearVariableData (Udp6Service);\r
-\r
\r
     Udp6CleanService (Udp6Service);\r
 \r
     FreePool (Udp6Service);\r
index 3830b14415e6bdb2a8fcccd6b177c32a9ccd4b53..40e3aff0695fed6a16c6af3abcda7c42ec58b7f0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Udp6 driver's whole implementation.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -1623,8 +1623,6 @@ Udp6Demultiplex (
     }\r
   }\r
 \r
-  gRT->GetTime (&RxData.TimeStamp, NULL);\r
-\r
   Udp6Session                  = &RxData.UdpSession;\r
   Udp6Session->SourcePort      = NTOHS (Udp6Header->SrcPort);\r
   Udp6Session->DestinationPort = NTOHS (Udp6Header->DstPort);\r
@@ -1933,175 +1931,7 @@ Udp6NetVectorExtFree (
   IN VOID  *Context\r
   )\r
 {\r
-}\r
-\r
-\r
-/**\r
-  Set the Udp6 variable data.\r
-\r
-  @param[in]  Udp6Service            Udp6 service data.\r
-\r
-  @retval     EFI_OUT_OF_RESOURCES   There are not enough resources to set the\r
-                                     variable.\r
-  @retval     other                  Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Udp6SetVariableData (\r
-  IN UDP6_SERVICE_DATA  *Udp6Service\r
-  )\r
-{\r
-  UINT32                  NumConfiguredInstance;\r
-  LIST_ENTRY              *Entry;\r
-  UINTN                   VariableDataSize;\r
-  EFI_UDP6_VARIABLE_DATA  *Udp6VariableData;\r
-  EFI_UDP6_SERVICE_POINT  *Udp6ServicePoint;\r
-  UDP6_INSTANCE_DATA      *Udp6Instance;\r
-  CHAR16                  *NewMacString;\r
-  EFI_STATUS              Status;\r
-\r
-  NumConfiguredInstance = 0;\r
-\r
-  //\r
-  // Go through the children list to count the configured children.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &Udp6Service->ChildrenList) {\r
-    Udp6Instance = NET_LIST_USER_STRUCT_S (\r
-                     Entry,\r
-                     UDP6_INSTANCE_DATA,\r
-                     Link,\r
-                     UDP6_INSTANCE_DATA_SIGNATURE\r
-                     );\r
-\r
-    if (Udp6Instance->Configured) {\r
-      NumConfiguredInstance++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Calculate the size of the Udp6VariableData. As there may be no Udp6 child,\r
-  // we should add extra buffer for the service points only if the number of configured\r
-  // children is more than 1.\r
-  //\r
-  VariableDataSize = sizeof (EFI_UDP6_VARIABLE_DATA);\r
-\r
-  if (NumConfiguredInstance > 1) {\r
-    VariableDataSize += sizeof (EFI_UDP6_SERVICE_POINT) * (NumConfiguredInstance - 1);\r
-  }\r
-\r
-  Udp6VariableData = AllocateZeroPool (VariableDataSize);\r
-  if (Udp6VariableData == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  Udp6VariableData->DriverHandle = Udp6Service->ImageHandle;\r
-  Udp6VariableData->ServiceCount = NumConfiguredInstance;\r
-\r
-  Udp6ServicePoint = &Udp6VariableData->Services[0];\r
-\r
-  //\r
-  // Go through the children list to fill the configured children's address pairs.\r
-  //\r
-  NET_LIST_FOR_EACH (Entry, &Udp6Service->ChildrenList) {\r
-    Udp6Instance = NET_LIST_USER_STRUCT_S (\r
-                     Entry,\r
-                     UDP6_INSTANCE_DATA,\r
-                     Link,\r
-                     UDP6_INSTANCE_DATA_SIGNATURE\r
-                     );\r
-\r
-    if (Udp6Instance->Configured) {\r
-      Udp6ServicePoint->InstanceHandle = Udp6Instance->ChildHandle;\r
-      Udp6ServicePoint->LocalPort      = Udp6Instance->ConfigData.StationPort;\r
-      Udp6ServicePoint->RemotePort     = Udp6Instance->ConfigData.RemotePort;\r
-\r
-      IP6_COPY_ADDRESS (\r
-        &Udp6ServicePoint->LocalAddress,\r
-        &Udp6Instance->ConfigData.StationAddress\r
-        );\r
-      IP6_COPY_ADDRESS (\r
-        &Udp6ServicePoint->RemoteAddress,\r
-        &Udp6Instance->ConfigData.RemoteAddress\r
-        );\r
-      Udp6ServicePoint++;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Get the MAC string.\r
-  //\r
-  Status = NetLibGetMacString (\r
-             Udp6Service->ControllerHandle,\r
-             Udp6Service->ImageHandle,\r
-             &NewMacString\r
-             );\r
-  if (EFI_ERROR (Status)) {\r
-    goto EXIT;\r
-  }\r
-\r
-  if (Udp6Service->MacString != NULL) {\r
-    //\r
-    // The variable is set already, we're going to update it.\r
-    //\r
-    if (StrCmp (Udp6Service->MacString, NewMacString) != 0) {\r
-      //\r
-      // The MAC address is changed, delete the previous variable first.\r
-      //\r
-      gRT->SetVariable (\r
-             Udp6Service->MacString,\r
-             &gEfiUdp6ServiceBindingProtocolGuid,\r
-             EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-             0,\r
-             NULL\r
-             );\r
-    }\r
-\r
-    FreePool (Udp6Service->MacString);\r
-  }\r
-\r
-  Udp6Service->MacString = NewMacString;\r
-\r
-  Status = gRT->SetVariable (\r
-                  Udp6Service->MacString,\r
-                  &gEfiUdp6ServiceBindingProtocolGuid,\r
-                  EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-                  VariableDataSize,\r
-                  (VOID *) Udp6VariableData\r
-                  );\r
-\r
-EXIT:\r
-\r
-  FreePool (Udp6VariableData);\r
-\r
-  return Status;\r
-}\r
-\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[in, out]  Udp6Service            Udp6 service data.\r
-\r
-**/\r
-VOID\r
-Udp6ClearVariableData (\r
-  IN OUT UDP6_SERVICE_DATA  *Udp6Service\r
-  )\r
-{\r
-  ASSERT (Udp6Service->MacString != NULL);\r
-\r
-  gRT->SetVariable (\r
-         Udp6Service->MacString,\r
-         &gEfiUdp6ServiceBindingProtocolGuid,\r
-         EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-         0,\r
-         NULL\r
-         );\r
-\r
-  FreePool (Udp6Service->MacString);\r
-  Udp6Service->MacString = NULL;\r
-}\r
-\r
+} \r
 \r
 /**\r
   Find the key in the netmap.\r
index 9ca4f4a011d03bf4742abfa653c1d1acdaa7736d..09f315f50b0af10bcd71ca981e53436921bf5ff4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Udp6 driver's whole implementation and internal data structures.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -79,8 +79,7 @@ typedef struct _UDP6_SERVICE_DATA {
   UINTN                         ChildrenNumber;\r
   IP_IO                         *IpIo;\r
   EFI_EVENT                     TimeoutEvent;\r
-  CHAR16                        *MacString;\r
-} UDP6_SERVICE_DATA;\r
+ } UDP6_SERVICE_DATA;\r
 \r
 typedef struct _UDP6_INSTANCE_DATA {\r
   UINT32                Signature;\r
@@ -145,22 +144,7 @@ Udp6CreateService (
   IN EFI_HANDLE         ImageHandle,\r
   IN EFI_HANDLE         ControllerHandle\r
   );\r
-\r
-/**\r
-  Set the Udp6 variable data.\r
-\r
-  @param[in]  Udp6Service            Udp6 service data.\r
-\r
-  @retval     EFI_OUT_OF_RESOURCES   There are not enough resources to set the\r
-                                     variable.\r
-  @retval     other                  Set variable failed.\r
-\r
-**/\r
-EFI_STATUS\r
-Udp6SetVariableData (\r
-  IN UDP6_SERVICE_DATA  *Udp6Service\r
-  );\r
-\r
\r
 /**\r
   This function cleans the udp instance.\r
 \r
@@ -171,18 +155,7 @@ VOID
 Udp6CleanInstance (\r
   IN OUT UDP6_INSTANCE_DATA  *Instance\r
   );\r
-\r
-/**\r
-  Clear the variable and free the resource.\r
-\r
-  @param[in, out]  Udp6Service            Udp6 service data.\r
-\r
-**/\r
-VOID\r
-Udp6ClearVariableData (\r
-  IN OUT UDP6_SERVICE_DATA  *Udp6Service\r
-  );\r
-\r
\r
 /**\r
   This function intializes the new created udp instance.\r
 \r
index 0cad5962765a09a84a738f6b76a784390709ef64..f3e99255f953cd6aeee284ed6994739df529143d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Contains all EFI_UDP6_PROTOCOL interfaces.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -275,7 +275,7 @@ Udp6Configure (
     //\r
     // Cancel all the user tokens.\r
     //\r
-    Status = Instance->Udp6Proto.Cancel (&Instance->Udp6Proto, NULL);\r
+    Instance->Udp6Proto.Cancel (&Instance->Udp6Proto, NULL);\r
 \r
     //\r
     // Remove the buffered RxData for this instance.\r
@@ -284,9 +284,7 @@ Udp6Configure (
 \r
     ASSERT (IsListEmpty (&Instance->DeliveredDgramQue));\r
   }\r
-\r
-  Status = Udp6SetVariableData (Instance->Udp6Service);\r
-\r
\r
 ON_EXIT:\r
 \r
   gBS->RestoreTPL (OldTpl);\r