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

open_ports

these are ports that we know this host to be listening on

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,]
				[open_ports	=> $array_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])
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.

AUTHOR

Tom Scanlan <tscanlan@openreach.com>

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>

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 47:

'=item' outside of any '=over'

Around line 267:

You forgot a '=back' before '=head1'