summaryrefslogtreecommitdiffstats
path: root/lib/libc/resolv/res_send.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/resolv/res_send.c')
-rw-r--r--lib/libc/resolv/res_send.c53
1 files changed, 29 insertions, 24 deletions
diff --git a/lib/libc/resolv/res_send.c b/lib/libc/resolv/res_send.c
index 455599e..78410d1 100644
--- a/lib/libc/resolv/res_send.c
+++ b/lib/libc/resolv/res_send.c
@@ -66,12 +66,13 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.9 2006/10/16 23:00:50 marka Exp $";
+static const char rcsid[] = "$Id: res_send.c,v 1.9.18.8 2006/10/16 23:00:58 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-/*
+/*! \file
+ * \brief
* Send query to name server and wait for reply.
*/
@@ -156,14 +157,15 @@ static const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
/* Public. */
-/* int
- * res_isourserver(ina)
+/*%
* looks up "ina" in _res.ns_addr_list[]
+ *
* returns:
- * 0 : not found
- * >0 : found
+ *\li 0 : not found
+ *\li >0 : found
+ *
* author:
- * paul vixie, 29may94
+ *\li paul vixie, 29may94
*/
int
res_ourserver_p(const res_state statp, const struct sockaddr *sa) {
@@ -206,17 +208,19 @@ res_ourserver_p(const res_state statp, const struct sockaddr *sa) {
return (0);
}
-/* int
- * res_nameinquery(name, type, class, buf, eom)
+/*%
* look for (name,type,class) in the query section of packet (buf,eom)
+ *
* requires:
- * buf + HFIXEDSZ <= eom
+ *\li buf + HFIXEDSZ <= eom
+ *
* returns:
- * -1 : format error
- * 0 : not found
- * >0 : found
+ *\li -1 : format error
+ *\li 0 : not found
+ *\li >0 : found
+ *
* author:
- * paul vixie, 29may94
+ *\li paul vixie, 29may94
*/
int
res_nameinquery(const char *name, int type, int class,
@@ -244,16 +248,17 @@ res_nameinquery(const char *name, int type, int class,
return (0);
}
-/* int
- * res_queriesmatch(buf1, eom1, buf2, eom2)
+/*%
* is there a 1:1 mapping of (name,type,class)
* in (buf1,eom1) and (buf2,eom2)?
+ *
* returns:
- * -1 : format error
- * 0 : not a 1:1 mapping
- * >0 : is a 1:1 mapping
+ *\li -1 : format error
+ *\li 0 : not a 1:1 mapping
+ *\li >0 : is a 1:1 mapping
+ *
* author:
- * paul vixie, 29may94
+ *\li paul vixie, 29may94
*/
int
res_queriesmatch(const u_char *buf1, const u_char *eom1,
@@ -552,9 +557,9 @@ res_nsend(res_state statp,
#endif
if (!v_circuit) {
if (!gotsomewhere)
- errno = ECONNREFUSED; /* no nameservers found */
+ errno = ECONNREFUSED; /*%< no nameservers found */
else
- errno = ETIMEDOUT; /* no answer obtained */
+ errno = ETIMEDOUT; /*%< no answer obtained */
} else
errno = terrno;
return (-1);
@@ -584,10 +589,10 @@ get_salen(sa)
else if (sa->sa_family == AF_INET6)
return (sizeof(struct sockaddr_in6));
else
- return (0); /* unknown, die on connect */
+ return (0); /*%< unknown, die on connect */
}
-/*
+/*%
* pick appropriate nsaddr_list for use. see res_init() for initialization.
*/
static struct sockaddr *
OpenPOWER on IntegriCloud