|
Packit |
514978 |
.\"
|
|
Packit |
514978 |
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
|
Packit |
514978 |
.\"
|
|
Packit |
514978 |
.\" Permission to use, copy, modify, and distribute this
|
|
Packit |
514978 |
.\" software and its documentation for any purpose and without
|
|
Packit |
514978 |
.\" fee is hereby granted, provided that the above copyright
|
|
Packit |
514978 |
.\" notice appear in all copies and that both that copyright
|
|
Packit |
514978 |
.\" notice and this permission notice appear in supporting
|
|
Packit |
514978 |
.\" documentation, and that the name of M.I.T. not be used in
|
|
Packit |
514978 |
.\" advertising or publicity pertaining to distribution of the
|
|
Packit |
514978 |
.\" software without specific, written prior permission.
|
|
Packit |
514978 |
.\" M.I.T. makes no representations about the suitability of
|
|
Packit |
514978 |
.\" this software for any purpose. It is provided "as is"
|
|
Packit |
514978 |
.\" without express or implied warranty.
|
|
Packit |
514978 |
.\"
|
|
Packit |
514978 |
.TH ARES_PARSE_NS_REPLY 3 "10 February 2007"
|
|
Packit |
514978 |
.SH NAME
|
|
Packit |
514978 |
ares_parse_ns_reply \- Parse a reply to a DNS query of type NS into a hostent
|
|
Packit |
514978 |
.SH SYNOPSIS
|
|
Packit |
514978 |
.nf
|
|
Packit |
514978 |
.B #include <ares.h>
|
|
Packit |
514978 |
.PP
|
|
Packit |
514978 |
.B int ares_parse_ns_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP,
|
|
Packit |
514978 |
.B struct hostent **\fIhost\fP);
|
|
Packit |
514978 |
.fi
|
|
Packit |
514978 |
.SH DESCRIPTION
|
|
Packit |
514978 |
The
|
|
Packit |
514978 |
.B ares_parse_ns_reply
|
|
Packit |
514978 |
function parses the response to a query of type NS into a
|
|
Packit |
514978 |
.BR "struct hostent" .
|
|
Packit |
514978 |
The parameters
|
|
Packit |
514978 |
.I abuf
|
|
Packit |
514978 |
and
|
|
Packit |
514978 |
.I alen
|
|
Packit |
514978 |
give the contents of the response. The result is stored in allocated
|
|
Packit |
514978 |
memory and a pointer to it stored into the variable pointed to by
|
|
Packit |
514978 |
.IR host .
|
|
Packit |
514978 |
The nameservers are stored into the
|
|
Packit |
514978 |
.BR aliases
|
|
Packit |
514978 |
field of the
|
|
Packit |
514978 |
.IR host
|
|
Packit |
514978 |
structure.
|
|
Packit |
514978 |
It is the caller's responsibility to free the resulting host structure
|
|
Packit |
514978 |
using
|
|
Packit |
514978 |
.BR ares_free_hostent (3)
|
|
Packit |
514978 |
when it is no longer needed.
|
|
Packit |
514978 |
.SH RETURN VALUES
|
|
Packit |
514978 |
.B ares_parse_ns_reply
|
|
Packit |
514978 |
can return any of the following values:
|
|
Packit |
514978 |
.TP 15
|
|
Packit |
514978 |
.B ARES_SUCCESS
|
|
Packit |
514978 |
The response was successfully parsed.
|
|
Packit |
514978 |
.TP 15
|
|
Packit |
514978 |
.B ARES_EBADRESP
|
|
Packit |
514978 |
The response was malformatted.
|
|
Packit |
514978 |
.TP 15
|
|
Packit |
514978 |
.B ARES_ENODATA
|
|
Packit |
514978 |
The response did not contain an answer to the query.
|
|
Packit |
514978 |
.TP 15
|
|
Packit |
514978 |
.B ARES_ENOMEM
|
|
Packit |
514978 |
Memory was exhausted.
|
|
Packit |
514978 |
.SH SEE ALSO
|
|
Packit |
514978 |
.BR ares_query (3),
|
|
Packit |
514978 |
.BR ares_free_hostent (3)
|
|
Packit |
514978 |
.SH AUTHOR
|
|
Packit |
514978 |
Written by Vlad Dinulescu <vlad.dinulescu@avira.com>, on behalf of AVIRA Gmbh http://www.avira.com
|