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