summaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>2001-02-28 02:30:31 +0000
committeritojun <itojun@NetBSD.org>2001-02-28 02:30:31 +0000
commitdea3f7103b088cbfc100c77d00a6a424bc25c652 (patch)
treeee4b30f024a2ebbd2c4ec65265f6d742dca7a9c9 /lib/libc/net
parent163eba47d828ab8fe156da114e7da4e71c2d0453 (diff)
it seems that gethostent(3) is no longer supplied in libc.
couple of wording corrections. From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/Makefile.inc4
-rw-r--r--lib/libc/net/gethostbyname.337
2 files changed, 13 insertions, 28 deletions
diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc
index 3c180b2da50..cec0b67f980 100644
--- a/lib/libc/net/Makefile.inc
+++ b/lib/libc/net/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.55 2000/07/07 05:30:58 cgd Exp $
+# $NetBSD: Makefile.inc,v 1.56 2001/02/28 02:30:31 itojun Exp $
# @(#)Makefile.inc 8.2 (Berkeley) 9/5/93
# net sources
@@ -46,7 +46,7 @@ MLINKS+=byteorder.3 htonl.3 byteorder.3 htons.3 byteorder.3 ntohl.3 \
MLINKS+=ethers.3 ether_aton.3 ethers.3 ether_hostton.3 ethers.3 ether_line.3 \
ethers.3 ether_ntoa.3 ethers.3 ether_ntohost.3
MLINKS+=gethostbyname.3 endhostent.3 gethostbyname.3 gethostbyaddr.3 \
- gethostbyname.3 sethostent.3 gethostbyname.3 gethostent.3 \
+ gethostbyname.3 sethostent.3 \
gethostbyname.3 herror.3 gethostbyname.3 hstrerror.3 \
gethostbyname.3 gethostbyname2.3
MLINKS+=getnetent.3 endnetent.3 getnetent.3 getnetbyaddr.3 \
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
index 2ae3cd6a996..a2c7ee2d07f 100644
--- a/lib/libc/net/gethostbyname.3
+++ b/lib/libc/net/gethostbyname.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: gethostbyname.3,v 1.17 2000/04/24 16:17:07 itojun Exp $
+.\" $NetBSD: gethostbyname.3,v 1.18 2001/02/28 02:30:31 itojun Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -40,7 +40,6 @@
.Nm gethostbyname ,
.Nm gethostbyname2 ,
.Nm gethostbyaddr ,
-.Nm gethostent ,
.Nm sethostent ,
.Nm endhostent ,
.Nm herror ,
@@ -57,8 +56,6 @@
.Fn gethostbyname2 "const char *name" "int af"
.Ft struct hostent *
.Fn gethostbyaddr "const char *addr" "int len" "int type"
-.Ft struct hostent *
-.Fn gethostent void
.Ft void
.Fn sethostent "int stayopen"
.Ft void
@@ -83,7 +80,7 @@ broken-out fields from a line in
.Pa /etc/hosts ,
or database entries supplied by the
.Xr yp 8
-system .
+system.
The order of the lookups is controlled by the
.Sq hosts
entry in
@@ -250,25 +247,15 @@ for example, a mail-forwarder may be registered for this domain.
.Xr hostname 7 ,
.Xr named 8
.Sh CAVEAT
-The
-.Fn gethostent
-function is defined, and
-.Fn sethostent
-and
-.Fn endhostent
-are redefined,
-when
-.Xr libc 3
-is built to use only the routines to lookup in
+If the search routines specified in
+.Xr nsswitch.conf 5
+decide to read the
.Pa /etc/hosts
-and not the name server.
-.Pp
-The
-.Fn gethostent
-function
-reads the next line of
-.Pa /etc/hosts ,
-opening the file if necessary.
+file,
+.Fn gethostbyname
+and other functions will
+read the next line of the file,
+re-opening the file if necessary.
.Pp
The
.Fn sethostent
@@ -286,8 +273,7 @@ or
.Pp
The
.Fn endhostent
-function
-closes the file.
+function closes the file.
.Sh HISTORY
The
.Fn herror
@@ -297,7 +283,6 @@ The
.Fn endhostent ,
.Fn gethostbyaddr ,
.Fn gethostbyname ,
-.Fn gethostent ,
and
.Fn sethostent
functions appeared in