/* Get the next buffer block in the specific socket buffer. */
NET_BUF* SockBufNext(IN SOCK_BUFFER *Sockbuf, IN NET_BUF *SockEntry)
/* Get the next buffer block in the specific socket buffer. */
NET_BUF* SockBufNext(IN SOCK_BUFFER *Sockbuf, IN NET_BUF *SockEntry)
{
  LIST_ENTRY  *NetbufList;
  NetbufList = &(Sockbuf->DataQueue->BufList);
  if ((SockEntry->List.ForwardLink == NetbufList) ||
      (SockEntry->List.BackLink == &SockEntry->List) ||
      (SockEntry->List.ForwardLink == &SockEntry->List)
      )
  {
    return NULL;
  }
  return NET_LIST_USER_STRUCT (SockEntry->List.ForwardLink, NET_BUF, List);
}