all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Asynchronous DNS resolving
Date: Sun, 15 Feb 2015 16:31:39 +1100	[thread overview]
Message-ID: <87fva7bv0k.fsf@building.gnus.org> (raw)
In-Reply-To: <87y4o2mbfp.fsf@building.gnus.org> (Lars Ingebrigtsen's message of "Fri, 13 Feb 2015 20:02:18 +1100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Can't you simulate async resolution with timers?  Or even by opening a
>> network-process to the DNS server and talking to it directly (which
>> can be done asynchronously with filters and sentinels and stuff)?
>
> That's what dns.el does, but it suffers from not having access to
> OS-level funky stuff like possible local caching, and the general
> difficulty of getting at the current DNS setup on modern machines.
>
> Using the C-level resolution functions is the safest best, since libc is
> really the authority here...

Although using getaddrinfo_a is best, a thought just occurred to me: The
main problem with dns.el is that it's not very good at getting the IP
address of the domain name server it's supposed to talk to.  (Talking
DNS itself is really easy.)

So if we added a `get-domain-name-server-addresses' C-level function, dns.el
could use that, and it'd work more reliably.  (That function would
basically just call res_init and then return the list of IP addresses.)

dns.el is currently mostly used to do reverse resolving of IP addresses
for display purposes in Gnus, so this would be a win even if we don't
use dns.el for forward resolution.  (But we could on systems without
getaddrinfo_a, if we wanted.)

Would anybody mind if I add the `get-domain-name-server-addresses'
function?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



      reply	other threads:[~2015-02-15  5:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13  7:10 Asynchronous DNS resolving Lars Ingebrigtsen
2015-02-13  7:21 ` Paul Eggert
2015-02-13  7:32   ` Lars Ingebrigtsen
2015-02-13  7:58     ` Paul Eggert
2015-02-13 19:20     ` Stefan Monnier
2015-02-14  0:06       ` chad
2015-02-14  3:44       ` Lars Ingebrigtsen
2015-02-14  6:20         ` Paul Eggert
2015-02-15  4:54           ` Lars Ingebrigtsen
2015-02-13  8:46 ` Eli Zaretskii
2015-02-13  9:02   ` Lars Ingebrigtsen
2015-02-15  5:31     ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fva7bv0k.fsf@building.gnus.org \
    --to=larsi@gnus.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.