/** @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
\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
/** @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
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
/** @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
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
//\r
mIp4Id = (UINT16)NET_RANDOM (NetRandomInitSeed ());\r
\r
- Ip4SetVariableData (IpSb);\r
-\r
return Status;\r
\r
UNINSTALL_PROTOCOL:\r
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
}\r
\r
Status = Ip4CleanProtocol (IpInstance);\r
-\r
- Ip4SetVariableData (IpSb);\r
-\r
if (EFI_ERROR (Status)) {\r
gBS->InstallMultipleProtocolInterfaces (\r
&ChildHandle,\r
/** @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
\r
IpSb->State = IP4_SERVICE_CONFIGED;\r
\r
- Ip4SetVariableData (IpSb);\r
-\r
ON_EXIT:\r
FreePool (Data);\r
}\r
//\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
/** @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
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
/** @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
);\r
FreePool (Sock->DevicePath);\r
}\r
-\r
- TcpSetVariableData (TcpProto->TcpService);\r
}\r
\r
NetbufFreeList (&Tcb->SndQue);\r
/** @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
\r
InitializeListHead (&TcpServiceData->SocketList);\r
\r
- TcpSetVariableData (TcpServiceData);\r
-\r
return EFI_SUCCESS;\r
\r
ON_ERROR:\r
//\r
Tcp4DestroyTimer ();\r
\r
- //\r
- // Clear the variable.\r
- //\r
- TcpClearVariableData (TcpServiceData);\r
-\r
if (gTcpControllerNameTable != NULL) {\r
FreeUnicodeStringTable (gTcpControllerNameTable);\r
gTcpControllerNameTable = NULL;\r
/** @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
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
/** @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
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
/** @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
InsertHeadList (Head, &Tcb->List);\r
\r
TcpProto = (TCP4_PROTO_DATA *) Tcb->Sk->ProtoReserved;\r
- TcpSetVariableData (TcpProto->TcpService);\r
\r
return 0;\r
}\r
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
/** @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
if (EFI_ERROR (Status)) {\r
Udp4CleanService (Udp4Service);\r
FreePool (Udp4Service);\r
- } else {\r
- Udp4SetVariableData (Udp4Service);\r
}\r
\r
return Status;\r
&Udp4Service->ServiceBinding,\r
NULL\r
);\r
-\r
- Udp4ClearVariableData (Udp4Service);\r
-\r
+ \r
Udp4CleanService (Udp4Service);\r
\r
if (gUdpControllerNameTable != NULL) {\r
/** @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
}\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
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
/** @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
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
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
/** @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
\r
ASSERT (IsListEmpty (&Instance->DeliveredDgramQue));\r
}\r
-\r
- Udp4SetVariableData (Instance->Udp4Service);\r
-\r
+ \r
ON_EXIT:\r
\r
gBS->RestoreTPL (OldTpl);\r
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
}\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
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
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
} 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
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
\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
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
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
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
} 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
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
\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
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
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
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
/** @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
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
/** @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
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
/** @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
//\r
mIp6Id = NET_RANDOM (NetRandomInitSeed ());\r
\r
- Ip6SetVariableData (IpSb);\r
-\r
return EFI_SUCCESS;\r
}\r
\r
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
}\r
\r
Status = Ip6CleanProtocol (IpInstance);\r
-\r
- Ip6SetVariableData (IpSb);\r
-\r
if (EFI_ERROR (Status)) {\r
gBS->InstallMultipleProtocolInterfaces (\r
&ChildHandle,\r
/** @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
//\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
/** @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
FreePool (Sock->DevicePath);\r
Sock->DevicePath = NULL;\r
}\r
-\r
- TcpSetVariableData (TcpProto->TcpService);\r
}\r
\r
NetbufFreeList (&Tcb->SndQue);\r
/** @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
goto ON_ERROR;\r
}\r
\r
- TcpSetVariableData (TcpServiceData);\r
-\r
return EFI_SUCCESS;\r
\r
ON_ERROR:\r
//\r
TcpDestroyTimer ();\r
\r
- //\r
- // Clear the variable.\r
- //\r
- TcpClearVariableData (TcpServiceData);\r
-\r
//\r
// Release the TCP service data\r
//\r
/** @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
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
/** @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
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
/** @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
InsertHeadList (Head, &Tcb->List);\r
\r
TcpProto = (TCP_PROTO_DATA *) Tcb->Sk->ProtoReserved;\r
- TcpSetVariableData (TcpProto->TcpService);\r
\r
return 0;\r
}\r
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
/** @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
if (EFI_ERROR (Status)) {\r
Udp6CleanService (Udp6Service);\r
goto EXIT;\r
- } else {\r
- Status = Udp6SetVariableData (Udp6Service);\r
}\r
\r
EXIT:\r
&Udp6Service->ServiceBinding,\r
NULL\r
);\r
-\r
- Udp6ClearVariableData (Udp6Service);\r
-\r
+ \r
Udp6CleanService (Udp6Service);\r
\r
FreePool (Udp6Service);\r
/** @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
}\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
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
/** @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
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
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
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
/** @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
//\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
\r
ASSERT (IsListEmpty (&Instance->DeliveredDgramQue));\r
}\r
-\r
- Status = Udp6SetVariableData (Instance->Udp6Service);\r
-\r
+ \r
ON_EXIT:\r
\r
gBS->RestoreTPL (OldTpl);\r