예제 #1
0
/**
  Flush the Tcb add its associated protocols.

  @param  Tcb                    Pointer to the TCP_CB to be flushed.

**/
VOID
Tcp4FlushPcb (
  IN TCP_CB *Tcb
  )
{
  SOCKET           *Sock;

  IpIoConfigIp (Tcb->IpInfo, NULL);

  Sock     = Tcb->Sk;

  if (SOCK_IS_CONFIGURED (Sock)) {
    RemoveEntryList (&Tcb->List);

    //
    // Uninstall the device path protocol.
    //
    if (Sock->DevicePath != NULL) {
      gBS->UninstallProtocolInterface (
             Sock->SockHandle,
             &gEfiDevicePathProtocolGuid,
             Sock->DevicePath
             );
      FreePool (Sock->DevicePath);
    }
  }

  NetbufFreeList (&Tcb->SndQue);
  NetbufFreeList (&Tcb->RcvQue);
  Tcb->State = TCP_CLOSED;
}
예제 #2
0
/**
  Flush the Tcb add its associated protocols.

  @param  Tcb                    Pointer to the TCP_CB to be flushed.

**/
VOID
Tcp4FlushPcb (
  IN TCP_CB *Tcb
  )
{
  SOCKET           *Sock;
  TCP4_PROTO_DATA  *TcpProto;

  IpIoConfigIp (Tcb->IpInfo, NULL);

  Sock     = Tcb->Sk;
  TcpProto = (TCP4_PROTO_DATA *) Sock->ProtoReserved;

  if (SOCK_IS_CONFIGURED (Sock)) {
    RemoveEntryList (&Tcb->List);

    //
    // Uninstall the device path protocol.
    //
    if (Sock->DevicePath != NULL) {
      gBS->UninstallProtocolInterface (
             Sock->SockHandle,
             &gEfiDevicePathProtocolGuid,
             Sock->DevicePath
             );
      FreePool (Sock->DevicePath);
    }

    TcpSetVariableData (TcpProto->TcpService);
  }

  NetbufFreeList (&Tcb->SndQue);
  NetbufFreeList (&Tcb->RcvQue);
  Tcb->State = TCP_CLOSED;
}
예제 #3
0
파일: Tcp4Timer.c 프로젝트: MattDevo/edk2
/**
  Close the TCP connection.

  @param  Tcb      Pointer to the TCP_CB of this TCP instance.

**/
VOID
TcpClose (
  IN OUT TCP_CB *Tcb
  )
{
  NetbufFreeList (&Tcb->SndQue);
  NetbufFreeList (&Tcb->RcvQue);

  TcpSetState (Tcb, TCP_CLOSED);
}
예제 #4
0
파일: HttpsSupport.c 프로젝트: baranee/edk2
/**
  The callback function to free the net buffer list.

  @param[in]  Arg The opaque parameter.

**/
VOID
EFIAPI
FreeNbufList (
  IN VOID *Arg
  )
{
  ASSERT (Arg != NULL);

  NetbufFreeList ((LIST_ENTRY *) Arg);
  FreePool (Arg);
}