View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Oliver Gorwits > App-Netdisco-2.037005 > App::Netdisco::Util::Node

Download:
App-Netdisco-2.037005.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: App-Netdisco-2.039031

NAME ^

App::Netdisco::Util::Node

DESCRIPTION ^

A set of helper subroutines to support parts of the Netdisco application.

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

EXPORT_OK ^

check_mac( $device, $node, $port_macs? )

Given a Device database object and a MAC address, perform various sanity checks which need to be done before writing an ARP/Neighbor entry to the database storage.

Returns false, and might log a debug level message, if the checks fail.

Returns a true value (the MAC address in IEEE format) if these checks pass:

Optionally pass a cached set of Device port MAC addresses as the third argument, in which case an additional check is added:

is_nbtstatable( $ip )

Given an IP address, returns true if Netdisco on this host is permitted by the local configuration to nbtstat the node.

The configuration items nbtstat_no and nbtstat_only are checked against the given IP.

Returns false if the host is not permitted to nbtstat the target node.

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: