Query Examples

Jim Reid jim at rfc1035.com
Mon Feb 14 19:39:27 UTC 2000


>>>>> "David" == David M Holmes <nospam_david_m_holmes at yahoo.com> writes:

    David> I'm a programmer trying to do host lookups for IP addresses
    David> like you can with nslookup. I need to do this within a
    David> program. I can connect to port 53 of a DNS server but I
    David> cannot find info on how the format or how to submit queries
    David> to the server. I've looked through the RFCs on DNS but only
    David> found server info. Anyone know where to find this info?

You couldn't have looked very hard. The format of DNS queries and
replies is defined in RC1035. Further RFCs describe the format of
newer resource records. There's also a good explanation of the DNS
packet format in "TCP/IP Illustrated Volume 1" by W. Richard
Stevens. And every UNIX system comes with man pages that describe the
resolver API. These are also in the man directory that can be found in
the doc tarball of BIND8.



More information about the bind-users mailing list