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