macro and text revision (-mdoc version 3)
[unix-history] / usr / src / old / htable / htable.8
CommitLineData
b42074ab 1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
6a22fdb8 2.\" All rights reserved.
4ee2fd4d 3.\"
b15837aa 4.\" %sccs.include.redist.man%
6a22fdb8 5.\"
b42074ab 6.\" @(#)htable.8 6.6 (Berkeley) %G%
4ee2fd4d 7.\"
b42074ab
CL
8.Dd
9.Dt HTABLE 8
10.Os BSD 4.2
11.Sh NAME
12.Nm htable
13.Nd convert
14.Tn NIC
15standard format host tables
16.Sh SYNOPSIS
17.Nm htable
18.Op Fl c Ar connected-nets
19.Op Fl l Ar local-nets
20.Ar file
21.Sh DESCRIPTION
22.Nm Htable
4ee2fd4d 23is used to convert host files in the format specified
b42074ab
CL
24in Internet
25.Tn RFC
26810 to the format used by the network
4ee2fd4d
KM
27library routines. Three files are created as a result
28of running
b42074ab
CL
29.Nm htable :
30.Pa hosts ,
31.Pa networks ,
4ee2fd4d 32and
b42074ab 33.Pa gateways .
4ee2fd4d 34The
b42074ab 35.Xr hosts
0479c228 36file may be used by the
b42074ab 37.Xr gethostbyname 3
0479c228
MK
38routines in mapping host names to addresses
39if the nameserver,
b42074ab 40.Xr named 8 ,
0479c228 41is not used.
4ee2fd4d 42The
b42074ab 43.Pa networks
4ee2fd4d 44file is used by the
b42074ab 45.Xr getnetent 3
4ee2fd4d
KM
46routines in mapping network names to numbers.
47The
b42074ab 48.Pa gateways
0479c228 49file may be used by the routing daemon
b42074ab
CL
50in identifying
51.Dq passive
52Internet gateways;
4ee2fd4d 53see
b42074ab 54.Xr routed 8
4ee2fd4d 55for an explanation.
b42074ab
CL
56.Pp
57Options available for
58.Nm htable :
59.Bl -tag -width Ds
60.It Fl c Ar connected-nets
0479c228 61If the gateways file is to be used,
b42074ab
CL
62.Ar connected-nets
63is a list of networks to which the host is directly connected.
4ee2fd4d 64The networks, separated by commas,
0479c228 65may be given by name or in Internet-standard dot notation,
b42074ab
CL
66for example:
67.Bd -literal -offset indent
68\-c arpanet,128.32,local-ether-net.
69.Ed
70.Pp
71.Nm Htable
4ee2fd4d
KM
72only includes gateways
73which are directly connected to one of the networks specified,
74or which can be reached from another gateway on a connected net.
b42074ab 75.It Fl l Ar local-nets
4ee2fd4d 76If the
b42074ab 77.Fl l
4ee2fd4d 78option is given with a list of networks (in the same format as for
b42074ab 79.Fl c ) ,
4ee2fd4d
KM
80these networks will be treated as ``local,''
81and information about hosts on local networks is
82taken only from the localhosts file.
83Entries for local hosts from the main database will be omitted.
84This allows the localhosts file to completely override
85any entries in the input file.
b42074ab
CL
86.El
87.Pp
88If any of the files
89.Pa localhosts ,
90.Pa localnetworks ,
91or
92.Pa localgateways
93are present in the current directory,
94the file's contents is prepended to the
95output file.
96Of these, only the gateways file is interpreted.
97This allows sites to maintain local aliases and
98entries which are not normally present in the
99master database.
100Only one gateway to each network will be placed in the gateways file;
101a gateway listed in the localgateways file will override any in the
102input file.
103.Pp
104.Nm Htable
4ee2fd4d 105is best used in conjunction with the
b42074ab
CL
106.Xr gettable 8
107program which retrieves the
108.Tn NIC
109database from a host.
110.Sh SEE ALSO
111.Xr netintro 4 ,
112.Xr gettable 8 ,
113.Xr named 8
114.Sh BUGS
0479c228
MK
115If the name-domain system provided network name mapping well as host
116name mapping,
b42074ab 117.Nm htable
0479c228 118would no longer be needed.
b42074ab
CL
119.Sh HISTORY
120The
121.Nm
122command appeared in
123.Bx 4.2 .