xref: /original-bsd/old/htable/htable.8 (revision 1b4ef7de)
1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)htable.8	6.6 (Berkeley) 03/16/91
7.\"
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
23is used to convert host files in the format specified
24in Internet
25.Tn RFC
26810 to the format used by the network
27library routines.  Three files are created as a result
28of running
29.Nm htable :
30.Pa hosts ,
31.Pa networks ,
32and
33.Pa gateways .
34The
35.Xr hosts
36file may be used by the
37.Xr gethostbyname 3
38routines in mapping host names to addresses
39if the nameserver,
40.Xr named 8 ,
41is not used.
42The
43.Pa networks
44file is used by the
45.Xr getnetent 3
46routines in mapping network names to numbers.
47The
48.Pa gateways
49file may be used by the routing daemon
50in identifying
51.Dq passive
52Internet gateways;
53see
54.Xr routed 8
55for an explanation.
56.Pp
57Options available for
58.Nm htable :
59.Bl -tag -width Ds
60.It Fl c Ar connected-nets
61If the gateways file is to be used,
62.Ar connected-nets
63is a list of networks to which the host is directly connected.
64The networks, separated by commas,
65may be given by name or in Internet-standard dot notation,
66for example:
67.Bd -literal -offset indent
68\-c arpanet,128.32,local-ether-net.
69.Ed
70.Pp
71.Nm Htable
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.
75.It Fl l Ar local-nets
76If the
77.Fl l
78option is given with a list of networks (in the same format as for
79.Fl c ) ,
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.
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
105is best used in conjunction with the
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
115If the name-domain system provided network name mapping well as host
116name mapping,
117.Nm htable
118would no longer be needed.
119.Sh HISTORY
120The
121.Nm
122command appeared in
123.Bx 4.2 .
124