
CfgTie::TieHost -- This accesses the hosts tables.

This is an associative array that allows the hosts tables to be configured easily.
tie %host,'CfgTie::TieHost';

This is a straightforward hash tie that allows us to access the host database sanely.
There are two ties available for programmers:
tie %host,'CfgTie::TieHost'$host{$name} will return a hash reference of the named host information.
tie %host_addr,'CfgTie::TieHost_addr'$host_addr{$addr} will return a hash reference for the specified host.
Any given host entry has the following information assoicated with it:
NameHost name
AliasesOther names for this host
AddrTypeThe type of address
LengthAddrsA list reference of addresses. You will need something like
($a,$b,$c,$d) = unpack('C4',$Addr);
to get the address out sanely.
Additionally, the programmer can set any other associated key, but this information will only be available to a running Perl script.

CfgTie::TieAliases, CfgTie::TieGeneric, CfgTie::TieGroup, CfgTie::TieMTab, CfgTie::TieNamed, CfgTie::TieNet, CfgTie::TiePh, CfgTie::TieProto, CfgTie::TieRCService, CfgTie::TieRsrc, CfgTie::TieServ, CfgTie::TieShadow, CfgTie::TieUser

The current version does cache some host information.

Randall Maas (mailto:randym@acm.org, http://www.hamline.edu/~rcmaas/)