/* Verify that all the segments in SndQue are in good shape. */
INTN TcpCheckSndQue(IN LIST_ENTRY *Head)
/* Verify that all the segments in SndQue are in good shape. */
INTN TcpCheckSndQue(IN LIST_ENTRY *Head)
{
  LIST_ENTRY  *Entry;
  NET_BUF     *Nbuf;
  TCP_SEQNO   Seq;
  if (IsListEmpty (Head)) {
    return 1;
  }
  Entry = Head->ForwardLink;
  Nbuf  = NET_LIST_USER_STRUCT (Entry, NET_BUF, List);
  Seq   = TCPSEG_NETBUF (Nbuf)->Seq;
  NET_LIST_FOR_EACH (Entry, Head) {
    Nbuf = NET_LIST_USER_STRUCT (Entry, NET_BUF, List);
    if (TcpVerifySegment (Nbuf) == 0) {
      return 0;
    }
    if (Seq != TCPSEG_NETBUF (Nbuf)->Seq) {
      return 0;
    }
    Seq = TCPSEG_NETBUF (Nbuf)->End;
  }
  return 1;
}