emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ai_flags in calls to getaddrinfo


From: Eli Zaretskii
Subject: Re: ai_flags in calls to getaddrinfo
Date: Sun, 03 Jan 2021 18:00:41 +0200

> From: Robin Tarsiger <rtt@dasyatidae.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 31 Dec 2020 16:40:18 -0600
> 
> does it happen with all names, including for instance "he.net" or
> "ipv6.google.com"

It does:

  With AI_ALL and AI_V4MAPPED flags:

    (network-lookup-address-info "he.net")
      => ([216 218 236 2 0] [8193 1136 0 1283 0 0 0 2 0])

    (network-lookup-address-info "he.net" 'ipv6)
      => ([0 0 0 0 0 65535 55514 60418 0])

    (network-lookup-address-info "ipv6.google.com")
      => nil: WSANO_DATA error

    (network-lookup-address-info "ipv6.google.com" 'ipv6)
      => nil: WSAHOST_NOT_FOUND error

  Without the AI_* flags:

    (network-lookup-address-info "he.net")
      => ([216 218 236 2 0])

    (network-lookup-address-info "he.net" 'ipv6)
      => nil: WSANO_DATA error

    (network-lookup-address-info "ipv6.google.com")
      => nil: WSAHOST_NOT_FOUND error

    (network-lookup-ddress-info "ipv6.google.com" 'ipv6)
      => nil: WSANO_DATA error

Note the difference in he.net resolution with and without the 'ipv6
argument, and also the behavior of ipv6.google.com with the ipv6
argument.  Interesting, no?

>  What about "localhost"?

As I said, localhost works the same with and without the AI_* flags.
I get:

  (network-lookup-address-info "localhost")
    => ([0 0 0 0 0 0 0 1 0] [127 0 0 1 0])

  (network-lookup-address-info "localhost" 'ipv6)
    => ([0 0 0 0 0 0 0 1 0])

> >> Does it have any IPv6 addresses configured, or no? What is
> >> its resolver configuration like?
> > 
> > No idea.  If you tell me how to find out, I will try.  This system is
> > behind firewalls up the kazoo, so it could be something essential for
> > IPv6 DNS is blocked or intentionally disabled.
> 
> If you run 'ipconfig/all' from a command line (which, if you are not
> familiar, you can launch by running 'cmd' from the 'Run' dialog,
> which in turn can be accessed through the Windows+R shortcut), it
> should display a bunch of information about active network connections,
> including local IP addresses and DNS resolver addresses.

Here's the result, with some fields redacted:

  Windows IP Configuration

     Host Name . . . . . . . . . . . . : (redacted)
     Primary Dns Suffix  . . . . . . . : (redacted)
     Node Type . . . . . . . . . . . . : Hybrid
     IP Routing Enabled. . . . . . . . : No
     WINS Proxy Enabled. . . . . . . . : No
     DNS Suffix Search List. . . . . . : (redacted)

  Ethernet adapter Ethernet:

     Connection-specific DNS Suffix  . : (redacted)
     Description . . . . . . . . . . . : Realtek PCIe GbE Family Controller
     Physical Address. . . . . . . . . : 6C-4B-90-A3-36-AB
     DHCP Enabled. . . . . . . . . . . : Yes
     Autoconfiguration Enabled . . . . : Yes
     Link-local IPv6 Address . . . . . : fe80::e855:89df:21cc:1554%7(Preferred)
     IPv4 Address. . . . . . . . . . . : 10.99.32.1(Preferred)
     Subnet Mask . . . . . . . . . . . : 255.255.252.0
     Lease Obtained. . . . . . . . . . : Sun 27 Dec 2020 09:20:18
     Lease Expires . . . . . . . . . . : Wed 06 Jan 2021 21:20:19
     Default Gateway . . . . . . . . . : 10.99.35.254
     DHCP Server . . . . . . . . . . . : 10.1.20.36
     DHCPv6 IAID . . . . . . . . . . . : 107760528
     DHCPv6 Client DUID. . . . . . . . : 
00-01-00-01-25-C0-F1-1B-6C-4B-90-A3-36-AB

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]