Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > DNS

    dns.c 20120805

    Download button

    No screenshots available
    Downloads: 1,174  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    William Ahern | More programs
    Freeware / FREE
    August 8th, 2012, 14:34 GMT [view history]
    ROOT / Internet / DNS

     Read user reviews (0)  Refer to a friend  Subscribe

    dns.c description

    A recursive, reentrant DNS Resolver

    dns.c is a reentrant, recursive and non-blocking DNS resolver library that resides in a sincle .c file. Also works great as a stub resolver.

    Core API built around actual DNS packet; as generic as DNS itself. This makes querying and manipulating records other than A, AAAA, and PTR much easier.

    Restartable record iterators with user-specified sorting. Iterating over MX or SRV records in semantic order (i.e. preference and priority) is as simple as:

    dns_rr_foreach(&rr, packet, .type = DNS_T_SRV, .sort = &dns_rr_i_order) {
      ...
    }


    Or in a restartable manner:

    switch (my->state) {
    case 0:
      dns_rr_i_init(&my->rr_i);
      my->rr_i.type = DNS_T_SRV;
      my->rr_i.sort = &dns_rr_i_order;
      my->state++;
    case 1:
      while (dns_rr_grep(&rr, 1, &my->rr_i, my->packet, &error)) {
        ...
        /* return into event loop */
      }
    }


    Supports "smart" queries. When enabled in the core resolver, queries for NS, MX, and SRV records will always attempt to resolve the RDATA canonical host name into an A record. Hosts which are not in-bailiwick and/or for which the authoritative server does not provide glue are automagically resolved and returned in the answer packet. Supported for both stub and recursive resolver instantiations. "Smart" resolution is also built into the address info (i.e. getaddrinfo()) API.

    Randomized source ports and QIDs.

    Non-blocking, re-entrant, iterator-based getaddrinfo() interface: dns_ai_open(), dns_ai_nextent(), dns_ai_close(). Semantically just like getaddrinfo(), but also takes a record type. Iterate over (struct addrinfo) objects even when querying an MX, NS, SRV (et al) host. There is less latency doing "smart" queries this way, since any necessary recursion can be postponed (and in all likelihood won't be necessary, since the first host is likely sufficient).


    Product's homepage

    What's New in This Release: [ read full changelog ]

    · Fix bug where dns_srv_print() failed to print a trailing NUL character.

      


    TAGS:

    DNS resolver | recursive DNS | reentrant | recursive | DNS

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM