C -- This accesses the hosts tables.


NAME

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


SYNOPSIS

This is an associative array that allows the hosts tables to be configured easily.

        tie %host,'CfgTie::TieHost';


DESCRIPTION

This is a straightforward hash tie that allows us to access the host database sanely.

Ties

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.

Structure of hash

Any given host entry has the following information assoicated with it:

Name
Host name

Aliases
Other names for this host

AddrType
The type of address

Length
Addrs
A 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.


See Also

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

host(5)


Caveats

The current version does cache some host information.


Author

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

 C -- This accesses the hosts tables.