change getshort() and getlong() to _getshort() and _getlong()
[unix-history] / usr / src / old / htable / htable.8
CommitLineData
4ee2fd4d
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
0479c228 5.\" @(#)htable.8 6.3 (Berkeley) %G%
4ee2fd4d 6.\"
bfd81b5b 7.TH HTABLE 8 ""
4ee2fd4d
KM
8.UC 5
9.SH NAME
10htable \- convert NIC standard format host tables
11.SH SYNOPSIS
12.B /etc/htable
13[
14.B \-c
15.I connected-nets
16] [
17.B \-l
18.I local-nets
19]
20.I file
21.SH DESCRIPTION
22.I Htable
23is used to convert host files in the format specified
24in Internet RFC 810 to the format used by the network
25library routines. Three files are created as a result
26of running
27.IR htable :
28.IR hosts ,
29.IR networks ,
30and
31.IR gateways .
32The
33.I hosts
0479c228 34file may be used by the
a96bccf5 35.IR gethostbyname (3N)
0479c228
MK
36routines in mapping host names to addresses
37if the nameserver,
38.IR named (8),
39is not used.
4ee2fd4d
KM
40The
41.I networks
42file is used by the
43.IR getnetent (3N)
44routines in mapping network names to numbers.
45The
46.I gateways
0479c228 47file may be used by the routing daemon
4ee2fd4d
KM
48in identifying ``passive'' Internet gateways;
49see
50.IR routed (8C)
51for an explanation.
52.PP
53If any of the files
54.IR localhosts ,
55.IR localnetworks ,
56or
57.I localgateways
58are present in the current directory,
59the file's contents is prepended to the
60output file.
61Of these, only the gateways file is interpreted.
62This allows sites to maintain local aliases and
63entries which are not normally present in the
64master database.
65Only one gateway to each network will be placed in the gateways file;
66a gateway listed in the localgateways file will override any in the
67input file.
68.PP
0479c228
MK
69If the gateways file is to be used,
70a list of networks to which the host is directly connected
71is specified with the
4ee2fd4d
KM
72.B \-c
73flag.
74The networks, separated by commas,
0479c228 75may be given by name or in Internet-standard dot notation,
4ee2fd4d
KM
76e.g.
77.B \-c
78arpanet,128.32,local-ether-net.
79.I Htable
80only includes gateways
81which are directly connected to one of the networks specified,
82or which can be reached from another gateway on a connected net.
83.PP
84If the
85.B \-l
86option is given with a list of networks (in the same format as for
87.BR \-c ),
88these networks will be treated as ``local,''
89and information about hosts on local networks is
90taken only from the localhosts file.
91Entries for local hosts from the main database will be omitted.
92This allows the localhosts file to completely override
93any entries in the input file.
94.PP
95.I Htable
96is best used in conjunction with the
97.IR gettable (8C)
98program which retrieves the NIC database from a host.
99.SH "SEE ALSO"
100intro(3N),
0479c228
MK
101gettable(8C),
102named(8)
103.SH BUGS
104If the name-domain system provided network name mapping well as host
105name mapping,
106.I htable
107would no longer be needed.