summaryrefslogtreecommitdiff
path: root/ares_create_query.3
diff options
context:
space:
mode:
authorYu Jiung <jiung.yu@samsung.com>2016-11-10 16:24:08 +0900
committerYu Jiung <jiung.yu@samsung.com>2016-11-10 16:25:02 +0900
commit8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8 (patch)
tree81f0750d91aa467df3ee81cf30d22a65db2e6685 /ares_create_query.3
parentccccebb78520ec3a26a18370936516b12ae5d53a (diff)
parent45e88a8337839e5fd88519bc55467053d521c9f6 (diff)
downloadc-ares-submit/tizen_4.0_base/20170828.000001.tar.gz
c-ares-submit/tizen_4.0_base/20170828.000001.tar.bz2
c-ares-submit/tizen_4.0_base/20170828.000001.zip
Conflicts: packaging/c-ares.spec Change-Id: I1ec10e394aed3ef19ee21fefbe3aba7d7a615c74
Diffstat (limited to 'ares_create_query.3')
-rw-r--r--ares_create_query.369
1 files changed, 32 insertions, 37 deletions
diff --git a/ares_create_query.3 b/ares_create_query.3
index 5fd94fc..59af0f0 100644
--- a/ares_create_query.3
+++ b/ares_create_query.3
@@ -18,45 +18,39 @@
ares_create_query \- Compose a single-question DNS query buffer
.SH SYNOPSIS
.nf
-.B #include <ares.h>
-.PP
-.B int ares_create_query(const char *\fIname\fP, int \fIdnsclass\fP,\
- int \fItype\fP,
-.B unsigned short \fIid\fP, int \fIrd\fP,\
- unsigned char **\fIbuf\fP,
-.B int *\fIbuflen\fP, int \fImax_udp_size\fP)
+#include <ares.h>
+
+int ares_create_query(const char *\fIname\fP,
+ int \fIdnsclass\fP,
+ int \fItype\fP,
+ unsigned short \fIid\fP,
+ int \fIrd\fP,
+ unsigned char **\fIbuf\fP,
+ int *\fIbuflen\fP,
+ int \fImax_udp_size\fP)
.fi
.SH DESCRIPTION
-The
-.B ares_create_query
-function composes a DNS query with a single question.
-The parameter
-.I name
-gives the query name as a NUL-terminated C string of period-separated
-labels optionally ending with a period; periods and backslashes within
-a label must be escaped with a backlash. The parameters
-.I dnsclass
-and
-.I type
-give the class and type of the query using the values defined in
-.BR <arpa/nameser.h> .
-The parameter
-.I id
-gives a 16-bit identifier for the query. The parameter
-.I rd
-should be nonzero if recursion is desired, zero if not. The query
-will be placed in an allocated buffer, a pointer to which will be
-stored in the variable pointed to by
-.IR buf ,
-and the length of which will be stored in the variable pointed to by
-.IR buflen .
+The \fIares_create_query(3)\fP function composes a DNS query with a single
+question. The parameter \fIname\fP gives the query name as a NUL-terminated C
+string of period-separated labels optionally ending with a period; periods and
+backslashes within a label must be escaped with a backlash.
+
+The parameters \fIdnsclass\fP and \fItype\fP give the class and type of the
+query using the values defined in \fB<arpa/nameser.h>\fP.
+
+The parameter \fIid\fP gives a 16-bit identifier for the query.
+
+The parameter \fIrd\fP should be nonzero if recursion is desired, zero if not.
+
+The query will be placed in an allocated buffer, a pointer to which will be
+stored in the variable pointed to by \fIbuf\fP, and the length of which will
+be stored in the variable pointed to by \fIbuflen\fP.
+
It is the caller's responsibility to free this buffer using
-\fIares_free_string(3)\fP when it is no longer needed.
-The parameter
-.I max_udp_size
-should be nonzero to activate EDNS. Usage of \fIares_create_query(3)\fP\ with
-.I max_udp_size
-set to zero is equivalent to \fIares_mkquery(3)\fP.
+\fIares_free_string(3)\fP when it is no longer needed. The parameter
+\fImax_udp_size\fP should be nonzero to activate EDNS. Usage of
+\fIares_create_query(3)\fP\ with \fImax_udp_size\fP set to zero is equivalent
+to using \fIares_mkquery(3)\fP.
.SH RETURN VALUES
.B ares_create_query
can return any of the following values:
@@ -77,5 +71,6 @@ Memory was exhausted.
Added in c-ares 1.10.0
.SH SEE ALSO
.BR ares_expand_name (3),
-.BR ares_free_string (3)
+.BR ares_free_string (3),
+.BR ares_mkquery (3)
.SH AUTHOR