コード例 #1
0
    // Token: 0x06000192 RID: 402 RVA: 0x00009628 File Offset: 0x00007828
    private IPAddress[] method_57(string string_2, IPAddress ipaddress_1)
    {
        List <IPAddress> list = new List <IPAddress>();

        Client.Struct1 @struct = this.method_58(ipaddress_1);
        short          short_  = 1;
        int            int_    = 72;
        IntPtr         zero    = IntPtr.Zero;
        IntPtr         ptr;

        if (Client.DnsQuery_A(string_2, short_, int_, ref @struct, ref ptr, ref zero) == 0)
        {
            Client.DnsRecord dnsRecord_ = (Client.DnsRecord)Marshal.PtrToStructure(ptr, typeof(Client.DnsRecord));
            IPAddress        ipaddress  = this.method_59(dnsRecord_);
            if (ipaddress != IPAddress.None)
            {
                list.Add(ipaddress);
            }
            while (!(dnsRecord_.intptr_0 == IntPtr.Zero))
            {
                dnsRecord_ = (Client.DnsRecord)Marshal.PtrToStructure(dnsRecord_.intptr_0, typeof(Client.DnsRecord));
                ipaddress  = this.method_59(dnsRecord_);
                if (ipaddress != IPAddress.None)
                {
                    list.Add(ipaddress);
                }
            }
        }
        return(list.ToArray());
    }
コード例 #2
0
 private static extern int DnsQuery_A(string string_2, short short_0, int int_8, ref Client.Struct1 struct1_0, ref IntPtr intptr_0, ref IntPtr intptr_1);