summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Tcp4Dxe
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Network/Tcp4Dxe')
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c4
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c9
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h3
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Func.h27
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c202
5 files changed, 5 insertions, 240 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
index 93d10c9..e09d2c9 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
@@ -1,7 +1,7 @@
/** @file
Tcp request dispatcher implementation.
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -237,8 +237,6 @@ Tcp4FlushPcb (
);
FreePool (Sock->DevicePath);
}
-
- TcpSetVariableData (TcpProto->TcpService);
}
NetbufFreeList (&Tcb->SndQue);
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c
index 29a0cf7..30e9406 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c
@@ -1,7 +1,7 @@
/** @file
Tcp driver function.
-Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -418,8 +418,6 @@ Tcp4DriverBindingStart (
InitializeListHead (&TcpServiceData->SocketList);
- TcpSetVariableData (TcpServiceData);
-
return EFI_SUCCESS;
ON_ERROR:
@@ -539,11 +537,6 @@ Tcp4DriverBindingStop (
//
Tcp4DestroyTimer ();
- //
- // Clear the variable.
- //
- TcpClearVariableData (TcpServiceData);
-
if (gTcpControllerNameTable != NULL) {
FreeUnicodeStringTable (gTcpControllerNameTable);
gTcpControllerNameTable = NULL;
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h
index 0a106a4..5fe98d4 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h
@@ -1,7 +1,7 @@
/** @file
Tcp driver function header.
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -48,7 +48,6 @@ typedef struct _TCP4_SERVICE_DATA {
IP_IO *IpIo; // IP Io consumed by TCP4
EFI_SERVICE_BINDING_PROTOCOL Tcp4ServiceBinding;
EFI_HANDLE DriverBindingHandle;
- CHAR16 *MacString;
LIST_ENTRY SocketList;
} TCP4_SERVICE_DATA;
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Func.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Func.h
index 24e9b51..53b7aac 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Func.h
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Func.h
@@ -1,7 +1,7 @@
/** @file
Tcp function header file.
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -765,31 +765,6 @@ TcpBackoffRto (
);
/**
- Set the Tdp4 variable data.
-
- @param Tcp4Service Pointer to Tcp4 service data.
-
- @retval EFI_OUT_OF_RESOURCES There are not enough resources to set the variable.
- @retval other Set variable failed.
-
-**/
-EFI_STATUS
-TcpSetVariableData (
- IN TCP4_SERVICE_DATA *Tcp4Service
- );
-
-/**
- Clear the variable and free the resource.
-
- @param Tcp4Service Pointer to Tcp4 service data.
-
-**/
-VOID
-TcpClearVariableData (
- IN TCP4_SERVICE_DATA *Tcp4Service
- );
-
-/**
Install the device path protocol on the TCP instance.
@param Sock Pointer to the socket representing the TCP instance.
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
index bf04b5a..5b18d20 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
@@ -1,7 +1,7 @@
/** @file
Misc support routines for tcp.
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -392,7 +392,6 @@ TcpInsertTcb (
InsertHeadList (Head, &Tcb->List);
TcpProto = (TCP4_PROTO_DATA *) Tcb->Sk->ProtoReserved;
- TcpSetVariableData (TcpProto->TcpService);
return 0;
}
@@ -878,205 +877,6 @@ TcpOnAppAbort (
TcpSetState (Tcb, TCP_CLOSED);
}
-
-/**
- Set the Tdp4 variable data.
-
- @param Tcp4Service Pointer to Tcp4 service data.
-
- @retval EFI_OUT_OF_RESOURCES There are not enough resources to set the variable.
- @retval other Set variable failed.
-
-**/
-EFI_STATUS
-TcpSetVariableData (
- IN TCP4_SERVICE_DATA *Tcp4Service
- )
-{
- UINT32 NumConfiguredInstance;
- LIST_ENTRY *Entry;
- TCP_CB *TcpPcb;
- TCP4_PROTO_DATA *TcpProto;
- UINTN VariableDataSize;
- EFI_TCP4_VARIABLE_DATA *Tcp4VariableData;
- EFI_TCP4_SERVICE_POINT *Tcp4ServicePoint;
- CHAR16 *NewMacString;
- EFI_STATUS Status;
-
- NumConfiguredInstance = 0;
-
- //
- // Go through the running queue to count the instances.
- //
- NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {
- TcpPcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
-
- TcpProto = (TCP4_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;
-
- if (TcpProto->TcpService == Tcp4Service) {
- //
- // This tcp instance belongs to the Tcp4Service.
- //
- NumConfiguredInstance++;
- }
- }
-
- //
- // Go through the listening queue to count the instances.
- //
- NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {
- TcpPcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
-
- TcpProto = (TCP4_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;
-
- if (TcpProto->TcpService == Tcp4Service) {
- //
- // This tcp instance belongs to the Tcp4Service.
- //
- NumConfiguredInstance++;
- }
- }
-
- //
- // Calculate the size of the Tcp4VariableData. As there may be no Tcp4 child,
- // we should add extra buffer for the service points only if the number of configured
- // children is more than 1.
- //
- VariableDataSize = sizeof (EFI_TCP4_VARIABLE_DATA);
-
- if (NumConfiguredInstance > 1) {
- VariableDataSize += sizeof (EFI_TCP4_SERVICE_POINT) * (NumConfiguredInstance - 1);
- }
-
- Tcp4VariableData = AllocatePool (VariableDataSize);
- if (Tcp4VariableData == NULL) {
- return EFI_OUT_OF_RESOURCES;
- }
-
- Tcp4VariableData->DriverHandle = Tcp4Service->DriverBindingHandle;
- Tcp4VariableData->ServiceCount = NumConfiguredInstance;
-
- Tcp4ServicePoint = &Tcp4VariableData->Services[0];
-
- //
- // Go through the running queue to fill the service points.
- //
- NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {
- TcpPcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
-
- TcpProto = (TCP4_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;
-
- if (TcpProto->TcpService == Tcp4Service) {
- //
- // This tcp instance belongs to the Tcp4Service.
- //
- Tcp4ServicePoint->InstanceHandle = TcpPcb->Sk->SockHandle;
- CopyMem (&Tcp4ServicePoint->LocalAddress, &TcpPcb->LocalEnd.Ip, sizeof (EFI_IPv4_ADDRESS));
- Tcp4ServicePoint->LocalPort = NTOHS (TcpPcb->LocalEnd.Port);
- CopyMem (&Tcp4ServicePoint->RemoteAddress, &TcpPcb->RemoteEnd.Ip, sizeof (EFI_IPv4_ADDRESS));
- Tcp4ServicePoint->RemotePort = NTOHS (TcpPcb->RemoteEnd.Port);
-
- Tcp4ServicePoint++;
- }
- }
-
- //
- // Go through the listening queue to fill the service points.
- //
- NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {
- TcpPcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
-
- TcpProto = (TCP4_PROTO_DATA *) TcpPcb->Sk->ProtoReserved;
-
- if (TcpProto->TcpService == Tcp4Service) {
- //
- // This tcp instance belongs to the Tcp4Service.
- //
- Tcp4ServicePoint->InstanceHandle = TcpPcb->Sk->SockHandle;
- CopyMem (&Tcp4ServicePoint->LocalAddress, &TcpPcb->LocalEnd.Ip, sizeof (EFI_IPv4_ADDRESS));
- Tcp4ServicePoint->LocalPort = NTOHS (TcpPcb->LocalEnd.Port);
- CopyMem (&Tcp4ServicePoint->RemoteAddress, &TcpPcb->RemoteEnd.Ip, sizeof (EFI_IPv4_ADDRESS));
- Tcp4ServicePoint->RemotePort = NTOHS (TcpPcb->RemoteEnd.Port);
-
- Tcp4ServicePoint++;
- }
- }
-
- //
- // Get the mac string.
- //
- Status = NetLibGetMacString (
- Tcp4Service->ControllerHandle,
- Tcp4Service->DriverBindingHandle,
- &NewMacString
- );
- if (EFI_ERROR (Status)) {
- goto ON_ERROR;
- }
-
- if (Tcp4Service->MacString != NULL) {
- //
- // The variable is set already, we're going to update it.
- //
- if (StrCmp (Tcp4Service->MacString, NewMacString) != 0) {
- //
- // The mac address is changed, delete the previous variable first.
- //
- gRT->SetVariable (
- Tcp4Service->MacString,
- &gEfiTcp4ServiceBindingProtocolGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS,
- 0,
- NULL
- );
- }
-
- FreePool (Tcp4Service->MacString);
- }
-
- Tcp4Service->MacString = NewMacString;
-
- Status = gRT->SetVariable (
- Tcp4Service->MacString,
- &gEfiTcp4ServiceBindingProtocolGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS,
- VariableDataSize,
- (VOID *) Tcp4VariableData
- );
-
-ON_ERROR:
-
- FreePool (Tcp4VariableData);
-
- return Status;
-}
-
-
-/**
- Clear the variable and free the resource.
-
- @param Tcp4Service Pointer to Tcp4 service data.
-
-**/
-VOID
-TcpClearVariableData (
- IN TCP4_SERVICE_DATA *Tcp4Service
- )
-{
- ASSERT (Tcp4Service->MacString != NULL);
-
- gRT->SetVariable (
- Tcp4Service->MacString,
- &gEfiTcp4ServiceBindingProtocolGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS,
- 0,
- NULL
- );
-
- FreePool (Tcp4Service->MacString);
- Tcp4Service->MacString = NULL;
-}
-
/**
Install the device path protocol on the TCP instance.