Oliver Gorwits > App-Netdisco > App::Netdisco::Core::Arpnip

Download:
App-Netdisco-2.029007.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

App::Netdisco::Core::Arpnip

DESCRIPTION ^

Helper subroutines to support parts of the Netdisco application.

There are no default exports, however the :all tag will export all subroutines.

EXPORT_OK ^

do_arpnip( $device, $snmp )

Given a Device database object, and a working SNMP connection, connect to a device and discover its ARP cache for IPv4 and Neighbor cache for IPv6.

Will also discover subnets in use on the device and update the Subnets table.

store_arp( \%host, $now? )

Stores a new entry to the node_ip table with the given MAC, IP (v4 or v6) and DNS host name. Host details are provided in a Hash ref:

 {
    ip   => '192.0.2.1',
    node => '00:11:22:33:44:55',
    dns  => 'myhost.example.com',
 }

The dns entry is optional. The update will mark old entries for this IP as no longer active.

Optionally a literal string can be passed in the second argument for the time_last timestamp, otherwise the current timestamp (now()) is used.

syntax highlighting: