NAME

NetworkInfo::Discovery::Host - holds all the data we know about a host

SYNOPSIS

  use NetworkInfo::Discovery::Host;

  my $host = new NetworkInfo::Discovery::Host('ipaddress'=> '192.168.1.3',
				      'mac'=> '11:11:11:11:11:11',
				      'dnsname' => 'someotherhost' ) 
		    || warn ("failed to make host");

DESCRIPTION

NetworkInfo::Discovery::Host has all the information we could ever want to know about a host.

dnsname

this it the name that DNS knows this host by.

ipaddress

this is the software address of the host (a.k.a its IP address)

mac

this is the hardware Media Access Control address (MAC address) of the host

(tcp|udp)_open_ports

these are ports that we know this host to be listening on (for either tcp or udp)

METHODS

new

returns a new Host object, and takes the arguments shown in this example:

    $obj = NetworkInfo::Discovery::Host->new( [dnsname	=> $text,]
				[ipaddress	=> $ipaddress_text,]
				[mac		=> $mac_text,]
				[tcp_open_ports	=> $arrayref_numbers,]
				[udp_open_ports	=> $arrayref_numbers,] );
is_discovery_host ([yes|no])

get set what we think the os type is (Linux, Solaris...)

os_type ([$string])

get set what we think the os type is (Linux, Solaris...)

dnsname ([$name])

get set this dns name

ipaddress ([$name])

get set this ip address in the form "111.222.333.444"

mac ([$mac])

get set this mac address in the form "aa:bb:bb:dd:ee:ff"

does_udp ([yes|no])
does_tcp ([yes|no])
does_arp ([yes|no])
does_ethernet ([yes|no])
tcp_open_ports ([$ports])

get/set the open listening ports for this host

udp_open_ports ([$ports])

get/set the open listening ports for this host

id

returns the "hopefully" unique address for this host. this is a real design flaw that needs to be worked out. the id right now is either just the ip address or "ipaddress+macaddress" if we know the mac address.

get_attributes

returns a hash of attributes about this host. it is currently used only by the NetworkInfo::Discovery module to store our graph info.

as_string

returns the host in a string representation.

AVAILABILITY

This module can be found in CPAN at http://www.cpan.org/authors/id/T/TS/TSCANLAN/ or at http://they.gotdns.org:88/~tscanlan/perl/ =head1 AUTHOR

Tom Scanlan <tscanlan@they.gotdns.org>

AUTHOR

Tom Scanlan <tscanlan@they.gotdns.org>

SEE ALSO

NetworkInfo::Discovery::Host

NetworkInfo::Discovery::Detect

NetworkInfo::Discovery::Sniff

NetworkInfo::Discovery::Traceroute

BUGS

Please send any bugs to Tom Scanlan <tscanlan@they.gotdns.org>