summaryrefslogtreecommitdiffstats
path: root/lib/libc/resolv/res_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/resolv/res_query.c')
-rw-r--r--lib/libc/resolv/res_query.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/libc/resolv/res_query.c b/lib/libc/resolv/res_query.c
index 5156ce8..c160e93 100644
--- a/lib/libc/resolv/res_query.c
+++ b/lib/libc/resolv/res_query.c
@@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_query.c,v 1.2.2.3.4.2 2004/03/16 12:34:19 marka Exp $";
+static const char rcsid[] = "$Id: res_query.c,v 1.7.18.1 2005/04/27 05:01:11 sra Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@@ -97,7 +97,7 @@ static const char rcsid[] = "$Id: res_query.c,v 1.2.2.3.4.2 2004/03/16 12:34:19
#define MAXPACKET 1024
#endif
-/*
+/*%
* Formulate a normal query, send, and await answer.
* Returned answer is placed in supplied buffer "answer".
* Perform preliminary check of answer, returning success only
@@ -109,10 +109,10 @@ static const char rcsid[] = "$Id: res_query.c,v 1.2.2.3.4.2 2004/03/16 12:34:19
*/
int
res_nquery(res_state statp,
- const char *name, /* domain name */
- int class, int type, /* class and type of query */
- u_char *answer, /* buffer to put answer */
- int anslen) /* size of answer buffer */
+ const char *name, /*%< domain name */
+ int class, int type, /*%< class and type of query */
+ u_char *answer, /*%< buffer to put answer */
+ int anslen) /*%< size of answer buffer */
{
u_char buf[MAXPACKET];
HEADER *hp = (HEADER *) answer;
@@ -122,8 +122,7 @@ res_nquery(res_state statp,
oflags = statp->_flags;
again:
- hp->rcode = NOERROR; /* default */
-
+ hp->rcode = NOERROR; /*%< default */
#ifdef DEBUG
if (statp->options & RES_DEBUG)
printf(";; res_query(%s, %d, %d)\n", name, class, type);
@@ -195,7 +194,7 @@ again:
return (n);
}
-/*
+/*%
* Formulate a normal query, send, and retrieve answer in supplied buffer.
* Return the size of the response on success, -1 on error.
* If enabled, implement search rules until answer or unrecoverable failure
@@ -203,10 +202,10 @@ again:
*/
int
res_nsearch(res_state statp,
- const char *name, /* domain name */
- int class, int type, /* class and type of query */
- u_char *answer, /* buffer to put answer */
- int anslen) /* size of answer */
+ const char *name, /*%< domain name */
+ int class, int type, /*%< class and type of query */
+ u_char *answer, /*%< buffer to put answer */
+ int anslen) /*%< size of answer */
{
const char *cp, * const *domain;
HEADER *hp = (HEADER *) answer;
@@ -218,8 +217,7 @@ res_nsearch(res_state statp,
int searched = 0;
errno = 0;
- RES_SET_H_ERRNO(statp, HOST_NOT_FOUND); /* True if we never query. */
-
+ RES_SET_H_ERRNO(statp, HOST_NOT_FOUND); /*%< True if we never query. */
dots = 0;
for (cp = name; *cp != '\0'; cp++)
dots += (*cp == '.');
@@ -344,7 +342,7 @@ res_nsearch(res_state statp,
return (-1);
}
-/*
+/*%
* Perform a call on res_query on the concatenation of name and domain,
* removing a trailing dot from name if domain is NULL.
*/
@@ -352,9 +350,9 @@ int
res_nquerydomain(res_state statp,
const char *name,
const char *domain,
- int class, int type, /* class and type of query */
- u_char *answer, /* buffer to put answer */
- int anslen) /* size of answer */
+ int class, int type, /*%< class and type of query */
+ u_char *answer, /*%< buffer to put answer */
+ int anslen) /*%< size of answer */
{
char nbuf[MAXDNAME];
const char *longname = nbuf;
@@ -430,3 +428,5 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) {
fclose(fp);
return (NULL);
}
+
+/*! \file */
OpenPOWER on IntegriCloud