1*47469Scael.\" Copyright (c) 1983, 1991 The Regents of the University of California. 235614Sbostic.\" All rights reserved. 318969Smckusick.\" 443824Strent.\" %sccs.include.redist.man% 518969Smckusick.\" 6*47469Scael.\" @(#)htable.8 6.6 (Berkeley) 03/16/91 735614Sbostic.\" 8*47469Scael.Dd 9*47469Scael.Dt HTABLE 8 10*47469Scael.Os BSD 4.2 11*47469Scael.Sh NAME 12*47469Scael.Nm htable 13*47469Scael.Nd convert 14*47469Scael.Tn NIC 15*47469Scaelstandard format host tables 16*47469Scael.Sh SYNOPSIS 17*47469Scael.Nm htable 18*47469Scael.Op Fl c Ar connected-nets 19*47469Scael.Op Fl l Ar local-nets 20*47469Scael.Ar file 21*47469Scael.Sh DESCRIPTION 22*47469Scael.Nm Htable 2318969Smckusickis used to convert host files in the format specified 24*47469Scaelin Internet 25*47469Scael.Tn RFC 26*47469Scael810 to the format used by the network 2718969Smckusicklibrary routines. Three files are created as a result 2818969Smckusickof running 29*47469Scael.Nm htable : 30*47469Scael.Pa hosts , 31*47469Scael.Pa networks , 3218969Smckusickand 33*47469Scael.Pa gateways . 3418969SmckusickThe 35*47469Scael.Xr hosts 3628557Skarelsfile may be used by the 37*47469Scael.Xr gethostbyname 3 3828557Skarelsroutines in mapping host names to addresses 3928557Skarelsif the nameserver, 40*47469Scael.Xr named 8 , 4128557Skarelsis not used. 4218969SmckusickThe 43*47469Scael.Pa networks 4418969Smckusickfile is used by the 45*47469Scael.Xr getnetent 3 4618969Smckusickroutines in mapping network names to numbers. 4718969SmckusickThe 48*47469Scael.Pa gateways 4928557Skarelsfile may be used by the routing daemon 50*47469Scaelin identifying 51*47469Scael.Dq passive 52*47469ScaelInternet gateways; 5318969Smckusicksee 54*47469Scael.Xr routed 8 5518969Smckusickfor an explanation. 56*47469Scael.Pp 57*47469ScaelOptions available for 58*47469Scael.Nm htable : 59*47469Scael.Bl -tag -width Ds 60*47469Scael.It Fl c Ar connected-nets 6128557SkarelsIf the gateways file is to be used, 62*47469Scael.Ar connected-nets 63*47469Scaelis a list of networks to which the host is directly connected. 6418969SmckusickThe networks, separated by commas, 6528557Skarelsmay be given by name or in Internet-standard dot notation, 66*47469Scaelfor example: 67*47469Scael.Bd -literal -offset indent 68*47469Scael\-c arpanet,128.32,local-ether-net. 69*47469Scael.Ed 70*47469Scael.Pp 71*47469Scael.Nm Htable 7218969Smckusickonly includes gateways 7318969Smckusickwhich are directly connected to one of the networks specified, 7418969Smckusickor which can be reached from another gateway on a connected net. 75*47469Scael.It Fl l Ar local-nets 7618969SmckusickIf the 77*47469Scael.Fl l 7818969Smckusickoption is given with a list of networks (in the same format as for 79*47469Scael.Fl c ) , 8018969Smckusickthese networks will be treated as ``local,'' 8118969Smckusickand information about hosts on local networks is 8218969Smckusicktaken only from the localhosts file. 8318969SmckusickEntries for local hosts from the main database will be omitted. 8418969SmckusickThis allows the localhosts file to completely override 8518969Smckusickany entries in the input file. 86*47469Scael.El 87*47469Scael.Pp 88*47469ScaelIf any of the files 89*47469Scael.Pa localhosts , 90*47469Scael.Pa localnetworks , 91*47469Scaelor 92*47469Scael.Pa localgateways 93*47469Scaelare present in the current directory, 94*47469Scaelthe file's contents is prepended to the 95*47469Scaeloutput file. 96*47469ScaelOf these, only the gateways file is interpreted. 97*47469ScaelThis allows sites to maintain local aliases and 98*47469Scaelentries which are not normally present in the 99*47469Scaelmaster database. 100*47469ScaelOnly one gateway to each network will be placed in the gateways file; 101*47469Scaela gateway listed in the localgateways file will override any in the 102*47469Scaelinput file. 103*47469Scael.Pp 104*47469Scael.Nm Htable 10518969Smckusickis best used in conjunction with the 106*47469Scael.Xr gettable 8 107*47469Scaelprogram which retrieves the 108*47469Scael.Tn NIC 109*47469Scaeldatabase from a host. 110*47469Scael.Sh SEE ALSO 111*47469Scael.Xr netintro 4 , 112*47469Scael.Xr gettable 8 , 113*47469Scael.Xr named 8 114*47469Scael.Sh BUGS 11528557SkarelsIf the name-domain system provided network name mapping well as host 11628557Skarelsname mapping, 117*47469Scael.Nm htable 11828557Skarelswould no longer be needed. 119*47469Scael.Sh HISTORY 120*47469ScaelThe 121*47469Scael.Nm 122*47469Scaelcommand appeared in 123*47469Scael.Bx 4.2 . 124