/* Release the resource in the prefix list table, and destroy the list entry and corresponding addresses or route entries. */
VOID Ip6CleanPrefixListTable(IN IP6_SERVICE *IpSb, IN LIST_ENTRY *ListHead)
/* Release the resource in the prefix list table, and destroy the list entry and corresponding addresses or route entries. */
VOID Ip6CleanPrefixListTable(IN IP6_SERVICE *IpSb, IN LIST_ENTRY *ListHead)
{
  IP6_PREFIX_LIST_ENTRY  *PrefixList;
  BOOLEAN                OnLink;
  OnLink = (BOOLEAN)(ListHead == &IpSb->OnlinkPrefix);
  while (!IsListEmpty (ListHead)) {
    PrefixList = NET_LIST_HEAD (ListHead, IP6_PREFIX_LIST_ENTRY, Link);
    Ip6DestroyPrefixListEntry (IpSb, PrefixList, OnLink, TRUE);
  }
}