Oliver Gorwits > App-Netdisco-2.019002 > App::Netdisco::Core::Macsuck

Download:
App-Netdisco-2.019002.tar.gz

Dependencies

Annotate this POD

Website

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

NAME ^

App::Netdisco::Core::Macsuck

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_macsuck( $device, $snmp )

Given a Device database object, and a working SNMP connection, connect to a device and discover the MAC addresses listed against each physical port without a neighbor.

If the device has VLANs, do_macsuck will walk each VALN to get the MAC addresses from there.

It will also gather wireless client information if store_wireless_clients configuration setting is enabled.

store_node( $ip, $vlan, $port, $mac, $now? )

Writes a fresh entry to the Netdisco node database table. Will mark old entries for this data as no longer active.

All four fields in the tuple are required. If you don't know the VLAN ID, Netdisco supports using ID "0".

Optionally, a fifth argument can be the literal string passed to the time_last field of the database record. If not provided, it defauls to now().

store_wireless_client_info( $device, $snmp, $now? )

Given a Device database object, and a working SNMP connection, connect to a device and discover 802.11 related information for all connected wireless clients.

If the device doesn't support the 802.11 MIBs, then this will silently return.

If the device does support the 802.11 MIBs but Netdisco's configuration does not permit polling (store_wireless_clients must be true) then a debug message is logged and the subroutine returns.

Otherwise, client information is gathered and stored to the database.

Optionally, a third argument can be the literal string passed to the time_last field of the database record. If not provided, it defauls to now().

syntax highlighting: