⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ares_search.3

📁 这是国外的resip协议栈
💻 3
字号:
.\".\" Copyright 1998 by the Massachusetts Institute of Technology..\".\" Permission to use, copy, modify, and distribute this.\" software and its documentation for any purpose and without.\" fee is hereby granted, provided that the above copyright.\" notice appear in all copies and that both that copyright.\" notice and this permission notice appear in supporting.\" documentation, and that the name of M.I.T. not be used in.\" advertising or publicity pertaining to distribution of the.\" software without specific, written prior permission..\" M.I.T. makes no representations about the suitability of.\" this software for any purpose.  It is provided "as is".\" without express or implied warranty..\".TH ARES_SEARCH 3 "24 July 1998".SH NAMEares_search \- Initiate a DNS query with domain search.SH SYNOPSIS.nf.B #include <ares.h>.PP.B typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP,.B	unsigned char *\fIabuf\fP, int \fIalen\fP).PP.B void ares_search(ares_channel \fIchannel\fP, const char *\fIname\fP,.B 	int \fIdnsclass\fP, int \fItype\fP, ares_callback \fIcallback\fP,.B	void *\fIarg\fP).fi.SH DESCRIPTIONThe.B ares_searchfunction initiates a series of single-question DNS queries on the nameservice channel identified by.IR channel ,using the channel's search domains as well as a host alias file givenby the HOSTALIAS environment variable.  The parameter.I namegives the alias name or the base of the query name as a NUL-terminatedC string of period-separated labels; if it ends with a period, thechannel's search domains will not be used.  Periods and backslasheswithin a label must be escaped with a backslash.  The parameters.I dnsclassand.I typegive the class and type of the query using the values defined in.BR <arpa/nameser.h> .When the query sequence is complete or has failed, the ares librarywill invoke.IR callback .Completion or failure of the query sequence may happen immediately, ormay happen during a later call to.BR ares_process (3)or.BR ares_destroy (3)..PPThe callback argument.I argis copied from the.B ares_searchargument.IR arg .The callback argument.I statusindicates whether the query sequence ended with a successful queryand, if not, how the query sequence failed.  It may have any of thefollowing values:.TP 19.B ARES_SUCCESSA query completed successfully..TP 19.B ARES_ENODATANo query completed successfully; when the query was tried without asearch domain appended, a response was returned with no answers..TP 19.B ARES_EFORMERRA query completed but the server claimed that the query wasmalformatted..TP 19.B ARES_ESERVFAILNo query completed successfully; when the query was tried without asearch domain appended, the server claimed to have experienced afailure.  (This code can only occur if the.B ARES_FLAG_NOCHECKRESPflag was specified at channel initialization time; otherwise, suchresponses are ignored at the.BR ares_send (3)level.).TP 19.B ARES_ENOTFOUNDNo query completed successfully; when the query was tried without asearch domain appended, the server reported that the queried-fordomain name was not found..TP 19.B ARES_ENOTIMPA query completed but the server does not implement the operationrequested by the query.  (This code can only occur if the.B ARES_FLAG_NOCHECKRESPflag was specified at channel initialization time; otherwise, suchresponses are ignored at the.BR ares_send (3)level.).TP 19.B ARES_EREFUSEDA query completed but the server refused the query.  (This code canonly occur returned if the.B ARES_FLAG_NOCHECKRESPflag was specified at channel initialization time; otherwise, suchresponses are ignored at the.BR ares_send (3)level.).TP 19.B ARES_TIMEOUTNo name servers responded to a query within the timeout period..TP 19.B ARES_ECONNREFUSEDNo name servers could be contacted..TP 19.B ARES_ENOMEMMemory was exhausted..TP 19.B ARES_EDESTRUCTIONThe name service channel.I channelis being destroyed; the query will not be completed..PPIf a query completed successfully, the callback argument.I abufpoints to a result buffer of length.IR alen .If the query did not complete successfully,.I abufwill usually be NULL and.I alenwill usually be 0, but in some cases an unsuccessful query result maybe placed in.IR abuf ..SH SEE ALSO.BR ares_process (3).SH AUTHORGreg Hudson, MIT Information Systems.brCopyright 1998 by the Massachusetts Institute of Technology.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -