diff options
Diffstat (limited to 'MdeModulePkg/Universal/Network/Tcp4Dxe')
19 files changed, 454 insertions, 454 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c index bb3a39c..f122769 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file
UEFI Component Name(2) protocol implementation for Tcp4Dxe driver.
-Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -234,10 +234,10 @@ TcpComponentNameGetDriverName ( @param Tcp4[in] A pointer to the EFI_TCP4_PROTOCOL.
-
+
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
-
+
**/
EFI_STATUS
UpdateName (
@@ -279,7 +279,7 @@ UpdateName ( FreeUnicodeStringTable (gTcpControllerNameTable);
gTcpControllerNameTable = NULL;
}
-
+
Status = AddUnicodeString2 (
"eng",
gTcp4ComponentName.SupportedLanguages,
@@ -290,7 +290,7 @@ UpdateName ( if (EFI_ERROR (Status)) {
return Status;
}
-
+
return AddUnicodeString2 (
"en",
gTcp4ComponentName2.SupportedLanguages,
@@ -387,10 +387,10 @@ TcpComponentNameGetControllerName ( if (ChildHandle == NULL) {
return EFI_UNSUPPORTED;
}
-
- //
- // Make sure this driver produced ChildHandle
- //
+
+ //
+ // Make sure this driver produced ChildHandle
+ //
Status = EfiTestChildHandle (
ControllerHandle,
ChildHandle,
@@ -400,9 +400,9 @@ TcpComponentNameGetControllerName ( return Status;
}
- //
+ //
// Retrieve an instance of a produced protocol from ChildHandle
- //
+ //
Status = gBS->OpenProtocol (
ChildHandle,
&gEfiTcp4ProtocolGuid,
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h index bfd750a..bea7479 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h @@ -1,7 +1,7 @@ /** @file
Socket implementation header file.
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -20,10 +20,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Signal a event with the given status.
-
+
@param Token The token's event is to be signaled.
@param TokenStatus The status to be sent with the event.
-
+
**/
#define SIGNAL_TOKEN(Token, TokenStatus) \
do { \
@@ -36,7 +36,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Supporting function for both SockImpl and SockInterface.
@param Event The Event this notify function registered to, ignored.
-
+
**/
VOID
EFIAPI
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c index bca4b02..6dbabc4 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c @@ -1,7 +1,7 @@ /** @file
Interface function of the Socket.
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param List Pointer to the token list to be searched.
@param Event The event to be checked.
- @retval TRUE The specific Event exists in the List.
+ @retval TRUE The specific Event exists in the List.
@retval FALSE The specific Event is not in the List.
**/
@@ -58,7 +58,7 @@ SockTokenExistedInList ( @param Sock Pointer to the instance's socket.
@param Event The event to be checked.
- @retval TRUE The Event exists in related socket's lists.
+ @retval TRUE The Event exists in related socket's lists.
@retval FALSE The Event is not in related socket's lists.
**/
@@ -250,7 +250,7 @@ SockDestroyChild ( data ProtoData.
@param SockInitData Inital data to setting the socket.
-
+
@return Pointer to the newly created socket. If NULL, error condition occured.
**/
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h index 9c2e6d0..7ff2fc5 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h @@ -1,7 +1,7 @@ /** @file
Socket header file.
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -85,31 +85,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Set socket SO_NO_MORE_DATA flag.
-
+
@param Sock Pointer to the socket
-
+
**/
#define SOCK_NO_MORE_DATA(Sock) ((Sock)->Flag |= SO_NO_MORE_DATA)
/**
Check whether the socket is unconfigured.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is unconfigued
@retval False The socket is not unconfigued
-
+
**/
#define SOCK_IS_UNCONFIGURED(Sock) ((Sock)->ConfigureState == SO_UNCONFIGURED)
/**
Check whether the socket is configured.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is configued
@retval False The socket is not configued
-
+
**/
#define SOCK_IS_CONFIGURED(Sock) \
(((Sock)->ConfigureState == SO_CONFIGURED_ACTIVE) || \
@@ -117,109 +117,109 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Check whether the socket is configured to active mode.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is configued to active mode
@retval False The socket is not configued to active mode
-
+
**/
#define SOCK_IS_CONFIGURED_ACTIVE(Sock) \
((Sock)->ConfigureState == SO_CONFIGURED_ACTIVE)
/**
Check whether the socket is configured to passive mode.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is configued to passive mode
@retval False The socket is not configued to passive mode
-
+
**/
#define SOCK_IS_CONNECTED_PASSIVE(Sock) \
((Sock)->ConfigureState == SO_CONFIGURED_PASSIVE)
/**
Check whether the socket is mapped.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is no mapping
@retval False The socket is mapped
-
+
**/
#define SOCK_IS_NO_MAPPING(Sock) \
((Sock)->ConfigureState == SO_NO_MAPPING)
/**
Check whether the socket is closed.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is closed
@retval False The socket is not closed
-
+
**/
#define SOCK_IS_CLOSED(Sock) ((Sock)->State == SO_CLOSED)
/**
Check whether the socket is listening.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is listening
@retval False The socket is not listening
-
+
**/
#define SOCK_IS_LISTENING(Sock) ((Sock)->State == SO_LISTENING)
/**
Check whether the socket is connecting.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is connecting
@retval False The socket is not connecting
-
+
**/
#define SOCK_IS_CONNECTING(Sock) ((Sock)->State == SO_CONNECTING)
/**
Check whether the socket has connected.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket has connected
@retval False The socket has not connected
-
+
**/
#define SOCK_IS_CONNECTED(Sock) ((Sock)->State == SO_CONNECTED)
/**
Check whether the socket is disconnecting.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is disconnecting
@retval False The socket is not disconnecting
-
+
**/
#define SOCK_IS_DISCONNECTING(Sock) ((Sock)->State == SO_DISCONNECTING)
/**
Check whether the socket is no more data.
-
+
@param Sock Pointer to the socket
-
+
@retval True The socket is no more data
@retval False The socket still has data
-
+
**/
#define SOCK_IS_NO_MORE_DATA(Sock) (0 != ((Sock)->Flag & SO_NO_MORE_DATA))
/**
Set the size of the receive buffer.
-
+
@param Sock Pointer to the socket
@param Size The size to set
@@ -228,9 +228,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Get the size of the receive buffer.
-
+
@param Sock Pointer to the socket
-
+
@return The receive buffer size
**/
@@ -238,9 +238,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Get the size of the receive data.
-
+
@param Sock Pointer to the socket
-
+
@return The received data size
**/
@@ -248,7 +248,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Set the size of the send buffer.
-
+
@param Sock Pointer to the socket
@param Size The size to set
@@ -257,9 +257,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Get the size of the send buffer.
-
+
@param Sock Pointer to the socket
-
+
@return The send buffer size
**/
@@ -267,9 +267,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Get the size of the send data.
-
+
@param Sock Pointer to the socket
-
+
@return The send data size
**/
@@ -277,7 +277,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Set the backlog value of the socket.
-
+
@param Sock Pointer to the socket
@param Value The value to set
@@ -286,9 +286,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Get the backlog value of the socket.
-
+
@param Sock Pointer to the socket
-
+
@return The backlog value
**/
@@ -296,7 +296,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Set the socket with error state.
-
+
@param Sock Pointer to the socket
@param Error The error state
@@ -342,7 +342,7 @@ typedef struct _SOCK_IO_TOKEN { } SOCK_IO_TOKEN;
///
-/// The request issued from socket layer to protocol layer.
+/// The request issued from socket layer to protocol layer.
///
#define SOCK_ATTACH 0 ///< Attach current socket to a new PCB
#define SOCK_DETACH 1 ///< Detach current socket from the PCB
@@ -379,15 +379,15 @@ typedef struct _SOCK_BUFFER { /**
The handler of protocol for request from socket.
-
+
@param Socket The socket issuing the request to protocol
@param Request The request issued by socket
@param RequestData The request related data
-
+
@retval EFI_SUCCESS The socket request is completed successfully.
@retval other The error status returned by the corresponding TCP
layer function.
-
+
**/
typedef
EFI_STATUS
@@ -396,8 +396,8 @@ EFI_STATUS IN UINT8 Request,
IN VOID *RequestData
);
-
-
+
+
//
// Socket provided oprerations for low layer protocol
//
@@ -420,15 +420,15 @@ SockSetState ( );
/**
- Called by the low layer protocol to indicate the socket a connection is
- established.
-
- This function just changes the socket's state to SO_CONNECTED
+ Called by the low layer protocol to indicate the socket a connection is
+ established.
+
+ This function just changes the socket's state to SO_CONNECTED
and signals the token used for connection establishment.
@param Sock Pointer to the socket associated with the
established connection.
-
+
**/
VOID
SockConnEstablished (
@@ -437,13 +437,13 @@ SockConnEstablished ( /**
Called by the low layer protocol to indicate the connection is closed.
-
- This function flushes the socket, sets the state to SO_CLOSED and signals
+
+ This function flushes the socket, sets the state to SO_CLOSED and signals
the close token.
@param Sock Pointer to the socket associated with the closed
connection.
-
+
**/
VOID
SockConnClosed (
@@ -452,8 +452,8 @@ SockConnClosed ( /**
Called by low layer protocol to indicate that some data is sent or processed.
-
- This function trims the sent data in the socket send buffer, signals the data
+
+ This function trims the sent data in the socket send buffer, signals the data
token if proper.
@param Sock Pointer to the socket.
@@ -490,7 +490,7 @@ SockGetDataToSend ( /**
Called by the low layer protocol to indicate that there
will be no more data from the communication peer.
-
+
This function set the socket's state to SO_NO_MORE_DATA and
signal all queued IO tokens with the error status EFI_CONNECTION_FIN.
@@ -504,8 +504,8 @@ SockNoMoreData ( /**
Called by the low layer protocol to deliver received data to socket layer.
-
- This function will append the data to the socket receive buffer, set ther
+
+ This function will append the data to the socket receive buffer, set ther
urgent data length and then check if any receive token can be signaled.
@param Sock Pointer to the socket.
@@ -573,9 +573,9 @@ EFI_STATUS IN SOCKET *This,
IN VOID *Context
);
-
+
///
-/// Proto type of the destroy callback
+/// Proto type of the destroy callback
///
typedef
VOID
@@ -618,7 +618,7 @@ typedef struct _SOCK_INIT_DATA { ///
/// The union type of TCP and UDP protocol.
-///
+///
typedef union _NET_PROTOCOL {
EFI_TCP4_PROTOCOL TcpProtocol; ///< Tcp protocol
EFI_UDP4_PROTOCOL UdpProtocol; ///< Udp protocol
@@ -637,7 +637,7 @@ struct _SOCKET { EFI_HANDLE DriverBinding; ///< Socket's driver binding protocol
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
- LIST_ENTRY Link;
+ LIST_ENTRY Link;
UINT8 ConfigureState;
SOCK_TYPE Type;
UINT8 State;
@@ -655,7 +655,7 @@ struct _SOCKET { UINT32 ConnCnt; ///< the current count of connections to it
SOCKET *Parent; ///< listening parent that accept the connection
LIST_ENTRY ConnectionList; ///< the connections maintained by this socket
-
+
//
// The queue to buffer application's asynchronous token
//
@@ -714,7 +714,7 @@ typedef struct _TCP_RSV_DATA { data ProtoData.
@param SockInitData Inital data to setting the socket.
-
+
@return Pointer to the newly created socket. If NULL, error condition occured.
**/
@@ -973,7 +973,7 @@ SockBufFirst ( @param SockEntry Pointer to the buffer block prior to the required
one.
- @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is
+ @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is
the tail or head entry.
**/
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c index 702cae8..a0f97d6 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c @@ -2,7 +2,7 @@ Tcp request dispatcher implementation.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -332,7 +332,7 @@ Tcp4DetachPcb ( ASSERT (Tcb != NULL);
Tcp4FlushPcb (Tcb);
-
+
IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo);
FreePool (Tcb);
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c index 7d84767..2ff8eee 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 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -116,7 +116,7 @@ Tcp4CreateTimer ( /**
Stop and destroy the heartbeat timer for TCP driver.
-
+
**/
VOID
Tcp4DestroyTimer (
@@ -138,7 +138,7 @@ Tcp4DestroyTimer ( /**
Callback function which provided by user to remove one node in NetDestroyLinkList process.
-
+
@param[in] Entry The entry to be removed.
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
@@ -221,32 +221,32 @@ Tcp4DriverEntryPoint ( /**
Tests to see if this driver supports a given controller.
-
- If a child device is provided, it further tests to see if this driver supports
+
+ If a child device is provided, it further tests to see if this driver supports
creating a handle for the specified child device.
@param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param RemainingDevicePath A pointer to the remaining portion of a device path.
+ @param RemainingDevicePath A pointer to the remaining portion of a device path.
This parameter is ignored by device drivers, and is optional for bus drivers.
@retval EFI_SUCCESS The device specified by ControllerHandle and
- RemainingDevicePath is supported by the driver
+ RemainingDevicePath is supported by the driver
specified by This.
@retval EFI_ALREADY_STARTED The device specified by ControllerHandle and
- RemainingDevicePath is already being managed by
+ RemainingDevicePath is already being managed by
the driver specified by This.
@retval EFI_ACCESS_DENIED The device specified by ControllerHandle and
- RemainingDevicePath is already being managed by a
- different driver or an application that requires
+ RemainingDevicePath is already being managed by a
+ different driver or an application that requires
exclusive access.
@retval EFI_UNSUPPORTED The device specified by ControllerHandle and
- RemainingDevicePath is not supported by the driver
+ RemainingDevicePath is not supported by the driver
specified by This.
-
+
**/
EFI_STATUS
EFIAPI
@@ -290,31 +290,31 @@ Tcp4DriverBindingSupported ( /**
- Start this driver on ControllerHandle.
-
- The Start() function is designed to be invoked from the EFI boot service
- ConnectController(). As a result, much of the error checking on the parameters
- to Start() has been moved into this common boot service. It is legal to call
- Start() from other locations, but the following calling restrictions must be
+ Start this driver on ControllerHandle.
+
+ The Start() function is designed to be invoked from the EFI boot service
+ ConnectController(). As a result, much of the error checking on the parameters
+ to Start() has been moved into this common boot service. It is legal to call
+ Start() from other locations, but the following calling restrictions must be
followed or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
- 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
+ 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
aligned EFI_DEVICE_PATH_PROTOCOL.
- 3. Prior to calling Start(), the Supported() function for the driver specified
- by This must have been called with the same calling parameters, and Supported()
+ 3. Prior to calling Start(), the Supported() function for the driver specified
+ by This must have been called with the same calling parameters, and Supported()
must have returned EFI_SUCCESS.
@param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param RemainingDevicePath A pointer to the remaining portion of a device path.
- This parameter is ignored by device drivers, and is
+ @param RemainingDevicePath A pointer to the remaining portion of a device path.
+ This parameter is ignored by device drivers, and is
optional for bus drivers.
@retval EFI_SUCCESS The device was started.
@retval EFI_ALREADY_STARTED The device could not be started due to a device error.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources.
**/
@@ -435,25 +435,25 @@ ON_ERROR: /**
Stop this driver on ControllerHandle.
-
- The Stop() function is designed to be invoked from the EFI boot service
- DisconnectController(). As a result, much of the error checking on the parameters
- to Stop() has been moved into this common boot service. It is legal to call Stop()
- from other locations, but the following calling restrictions must be followed
+
+ The Stop() function is designed to be invoked from the EFI boot service
+ DisconnectController(). As a result, much of the error checking on the parameters
+ to Stop() has been moved into this common boot service. It is legal to call Stop()
+ from other locations, but the following calling restrictions must be followed
or the system behavior will not be deterministic.
- 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call
+ 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call
to this same driver's Start() function.
2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid
- EFI_HANDLE. In addition, all of these handles must have been created in this
- driver's Start() function, and the Start() function must have called OpenProtocol()
+ EFI_HANDLE. In addition, all of these handles must have been created in this
+ driver's Start() function, and the Start() function must have called OpenProtocol()
on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
-
+
@param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@param NumberOfChildren The number of child device handles in ChildHandleBuffer.
- @param ChildHandleBuffer An array of child handles to be freed. May be NULL if
+ @param ChildHandleBuffer An array of child handles to be freed. May be NULL if
NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped.
@@ -505,7 +505,7 @@ Tcp4DriverBindingStop ( TcpServiceData = TCP4_FROM_THIS (ServiceBinding);
if (NumberOfChildren != 0) {
- List = &TcpServiceData->SocketList;
+ List = &TcpServiceData->SocketList;
Context.ServiceBinding = ServiceBinding;
Context.NumberOfChildren = NumberOfChildren;
Context.ChildHandleBuffer = ChildHandleBuffer;
@@ -541,7 +541,7 @@ Tcp4DriverBindingStop ( FreeUnicodeStringTable (gTcpControllerNameTable);
gTcpControllerNameTable = NULL;
}
-
+
//
// Release the TCP service data
//
@@ -554,15 +554,15 @@ Tcp4DriverBindingStop ( }
/**
- Open Ip4 and device path protocols for a created socket, and insert it in
+ Open Ip4 and device path protocols for a created socket, and insert it in
socket list.
-
+
@param This Pointer to the socket just created
@param Context Context of the socket
-
+
@retval EFI_SUCCESS This protocol is installed successfully.
@retval other Some error occured.
-
+
**/
EFI_STATUS
Tcp4CreateSocketCallback (
@@ -620,11 +620,11 @@ Tcp4CreateSocketCallback ( }
/**
- Close Ip4 and device path protocols for a socket, and remove it from socket list.
-
+ Close Ip4 and device path protocols for a socket, and remove it from socket list.
+
@param This Pointer to the socket to be removed
@param Context Context of the socket
-
+
**/
VOID
Tcp4DestroySocketCallback (
@@ -654,15 +654,15 @@ Tcp4DestroySocketCallback ( /**
Creates a child handle and installs a protocol.
-
- The CreateChild() function installs a protocol on ChildHandle. If ChildHandle
- is a pointer to NULL, then a new handle is created and returned in ChildHandle.
- If ChildHandle is not a pointer to NULL, then the protocol installs on the existing
+
+ The CreateChild() function installs a protocol on ChildHandle. If ChildHandle
+ is a pointer to NULL, then a new handle is created and returned in ChildHandle.
+ If ChildHandle is not a pointer to NULL, then the protocol installs on the existing
ChildHandle.
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
- @param ChildHandle Pointer to the handle of the child to create. If it is NULL, then
- a new handle is created. If it is a pointer to an existing UEFI
+ @param ChildHandle Pointer to the handle of the child to create. If it is NULL, then
+ a new handle is created. If it is a pointer to an existing UEFI
handle, then the protocol is added to the existing UEFI handle.
@retval EFI_SUCCES The protocol was added to ChildHandle.
@@ -722,22 +722,22 @@ Tcp4ServiceBindingCreateChild ( /**
Destroys a child handle with a protocol installed on it.
-
- The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
- that was installed by CreateChild() from ChildHandle. If the removed protocol is the
+
+ The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
+ that was installed by CreateChild() from ChildHandle. If the removed protocol is the
last protocol on ChildHandle, then ChildHandle is destroyed.
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
@param ChildHandle Handle of the child to destroy
@retval EFI_SUCCES The protocol was removed from ChildHandle.
- @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is
+ @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is
being removed.
@retval EFI_INVALID_PARAMETER Child handle is NULL.
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
because its services are being used.
@retval other The child handle was not destroyed.
-
+
**/
EFI_STATUS
EFIAPI
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h index edaa1a4..368f49c 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 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -30,7 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Tcp4ServiceBinding, \
TCP4_DRIVER_SIGNATURE \
)
-
+
///
/// TCP heartbeat tick timer.
///
@@ -148,32 +148,32 @@ Tcp4DriverEntryPoint ( /**
Tests to see if this driver supports a given controller.
-
- If a child device is provided, it further tests to see if this driver supports
+
+ If a child device is provided, it further tests to see if this driver supports
creating a handle for the specified child device.
@param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param ControllerHandle The handle of the controller to test. This handle
- must support a protocol interface that supplies
+ @param ControllerHandle The handle of the controller to test. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param RemainingDevicePath A pointer to the remaining portion of a device path.
+ @param RemainingDevicePath A pointer to the remaining portion of a device path.
This parameter is ignored by device drivers, and is optional for bus drivers.
@retval EFI_SUCCESS The device specified by ControllerHandle and
- RemainingDevicePath is supported by the driver
+ RemainingDevicePath is supported by the driver
specified by This.
@retval EFI_ALREADY_STARTED The device specified by ControllerHandle and
- RemainingDevicePath is already being managed by
+ RemainingDevicePath is already being managed by
the driver specified by This.
@retval EFI_ACCESS_DENIED The device specified by ControllerHandle and
- RemainingDevicePath is already being managed by a
- different driver or an application that requires
+ RemainingDevicePath is already being managed by a
+ different driver or an application that requires
exclusive access.
@retval EFI_UNSUPPORTED The device specified by ControllerHandle and
- RemainingDevicePath is not supported by the driver
+ RemainingDevicePath is not supported by the driver
specified by This.
-
+
**/
EFI_STATUS
EFIAPI
@@ -184,31 +184,31 @@ Tcp4DriverBindingSupported ( );
/**
- Start this driver on ControllerHandle.
-
- The Start() function is designed to be invoked from the EFI boot service
- ConnectController(). As a result, much of the error checking on the parameters
- to Start() has been moved into this common boot service. It is legal to call
- Start() from other locations, but the following calling restrictions must be
+ Start this driver on ControllerHandle.
+
+ The Start() function is designed to be invoked from the EFI boot service
+ ConnectController(). As a result, much of the error checking on the parameters
+ to Start() has been moved into this common boot service. It is legal to call
+ Start() from other locations, but the following calling restrictions must be
followed or the system behavior will not be deterministic.
1. ControllerHandle must be a valid EFI_HANDLE.
- 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
+ 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
aligned EFI_DEVICE_PATH_PROTOCOL.
- 3. Prior to calling Start(), the Supported() function for the driver specified
- by This must have been called with the same calling parameters, and Supported()
+ 3. Prior to calling Start(), the Supported() function for the driver specified
+ by This must have been called with the same calling parameters, and Supported()
must have returned EFI_SUCCESS.
@param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param ControllerHandle The handle of the controller to start. This handle
- must support a protocol interface that supplies
+ @param ControllerHandle The handle of the controller to start. This handle
+ must support a protocol interface that supplies
an I/O abstraction to the driver.
- @param RemainingDevicePath A pointer to the remaining portion of a device path.
- This parameter is ignored by device drivers, and is
+ @param RemainingDevicePath A pointer to the remaining portion of a device path.
+ This parameter is ignored by device drivers, and is
optional for bus drivers.
@retval EFI_SUCCESS The device was started.
@retval EFI_ALREADY_STARTED The device could not be started due to a device error.
- @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
of resources.
**/
@@ -222,25 +222,25 @@ Tcp4DriverBindingStart ( /**
Stop this driver on ControllerHandle.
-
- The Stop() function is designed to be invoked from the EFI boot service
- DisconnectController(). As a result, much of the error checking on the parameters
- to Stop() has been moved into this common boot service. It is legal to call Stop()
- from other locations, but the following calling restrictions must be followed
+
+ The Stop() function is designed to be invoked from the EFI boot service
+ DisconnectController(). As a result, much of the error checking on the parameters
+ to Stop() has been moved into this common boot service. It is legal to call Stop()
+ from other locations, but the following calling restrictions must be followed
or the system behavior will not be deterministic.
- 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call
+ 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call
to this same driver's Start() function.
2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid
- EFI_HANDLE. In addition, all of these handles must have been created in this
- driver's Start() function, and the Start() function must have called OpenProtocol()
+ EFI_HANDLE. In addition, all of these handles must have been created in this
+ driver's Start() function, and the Start() function must have called OpenProtocol()
on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
-
+
@param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
- @param ControllerHandle A handle to the device being stopped. The handle must
- support a bus specific I/O protocol for the driver
+ @param ControllerHandle A handle to the device being stopped. The handle must
+ support a bus specific I/O protocol for the driver
to use to stop the device.
@param NumberOfChildren The number of child device handles in ChildHandleBuffer.
- @param ChildHandleBuffer An array of child handles to be freed. May be NULL if
+ @param ChildHandleBuffer An array of child handles to be freed. May be NULL if
NumberOfChildren is 0.
@retval EFI_SUCCESS The device was stopped.
@@ -257,15 +257,15 @@ Tcp4DriverBindingStop ( );
/**
- Open Ip4 and device path protocols for a created socket, and insert it in
+ Open Ip4 and device path protocols for a created socket, and insert it in
socket list.
-
+
@param This Pointer to the socket just created
@param Context Context of the socket
-
+
@retval EFI_SUCCESS This protocol is installed successfully.
@retval other Some error occured.
-
+
**/
EFI_STATUS
Tcp4CreateSocketCallback (
@@ -274,11 +274,11 @@ Tcp4CreateSocketCallback ( );
/**
- Close Ip4 and device path protocols for a socket, and remove it from socket list.
-
+ Close Ip4 and device path protocols for a socket, and remove it from socket list.
+
@param This Pointer to the socket to be removed
@param Context Context of the socket
-
+
**/
VOID
Tcp4DestroySocketCallback (
@@ -288,15 +288,15 @@ Tcp4DestroySocketCallback ( /**
Creates a child handle and installs a protocol.
-
- The CreateChild() function installs a protocol on ChildHandle. If ChildHandle
- is a pointer to NULL, then a new handle is created and returned in ChildHandle.
- If ChildHandle is not a pointer to NULL, then the protocol installs on the existing
+
+ The CreateChild() function installs a protocol on ChildHandle. If ChildHandle
+ is a pointer to NULL, then a new handle is created and returned in ChildHandle.
+ If ChildHandle is not a pointer to NULL, then the protocol installs on the existing
ChildHandle.
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
- @param ChildHandle Pointer to the handle of the child to create. If it is NULL, then
- a new handle is created. If it is a pointer to an existing UEFI
+ @param ChildHandle Pointer to the handle of the child to create. If it is NULL, then
+ a new handle is created. If it is a pointer to an existing UEFI
handle, then the protocol is added to the existing UEFI handle.
@retval EFI_SUCCES The protocol was added to ChildHandle.
@@ -315,22 +315,22 @@ Tcp4ServiceBindingCreateChild ( /**
Destroys a child handle with a protocol installed on it.
-
- The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
- that was installed by CreateChild() from ChildHandle. If the removed protocol is the
+
+ The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
+ that was installed by CreateChild() from ChildHandle. If the removed protocol is the
last protocol on ChildHandle, then ChildHandle is destroyed.
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
@param ChildHandle Handle of the child to destroy
@retval EFI_SUCCES The protocol was removed from ChildHandle.
- @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is
+ @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is
being removed.
@retval EFI_INVALID_PARAMETER Child handle is NULL.
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
because its services are being used.
@retval other The child handle was not destroyed.
-
+
**/
EFI_STATUS
EFIAPI
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf index ba3c377..5021cbc 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf @@ -4,7 +4,7 @@ # This module produces EFI TCPv4(Transmission Control Protocol version 4) Protocol
# upon EFI IPv4 Protocol, to provide basic TCPv4 I/O services.
#
-# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, 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
@@ -30,7 +30,7 @@ #
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
-# DRIVER_BINDING = mTcp4DriverBinding
+# DRIVER_BINDING = mTcp4DriverBinding
# COMPONENT_NAME = gTcp4ComponentName
# COMPONENT_NAME2 = gTcp4ComponentName2
#
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.uni b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.uni index b6d30d9..1514a39 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.uni +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.uni @@ -4,13 +4,13 @@ // This module produces EFI TCPv4(Transmission Control Protocol version 4) Protocol
// upon EFI IPv4 Protocol, to provide basic TCPv4 I/O services.
//
-// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2006 - 2018, 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.
//
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4DxeExtra.uni b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4DxeExtra.uni index a3e36b3..0e6d2f2 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4DxeExtra.uni +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4DxeExtra.uni @@ -1,7 +1,7 @@ // /** @file
// Tcp4Dxe Localized Strings and Content
//
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2013 - 2018, 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
@@ -13,8 +13,8 @@ //
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"TCP v4 DXE Driver"
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c index 72955c6..f48efda 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c @@ -1,7 +1,7 @@ /** @file
TCP input process routines.
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -704,7 +704,7 @@ TcpInput ( TCP_SEQNO Right;
TCP_SEQNO Urg;
INT32 Usable;
-
+
NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
Parent = NULL;
@@ -717,7 +717,7 @@ TcpInput ( DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));
goto DISCARD;
}
-
+
Len = Nbuf->TotalSize - (Head->HeadLen << 2);
if ((Head->HeadLen < 5) || (Len < 0) ||
@@ -1315,7 +1315,7 @@ StepSix: TcpSetKeepaliveTimer (Tcb);
if (TCP_FLG_ON (Seg->Flag, TCP_FLG_URG) &&
- !TCP_FIN_RCVD (Tcb->State))
+ !TCP_FIN_RCVD (Tcb->State))
{
DEBUG ((EFI_D_NET, "TcpInput: received urgent data "
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c index 2679f1b..d8fc68c 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c @@ -1,7 +1,7 @@ /** @file
Implementation of TCP4 protocol services.
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -53,10 +53,10 @@ Tcp4ChkDataBuf ( /**
Get the current operational status.
-
- The GetModeData() function copies the current operational settings of this
- EFI TCPv4 Protocol instance into user-supplied buffers. This function can
- also be used to retrieve the operational setting of underlying drivers
+
+ The GetModeData() function copies the current operational settings of this
+ EFI TCPv4 Protocol instance into user-supplied buffers. This function can
+ also be used to retrieve the operational setting of underlying drivers
such as IPv4, MNP, or SNP.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@@ -64,7 +64,7 @@ Tcp4ChkDataBuf ( state.
@param Tcp4ConfigData Pointer to the buffer to receive the current TCP
configuration.
- @param Ip4ModeData Pointer to the buffer to receive the current IPv4
+ @param Ip4ModeData Pointer to the buffer to receive the current IPv4
configuration data used by the TCPv4 instance.
@param MnpConfigData Pointer to the buffer to receive the current MNP
configuration data indirectly used by the TCPv4
@@ -112,21 +112,21 @@ Tcp4GetModeData ( /**
Initialize or brutally reset the operational parameters for
this EFI TCPv4 instance.
-
+
The Configure() function does the following:
- * Initialize this EFI TCPv4 instance, i.e., initialize the communication end
+ * Initialize this EFI TCPv4 instance, i.e., initialize the communication end
setting, specify active open or passive open for an instance.
- * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous
- tokens, flush transmission and receiving buffer directly without informing
+ * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous
+ tokens, flush transmission and receiving buffer directly without informing
the communication peer.
- No other TCPv4 Protocol operation can be executed by this instance
- until it is configured properly. For an active TCP4 instance, after a proper
- configuration it may call Connect() to initiates the three-way handshake.
- For a passive TCP4 instance, its state will transit to Tcp4StateListen after
- configuration, and Accept() may be called to listen the incoming TCP connection
- request. If TcpConfigData is set to NULL, the instance is reset. Resetting
- process will be done brutally, the state machine will be set to Tcp4StateClosed
- directly, the receive queue and transmit queue will be flushed, and no traffic is
+ No other TCPv4 Protocol operation can be executed by this instance
+ until it is configured properly. For an active TCP4 instance, after a proper
+ configuration it may call Connect() to initiates the three-way handshake.
+ For a passive TCP4 instance, its state will transit to Tcp4StateListen after
+ configuration, and Accept() may be called to listen the incoming TCP connection
+ request. If TcpConfigData is set to NULL, the instance is reset. Resetting
+ process will be done brutally, the state machine will be set to Tcp4StateClosed
+ directly, the receive queue and transmit queue will be flushed, and no traffic is
allowed through this instance.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@@ -183,7 +183,7 @@ Tcp4Configure ( CopyMem (&Ip, &TcpConfigData->AccessPoint.StationAddress, sizeof (IP4_ADDR));
CopyMem (&SubnetMask, &TcpConfigData->AccessPoint.SubnetMask, sizeof (IP4_ADDR));
- if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) ||
+ if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) ||
(SubnetMask != 0 && !NetIp4IsUnicast (NTOHL (Ip), NTOHL (SubnetMask)))) {
return EFI_INVALID_PARAMETER;
}
@@ -214,35 +214,35 @@ Tcp4Configure ( /**
Add or delete routing entries.
-
+
The Routes() function adds or deletes a route from the instance's routing table.
- The most specific route is selected by comparing the SubnetAddress with the
+ The most specific route is selected by comparing the SubnetAddress with the
destination IP address's arithmetical AND to the SubnetMask.
- The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0.
+ The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0.
The default route matches all destination IP addresses if there is no more specific route.
- Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to
- the destination host if its address can be found in the Address Resolution Protocol (ARP)
- cache or it is on the local subnet. If the instance is configured to use default
+ Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to
+ the destination host if its address can be found in the Address Resolution Protocol (ARP)
+ cache or it is on the local subnet. If the instance is configured to use default
address, a direct route to the local network will be added automatically.
- Each TCP instance has its own independent routing table. Instance that uses the
- default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table.
- The copy will be updated automatically whenever the IP driver reconfigures its
- instance. As a result, the previous modification to the instance's local copy
- will be lost. The priority of checking the route table is specific with IP
+ Each TCP instance has its own independent routing table. Instance that uses the
+ default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table.
+ The copy will be updated automatically whenever the IP driver reconfigures its
+ instance. As a result, the previous modification to the instance's local copy
+ will be lost. The priority of checking the route table is specific with IP
implementation and every IP implementation must comply with RFC 1122.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@param DeleteRoute If TRUE, delete the specified route from routing
table; if FALSE, add the specified route to
routing table.
- DestinationAddress and SubnetMask are used as
+ DestinationAddress and SubnetMask are used as
the keywords to search route entry.
@param SubnetAddress The destination network.
@param SubnetMask The subnet mask for the destination network.
- @param GatewayAddress The gateway address for this route.
- It must be on the same subnet with the station
+ @param GatewayAddress The gateway address for this route.
+ It must be on the same subnet with the station
address unless a direct route is specified.
-
+
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance has not been
configured.
@@ -288,21 +288,21 @@ Tcp4Routes ( /**
Initiate a nonblocking TCP connection request for an active TCP instance.
- The Connect() function will initiate an active open to the remote peer configured
- in current TCP instance if it is configured active. If the connection succeeds
- or fails due to any error, the ConnectionToken->CompletionToken.Event will be
- signaled and ConnectionToken->CompletionToken.Status will be updated accordingly.
- This function can only be called for the TCP instance in Tcp4StateClosed state.
- The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS.
- If TCP three way handshake succeeds, its state will become Tcp4StateEstablished,
+ The Connect() function will initiate an active open to the remote peer configured
+ in current TCP instance if it is configured active. If the connection succeeds
+ or fails due to any error, the ConnectionToken->CompletionToken.Event will be
+ signaled and ConnectionToken->CompletionToken.Status will be updated accordingly.
+ This function can only be called for the TCP instance in Tcp4StateClosed state.
+ The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS.
+ If TCP three way handshake succeeds, its state will become Tcp4StateEstablished,
otherwise, the state will return to Tcp4StateClosed.
-
+
@param This Pointer to the EFI_TCP4_PROTOCOL instance
@param ConnectionToken Pointer to the connection token to return when
the TCP three way handshake finishes.
- @retval EFI_SUCCESS The connection request is successfully initiated
- and the state of this TCPv4 instance has
+ @retval EFI_SUCCESS The connection request is successfully initiated
+ and the state of this TCPv4 instance has
been changed to Tcp4StateSynSent.
@retval EFI_NOT_STARTED This EFI_TCP4_PROTOCOL instance hasn't been
configured.
@@ -338,14 +338,14 @@ Tcp4Connect ( /**
Listen on the passive instance to accept an incoming connection request.
- The Accept() function initiates an asynchronous accept request to wait for an
- incoming connection on the passive TCP instance. If a remote peer successfully
- establishes a connection with this instance, a new TCP instance will be created
- and its handle will be returned in ListenToken->NewChildHandle. The newly created
- instance is configured by inheriting the passive instance's configuration and is
+ The Accept() function initiates an asynchronous accept request to wait for an
+ incoming connection on the passive TCP instance. If a remote peer successfully
+ establishes a connection with this instance, a new TCP instance will be created
+ and its handle will be returned in ListenToken->NewChildHandle. The newly created
+ instance is configured by inheriting the passive instance's configuration and is
ready for use upon return. The instance is in the Tcp4StateEstablished state.
- The ListenToken->CompletionToken.Event will be signaled when a new connection
- is accepted, user aborts the listen or connection is reset. This function only
+ The ListenToken->CompletionToken.Event will be signaled when a new connection
+ is accepted, user aborts the listen or connection is reset. This function only
can be called when current TCP instance is in Tcp4StateListen state.
@param This Pointer to the EFI_TCP4_PROTOCOL instance
@@ -389,8 +389,8 @@ Tcp4Accept ( /**
Queues outgoing data into the transmit queue.
- The Transmit() function queues a sending request to this TCPv4 instance along
- with the user data. The status of the token is updated and the event in the token
+ The Transmit() function queues a sending request to this TCPv4 instance along
+ with the user data. The status of the token is updated and the event in the token
will be signaled once the data is sent out or some error occurs.
@param This Pointer to the EFI_TCP4_PROTOCOL instance
@@ -406,11 +406,11 @@ Tcp4Accept ( @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE:
* A transmit completion token with the same
Token-> CompletionToken.Event was already in the
- transmission queue.
- * The current instance is in Tcp4StateClosed state
- * The current instance is a passive one and
- it is in Tcp4StateListen state.
- * User has called Close() to disconnect this
+ transmission queue.
+ * The current instance is in Tcp4StateClosed state
+ * The current instance is a passive one and
+ it is in Tcp4StateListen state.
+ * User has called Close() to disconnect this
connection.
@retval EFI_NOT_READY The completion token could not be queued because
the transmit queue is full.
@@ -459,16 +459,16 @@ Tcp4Transmit ( /**
Place an asynchronous receive request into the receiving queue.
- The Receive() function places a completion token into the receive packet queue.
- This function is always asynchronous. The caller must allocate the
- Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also
- must fill the DataLength which represents the whole length of all FragmentBuffer.
- When the receive operation completes, the EFI TCPv4 Protocol driver updates the
- Token->CompletionToken.Status and Token->Packet.RxData fields and the
- Token->CompletionToken.Event is signaled. If got data the data and its length
- will be copy into the FragmentTable, in the same time the full length of received
- data will be recorded in the DataLength fields. Providing a proper notification
- function and context for the event will enable the user to receive the notification
+ The Receive() function places a completion token into the receive packet queue.
+ This function is always asynchronous. The caller must allocate the
+ Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also
+ must fill the DataLength which represents the whole length of all FragmentBuffer.
+ When the receive operation completes, the EFI TCPv4 Protocol driver updates the
+ Token->CompletionToken.Status and Token->Packet.RxData fields and the
+ Token->CompletionToken.Event is signaled. If got data the data and its length
+ will be copy into the FragmentTable, in the same time the full length of received
+ data will be recorded in the DataLength fields. Providing a proper notification
+ function and context for the event will enable the user to receive the notification
and receiving status. That notification function is guaranteed to not be re-entered.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@@ -484,16 +484,16 @@ Tcp4Transmit ( @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued
due to a lack of system resources.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
- The EFI TCPv4 Protocol instance has been reset
+ The EFI TCPv4 Protocol instance has been reset
to startup defaults.
@retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE:
* A receive completion token with the same
- Token->CompletionToken.Event was already in
- the receive queue.
- * The current instance is in Tcp4StateClosed state.
- * The current instance is a passive one and it
- is in Tcp4StateListen state.
- * User has called Close() to disconnect this
+ Token->CompletionToken.Event was already in
+ the receive queue.
+ * The current instance is in Tcp4StateClosed state.
+ * The current instance is a passive one and it
+ is in Tcp4StateListen state.
+ * User has called Close() to disconnect this
connection.
@retval EFI_CONNECTION_FIN The communication peer has closed the connection
and there is no any buffered data in the receive
@@ -541,13 +541,13 @@ Tcp4Receive ( /**
Disconnecting a TCP connection gracefully or reset a TCP connection.
- Initiate an asynchronous close token to TCP driver. After Close() is called,
- any buffered transmission data will be sent by TCP driver and the current
- instance will have a graceful close working flow described as RFC 793 if
- AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP
- driver to fast disconnect this connection. When the close operation completes
- successfully the TCP instance is in Tcp4StateClosed state, all pending
- asynchronous operation is signaled and any buffers used for TCP network traffic
+ Initiate an asynchronous close token to TCP driver. After Close() is called,
+ any buffered transmission data will be sent by TCP driver and the current
+ instance will have a graceful close working flow described as RFC 793 if
+ AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP
+ driver to fast disconnect this connection. When the close operation completes
+ successfully the TCP instance is in Tcp4StateClosed state, all pending
+ asynchronous operation is signaled and any buffers used for TCP network traffic
is flushed.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@@ -557,7 +557,7 @@ Tcp4Receive ( @retval EFI_SUCCESS The operation completed successfully.
@retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance hasn't been
configured.
- @retval EFI_ACCESS_DENIED One or more of the following are TRUE:
+ @retval EFI_ACCESS_DENIED One or more of the following are TRUE:
* Configure() has been called with TcpConfigData
set to NULL and this function has not returned.
* Previous Close() call on this instance has not
@@ -593,33 +593,33 @@ Tcp4Close ( /**
Abort an asynchronous connection, listen, transmission or receive request.
- The Cancel() function aborts a pending connection, listen, transmit or receive
- request. If Token is not NULL and the token is in the connection, listen,
- transmission or receive queue when it is being cancelled, its Token->Status
- will be set to EFI_ABORTED and then Token->Event will be signaled. If the token
- is not in one of the queues, which usually means that the asynchronous operation
- has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token
+ The Cancel() function aborts a pending connection, listen, transmit or receive
+ request. If Token is not NULL and the token is in the connection, listen,
+ transmission or receive queue when it is being cancelled, its Token->Status
+ will be set to EFI_ABORTED and then Token->Event will be signaled. If the token
+ is not in one of the queues, which usually means that the asynchronous operation
+ has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token
issued by Connect(), Accept(), Transmit() and Receive()will be aborted.
NOTE: It has not been implemented currently.
-
+
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@param Token Pointer to a token that has been issued by
Connect(), Accept(), Transmit() or Receive(). If
NULL, all pending tokens issued by above four
functions will be aborted.
-
+
@retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event
is signaled.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_NOT_STARTED This instance hasn's been configured.
@retval EFI_NO_MAPPING When using the default address, configuration
(DHCP, BOOTP,RARP, etc.) hasn's finished yet.
- @retval EFI_NOT_FOUND The asynchronous I/O request isn's found in the
- transmission or receive queue. It has either
+ @retval EFI_NOT_FOUND The asynchronous I/O request isn's found in the
+ transmission or receive queue. It has either
completed or wasn's issued by Transmit() and Receive().
@retval EFI_UNSUPPORTED The operation is not supported in current
implementation.
-
+
**/
EFI_STATUS
EFIAPI
@@ -635,11 +635,11 @@ Tcp4Cancel ( /**
Poll to receive incoming data and transmit outgoing segments.
- The Poll() function increases the rate that data is moved between the network
- and application and can be called when the TCP instance is created successfully.
- Its use is optional. In some implementations, the periodical timer in the MNP
- driver may not poll the underlying communications device fast enough to avoid
- drop packets. Drivers and applications that are experiencing packet loss should
+ The Poll() function increases the rate that data is moved between the network
+ and application and can be called when the TCP instance is created successfully.
+ Its use is optional. In some implementations, the periodical timer in the MNP
+ driver may not poll the underlying communications device fast enough to avoid
+ drop packets. Drivers and applications that are experiencing packet loss should
try calling the Poll() function in a high frequency.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h index cd90458..c898a7e 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h @@ -1,7 +1,7 @@ /** @file
TCP4 protocol services header file.
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -53,7 +53,7 @@ Tcp4Dispatcher ( IN UINT8 Request,
IN VOID *Data OPTIONAL
);
-
+
///
/// TCP mode data
///
@@ -83,10 +83,10 @@ typedef struct { /**
Get the current operational status of a TCP instance.
-
- The GetModeData() function copies the current operational settings of this
- EFI TCPv4 Protocol instance into user-supplied buffers. This function can
- also be used to retrieve the operational setting of underlying drivers
+
+ The GetModeData() function copies the current operational settings of this
+ EFI TCPv4 Protocol instance into user-supplied buffers. This function can
+ also be used to retrieve the operational setting of underlying drivers
such as IPv4, MNP, or SNP.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@@ -94,7 +94,7 @@ typedef struct { state.
@param Tcp4ConfigData Pointer to the buffer to receive the current TCP
configuration.
- @param Ip4ModeData Pointer to the buffer to receive the current IPv4
+ @param Ip4ModeData Pointer to the buffer to receive the current IPv4
configuration data used by the TCPv4 instance.
@param MnpConfigData Pointer to the buffer to receive the current MNP
configuration data indirectly used by the TCPv4
@@ -124,21 +124,21 @@ Tcp4GetModeData ( /**
Initialize or brutally reset the operational parameters for
this EFI TCPv4 instance.
-
+
The Configure() function does the following:
- * Initialize this EFI TCPv4 instance, i.e., initialize the communication end
+ * Initialize this EFI TCPv4 instance, i.e., initialize the communication end
setting, specify active open or passive open for an instance.
- * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous
- tokens, flush transmission and receiving buffer directly without informing
+ * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous
+ tokens, flush transmission and receiving buffer directly without informing
the communication peer.
- No other TCPv4 Protocol operation can be executed by this instance
- until it is configured properly. For an active TCP4 instance, after a proper
- configuration it may call Connect() to initiates the three-way handshake.
- For a passive TCP4 instance, its state will transit to Tcp4StateListen after
- configuration, and Accept() may be called to listen the incoming TCP connection
- request. If TcpConfigData is set to NULL, the instance is reset. Resetting
- process will be done brutally, the state machine will be set to Tcp4StateClosed
- directly, the receive queue and transmit queue will be flushed, and no traffic is
+ No other TCPv4 Protocol operation can be executed by this instance
+ until it is configured properly. For an active TCP4 instance, after a proper
+ configuration it may call Connect() to initiates the three-way handshake.
+ For a passive TCP4 instance, its state will transit to Tcp4StateListen after
+ configuration, and Accept() may be called to listen the incoming TCP connection
+ request. If TcpConfigData is set to NULL, the instance is reset. Resetting
+ process will be done brutally, the state machine will be set to Tcp4StateClosed
+ directly, the receive queue and transmit queue will be flushed, and no traffic is
allowed through this instance.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@@ -168,35 +168,35 @@ Tcp4Configure ( /**
Add or delete routing entries.
-
+
The Routes() function adds or deletes a route from the instance's routing table.
- The most specific route is selected by comparing the SubnetAddress with the
+ The most specific route is selected by comparing the SubnetAddress with the
destination IP address's arithmetical AND to the SubnetMask.
- The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0.
+ The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0.
The default route matches all destination IP addresses if there is no more specific route.
- Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to
- the destination host if its address can be found in the Address Resolution Protocol (ARP)
- cache or it is on the local subnet. If the instance is configured to use default
+ Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to
+ the destination host if its address can be found in the Address Resolution Protocol (ARP)
+ cache or it is on the local subnet. If the instance is configured to use default
address, a direct route to the local network will be added automatically.
- Each TCP instance has its own independent routing table. Instance that uses the
- default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table.
- The copy will be updated automatically whenever the IP driver reconfigures its
- instance. As a result, the previous modification to the instance's local copy
- will be lost. The priority of checking the route table is specific with IP
+ Each TCP instance has its own independent routing table. Instance that uses the
+ default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table.
+ The copy will be updated automatically whenever the IP driver reconfigures its
+ instance. As a result, the previous modification to the instance's local copy
+ will be lost. The priority of checking the route table is specific with IP
implementation and every IP implementation must comply with RFC 1122.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@param DeleteRoute If TRUE, delete the specified route from routing
table; if FALSE, add the specified route to
routing table.
- DestinationAddress and SubnetMask are used as
+ DestinationAddress and SubnetMask are used as
the keywords to search route entry.
@param SubnetAddress The destination network.
@param SubnetMask The subnet mask for the destination network.
- @param GatewayAddress The gateway address for this route.
- It must be on the same subnet with the station
+ @param GatewayAddress The gateway address for this route.
+ It must be on the same subnet with the station
address unless a direct route is specified.
-
+
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance has not been
configured.
@@ -224,21 +224,21 @@ Tcp4Routes ( /**
Initiate a nonblocking TCP connection request for an active TCP instance.
- The Connect() function will initiate an active open to the remote peer configured
- in current TCP instance if it is configured active. If the connection succeeds
- or fails due to any error, the ConnectionToken->CompletionToken.Event will be
- signaled and ConnectionToken->CompletionToken.Status will be updated accordingly.
- This function can only be called for the TCP instance in Tcp4StateClosed state.
- The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS.
- If TCP three way handshake succeeds, its state will become Tcp4StateEstablished,
+ The Connect() function will initiate an active open to the remote peer configured
+ in current TCP instance if it is configured active. If the connection succeeds
+ or fails due to any error, the ConnectionToken->CompletionToken.Event will be
+ signaled and ConnectionToken->CompletionToken.Status will be updated accordingly.
+ This function can only be called for the TCP instance in Tcp4StateClosed state.
+ The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS.
+ If TCP three way handshake succeeds, its state will become Tcp4StateEstablished,
otherwise, the state will return to Tcp4StateClosed.
-
+
@param This Pointer to the EFI_TCP4_PROTOCOL instance
@param ConnectionToken Pointer to the connection token to return when
the TCP three way handshake finishes.
- @retval EFI_SUCCESS The connection request is successfully initiated
- and the state of this TCPv4 instance has
+ @retval EFI_SUCCESS The connection request is successfully initiated
+ and the state of this TCPv4 instance has
been changed to Tcp4StateSynSent.
@retval EFI_NOT_STARTED This EFI_TCP4_PROTOCOL instance hasn't been
configured.
@@ -260,14 +260,14 @@ Tcp4Connect ( /**
Listen on the passive instance to accept an incoming connection request.
- The Accept() function initiates an asynchronous accept request to wait for an
- incoming connection on the passive TCP instance. If a remote peer successfully
- establishes a connection with this instance, a new TCP instance will be created
- and its handle will be returned in ListenToken->NewChildHandle. The newly created
- instance is configured by inheriting the passive instance's configuration and is
+ The Accept() function initiates an asynchronous accept request to wait for an
+ incoming connection on the passive TCP instance. If a remote peer successfully
+ establishes a connection with this instance, a new TCP instance will be created
+ and its handle will be returned in ListenToken->NewChildHandle. The newly created
+ instance is configured by inheriting the passive instance's configuration and is
ready for use upon return. The instance is in the Tcp4StateEstablished state.
- The ListenToken->CompletionToken.Event will be signaled when a new connection
- is accepted, user aborts the listen or connection is reset. This function only
+ The ListenToken->CompletionToken.Event will be signaled when a new connection
+ is accepted, user aborts the listen or connection is reset. This function only
can be called when current TCP instance is in Tcp4StateListen state.
@param This Pointer to the EFI_TCP4_PROTOCOL instance
@@ -297,8 +297,8 @@ Tcp4Accept ( /**
Queues outgoing data into the transmit queue.
- The Transmit() function queues a sending request to this TCPv4 instance along
- with the user data. The status of the token is updated and the event in the token
+ The Transmit() function queues a sending request to this TCPv4 instance along
+ with the user data. The status of the token is updated and the event in the token
will be signaled once the data is sent out or some error occurs.
@param This Pointer to the EFI_TCP4_PROTOCOL instance
@@ -314,11 +314,11 @@ Tcp4Accept ( @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE:
* A transmit completion token with the same
Token-> CompletionToken.Event was already in the
- transmission queue.
- * The current instance is in Tcp4StateClosed state
- * The current instance is a passive one and
- it is in Tcp4StateListen state.
- * User has called Close() to disconnect this
+ transmission queue.
+ * The current instance is in Tcp4StateClosed state
+ * The current instance is a passive one and
+ it is in Tcp4StateListen state.
+ * User has called Close() to disconnect this
connection.
@retval EFI_NOT_READY The completion token could not be queued because
the transmit queue is full.
@@ -338,16 +338,16 @@ Tcp4Transmit ( /**
Place an asynchronous receive request into the receiving queue.
- The Receive() function places a completion token into the receive packet queue.
- This function is always asynchronous. The caller must allocate the
- Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also
- must fill the DataLength which represents the whole length of all FragmentBuffer.
- When the receive operation completes, the EFI TCPv4 Protocol driver updates the
- Token->CompletionToken.Status and Token->Packet.RxData fields and the
- Token->CompletionToken.Event is signaled. If got data the data and its length
- will be copy into the FragmentTable, in the same time the full length of received
- data will be recorded in the DataLength fields. Providing a proper notification
- function and context for the event will enable the user to receive the notification
+ The Receive() function places a completion token into the receive packet queue.
+ This function is always asynchronous. The caller must allocate the
+ Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also
+ must fill the DataLength which represents the whole length of all FragmentBuffer.
+ When the receive operation completes, the EFI TCPv4 Protocol driver updates the
+ Token->CompletionToken.Status and Token->Packet.RxData fields and the
+ Token->CompletionToken.Event is signaled. If got data the data and its length
+ will be copy into the FragmentTable, in the same time the full length of received
+ data will be recorded in the DataLength fields. Providing a proper notification
+ function and context for the event will enable the user to receive the notification
and receiving status. That notification function is guaranteed to not be re-entered.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@@ -363,16 +363,16 @@ Tcp4Transmit ( @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued
due to a lack of system resources.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
- The EFI TCPv4 Protocol instance has been reset
+ The EFI TCPv4 Protocol instance has been reset
to startup defaults.
@retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE:
* A receive completion token with the same
- Token->CompletionToken.Event was already in
- the receive queue.
- * The current instance is in Tcp4StateClosed state.
- * The current instance is a passive one and it
- is in Tcp4StateListen state.
- * User has called Close() to disconnect this
+ Token->CompletionToken.Event was already in
+ the receive queue.
+ * The current instance is in Tcp4StateClosed state.
+ * The current instance is a passive one and it
+ is in Tcp4StateListen state.
+ * User has called Close() to disconnect this
connection.
@retval EFI_CONNECTION_FIN The communication peer has closed the connection
and there is no any buffered data in the receive
@@ -391,13 +391,13 @@ Tcp4Receive ( /**
Disconnecting a TCP connection gracefully or reset a TCP connection.
- Initiate an asynchronous close token to TCP driver. After Close() is called,
- any buffered transmission data will be sent by TCP driver and the current
- instance will have a graceful close working flow described as RFC 793 if
- AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP
- driver to fast disconnect this connection. When the close operation completes
- successfully the TCP instance is in Tcp4StateClosed state, all pending
- asynchronous operation is signaled and any buffers used for TCP network traffic
+ Initiate an asynchronous close token to TCP driver. After Close() is called,
+ any buffered transmission data will be sent by TCP driver and the current
+ instance will have a graceful close working flow described as RFC 793 if
+ AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP
+ driver to fast disconnect this connection. When the close operation completes
+ successfully the TCP instance is in Tcp4StateClosed state, all pending
+ asynchronous operation is signaled and any buffers used for TCP network traffic
is flushed.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@@ -407,7 +407,7 @@ Tcp4Receive ( @retval EFI_SUCCESS The operation completed successfully.
@retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance hasn't been
configured.
- @retval EFI_ACCESS_DENIED One or more of the following are TRUE:
+ @retval EFI_ACCESS_DENIED One or more of the following are TRUE:
* Configure() has been called with TcpConfigData
set to NULL and this function has not returned.
* Previous Close() call on this instance has not
@@ -429,33 +429,33 @@ Tcp4Close ( /**
Abort an asynchronous connection, listen, transmission or receive request.
- The Cancel() function aborts a pending connection, listen, transmit or receive
- request. If Token is not NULL and the token is in the connection, listen,
- transmission or receive queue when it is being cancelled, its Token->Status
- will be set to EFI_ABORTED and then Token->Event will be signaled. If the token
- is not in one of the queues, which usually means that the asynchronous operation
- has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token
+ The Cancel() function aborts a pending connection, listen, transmit or receive
+ request. If Token is not NULL and the token is in the connection, listen,
+ transmission or receive queue when it is being cancelled, its Token->Status
+ will be set to EFI_ABORTED and then Token->Event will be signaled. If the token
+ is not in one of the queues, which usually means that the asynchronous operation
+ has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token
issued by Connect(), Accept(), Transmit() and Receive()will be aborted.
NOTE: It has not been implemented currently.
-
+
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
@param Token Pointer to a token that has been issued by
Connect(), Accept(), Transmit() or Receive(). If
NULL, all pending tokens issued by above four
functions will be aborted.
-
+
@retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event
is signaled.
@retval EFI_INVALID_PARAMETER This is NULL.
@retval EFI_NOT_STARTED This instance hasn's been configured.
@retval EFI_NO_MAPPING When using the default address, configuration
(DHCP, BOOTP,RARP, etc.) hasn's finished yet.
- @retval EFI_NOT_FOUND The asynchronous I/O request isn's found in the
- transmission or receive queue. It has either
+ @retval EFI_NOT_FOUND The asynchronous I/O request isn's found in the
+ transmission or receive queue. It has either
completed or wasn's issued by Transmit() and Receive().
@retval EFI_UNSUPPORTED The operation is not supported in current
implementation.
-
+
**/
EFI_STATUS
EFIAPI
@@ -467,11 +467,11 @@ Tcp4Cancel ( /**
Poll to receive incoming data and transmit outgoing segments.
- The Poll() function increases the rate that data is moved between the network
- and application and can be called when the TCP instance is created successfully.
- Its use is optional. In some implementations, the periodical timer in the MNP
- driver may not poll the underlying communications device fast enough to avoid
- drop packets. Drivers and applications that are experiencing packet loss should
+ The Poll() function increases the rate that data is moved between the network
+ and application and can be called when the TCP instance is created successfully.
+ Its use is optional. In some implementations, the periodical timer in the MNP
+ driver may not poll the underlying communications device fast enough to avoid
+ drop packets. Drivers and applications that are experiencing packet loss should
try calling the Poll() function in a high frequency.
@param This Pointer to the EFI_TCP4_PROTOCOL instance.
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c index 892d19b..7fd8bb1 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 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -79,7 +79,7 @@ TcpInitTcbLocal ( //
Tcb->RcvWndScale = 0;
Tcb->RetxmitSeqMax = 0;
-
+
Tcb->ProbeTimerOn = FALSE;
}
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c index 0da249c..2817b80 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c @@ -1,7 +1,7 @@ /** @file
Routines to process TCP option.
-
-Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR>
+
+Copyright (c) 2005 - 2018, 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
@@ -16,9 +16,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /**
Get a UINT16 value from buffer.
-
+
@param Buf Pointer to input buffer.
-
+
@return The UINT16 value get from buffer.
**/
@@ -34,9 +34,9 @@ TcpGetUint16 ( /**
Get a UINT32 value from buffer.
-
+
@param Buf Pointer to input buffer.
-
+
@return The UINT32 value get from buffer.
**/
@@ -52,9 +52,9 @@ TcpGetUint32 ( /**
Put a UINT32 value in buffer.
-
+
@param Buf Pointer to the buffer.
- @param Data The UINT32 Date to put in buffer
+ @param Data The UINT32 Date to put in buffer
**/
VOID
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h index 9676df0..5185aec 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h @@ -1,7 +1,7 @@ /** @file
Tcp option's routine header file.
-
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
+
+Copyright (c) 2005 - 2018, 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
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c index 5a3d837..760b09a 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c @@ -1,7 +1,7 @@ /** @file
TCP output process routines.
-
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+
+Copyright (c) 2005 - 2018, 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
@@ -687,10 +687,10 @@ TcpRetransmit ( "TcpRetransmit: retransmission without regard to the receiver window for TCB %p\n",
Tcb)
);
-
+
} else if (TCP_SEQ_GEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq)) {
Len = TCP_SUB_SEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq);
-
+
} else {
DEBUG (
(EFI_D_WARN,
@@ -700,7 +700,7 @@ TcpRetransmit ( return 0;
}
-
+
Len = MIN (Len, Tcb->SndMss);
Nbuf = TcpGetSegmentSndQue (Tcb, Seq, Len);
@@ -713,7 +713,7 @@ TcpRetransmit ( if (TcpTransmitSegment (Tcb, Nbuf) != 0) {
goto OnError;
}
-
+
if (TCP_SEQ_GT (Seq, Tcb->RetxmitSeqMax)) {
Tcb->RetxmitSeqMax = Seq;
}
@@ -793,7 +793,7 @@ SEND_AGAIN: // only send a segment without data if SYN or
// FIN is set.
//
- if ((Len == 0) &&
+ if ((Len == 0) &&
((Flag & (TCP_FLG_SYN | TCP_FLG_FIN)) == 0)) {
return Sent;
}
@@ -831,10 +831,10 @@ SEND_AGAIN: TCP_SEQ_LT (End + 1, Tcb->SndWnd + Tcb->SndWl2)) {
DEBUG (
- (EFI_D_NET,
- "TcpToSendData: send FIN "
- "to peer for TCB %p in state %s\n",
- Tcb,
+ (EFI_D_NET,
+ "TcpToSendData: send FIN "
+ "to peer for TCB %p in state %s\n",
+ Tcb,
mTcpStateName[Tcb->State])
);
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h index 49d8a1d..37191fe 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h @@ -1,7 +1,7 @@ /** @file
Tcp Protocol header file.
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2018, 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
@@ -49,11 +49,11 @@ typedef struct _TCP_CB TCP_CB; #define TCP_FLG_PSH 0x08
#define TCP_FLG_ACK 0x10
#define TCP_FLG_URG 0x20
-
+
//
// mask for all the flags
//
-#define TCP_FLG_FLAG 0x3F
+#define TCP_FLG_FLAG 0x3F
#define TCP_CONNECT_REFUSED (-1) ///< TCP error status
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c index a8e4a93..4cb0ee7 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c @@ -1,7 +1,7 @@ /** @file
TCP timer related functions.
-
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
+
+Copyright (c) 2005 - 2018, 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
@@ -37,7 +37,7 @@ VOID TcpRexmitTimeout (
IN OUT TCP_CB *Tcb
);
-
+
/**
Timeout handler for window probe timer.
@@ -289,7 +289,7 @@ Tcp2MSLTimeout ( /**
- Update the timer status and the next expire time according to the timers
+ Update the timer status and the next expire time according to the timers
to expire in a specific future time slot.
@param Tcb Pointer to the TCP_CB of this TCP instance.
@@ -555,7 +555,7 @@ TcpTickingDpc ( }
}
}
-
+
//
// If the Tcb still exist or some timer is set, update the timer
//
|