summaryrefslogtreecommitdiff
path: root/StdLib/EfiSocketLib/Tcp6.c
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2014-10-30 01:05:22 +0000
committerdarylm503 <darylm503@Edk2>2014-10-30 01:05:22 +0000
commit0e565888ee40264bfad5a700e0d62f4824d81c18 (patch)
treecc2842df141ff68b559f8faaf6182dbb49ed0dc8 /StdLib/EfiSocketLib/Tcp6.c
parentb07ae3d6073f9ec69ae4316b0832fc96325c01d4 (diff)
StdLib: Fix GCC warnings/errors caused by variables being set but not used.
Removed variables that had no effect on code behavior. Fifo.c::FIFO_Dequeue: Replaced instances of "Self->ElementSize" with preexisting variable "SizeOfElement". IIOutilities.c::IIO_GetInChar: Fixed variable of wrong, but compatible, type and made updating of housekeeping variables dependent upon successful completion of reading from the buffer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16276 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/EfiSocketLib/Tcp6.c')
-rw-r--r--StdLib/EfiSocketLib/Tcp6.c70
1 files changed, 33 insertions, 37 deletions
diff --git a/StdLib/EfiSocketLib/Tcp6.c b/StdLib/EfiSocketLib/Tcp6.c
index 21c4109d6e..0f6d2d6ac9 100644
--- a/StdLib/EfiSocketLib/Tcp6.c
+++ b/StdLib/EfiSocketLib/Tcp6.c
@@ -1,18 +1,18 @@
/** @file
Implement the TCP6 driver support for the socket layer.
- Copyright (c) 2011, Intel Corporation
- All rights reserved. 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
- http://opensource.org/licenses/bsd-license.php
+ Copyright (c) 2011 - 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
+ http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
\section ConnectionManagement Connection Management
-
+
The ::EslTcp6Listen routine initially places the SOCK_STREAM or
SOCK_SEQPACKET socket into a listen state. When a remote machine
makes a connection to the socket, the TCPv6 network layer calls
@@ -398,55 +398,55 @@ EslTcp6ConnectPoll (
case EFI_DEVICE_ERROR:
pSocket->errno = EIO;
break;
-
+
case EFI_ABORTED:
pSocket->errno = ECONNABORTED;
break;
-
+
case EFI_ACCESS_DENIED:
pSocket->errno = EACCES;
break;
-
+
case EFI_CONNECTION_RESET:
pSocket->errno = ECONNRESET;
break;
-
+
case EFI_INVALID_PARAMETER:
pSocket->errno = EADDRNOTAVAIL;
break;
-
+
case EFI_HOST_UNREACHABLE:
case EFI_NO_RESPONSE:
pSocket->errno = EHOSTUNREACH;
break;
-
+
case EFI_NO_MAPPING:
pSocket->errno = EAFNOSUPPORT;
break;
-
+
case EFI_NO_MEDIA:
case EFI_NETWORK_UNREACHABLE:
pSocket->errno = ENETDOWN;
break;
-
+
case EFI_OUT_OF_RESOURCES:
pSocket->errno = ENOBUFS;
break;
-
+
case EFI_PORT_UNREACHABLE:
case EFI_PROTOCOL_UNREACHABLE:
case EFI_CONNECTION_REFUSED:
pSocket->errno = ECONNREFUSED;
break;
-
+
case EFI_SUCCESS:
pSocket->errno = 0;
break;
-
+
case EFI_TIMEOUT:
pSocket->errno = ETIMEDOUT;
break;
-
+
case EFI_UNSUPPORTED:
pSocket->errno = EOPNOTSUPP;
break;
@@ -505,7 +505,7 @@ EslTcp6ConnectStart (
EFI_STATUS Status;
DBG_ENTER ( );
-
+
//
// Determine if any more local adapters are available
//
@@ -601,7 +601,7 @@ EslTcp6ConnectStart (
// Status to errno translation gets done in EslTcp4ConnectPoll
//
pTcp6->ConnectToken.CompletionToken.Status = Status;
-
+
//
// Continue with the next port
//
@@ -807,7 +807,7 @@ EslTcp6Listen (
//
pPort = pNextPort;
}
-
+
//
// Determine if any ports are in the listen state
//
@@ -871,7 +871,6 @@ EslTcp6ListenComplete (
EFI_HANDLE ChildHandle;
struct sockaddr_in6 LocalAddress;
EFI_TCP6_CONFIG_DATA * pConfigData;
- ESL_LAYER * pLayer;
ESL_PORT * pNewPort;
ESL_SOCKET * pNewSocket;
ESL_SOCKET * pSocket;
@@ -900,7 +899,6 @@ EslTcp6ListenComplete (
// Allocate a socket for this connection
//
ChildHandle = NULL;
- pLayer = &mEslLayer;
Status = EslSocketAllocate ( &ChildHandle,
DEBUG_CONNECTION,
&pNewSocket );
@@ -1098,7 +1096,7 @@ EslTcp6ListenComplete (
// Process:
// Call close
// Release the resources
-
+
}
DBG_EXIT ( );
@@ -1397,7 +1395,7 @@ EslTcp6PortAllocate (
This routine is called by ::EslSocketPortClose.
See the \ref PortCloseStateMachine section.
-
+
@param [in] pPort Address of an ::ESL_PORT structure.
@retval EFI_SUCCESS The port is closed
@@ -1412,7 +1410,7 @@ EslTcp6PortClose (
UINTN DebugFlags;
ESL_TCP6_CONTEXT * pTcp6;
EFI_STATUS Status;
-
+
DBG_ENTER ( );
//
@@ -1556,13 +1554,13 @@ EslTcp6PortCloseOp (
@param [in] pPort Address of an ::ESL_PORT structure.
@param [in] pPacket Address of an ::ESL_PACKET structure.
-
+
@param [in] pbConsumePacket Address of a BOOLEAN indicating if the packet is to be consumed
-
+
@param [in] BufferLength Length of the the buffer
-
+
@param [in] pBuffer Address of a buffer to receive the data.
-
+
@param [in] pDataLength Number of received data bytes in the buffer.
@param [out] pAddress Network address to receive the remote system address
@@ -1957,13 +1955,13 @@ EslTcp6RxStart (
during the current transmission attempt.
@param [in] pSocket Address of an ::ESL_SOCKET structure
-
+
@param [in] Flags Message control flags
-
+
@param [in] BufferLength Length of the the buffer
-
+
@param [in] pBuffer Address of a buffer to receive the data.
-
+
@param [in] pDataLength Number of received data bytes in the buffer.
@param [in] pAddress Network address of the remote system address
@@ -1993,7 +1991,6 @@ EslTcp6TxBuffer (
ESL_PACKET ** ppQueueHead;
ESL_PACKET ** ppQueueTail;
ESL_PACKET * pPreviousPacket;
- ESL_TCP6_CONTEXT * pTcp6;
size_t * pTxBytes;
EFI_TCP6_TRANSMIT_DATA * pTxData;
EFI_STATUS Status;
@@ -2020,7 +2017,6 @@ EslTcp6TxBuffer (
//
// Determine the queue head
//
- pTcp6 = &pPort->Context.Tcp6;
bUrgent = (BOOLEAN)( 0 != ( Flags & MSG_OOB ));
bUrgentQueue = bUrgent
&& ( !pSocket->bOobInLine )
@@ -2211,7 +2207,7 @@ EslTcp6TxComplete (
ESL_PORT * pPort;
ESL_SOCKET * pSocket;
EFI_STATUS Status;
-
+
DBG_ENTER ( );
//