Home | History | Annotate | Download | only in TcpDxe

Lines Matching refs:Tcb

23   @param[in, out]  Tcb      Pointer to the TCP_CB of this TCP instance.

28 IN OUT TCP_CB *Tcb
34 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
39 IN OUT TCP_CB *Tcb
45 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
50 IN OUT TCP_CB *Tcb
56 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
61 IN OUT TCP_CB *Tcb
67 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
72 IN OUT TCP_CB *Tcb
78 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
83 IN OUT TCP_CB *Tcb
98 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
103 IN OUT TCP_CB *Tcb
106 NetbufFreeList (&Tcb->SndQue);
107 NetbufFreeList (&Tcb->RcvQue);
109 TcpSetState (Tcb, TCP_CLOSED);
115 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
120 IN OUT TCP_CB *Tcb
128 if ((Tcb->LossTimes >= TCP_FOLD_RTT) && (Tcb->SRtt != 0)) {
129 Tcb->RttVar += Tcb->SRtt >> 2;
130 Tcb->SRtt = 0;
133 Tcb->Rto <<= 1;
135 if (Tcb->Rto < TCP_RTO_MIN) {
137 Tcb->Rto = TCP_RTO_MIN;
138 } else if (Tcb->Rto > TCP_RTO_MAX) {
140 Tcb->Rto = TCP_RTO_MAX;
147 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
152 IN OUT TCP_CB *Tcb
155 if (!TCP_CONNECTED (Tcb->State)) {
158 "TcpConnectTimeout: connection closed because conenction timer timeout for TCB %p\n",
159 Tcb)
162 if (EFI_ABORTED == Tcb->Sk->SockError) {
163 SOCK_ERROR (Tcb->Sk, EFI_TIMEOUT);
166 if (TCP_SYN_RCVD == Tcb->State) {
169 "TcpConnectTimeout: send reset because connection timer timeout for TCB %p\n",
170 Tcb)
173 TcpResetConnection (Tcb);
177 TcpClose (Tcb);
185 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
190 IN OUT TCP_CB *Tcb
197 "TcpRexmitTimeout: transmission timeout for TCB %p\n",
198 Tcb)
206 FlightSize = TCP_SUB_SEQ (Tcb->SndNxt, Tcb->SndUna);
207 Tcb->Ssthresh = MAX ((UINT32) (2 * Tcb->SndMss), FlightSize / 2);
209 Tcb->CWnd = Tcb->SndMss;
210 Tcb->LossRecover = Tcb->SndNxt;
212 Tcb->LossTimes++;
213 if ((Tcb->LossTimes > Tcb->MaxRexmit) && !TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_CONNECT)) {
217 "TcpRexmitTimeout: connection closed because too many timeouts for TCB %p\n",
218 Tcb)
221 if (EFI_ABORTED == Tcb->Sk->SockError) {
222 SOCK_ERROR (Tcb->Sk, EFI_TIMEOUT);
225 TcpClose (Tcb);
229 TcpBackoffRto (Tcb);
230 TcpRetransmit (Tcb, Tcb->SndUna);
231 TcpSetTimer (Tcb, TCP_TIMER_REXMIT, Tcb->Rto);
233 Tcb->CongestState = TCP_CONGEST_LOSS;
235 TCP_CLEAR_FLG (Tcb->CtrlFlag, TCP_CTRL_RTT_ON);
241 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
246 IN OUT TCP_CB *Tcb
255 if ((TcpDataToSend (Tcb, 1) != 0) && (TcpToSendData (Tcb, 1) > 0)) {
257 ASSERT (TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_REXMIT) != 0);
258 Tcb->ProbeTimerOn = FALSE;
262 TcpSendZeroProbe (Tcb);
263 TcpSetProbeTimer (Tcb);
269 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
274 IN OUT TCP_CB *Tcb
277 Tcb->KeepAliveProbes++;
282 if (Tcb->KeepAliveProbes > Tcb->MaxKeepAlive) {
284 if (EFI_ABORTED == Tcb->Sk->SockError) {
285 SOCK_ERROR (Tcb->Sk, EFI_TIMEOUT);
288 TcpClose (Tcb);
292 TcpSendZeroProbe (Tcb);
293 TcpSetKeepaliveTimer (Tcb);
299 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
304 IN OUT TCP_CB *Tcb
309 "TcpFinwait2Timeout: connection closed because FIN_WAIT2 timer timeouts for TCB %p\n",
310 Tcb)
313 TcpClose (Tcb);
319 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
324 IN OUT TCP_CB *Tcb
329 "Tcp2MSLTimeout: connection closed because TIME_WAIT timer timeouts for TCB %p\n",
330 Tcb)
333 TcpClose (Tcb);
340 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
345 IN OUT TCP_CB *Tcb
354 Tcb->NextExpire = TCP_EXPIRE_TIME;
355 TCP_CLEAR_FLG (Tcb->CtrlFlag, TCP_CTRL_TIMER_ON);
359 if (TCP_TIMER_ON (Tcb->EnabledTimer, Index) &&
360 TCP_TIME_LT (Tcb->Timer[Index], mTcpTick + Tcb->NextExpire)
363 Tcb->NextExpire = TCP_SUB_TIME (Tcb->Timer[Index], mTcpTick);
364 TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_TIMER_ON);
372 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
379 IN OUT TCP_CB *Tcb,
384 TCP_SET_TIMER (Tcb->EnabledTimer, Timer);
385 Tcb->Timer[Timer] = mTcpTick + TimeOut;
387 TcpUpdateTimer (Tcb);
393 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
399 IN OUT TCP_CB *Tcb,
403 TCP_CLEAR_TIMER (Tcb->EnabledTimer, Timer);
404 TcpUpdateTimer (Tcb);
410 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
415 IN OUT TCP_CB *Tcb
418 Tcb->EnabledTimer = 0;
419 TcpUpdateTimer (Tcb);
425 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
430 IN OUT TCP_CB *Tcb
433 if (!Tcb->ProbeTimerOn) {
434 Tcb->ProbeTime = Tcb->Rto;
435 Tcb->ProbeTimerOn = TRUE;
438 Tcb->ProbeTime <<= 1;
441 if (Tcb->ProbeTime < TCP_RTO_MIN) {
443 Tcb->ProbeTime = TCP_RTO_MIN;
444 } else if (Tcb->ProbeTime > TCP_RTO_MAX) {
446 Tcb->ProbeTime = TCP_RTO_MAX;
449 TcpSetTimer (Tcb, TCP_TIMER_PROBE, Tcb->ProbeTime);
455 @param[in, out] Tcb Pointer to the TCP_CB of this TCP instance.
460 IN OUT TCP_CB *Tcb
463 if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_NO_KEEPALIVE)) {
475 if (!TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_KEEPALIVE) ||
476 (Tcb->Idle < Tcb->KeepAliveIdle)
479 TcpSetTimer (Tcb, TCP_TIMER_KEEPALIVE, Tcb->KeepAliveIdle);
480 Tcb->KeepAliveProbes = 0;
484 TcpSetTimer (Tcb, TCP_TIMER_KEEPALIVE, Tcb->KeepAlivePeriod);
502 TCP_CB *Tcb;
515 Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
517 if (Tcb->State == TCP_CLOSED) {
523 if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_RTT_ON)) {
524 Tcb->RttMeasure++;
527 Tcb->Idle++;
529 if (Tcb->DelayedAck != 0) {
530 TcpSendAck (Tcb);
533 if (Tcb->IpInfo->IpVersion == IP_VERSION_6 && Tcb->Tick > 0) {
534 Tcb->Tick--;
540 if (!TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_TIMER_ON) || ((--Tcb->NextExpire) > 0)) {
550 if (TCP_TIMER_ON (Tcb->EnabledTimer, Index) && TCP_TIME_LEQ (Tcb->Timer[Index], mTcpTick)) {
555 TCP_CLEAR_TIMER (Tcb->EnabledTimer, Index);
556 mTcpTimerHandler[Index](Tcb);
559 // The Tcb may have been deleted by the timer, or
562 if ((Next->BackLink != Entry) || (Tcb->EnabledTimer == 0)) {
569 // If the Tcb still exist or some timer is set, update the timer
572 TcpUpdateTimer (Tcb);