NetworkPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Implementation of protocols EFI_COMPONENT_NAME_PROTOCOL and
|
||||
EFI_COMPONENT_NAME2_PROTOCOL.
|
||||
|
||||
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -231,10 +231,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
|
||||
UpdateTcp4Name (
|
||||
@@ -276,7 +276,7 @@ UpdateTcp4Name (
|
||||
FreeUnicodeStringTable (gTcpControllerNameTable);
|
||||
gTcpControllerNameTable = NULL;
|
||||
}
|
||||
|
||||
|
||||
Status = AddUnicodeString2 (
|
||||
"eng",
|
||||
gTcpComponentName.SupportedLanguages,
|
||||
@@ -287,7 +287,7 @@ UpdateTcp4Name (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
return AddUnicodeString2 (
|
||||
"en",
|
||||
gTcpComponentName2.SupportedLanguages,
|
||||
@@ -302,10 +302,10 @@ UpdateTcp4Name (
|
||||
|
||||
@param Tcp6[in] A pointer to the EFI_TCP6_PROTOCOL.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateTcp6Name (
|
||||
@@ -343,7 +343,7 @@ UpdateTcp6Name (
|
||||
FreeUnicodeStringTable (gTcpControllerNameTable);
|
||||
gTcpControllerNameTable = NULL;
|
||||
}
|
||||
|
||||
|
||||
Status = AddUnicodeString2 (
|
||||
"eng",
|
||||
gTcpComponentName.SupportedLanguages,
|
||||
@@ -354,7 +354,7 @@ UpdateTcp6Name (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
return AddUnicodeString2 (
|
||||
"en",
|
||||
gTcpComponentName2.SupportedLanguages,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of the Socket.
|
||||
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -577,13 +577,13 @@ SockWakeRcvToken (
|
||||
/**
|
||||
Cancel the tokens in the specific token list.
|
||||
|
||||
@param[in] Token Pointer to the Token. If NULL, all tokens
|
||||
in SpecifiedTokenList will be canceled.
|
||||
@param[in] Token Pointer to the Token. If NULL, all tokens
|
||||
in SpecifiedTokenList will be canceled.
|
||||
@param[in, out] SpecifiedTokenList Pointer to the token list to be checked.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Cancel the tokens in the specific token listsuccessfully.
|
||||
@retval EFI_NOT_FOUND The Token is not found in SpecifiedTokenList.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
SockCancelToken (
|
||||
@@ -602,19 +602,19 @@ SockCancelToken (
|
||||
if (IsListEmpty (SpecifiedTokenList) && Token != NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Iterate through the SpecifiedTokenList.
|
||||
//
|
||||
Entry = SpecifiedTokenList->ForwardLink;
|
||||
while (Entry != SpecifiedTokenList) {
|
||||
SockToken = NET_LIST_USER_STRUCT (Entry, SOCK_TOKEN, TokenList);
|
||||
|
||||
|
||||
if (Token == NULL) {
|
||||
SIGNAL_TOKEN (SockToken->Token, EFI_ABORTED);
|
||||
RemoveEntryList (&SockToken->TokenList);
|
||||
FreePool (SockToken);
|
||||
|
||||
|
||||
Entry = SpecifiedTokenList->ForwardLink;
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
@@ -622,18 +622,18 @@ SockCancelToken (
|
||||
SIGNAL_TOKEN (Token, EFI_ABORTED);
|
||||
RemoveEntryList (&(SockToken->TokenList));
|
||||
FreePool (SockToken);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
Status = EFI_NOT_FOUND;
|
||||
|
||||
|
||||
Entry = Entry->ForwardLink;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT (IsListEmpty (SpecifiedTokenList) || Token != NULL);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The function declaration that provided for Socket Interface.
|
||||
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -80,13 +80,13 @@ SockConnFlush (
|
||||
/**
|
||||
Cancel the tokens in the specific token list.
|
||||
|
||||
@param[in] Token Pointer to the Token. If NULL, all tokens
|
||||
in SpecifiedTokenList will be canceled.
|
||||
@param[in] Token Pointer to the Token. If NULL, all tokens
|
||||
in SpecifiedTokenList will be canceled.
|
||||
@param[in, out] SpecifiedTokenList Pointer to the token list to be checked.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Cancel the tokens in the specific token listsuccessfully.
|
||||
@retval EFI_NOT_FOUND The Token is not found in SpecifiedTokenList.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
SockCancelToken (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Interface function of the Socket.
|
||||
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -985,7 +985,7 @@ EFI_STATUS
|
||||
SockCancel (
|
||||
IN OUT SOCKET *Sock,
|
||||
IN VOID *Token
|
||||
)
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
@@ -1008,7 +1008,7 @@ SockCancel (
|
||||
Status = EFI_NOT_STARTED;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 1. Check ConnectionToken.
|
||||
//
|
||||
@@ -1039,7 +1039,7 @@ SockCancel (
|
||||
if (Token != NULL && !EFI_ERROR (Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 4. Check SndTokenList.
|
||||
//
|
||||
@@ -1052,7 +1052,7 @@ SockCancel (
|
||||
// 5. Check ProcessingSndTokenList.
|
||||
//
|
||||
Status = SockCancelToken (Token, &Sock->ProcessingSndTokenList);
|
||||
|
||||
|
||||
Exit:
|
||||
EfiReleaseLock (&(Sock->Lock));
|
||||
return Status;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
The implementation of a dispatch routine for processing TCP requests.
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -360,7 +360,7 @@ TcpAttachPcb (
|
||||
} else {
|
||||
IpProtocolGuid = &gEfiIp6ProtocolGuid;
|
||||
}
|
||||
|
||||
|
||||
Tcb = AllocateZeroPool (sizeof (TCP_CB));
|
||||
|
||||
if (Tcb == NULL) {
|
||||
@@ -398,7 +398,7 @@ TcpAttachPcb (
|
||||
IpIoRemoveIp (IpIo, Tcb->IpInfo);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
InitializeListHead (&Tcb->List);
|
||||
InitializeListHead (&Tcb->SndQue);
|
||||
InitializeListHead (&Tcb->RcvQue);
|
||||
@@ -430,7 +430,7 @@ TcpDetachPcb (
|
||||
ASSERT (Tcb != NULL);
|
||||
|
||||
TcpFlushPcb (Tcb);
|
||||
|
||||
|
||||
IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo);
|
||||
|
||||
FreePool (Tcb);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The driver binding and service binding protocol for the TCP driver.
|
||||
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -365,7 +365,7 @@ ON_ERROR:
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@@ -410,7 +410,7 @@ TcpDestroyChildEntryInHandleBuffer (
|
||||
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number
|
||||
of children is zero stop the entire bus driver.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.
|
||||
if NumberOfChildren is 0.
|
||||
@param[in] IpVersion IP_VERSION_4 or IP_VERSION_6
|
||||
|
||||
@retval EFI_SUCCESS The resources used by the instance were cleaned up.
|
||||
@@ -545,7 +545,7 @@ Tcp4DriverBindingSupported (
|
||||
if (!EFI_ERROR (Status)) {
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Test for the Ip4ServiceBinding Protocol
|
||||
//
|
||||
@@ -662,7 +662,7 @@ Tcp6DriverBindingSupported (
|
||||
if (!EFI_ERROR (Status)) {
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Test for the Ip6ServiceBinding Protocol
|
||||
//
|
||||
|
@@ -2,11 +2,11 @@
|
||||
# TCPv4 I/O and TCPv6 I/O services.
|
||||
#
|
||||
# This module provides EFI TCPv4 Protocol and EFI TCPv6 Protocol to send and receive data stream.
|
||||
# It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on
|
||||
# It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on
|
||||
# which network stack has been loaded in system.
|
||||
#
|
||||
#
|
||||
# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2009 - 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
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// It might provide TCPv4 Protocol or TCPv6 Protocol or both of them that depends on
|
||||
// which network stack has been loaded in system.
|
||||
//
|
||||
// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2009 - 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.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// TcpDxe 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 DXE"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
TCP input process routines.
|
||||
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -436,7 +436,7 @@ TcpDeliverData (
|
||||
NetbufFree (Nbuf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
ASSERT (Nbuf->Tcp == NULL);
|
||||
|
||||
if (TCP_SEQ_GT (Seg->Seq, Seq)) {
|
||||
@@ -775,18 +775,18 @@ TcpInput (
|
||||
|
||||
Head = (TCP_HEAD *) NetbufGetByte (Nbuf, 0, NULL);
|
||||
ASSERT (Head != NULL);
|
||||
|
||||
|
||||
if (Nbuf->TotalSize < sizeof (TCP_HEAD)) {
|
||||
DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));
|
||||
goto DISCARD;
|
||||
}
|
||||
|
||||
|
||||
Len = Nbuf->TotalSize - (Head->HeadLen << 2);
|
||||
|
||||
if ((Head->HeadLen < 5) || (Len < 0)) {
|
||||
|
||||
DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));
|
||||
|
||||
|
||||
goto DISCARD;
|
||||
}
|
||||
|
||||
@@ -1322,7 +1322,7 @@ TcpInput (
|
||||
|
||||
goto DISCARD;
|
||||
}
|
||||
|
||||
|
||||
Tcb->SndUna = Seg->Ack;
|
||||
|
||||
if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_SND_URG) &&
|
||||
@@ -1564,7 +1564,7 @@ StepSix:
|
||||
|
||||
goto DISCARD;
|
||||
}
|
||||
|
||||
|
||||
if (TcpDeliverData (Tcb) == -1) {
|
||||
goto RESET_THEN_DROP;
|
||||
}
|
||||
@@ -1664,7 +1664,7 @@ TcpIcmpInput (
|
||||
if (Nbuf->TotalSize < sizeof (TCP_HEAD)) {
|
||||
goto CLEAN_EXIT;
|
||||
}
|
||||
|
||||
|
||||
Head = (TCP_HEAD *) NetbufGetByte (Nbuf, 0, NULL);
|
||||
ASSERT (Head != NULL);
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Implementation of EFI_TCP4_PROTOCOL and EFI_TCP6_PROTOCOL.
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -153,7 +153,7 @@ Tcp4Configure (
|
||||
if (IP4_IS_LOCAL_BROADCAST (NTOHL (Ip))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
if (TcpConfigData->AccessPoint.ActiveFlag && (0 == TcpConfigData->AccessPoint.RemotePort || (Ip == 0))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -162,7 +162,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;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
TCP output process routines.
|
||||
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 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
|
||||
@@ -295,7 +295,7 @@ TcpTransmitSegment (
|
||||
ASSERT ((Nbuf != NULL) && (Nbuf->Tcp == NULL));
|
||||
|
||||
if (TcpVerifySegment (Nbuf) == 0) {
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
DataLen = Nbuf->TotalSize;
|
||||
@@ -642,7 +642,7 @@ TcpGetSegment (
|
||||
NetbufFree (Nbuf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
return Nbuf;
|
||||
}
|
||||
|
||||
@@ -688,10 +688,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,
|
||||
|
Reference in New Issue
Block a user