/* Send a zero probe segment. It can be used by keepalive and zero window probe. */
INTN TcpSendZeroProbe(IN OUT TCP_CB *Tcb)
/* Send a zero probe segment. It can be used by keepalive and zero window probe. */
INTN TcpSendZeroProbe(IN OUT TCP_CB *Tcb)
{
  NET_BUF  *Nbuf;
  TCP_SEG  *Seg;
  INTN     Result;
  Nbuf = NetbufAlloc (TCP_MAX_HEAD);
  if (Nbuf == NULL) {
    return -1;
  }
  NetbufReserve (Nbuf, TCP_MAX_HEAD);
  Seg       = TCPSEG_NETBUF (Nbuf);
  Seg->Seq  = Tcb->SndNxt - 1;
  Seg->End  = Tcb->SndNxt - 1;
  Seg->Flag = TCP_FLG_ACK;
  Result = TcpTransmitSegment (Tcb, Nbuf);
  NetbufFree (Nbuf);
  return Result;
}