summaryrefslogtreecommitdiff
path: root/ares_parse_srv_reply.3
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-23 00:57:50 +0000
committerYang Tse <yangsita@gmail.com>2009-11-23 00:57:50 +0000
commit497afa9acb4d42b4bb186701f0d03a02884ff9b2 (patch)
treee3fa308b13390cea964fb4d98be523abdef21061 /ares_parse_srv_reply.3
parent17e6785e05bd19e7cac4aec96b781d5a41974e4b (diff)
downloadc-ares-497afa9acb4d42b4bb186701f0d03a02884ff9b2.tar.gz
c-ares-497afa9acb4d42b4bb186701f0d03a02884ff9b2.tar.bz2
c-ares-497afa9acb4d42b4bb186701f0d03a02884ff9b2.zip
- Jakub Hrozek fixed more function prototypes in man pages to sync them
with the ones declared in ares.h
Diffstat (limited to 'ares_parse_srv_reply.3')
-rw-r--r--ares_parse_srv_reply.310
1 files changed, 6 insertions, 4 deletions
diff --git a/ares_parse_srv_reply.3 b/ares_parse_srv_reply.3
index 77fe071..60662c1 100644
--- a/ares_parse_srv_reply.3
+++ b/ares_parse_srv_reply.3
@@ -21,12 +21,13 @@ ares_parse_srv_reply \- Parse a reply to a DNS query of type SRV
.B #include <ares.h>
.PP
.B int ares_parse_srv_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP,
-.B struct ares_srv_reply** \fIsrv_out\fP, int *\fInsrvreply\fP);
+.B struct ares_srv_reply** \fIsrv_out\fP);
.fi
.SH DESCRIPTION
The
.B ares_parse_srv_reply
function parses the response to a query of type SRV into a
+linked list of
.I struct ares_srv_reply
The parameters
.I abuf
@@ -35,11 +36,10 @@ and
give the contents of the response. The result is stored in allocated
memory and a pointer to it stored into the variable pointed to by
.IR srv_out .
-The number of responses is stored into the variable pointed to by
-.IR nsrvreply .
It is the caller's responsibility to free the resulting
.IR srv_out
-structure when it is no longer needed.
+structure when it is no longer needed using the function
+.B ares_free_data
.PP
The structure
.I ares_srv_reply
@@ -48,6 +48,7 @@ contains the following fields:
.in +4n
.nf
struct ares_srv_reply {
+ struct ares_srv_reply *next;
unsigned short weight;
unsigned short priority;
unsigned short port;
@@ -73,5 +74,6 @@ The response did not contain an answer to the query.
Memory was exhausted.
.SH SEE ALSO
.BR ares_query (3)
+.BR ares_free_data (3)
.SH AUTHOR
Written by Jakub Hrozek <jhrozek@redhat.com>, on behalf of Red Hat, Inc http://www.redhat.com