Lines Matching refs:TcpIo
137 OUT TCP_IO *TcpIo in TcpIoCreateSocket() argument
154 if ((Image == NULL) || (Controller == NULL) || (ConfigData == NULL) || (TcpIo == NULL)) { in TcpIoCreateSocket()
161 ZeroMem (TcpIo, sizeof (TCP_IO)); in TcpIoCreateSocket()
166 Interface = (VOID **) (&TcpIo->Tcp.Tcp4); in TcpIoCreateSocket()
170 Interface = (VOID **) (&TcpIo->Tcp.Tcp6); in TcpIoCreateSocket()
175 TcpIo->TcpVersion = TcpVersion; in TcpIoCreateSocket()
184 &TcpIo->Handle in TcpIoCreateSocket()
191 TcpIo->Handle, in TcpIoCreateSocket()
203 Tcp4 = TcpIo->Tcp.Tcp4; in TcpIoCreateSocket()
205 Tcp6 = TcpIo->Tcp.Tcp6; in TcpIoCreateSocket()
208 TcpIo->Image = Image; in TcpIoCreateSocket()
209 TcpIo->Controller = Controller; in TcpIoCreateSocket()
319 &TcpIo->IsConnDone, in TcpIoCreateSocket()
326 TcpIo->ConnToken.Tcp4Token.CompletionToken.Event = Event; in TcpIoCreateSocket()
332 &TcpIo->IsListenDone, in TcpIoCreateSocket()
339 TcpIo->ListenToken.Tcp4Token.CompletionToken.Event = Event; in TcpIoCreateSocket()
345 &TcpIo->IsTxDone, in TcpIoCreateSocket()
352 TcpIo->TxToken.Tcp4Token.CompletionToken.Event = Event; in TcpIoCreateSocket()
359 &TcpIo->IsRxDone, in TcpIoCreateSocket()
366 TcpIo->RxToken.Tcp4Token.CompletionToken.Event = Event; in TcpIoCreateSocket()
374 TcpIo->RxToken.Tcp4Token.Packet.RxData = RxData; in TcpIoCreateSocket()
380 &TcpIo->IsCloseDone, in TcpIoCreateSocket()
387 TcpIo->CloseToken.Tcp4Token.CompletionToken.Event = Event; in TcpIoCreateSocket()
394 TcpIoDestroySocket (TcpIo); in TcpIoCreateSocket()
408 IN TCP_IO *TcpIo in TcpIoDestroySocket() argument
419 if (TcpIo == NULL) { in TcpIoDestroySocket()
423 TcpVersion = TcpIo->TcpVersion; in TcpIoDestroySocket()
429 Event = TcpIo->ConnToken.Tcp4Token.CompletionToken.Event; in TcpIoDestroySocket()
435 Event = TcpIo->ListenToken.Tcp4Token.CompletionToken.Event; in TcpIoDestroySocket()
441 Event = TcpIo->TxToken.Tcp4Token.CompletionToken.Event; in TcpIoDestroySocket()
447 Event = TcpIo->RxToken.Tcp4Token.CompletionToken.Event; in TcpIoDestroySocket()
453 Event = TcpIo->CloseToken.Tcp4Token.CompletionToken.Event; in TcpIoDestroySocket()
459 if (TcpIo->RxToken.Tcp4Token.Packet.RxData != NULL) { in TcpIoDestroySocket()
460 FreePool (TcpIo->RxToken.Tcp4Token.Packet.RxData); in TcpIoDestroySocket()
470 Tcp4 = TcpIo->Tcp.Tcp4; in TcpIoDestroySocket()
477 Tcp6 = TcpIo->Tcp.Tcp6; in TcpIoDestroySocket()
486 TcpIo->Handle, in TcpIoDestroySocket()
488 TcpIo->Image, in TcpIoDestroySocket()
489 TcpIo->Controller in TcpIoDestroySocket()
495 if (TcpIo->IsListenDone) { in TcpIoDestroySocket()
497 Tcp4 = TcpIo->NewTcp.Tcp4; in TcpIoDestroySocket()
500 ChildHandle = TcpIo->ListenToken.Tcp4Token.NewChildHandle; in TcpIoDestroySocket()
503 Tcp6 = TcpIo->NewTcp.Tcp6; in TcpIoDestroySocket()
506 ChildHandle = TcpIo->ListenToken.Tcp6Token.NewChildHandle; in TcpIoDestroySocket()
515 TcpIo->Image, in TcpIoDestroySocket()
516 TcpIo->Controller in TcpIoDestroySocket()
522 TcpIo->Controller, in TcpIoDestroySocket()
523 TcpIo->Image, in TcpIoDestroySocket()
525 TcpIo->Handle in TcpIoDestroySocket()
548 IN OUT TCP_IO *TcpIo, in TcpIoConnect() argument
556 if ((TcpIo == NULL) || (TcpIo->Tcp.Tcp4 == NULL)) { in TcpIoConnect()
560 TcpIo->IsConnDone = FALSE; in TcpIoConnect()
565 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoConnect()
566 Tcp4 = TcpIo->Tcp.Tcp4; in TcpIoConnect()
567 Status = Tcp4->Connect (Tcp4, &TcpIo->ConnToken.Tcp4Token); in TcpIoConnect()
568 } else if (TcpIo->TcpVersion == TCP_VERSION_6) { in TcpIoConnect()
569 Tcp6 = TcpIo->Tcp.Tcp6; in TcpIoConnect()
570 Status = Tcp6->Connect (Tcp6, &TcpIo->ConnToken.Tcp6Token); in TcpIoConnect()
579 while (!TcpIo->IsConnDone && EFI_ERROR (gBS->CheckEvent (Timeout))) { in TcpIoConnect()
580 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoConnect()
587 if (!TcpIo->IsConnDone) { in TcpIoConnect()
590 Status = TcpIo->ConnToken.Tcp4Token.CompletionToken.Status; in TcpIoConnect()
617 IN OUT TCP_IO *TcpIo, in TcpIoAccept() argument
626 if ((TcpIo == NULL) || (TcpIo->Tcp.Tcp4 == NULL)) { in TcpIoAccept()
630 TcpIo->IsListenDone = FALSE; in TcpIoAccept()
635 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoAccept()
636 Tcp4 = TcpIo->Tcp.Tcp4; in TcpIoAccept()
637 Status = Tcp4->Accept (Tcp4, &TcpIo->ListenToken.Tcp4Token); in TcpIoAccept()
638 } else if (TcpIo->TcpVersion == TCP_VERSION_6) { in TcpIoAccept()
639 Tcp6 = TcpIo->Tcp.Tcp6; in TcpIoAccept()
640 Status = Tcp6->Accept (Tcp6, &TcpIo->ListenToken.Tcp6Token); in TcpIoAccept()
649 while (!TcpIo->IsListenDone && EFI_ERROR (gBS->CheckEvent (Timeout))) { in TcpIoAccept()
650 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoAccept()
657 if (!TcpIo->IsListenDone) { in TcpIoAccept()
660 Status = TcpIo->ListenToken.Tcp4Token.CompletionToken.Status; in TcpIoAccept()
668 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoAccept()
675 TcpIo->ListenToken.Tcp4Token.NewChildHandle, in TcpIoAccept()
677 (VOID **) (&TcpIo->NewTcp.Tcp4), in TcpIoAccept()
678 TcpIo->Image, in TcpIoAccept()
679 TcpIo->Controller, in TcpIoAccept()
697 IN OUT TCP_IO *TcpIo in TcpIoReset() argument
704 if ((TcpIo == NULL) || (TcpIo->Tcp.Tcp4 == NULL)) { in TcpIoReset()
708 TcpIo->IsCloseDone = FALSE; in TcpIoReset()
712 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoReset()
713 TcpIo->CloseToken.Tcp4Token.AbortOnClose = TRUE; in TcpIoReset()
714 Tcp4 = TcpIo->Tcp.Tcp4; in TcpIoReset()
715 Status = Tcp4->Close (Tcp4, &TcpIo->CloseToken.Tcp4Token); in TcpIoReset()
716 } else if (TcpIo->TcpVersion == TCP_VERSION_6) { in TcpIoReset()
717 TcpIo->CloseToken.Tcp6Token.AbortOnClose = TRUE; in TcpIoReset()
718 Tcp6 = TcpIo->Tcp.Tcp6; in TcpIoReset()
719 Status = Tcp6->Close (Tcp6, &TcpIo->CloseToken.Tcp6Token); in TcpIoReset()
728 while (!TcpIo->IsCloseDone) { in TcpIoReset()
729 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoReset()
756 IN TCP_IO *TcpIo, in TcpIoTransmit() argument
766 if ((TcpIo == NULL) || (TcpIo->Tcp.Tcp4 == NULL)|| (Packet == NULL)) { in TcpIoTransmit()
770 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoTransmit()
774 } else if (TcpIo->TcpVersion == TCP_VERSION_6) { in TcpIoTransmit()
808 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoTransmit()
809 TcpIo->TxToken.Tcp4Token.Packet.TxData = (EFI_TCP4_TRANSMIT_DATA *) Data; in TcpIoTransmit()
810 Tcp4 = TcpIo->Tcp.Tcp4; in TcpIoTransmit()
811 if (TcpIo->IsListenDone) { in TcpIoTransmit()
812 Tcp4 = TcpIo->NewTcp.Tcp4; in TcpIoTransmit()
819 Status = Tcp4->Transmit (Tcp4, &TcpIo->TxToken.Tcp4Token); in TcpIoTransmit()
821 TcpIo->TxToken.Tcp6Token.Packet.TxData = (EFI_TCP6_TRANSMIT_DATA *) Data; in TcpIoTransmit()
822 Tcp6 = TcpIo->Tcp.Tcp6; in TcpIoTransmit()
823 if (TcpIo->IsListenDone) { in TcpIoTransmit()
824 Tcp6 = TcpIo->NewTcp.Tcp6; in TcpIoTransmit()
831 Status = Tcp6->Transmit (Tcp6, &TcpIo->TxToken.Tcp6Token); in TcpIoTransmit()
838 while (!TcpIo->IsTxDone) { in TcpIoTransmit()
839 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoTransmit()
846 TcpIo->IsTxDone = FALSE; in TcpIoTransmit()
847 Status = TcpIo->TxToken.Tcp4Token.CompletionToken.Status; in TcpIoTransmit()
877 IN OUT TCP_IO *TcpIo, in TcpIoReceive() argument
891 if ((TcpIo == NULL) || (TcpIo->Tcp.Tcp4 == NULL)|| (Packet == NULL)) { in TcpIoReceive()
895 RxData = TcpIo->RxToken.Tcp4Token.Packet.RxData; in TcpIoReceive()
903 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoReceive()
904 Tcp4 = TcpIo->Tcp.Tcp4; in TcpIoReceive()
906 if (TcpIo->IsListenDone) { in TcpIoReceive()
907 Tcp4 = TcpIo->NewTcp.Tcp4; in TcpIoReceive()
914 } else if (TcpIo->TcpVersion == TCP_VERSION_6) { in TcpIoReceive()
915 Tcp6 = TcpIo->Tcp.Tcp6; in TcpIoReceive()
917 if (TcpIo->IsListenDone) { in TcpIoReceive()
918 Tcp6 = TcpIo->NewTcp.Tcp6; in TcpIoReceive()
949 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoReceive()
950 Status = Tcp4->Receive (Tcp4, &TcpIo->RxToken.Tcp4Token); in TcpIoReceive()
952 Status = Tcp6->Receive (Tcp6, &TcpIo->RxToken.Tcp6Token); in TcpIoReceive()
959 while (!TcpIo->IsRxDone && ((Timeout == NULL) || EFI_ERROR (gBS->CheckEvent (Timeout)))) { in TcpIoReceive()
963 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoReceive()
970 if (!TcpIo->IsRxDone) { in TcpIoReceive()
974 if (TcpIo->TcpVersion == TCP_VERSION_4) { in TcpIoReceive()
975 Tcp4->Cancel (Tcp4, &TcpIo->RxToken.Tcp4Token.CompletionToken); in TcpIoReceive()
977 Tcp6->Cancel (Tcp6, &TcpIo->RxToken.Tcp6Token.CompletionToken); in TcpIoReceive()
983 TcpIo->IsRxDone = FALSE; in TcpIoReceive()
986 Status = TcpIo->RxToken.Tcp4Token.CompletionToken.Status; in TcpIoReceive()