Fix the IN OUT modifier for parameters.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7147 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niry 2008-12-29 12:58:38 +00:00
parent 73e4adbe68
commit 77f00155e3
13 changed files with 139 additions and 142 deletions

View File

@ -41,7 +41,7 @@ SockTcpDataToRcv (
**/
VOID
SockProcessSndToken (
IN SOCKET *Sock
IN OUT SOCKET *Sock
);
/**
@ -148,7 +148,7 @@ SockTcpDataToRcv (
@param Sock Pointer to the socket.
@param TcpRxData Pointer to the application provided receive buffer.
@param RcvdBytes The maximum length of the data can be copied.
@param IsOOB If TURE the data is OOB, else the data is normal.
@param IsOOB If TURE the data is OOB, FALSE the data is normal.
**/
VOID
@ -205,7 +205,7 @@ SockSetTcpRxData (
UINT32
SockProcessRcvToken (
IN SOCKET *Sock,
IN SOCK_IO_TOKEN *RcvToken
IN OUT SOCK_IO_TOKEN *RcvToken
)
{
UINT32 TokenRcvdBytes;
@ -242,7 +242,7 @@ SockProcessRcvToken (
the buffer to socket send buffer,then try to send it.
@param Sock Pointer to the socket.
@param TcpTxData Pointer to the tcp txdata.
@param TcpTxData Pointer to the application provided send buffer.
@retval EFI_SUCCESS The operation is completed successfully.
@retval EFI_OUT_OF_RESOURCES Failed due to resource limit.
@ -358,7 +358,7 @@ SockFlushPendingToken (
**/
VOID
SockWakeConnToken (
IN SOCKET *Sock
IN OUT SOCKET *Sock
)
{
ASSERT (Sock->ConnectionToken != NULL);
@ -382,7 +382,7 @@ SockWakeConnToken (
**/
VOID
SockWakeListenToken (
IN SOCKET *Sock
IN OUT SOCKET *Sock
)
{
SOCKET *Parent;
@ -470,7 +470,7 @@ SockWakeRcvToken (
**/
VOID
SockProcessSndToken (
IN SOCKET *Sock
IN OUT SOCKET *Sock
)
{
UINT32 FreeSpace;
@ -712,7 +712,7 @@ OnError:
**/
VOID
SockDestroy (
IN SOCKET *Sock
IN OUT SOCKET *Sock
)
{
VOID *SockProtocol;
@ -804,14 +804,14 @@ FreeSock:
/**
Flush the socket.
Flush the sndBuffer and rcvBuffer of socket.
@param Sock Pointer to the socket.
**/
VOID
SockConnFlush (
IN SOCKET *Sock
IN OUT SOCKET *Sock
)
{
SOCKET *Child;
@ -877,7 +877,7 @@ SockConnFlush (
**/
VOID
SockSetState (
IN SOCKET *Sock,
IN OUT SOCKET *Sock,
IN SOCK_STATE State
)
{
@ -972,7 +972,7 @@ SockConnEstablished (
**/
VOID
SockConnClosed (
IN SOCKET *Sock
IN OUT SOCKET *Sock
)
{
if (Sock->CloseToken != NULL) {
@ -1095,7 +1095,7 @@ SockGetDataToSend (
VOID
SockDataRcvd (
IN SOCKET *Sock,
IN NET_BUF *NetBuffer,
IN OUT NET_BUF *NetBuffer,
IN UINT32 UrgLen
)
{
@ -1161,7 +1161,7 @@ SockGetFreeSpace (
**/
VOID
SockRcvdErr (
IN SOCKET *Sock,
IN OUT SOCKET *Sock,
IN EFI_STATUS Error
)
{
@ -1199,7 +1199,7 @@ SockRcvdErr (
**/
VOID
SockNoMoreData (
IN SOCKET *Sock
IN OUT SOCKET *Sock
)
{
EFI_STATUS Err;

View File

@ -87,7 +87,7 @@ SockSetTcpRxData (
UINT32
SockProcessRcvToken (
IN SOCKET *Sock,
IN SOCK_IO_TOKEN *RcvToken
IN OUT SOCK_IO_TOKEN *RcvToken
);
/**
@ -98,7 +98,7 @@ SockProcessRcvToken (
**/
VOID
SockConnFlush (
IN SOCKET *Sock
IN OUT SOCKET *Sock
);
/**
@ -122,7 +122,7 @@ SockCreate (
**/
VOID
SockDestroy (
IN SOCKET *Sock
IN OUT SOCKET *Sock
);
#endif

View File

@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param Event The event to be checked.
@retval TRUE The specific Event exists in the List.
@retval False The specific Event is not in the List.
@retval FALSE The specific Event is not in the List.
**/
BOOLEAN
@ -57,7 +57,8 @@ SockTokenExistedInList (
@param Sock Pointer to the instance's socket.
@param Event The event to be checked.
@return The specific Event exists in one of socket's lists or not.
@retval TRUE The Event exists in related socket's lists.
@retval FALSE The Event is not in related socket's lists.
**/
BOOLEAN

View File

@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef _SOCKET_H_
#define _SOCKET_H_
#include <PiDxe.h>
#include <Uefi.h>
#include <Protocol/Ip4.h>
#include <Protocol/Tcp4.h>
@ -23,12 +23,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/NetLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/UefiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseMemoryLib.h>
#define SOCK_SND_BUF 0
#define SOCK_RCV_BUF 1
@ -244,7 +240,7 @@ EFI_STATUS
**/
VOID
SockSetState (
IN SOCKET *Sock,
IN OUT SOCKET *Sock,
IN SOCK_STATE State
);
@ -276,7 +272,7 @@ SockConnEstablished (
**/
VOID
SockConnClosed (
IN SOCKET *Sock
IN OUT SOCKET *Sock
);
/**
@ -328,7 +324,7 @@ SockGetDataToSend (
**/
VOID
SockNoMoreData (
IN SOCKET *Sock
IN OUT SOCKET *Sock
);
/**
@ -346,7 +342,7 @@ SockNoMoreData (
VOID
SockDataRcvd (
IN SOCKET *Sock,
IN NET_BUF *NetBuffer,
IN OUT NET_BUF *NetBuffer,
IN UINT32 UrgLen
);
@ -389,7 +385,7 @@ SockClone (
**/
VOID
SockRcvdErr (
IN SOCKET *Sock,
IN OUT SOCKET *Sock,
IN EFI_STATUS Error
);

View File

@ -107,7 +107,7 @@ TcpGetIss (
**/
VOID
TcpInitTcbLocal (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -121,7 +121,7 @@ TcpInitTcbLocal (
**/
VOID
TcpInitTcbPeer (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN TCP_SEG *Seg,
IN TCP_OPTION *Opt
);
@ -148,7 +148,7 @@ TcpGetRcvMss (
**/
VOID
TcpSetState (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN UINT8 State
);
@ -187,7 +187,7 @@ TcpSendIpPacket (
**/
INTN
TcpToSendData (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN INTN Force
);
@ -199,7 +199,7 @@ TcpToSendData (
**/
VOID
TcpToSendAck (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -210,7 +210,7 @@ TcpToSendAck (
**/
VOID
TcpSendAck (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -224,7 +224,7 @@ TcpSendAck (
**/
INTN
TcpSendZeroProbe (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -240,7 +240,7 @@ TcpSendZeroProbe (
**/
INTN
TcpDeliverData (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -482,7 +482,7 @@ TcpSeqAcceptable (
**/
VOID
TcpFastRecover (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN TCP_SEG *Seg
);
@ -495,7 +495,7 @@ TcpFastRecover (
**/
VOID
TcpFastLossRecover (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN TCP_SEG *Seg
);
@ -508,7 +508,7 @@ TcpFastLossRecover (
**/
VOID
TcpComputeRtt (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN UINT32 Measure
);
@ -534,7 +534,7 @@ TcpTrimInWnd (
**/
VOID
TcpQueueData (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN NET_BUF *Nbuf
);
@ -584,7 +584,7 @@ TcpChecksum (
TCP_SEG *
TcpFormatNetbuf (
IN TCP_CB *Tcb,
IN NET_BUF *Nbuf
IN OUT NET_BUF *Nbuf
);
/**
@ -596,7 +596,7 @@ TcpFormatNetbuf (
**/
VOID
TcpOnAppConnect (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -620,7 +620,7 @@ TcpOnAppConsume (
**/
VOID
TcpOnAppClose (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -636,7 +636,7 @@ TcpOnAppClose (
**/
INTN
TcpOnAppSend (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -674,7 +674,7 @@ TcpResetConnection (
**/
VOID
TcpClose (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -701,7 +701,7 @@ TcpTicking (
**/
VOID
TcpSetTimer (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN UINT16 Timer,
IN UINT32 TimeOut
);
@ -715,7 +715,7 @@ TcpSetTimer (
**/
VOID
TcpClearTimer (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN UINT16 Timer
);
@ -727,7 +727,7 @@ TcpClearTimer (
**/
VOID
TcpClearAllTimer (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -738,7 +738,7 @@ TcpClearAllTimer (
**/
VOID
TcpSetProbeTimer (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -749,7 +749,7 @@ TcpSetProbeTimer (
**/
VOID
TcpSetKeepaliveTimer (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -760,7 +760,7 @@ TcpSetKeepaliveTimer (
**/
VOID
TcpBackoffRto (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**

View File

@ -46,7 +46,7 @@ TcpSeqAcceptable (
**/
VOID
TcpFastRecover (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN TCP_SEG *Seg
)
{
@ -156,7 +156,7 @@ TcpFastRecover (
**/
VOID
TcpFastLossRecover (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN TCP_SEG *Seg
)
{
@ -200,7 +200,7 @@ TcpFastLossRecover (
**/
VOID
TcpComputeRtt (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN UINT32 Measure
)
{
@ -369,7 +369,7 @@ TcpTrimInWnd (
**/
INTN
TcpDeliverData (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
LIST_ENTRY *Entry;
@ -533,7 +533,7 @@ TcpDeliverData (
**/
VOID
TcpQueueData (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN NET_BUF *Nbuf
)
{

View File

@ -26,8 +26,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param Context Pointer to the context configured in IpIoOpen(), not used
now.
@return None
**/
VOID
Tcp4RxCallback (

View File

@ -52,7 +52,7 @@ CHAR16 *mTcpStateName[] = {
**/
VOID
TcpInitTcbLocal (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
//
@ -92,7 +92,7 @@ TcpInitTcbLocal (
**/
VOID
TcpInitTcbPeer (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN TCP_SEG *Seg,
IN TCP_OPTION *Opt
)
@ -496,7 +496,7 @@ TcpGetRcvMss (
**/
VOID
TcpSetState (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN UINT8 State
)
{
@ -579,7 +579,7 @@ TcpChecksum (
TCP_SEG *
TcpFormatNetbuf (
IN TCP_CB *Tcb,
IN NET_BUF *Nbuf
IN OUT NET_BUF *Nbuf
)
{
TCP_SEG *Seg;
@ -674,7 +674,7 @@ TcpResetConnection (
**/
VOID
TcpOnAppConnect (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
TcpInitTcbLocal (Tcb);
@ -694,7 +694,7 @@ TcpOnAppConnect (
**/
VOID
TcpOnAppClose (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
ASSERT (Tcb != NULL);
@ -745,29 +745,25 @@ TcpOnAppClose (
**/
INTN
TcpOnAppSend (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
switch (Tcb->State) {
case TCP_CLOSED:
return -1;
break;
case TCP_LISTEN:
return -1;
break;
case TCP_SYN_SENT:
case TCP_SYN_RCVD:
return 0;
break;
case TCP_ESTABLISHED:
case TCP_CLOSE_WAIT:
TcpToSendData (Tcb, 0);
return 0;
break;
case TCP_FIN_WAIT_1:
case TCP_FIN_WAIT_2:
@ -775,7 +771,7 @@ TcpOnAppSend (
case TCP_LAST_ACK:
case TCP_TIME_WAIT:
return -1;
break;
default:
break;
}
@ -869,6 +865,8 @@ TcpOnAppAbort (
case TCP_CLOSE_WAIT:
TcpResetConnection (Tcb);
break;
default:
break;
}
TcpSetState (Tcb, TCP_CLOSED);

View File

@ -59,7 +59,7 @@ TcpGetUint32 (
**/
VOID
TcpPutUint32 (
IN UINT8 *Buf,
OUT UINT8 *Buf,
IN UINT32 Data
)
{
@ -237,7 +237,7 @@ TcpBuildOption (
INTN
TcpParseOption (
IN TCP_HEAD *Tcp,
IN TCP_OPTION *Option
IN OUT TCP_OPTION *Option
)
{
UINT8 *Head;

View File

@ -125,7 +125,7 @@ TcpBuildOption (
INTN
TcpParseOption (
IN TCP_HEAD *Tcp,
IN TCP_OPTION *Option
IN OUT TCP_OPTION *Option
);
/**

View File

@ -115,7 +115,7 @@ TcpRcvWinNow (
**/
UINT16
TcpComputeWnd (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN BOOLEAN Syn
)
{
@ -286,7 +286,7 @@ SetPersistTimer:
**/
INTN
TcpTransmitSegment (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN NET_BUF *Nbuf
)
{
@ -721,7 +721,7 @@ OnError:
**/
INTN
TcpToSendData (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN INTN Force
)
{
@ -909,7 +909,7 @@ OnError:
**/
VOID
TcpSendAck (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
NET_BUF *Nbuf;
@ -948,7 +948,7 @@ TcpSendAck (
**/
INTN
TcpSendZeroProbe (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
NET_BUF *Nbuf;
@ -987,7 +987,7 @@ TcpSendZeroProbe (
**/
VOID
TcpToSendAck (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
UINT32 TcpNow;

View File

@ -24,7 +24,7 @@ UINT32 mTcpTick = 1000;
**/
VOID
TcpConnectTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -35,7 +35,7 @@ TcpConnectTimeout (
**/
VOID
TcpRexmitTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -46,7 +46,7 @@ TcpRexmitTimeout (
**/
VOID
TcpProbeTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -57,7 +57,7 @@ TcpProbeTimeout (
**/
VOID
TcpKeepaliveTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -68,7 +68,7 @@ TcpKeepaliveTimeout (
**/
VOID
TcpFinwait2Timeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
/**
@ -79,7 +79,7 @@ TcpFinwait2Timeout (
**/
VOID
Tcp2MSLTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
);
TCP_TIMER_HANDLER mTcpTimerHandler[TCP_TIMER_NUMBER] = {
@ -99,7 +99,7 @@ TCP_TIMER_HANDLER mTcpTimerHandler[TCP_TIMER_NUMBER] = {
**/
VOID
TcpClose (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
NetbufFreeList (&Tcb->SndQue);
@ -117,7 +117,7 @@ TcpClose (
**/
VOID
TcpConnectTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
if (!TCP_CONNECTED (Tcb->State)) {
@ -149,7 +149,7 @@ TcpConnectTimeout (
**/
VOID
TcpRexmitTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
UINT32 FlightSize;
@ -200,7 +200,7 @@ TcpRexmitTimeout (
**/
VOID
TcpProbeTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
//
@ -228,7 +228,7 @@ TcpProbeTimeout (
**/
VOID
TcpKeepaliveTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
Tcb->KeepAliveProbes++;
@ -259,7 +259,7 @@ TcpKeepaliveTimeout (
**/
VOID
TcpFinwait2Timeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
DEBUG ((EFI_D_WARN, "TcpFinwait2Timeout: connection closed "
@ -277,7 +277,7 @@ TcpFinwait2Timeout (
**/
VOID
Tcp2MSLTimeout (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
DEBUG ((EFI_D_WARN, "Tcp2MSLTimeout: connection closed "
@ -296,7 +296,7 @@ Tcp2MSLTimeout (
**/
VOID
TcpUpdateTimer (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
UINT16 Index;
@ -330,7 +330,7 @@ TcpUpdateTimer (
**/
VOID
TcpSetTimer (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN UINT16 Timer,
IN UINT32 TimeOut
)
@ -351,7 +351,7 @@ TcpSetTimer (
**/
VOID
TcpClearTimer (
IN TCP_CB *Tcb,
IN OUT TCP_CB *Tcb,
IN UINT16 Timer
)
{
@ -368,7 +368,7 @@ TcpClearTimer (
**/
VOID
TcpClearAllTimer (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
Tcb->EnabledTimer = 0;
@ -384,7 +384,7 @@ TcpClearAllTimer (
**/
VOID
TcpSetProbeTimer (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
if (!TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_PROBE)) {
@ -414,7 +414,7 @@ TcpSetProbeTimer (
**/
VOID
TcpSetKeepaliveTimer (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_NO_KEEPALIVE)) {
@ -450,7 +450,7 @@ TcpSetKeepaliveTimer (
**/
VOID
TcpBackoffRto (
IN TCP_CB *Tcb
IN OUT TCP_CB *Tcb
)
{
//
@ -553,6 +553,10 @@ TcpTickingDpc (
}
}
}
//
// If the Tcb still exist or some timer is set, update the timer
//
if (Index == TCP_TIMER_NUMBER) {
TcpUpdateTimer (Tcb);
}