/* Build and send a ACK packet for the download session. */
EFI_STATUS Mtftp4RrqSendAck(IN MTFTP4_PROTOCOL *Instance, IN UINT16 BlkNo)
/* Build and send a ACK packet for the download session. */
EFI_STATUS Mtftp4RrqSendAck(IN MTFTP4_PROTOCOL *Instance, IN UINT16 BlkNo)
{
  EFI_MTFTP4_PACKET  *Ack;
  NET_BUF            *Packet;
  EFI_STATUS         Status;
  Status = EFI_SUCCESS;
  Packet = NetbufAlloc (sizeof (EFI_MTFTP4_ACK_HEADER));
  if (Packet == NULL) {
    return EFI_OUT_OF_RESOURCES;
  }
  Ack = (EFI_MTFTP4_PACKET *)NetbufAllocSpace (
                               Packet,
                               sizeof (EFI_MTFTP4_ACK_HEADER),
                               FALSE
                               );
  ASSERT (Ack != NULL);
  Ack->Ack.OpCode   = HTONS (EFI_MTFTP4_OPCODE_ACK);
  Ack->Ack.Block[0] = HTONS (BlkNo);
  Status = Mtftp4SendPacket (Instance, Packet);
  if (!EFI_ERROR (Status)) {
    Instance->AckedBlock = Instance->TotalBlock;
  }
  return Status;
}