DNSQUERY(1) BSD Reference Manual DNSQUERY(1) NNAAMMEE ddnnssqquueerryy - query domain name servers using resolver SSYYNNOOPPSSIISS ddnnssqquueerryy [--nn _n_a_m_e_s_e_r_v_e_r] [--tt _t_y_p_e] [--cc _c_l_a_s_s] [--rr _r_e_t_r_y] [--pp _p_e_r_i_o_d] [--dd] [--ss] [--vv] _h_o_s_t DDEESSCCRRIIPPTTIIOONN The ddnnssqquueerryy program is a general interface to nameservers via BIND re- solver library calls. The program supports queries to the nameserver with an opcode of QUERY. This program is intended to be a replacement or supplement to programs like nstest, nsquery and nslookup. All arguments except for _h_o_s_t and _n_a_m_e_s_e_r_v_e_r are treated without case-sensitivity. OOPPTTIIOONNSS --nn _n_a_m_e_s_e_r_v_e_r The nameserver to be used in the query. Nameservers can ap- pear as either Internet addresses of the form _w_._x_._y_._z or can appear as domain names. (Default: as specified in _/_e_t_c_/_r_e_s_o_l_v_._c_o_n_f.) --tt _t_y_p_e The type of resource record of interest. Types include: _A address _N_S nameserver _C_N_A_M_E canonical name _P_T_R domain name pointer _S_O_A start of authority _W_K_S well-known service _H_I_N_F_O host information _M_I_N_F_O mailbox information _M_X mail exchange _R_P responsible person _M_G mail group member _A_F_S_D_B DCE or AFS server _A_N_Y wildcard Note that any case may be used. (Default: _A_N_Y.) --cc _c_l_a_s_s The class of resource records of interest. Classes include: _I_N Internet _H_S Hesiod _C_H_A_O_S Chaos _A_N_Y wildcard Note that any case may be used. (Default: _I_N.) --rr _r_e_t_r_y The number of times to retry if the nameserver is not re- sponding. (Default: 4.) --pp _p_e_r_i_o_d Period to wait before timing out. (Default: RES_TIMEOUT.) --dd Turn on debugging. This sets the RES_DEBUG bit of the re- solver's _o_p_t_i_o_n_s field. (Default: no debugging.) --ss Use a _s_t_r_e_a_m rather than a packet. This uses a TCP stream connection with the nameserver rather than a UDP datagram. This sets the RES_USEVC bit of the resolver's _o_p_t_i_o_n_s field. (Default: UDP datagram.) --vv Synonym for the ``--ss'' flag. _h_o_s_t The name of the host (or domain) of interest. FFIILLEESS /etc/resolv.conf to get the default ns and search lists list of usable RR types and classes list of resolver flags DDIIAAGGNNOOSSTTIICCSS If the resolver fails to answer the query and debugging has not been turned on, ddnnssqquueerryy will simply print a message like: Query failed (rc = 1): Unknown host The value of the return code is supplied by _h___e_r_r_n_o _. SSEEEE AALLSSOO nslookup(8), nstest(1), nsquery(1), named(8), resolver(5). AAUUTTHHOORR Bryan Beecher BBUUGGSS Queries of a class other than _I_N can have interesting results since ordi- narily a nameserver only has a list of root nameservers for class _I_N re- source records. DDnnssqquueerryy uses a call to iinneett__aaddddrr() to determine if the argument for the ``--nn'' option is a valid Internet address. Unfortunately, iinneett__aaddddrr() seems to cause a segmentation fault with some (bad) IP addresses (e.g., 1.2.3.4.5). 4th Berkeley Distribution March 10, 1990 2