📄 query.1
字号:
.TH QUERY 1 "10 March 1990".UC 6.SH NAMEquery \- query nameservers through resolver library calls.SH SYNOPSIS.B query[-n.I nameserver][-t.I type][-c.I class][-r .I retry] [-p .I retry period] [-d] [-s] [-v] host.SH DESCRIPTIONThe.IR queryprogram is a general interface to nameservers viaBIND resolver library calls. The program supportsqueries to the nameserver with an opcode of QUERY.This program is intended to be a replacement orsupplement to programs like nstest, nsquery andnslookup. All arguments except for.IR hostand.IR nsare treated without case-sensitivity..SH OPTIONS.TP 1i.B \-nThe nameserver to be used in the query. Nameservers can appear as either Internet addresses of the form w.x.y.z or can appear as domain names. (default: as specified in /etc/resolv.conf).TP 1i.B \-tThe type of resource record of interest. Types include:.RS 1.5i.TP 1iAaddress.PD 0.TP 1iNSnameserver.TP 1iCNAMEcanonical name.TP 1iPTR domain name pointer.TP 1iSOA start of authority.TP 1iWKS well-known service.TP 1iHINFOhost information.TP 1iMINFOmailbox information.TP 1iMX mail exchange.TP 1iRP responsible person.TP 1iMG mail group member.TP 1iAFSDB DCE or AFS server.TP 1iANY wildcard.RE.PD.IPNote that any case may be used. (default: ANY).TP 1i.B \-cThe class of resource records of interest.Classes include:.RS 2i.TP 1iIN Internet.PD 0.TP 1iHS Hesiod.TP 1iCHAOSChaos.TP 1iANY wildcard.RE.PD.IPNote that any case may be used. (default: IN).TP 1i.B \-rThe number of times to retry if the nameserver isnot responding. (default: 4).TP 1i.B \-pPeriod to wait before timing out. (default: RES_TIMEOUT).IR optionsfield. (default: any answer).TP 1i.B \-dTurn on debugging. This sets the RES_DEBUG bit of the resolver's.IR optionsfield. (default: no debugging).TP 1i.B \-sUse a.IR streamrather than a packet. This uses a TCP stream connection withthe nameserver rather than a UDP datagram. This sets theRES_USEVC bit of the resolver's.IR optionsfield. (default: UDP).TP 1i.B \-vSynonym for the 's' flag..TP 1i.B hostThe name of the host (or domain) of interest..SH FILES/etc/resolv.conf to get the default ns and search lists.br<arpa/nameser.h> list of usable RR types and classes.br<resolv.h> list of resolver flags.SH "SEE ALSO"nslookup(1), nstest(1), nsquery(1), named(8), resolver(5).SH DIAGNOSTICSIf the resolver fails to answer the query and debugging has not beenturned on,.IR querywill simply print a message like:.TP 1iQuery failed (rc = 1) : Unknown host.LPThe value of the return code is supplied by h_errno..SH BUGSQueries of a class other than IN can have interesting resultssince ordinarily a nameserver only has a list of root nameserversfor class IN resource records..PPQuery uses a call to inet_addr() to determine if the argumentfor the '-n' option is a valid Internet address. Unfortunately,inet_addr() seems to cause a segmentation fault with some (bad)addresses (e.g. 1.2.3.4.5)..SH AUTHORBryan Beecher
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -