summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authortobez <tobez@FreeBSD.org>2001-07-09 20:46:00 +0000
committertobez <tobez@FreeBSD.org>2001-07-09 20:46:00 +0000
commit8e095496f1e74f8bda69ee4a03e5ac0c0c1e4706 (patch)
tree4dccad27ad916220f7304f66e9c499d2cb3ce277 /lib/libc
parentcc88f49f47f173976d06666c4385e9920c76417f (diff)
downloadFreeBSD-src-8e095496f1e74f8bda69ee4a03e5ac0c0c1e4706.zip
FreeBSD-src-8e095496f1e74f8bda69ee4a03e5ac0c0c1e4706.tar.gz
Document more resolver(3) routines: dn_skip() from resolv.h, and
ns_get16(), ns_get32(), ns_put16(), and ns_put32() from arpa/nameser.h. Markup by: ru OK'ed by: markm
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/Makefile.inc4
-rw-r--r--lib/libc/net/resolver.353
2 files changed, 55 insertions, 2 deletions
diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc
index 8e3b96b..6b735fb 100644
--- a/lib/libc/net/Makefile.inc
+++ b/lib/libc/net/Makefile.inc
@@ -93,5 +93,7 @@ MLINKS+=rcmd.3 iruserok.3 rcmd.3 iruserok_sa.3 \
rcmd.3 ruserok.3
MLINKS+=resolver.3 dn_comp.3 resolver.3 dn_expand.3 resolver.3 res_init.3 \
resolver.3 res_mkquery.3 resolver.3 res_query.3 \
- resolver.3 res_search.3 resolver.3 res_send.3
+ resolver.3 res_search.3 resolver.3 res_send.3 resolver.3 dn_skipname.3 \
+ resolver.3 ns_get16.3 resolver.3 ns_get32.3 \
+ resolver.3 ns_put16.3 resolver.3 ns_put32.3
.endif
diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3
index e45ab13..07d6bfa 100644
--- a/lib/libc/net/resolver.3
+++ b/lib/libc/net/resolver.3
@@ -42,7 +42,12 @@
.Nm res_send ,
.Nm res_init ,
.Nm dn_comp ,
-.Nm dn_expand
+.Nm dn_expand ,
+.Nm dn_skipname ,
+.Nm ns_get16 ,
+.Nm ns_get32 ,
+.Nm ns_put16 ,
+.Nm ns_put32
.Nd resolver routines
.Sh LIBRARY
.Lb libc
@@ -88,6 +93,7 @@
.Fc
.Ft int
.Fn res_init
+.Ft int
.Fo dn_comp
.Fa "const char *exp_dn"
.Fa "u_char *comp_dn"
@@ -103,6 +109,16 @@
.Fa "char *exp_dn"
.Fa "int length"
.Fc
+.Ft int
+.Fn dn_skipname "const u_char *comp_dn" "const u_char *eom"
+.Ft u_int
+.Fn ns_get16 "const u_char *src"
+.Ft u_long
+.Fn ns_get32 "const u_char *src"
+.Ft void
+.Fn ns_put16 "u_int src" "u_char *dst"
+.Ft void
+.Fn ns_put32 "u_long src" "u_char *dst"
.Sh DESCRIPTION
These routines are used for making, sending and interpreting
query and reply messages with Internet domain name servers.
@@ -343,6 +359,41 @@ The uncompressed name is placed in the buffer indicated by
which is of size
.Fa length .
The size of compressed name is returned or \-1 if there was an error.
+.Pp
+The
+.Fn dn_skipname
+function skips over a compressed domain name, which starts at a location
+pointed to by
+.Fa comp_dn .
+The compressed name is contained in a query or reply message;
+.Fa eom
+is a pointer to the end of the message.
+The size of compressed name is returned or \-1 if there was
+an error.
+.Pp
+The
+.Fn ns_get16
+function gets a 16-bit quantity from a buffer pointed to by
+.Fa src .
+.Pp
+The
+.Fn ns_get32
+function gets a 32-bit quantity from a buffer pointed to by
+.Fa src .
+.Pp
+The
+.Fn ns_put16
+function puts a 16-bit quantity
+.Fa src
+to a buffer pointed to by
+.Fa dst .
+.Pp
+The
+.Fn ns_put32
+function puts a 32-bit quantity
+.Fa src
+to a buffer pointed to by
+.Fa dst .
.Sh FILES
.Bl -tag -width /etc/resolv.conf
.It Pa /etc/resolv.conf
OpenPOWER on IntegriCloud