Jan Henning Thorsen > SNMP-Effective-1.10 > SNMP::Effective::Host

Download:
SNMP-Effective-1.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: SNMP-Effective-1.1101

NAME ^

SNMP::Effective::Host - A SNMP::Effective host class

DESCRIPTION ^

A host object holds all the information pr. host SNMP::Effective requires. This $host object is available in "THE CALLBACK METHOD" in SNMP::Effective.

ATTRIBUTES ^

address

Get host address, also overloaded by "$self".

session

Get SNMP::Session, also overloaded by $$self.

sesssion

Alias for "session" (because of previous typo). Will be deprecated.

varlist

The remaining OIDs to get/set, also overloaded by @$self.

callback

Get a ref to the callback method.

heap

Get/set any data you like. By default, it returns a hash-ref, so you can do:

    $host->heap->{'mykey'} = "remember this";

pre_collect_callback

Holds a callback which will be called right before the first request is sent to the target host. The callback recevies $self as the first argument and the SNMP::Effective object as the second.

post_collect_callback

Holds a callback which will be called after SNMP::Effective is done with the $host object. The callback recevies $self as the first argument and the SNMP::Effective object as the second.

arg

Get/set SNMP::Session args.

data

    $hash_ref = $self->data;
    $hash_ref = $self->data(\@data0, $ref_oid0, ...);

Get the retrieved data or add more data to the host cache.

@data0 looks like: [ $oid0, $iid0, $value0, $type0 ], where $ref_oid0 is used to figure out the $iid unless specified in @data0. $iid0 will fallback to "1", if everything fails.

METHODS ^

new

    $self = $class->new($address);

Object constructor. $address can also be an ip-address.

clear_data

Remove data from the host cache. Will make /data return an empty hash-ref.

AUTHOR ^

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

See SNMP::Effective

syntax highlighting: