internal static InternalIPAddressCollection MarshalIpAddressCollection(IntPtr ptr)
            {
                InternalIPAddressCollection addressList = new InternalIPAddressCollection();

                IpAdapterAddress *pIpAdapterAddress = (IpAdapterAddress *)ptr;

                while (pIpAdapterAddress != null)
                {
                    addressList.InternalAdd(pIpAdapterAddress->address.MarshalIPAddress());
                    pIpAdapterAddress = pIpAdapterAddress->next;
                }

                return(addressList);
            }
            internal static InternalIPAddressCollection MarshalIpAddressCollection(IntPtr ptr)
            {
                InternalIPAddressCollection addressList = new InternalIPAddressCollection();

                while (ptr != IntPtr.Zero)
                {
                    IpAdapterAddress addressStructure = Marshal.PtrToStructure <IpAdapterAddress>(ptr);
                    IPAddress        address          = addressStructure.address.MarshalIPAddress();
                    addressList.InternalAdd(address);

                    ptr = addressStructure.next;
                }

                return(addressList);
            }