Re: Query a DNS in C

phil-news-nospam_at_ipal.net
Date: 04/17/04


Date: 17 Apr 2004 15:36:29 GMT

On 14 Apr 2004 21:08:00 GMT Jens.Toerring@physik.fu-berlin.de wrote:

| If it's just that the OP can have my code for whatever it's worth - it's
| supposed to take the name of the machine to send mail to (plus the name
| of the local machine) as input arguments and then to return the names of
| the machines prepared to accept mail for the remote machine successively
| (in order of priority). It doesn't do the talking with the DNS server
| directly, that's handled via the res_xxx() and dn_xxx() functions from
| libresolv, it just tries to make sense out of the DNS servers reply. So
| if the Christian is interested my email address isn't munged (just don't
| send me HTML formated mails, they tend to go to /dev/null directly).

Do you know of a library which can assist in doing the DNS queries in a
non-blocking way? It would be such that during any number of outstanding
queries, the process can continue to do other things, or wait in parallel
for these answers and other things it is waiting for. I would envision
(since I am thinking of writing my own if no good one can be found) that
such a library would have functions to set up a proper socket on which to
do waits (select or poll), functions to construct queries, a function to
do a non-blocking read/receive for any waiting answers, and functions to
take apart the answers.

-- 
-----------------------------------------------------------------------------
| Phil Howard KA9WGN       | http://linuxhomepage.com/      http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/   http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


Relevant Pages

  • RE: DNS forwarders
    ... Remove the ISP forwarder entries from all the remote sites and replace ... thereby limiting DNS server exposure to the Internet. ... all of the external DNS queries in the network are resolved through it. ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.dns)
  • Re: Named requests filling up T1
    ... Looks like someone is spamming your DNS server with queries. ... If the answer to 1) is NO, then there's no reason for these queries to be ... directed to your DNS server from the Internet. ...
    (freebsd-hackers)
  • Re: My understanding of iterative vs. recursive DNS queries
    ... My understanding of iterative vs. recursive DNS queries is as follows. ... performed by a DNS server simply go to the first DNS ... With a recursive name query, the DNS client requires that the DNS server respond to the client ... ... A query can be resolved from its cache where no recursion involved ...
    (microsoft.public.windows.server.dns)
  • FW: [Full-Disclosure] Question for DNS pros
    ... It seems to me you could do this without setting up a dns server. ... then you'll be able to tell if the queries are all for one specific domain ... call them and they fix the typo. ... Charter: http://lists.netsys.com/full-disclosure-charter.html ...
    (Full-Disclosure)
  • Re: FreeBSD, PostgreSQL, semwait and sbwait!
    ... > We're having a substantial problem with our FreeBSD 5.2 database server ... > queries per second), but queries are slow, and it's seemingly waiting on ... To unsubscribe, ...
    (freebsd-performance)