Commit | Line | Data |
---|---|---|
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 | |
15 | standard 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 | 23 | is used to convert host files in the format specified |
b42074ab CL |
24 | in Internet |
25 | .Tn RFC | |
26 | 810 to the format used by the network | |
4ee2fd4d KM |
27 | library routines. Three files are created as a result |
28 | of running | |
b42074ab CL |
29 | .Nm htable : |
30 | .Pa hosts , | |
31 | .Pa networks , | |
4ee2fd4d | 32 | and |
b42074ab | 33 | .Pa gateways . |
4ee2fd4d | 34 | The |
b42074ab | 35 | .Xr hosts |
0479c228 | 36 | file may be used by the |
b42074ab | 37 | .Xr gethostbyname 3 |
0479c228 MK |
38 | routines in mapping host names to addresses |
39 | if the nameserver, | |
b42074ab | 40 | .Xr named 8 , |
0479c228 | 41 | is not used. |
4ee2fd4d | 42 | The |
b42074ab | 43 | .Pa networks |
4ee2fd4d | 44 | file is used by the |
b42074ab | 45 | .Xr getnetent 3 |
4ee2fd4d KM |
46 | routines in mapping network names to numbers. |
47 | The | |
b42074ab | 48 | .Pa gateways |
0479c228 | 49 | file may be used by the routing daemon |
b42074ab CL |
50 | in identifying |
51 | .Dq passive | |
52 | Internet gateways; | |
4ee2fd4d | 53 | see |
b42074ab | 54 | .Xr routed 8 |
4ee2fd4d | 55 | for an explanation. |
b42074ab CL |
56 | .Pp |
57 | Options available for | |
58 | .Nm htable : | |
59 | .Bl -tag -width Ds | |
60 | .It Fl c Ar connected-nets | |
0479c228 | 61 | If the gateways file is to be used, |
b42074ab CL |
62 | .Ar connected-nets |
63 | is a list of networks to which the host is directly connected. | |
4ee2fd4d | 64 | The networks, separated by commas, |
0479c228 | 65 | may be given by name or in Internet-standard dot notation, |
b42074ab CL |
66 | for example: |
67 | .Bd -literal -offset indent | |
68 | \-c arpanet,128.32,local-ether-net. | |
69 | .Ed | |
70 | .Pp | |
71 | .Nm Htable | |
4ee2fd4d KM |
72 | only includes gateways |
73 | which are directly connected to one of the networks specified, | |
74 | or which can be reached from another gateway on a connected net. | |
b42074ab | 75 | .It Fl l Ar local-nets |
4ee2fd4d | 76 | If the |
b42074ab | 77 | .Fl l |
4ee2fd4d | 78 | option is given with a list of networks (in the same format as for |
b42074ab | 79 | .Fl c ) , |
4ee2fd4d KM |
80 | these networks will be treated as ``local,'' |
81 | and information about hosts on local networks is | |
82 | taken only from the localhosts file. | |
83 | Entries for local hosts from the main database will be omitted. | |
84 | This allows the localhosts file to completely override | |
85 | any entries in the input file. | |
b42074ab CL |
86 | .El |
87 | .Pp | |
88 | If any of the files | |
89 | .Pa localhosts , | |
90 | .Pa localnetworks , | |
91 | or | |
92 | .Pa localgateways | |
93 | are present in the current directory, | |
94 | the file's contents is prepended to the | |
95 | output file. | |
96 | Of these, only the gateways file is interpreted. | |
97 | This allows sites to maintain local aliases and | |
98 | entries which are not normally present in the | |
99 | master database. | |
100 | Only one gateway to each network will be placed in the gateways file; | |
101 | a gateway listed in the localgateways file will override any in the | |
102 | input file. | |
103 | .Pp | |
104 | .Nm Htable | |
4ee2fd4d | 105 | is best used in conjunction with the |
b42074ab CL |
106 | .Xr gettable 8 |
107 | program which retrieves the | |
108 | .Tn NIC | |
109 | database from a host. | |
110 | .Sh SEE ALSO | |
111 | .Xr netintro 4 , | |
112 | .Xr gettable 8 , | |
113 | .Xr named 8 | |
114 | .Sh BUGS | |
0479c228 MK |
115 | If the name-domain system provided network name mapping well as host |
116 | name mapping, | |
b42074ab | 117 | .Nm htable |
0479c228 | 118 | would no longer be needed. |
b42074ab CL |
119 | .Sh HISTORY |
120 | The | |
121 | .Nm | |
122 | command appeared in | |
123 | .Bx 4.2 . |