mIter = PR_EnumerateAddrInfo(mIter, mAddrInfo->get(), port, addr);
if (mHostRecord->addrinfo) { mIter = PR_EnumerateAddrInfo(mIter, mHostRecord->addrinfo, port, addr); if (!mIter) return NS_ERROR_NOT_AVAILABLE; } else { mIter = nsnull; NS_ASSERTION(mHostRecord->addr, "no addr"); memcpy(addr, mHostRecord->addr, sizeof(PRNetAddr));  port = PR_htons(port); if (addr->raw.family == PR_AF_INET) addr->inet.port = port; else addr->ipv6.port = port; }
nsDNSRecord::GetNextAddr(PRUint16 port, PRNetAddr *addr){    NS_ENSURE_TRUE(mAddrInfo, NS_ERROR_NOT_AVAILABLE);    // not a programming error to poke the DNS record when it has    // no more entries.  just silently fail.  this enables consumers    // to enumerate the DNS record without calling HasMore.    if (mDone)        return NS_ERROR_NOT_AVAILABLE;    mIter = PR_EnumerateAddrInfo(mIter, mAddrInfo->get(), port, addr);    mDone = !mIter;    return NS_OK; }