FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
HP_Snmp Class Reference

SNMP driver for HP switches (tested on HP5800). More...

Inheritance diagram for HP_Snmp:
Abstract_Snmp

Public Member Functions

 isCompactibleDriverWith ($device_ip)
 Checks if the driver is compactible with the driver.
 getARPMacAddressOf ($device_ip)
 Obtain MAC address of a device with the given IP address from ARP table.
 getDHCPMacAddressOf ($device_ip)
 Obtain MAC address of a device with the given IP address from DHCP server.
 getPortNumberOf ($mac_address)
 Obtaint port number with given MAC address.
- Public Member Functions inherited from Abstract_Snmp
 getTimeout ()
 Gets the current number of microseconds until the first timeout.
 setTimeout ($timeout)
 Sets the number of microseconds until the first timeout.
 getRetries ()
 Gets the number of times to retry if timeouts occur.
 setRetries ($retries)
 Sets the number of times to retry if timeouts occur.
 getComunity ()
 Gets the read community.
 setComunity ($comunity)
 Sets the read community.
 setDeviceIp ($device_ip)
 Sets device IP.
 getDeviceIp ()
 Gets device IP address.
 errorHandler ($errno, $errstr, $errfile, $errline)
 Handles errors (throws exceptions)

Additional Inherited Members

- Protected Member Functions inherited from Abstract_Snmp
 startErrorHandler ()
 Starts handling PHP errors as Exceptions (if not already started)
 stopErrorHandler ()
 Stops handling PHP errors as Exceptions (if not alreasy stopped)
- Protected Attributes inherited from Abstract_Snmp
 $timeout = 3000000
 $retries = 5
 $comunity = 'public'
 $error_handler_started = FALSE
 $deviceIp

Detailed Description

SNMP driver for HP switches (tested on HP5800).

This class MUST not be initialized directly, use Snmp_Factory!

Author
Michal Kliment
See Also
Abstract_Snmp

Member Function Documentation

HP_Snmp::getARPMacAddressOf (   $device_ip)

Obtain MAC address of a device with the given IP address from ARP table.

Parameters
string$device_ipIP address of the device (we would like to know his MAC)
Returns
string MAC address in format xx:xx:xx:xx:xx:xx
Exceptions
ExceptionOn SNMP error or wrong SNMP response
InvalidArgumentExceptionOn wrong IP address
Todo:
Do it :-)

Reimplemented from Abstract_Snmp.

HP_Snmp::getDHCPMacAddressOf (   $device_ip)

Obtain MAC address of a device with the given IP address from DHCP server.

Parameters
string$device_ipIP address of the device (we would like to know his MAC)
Returns
string MAC address in format xx:xx:xx:xx:xx:xx
Exceptions
ExceptionOn SNMP error or wrong SNMP response
InvalidArgumentExceptionOn wrong IP address
Todo:
Do it :-)

Reimplemented from Abstract_Snmp.

HP_Snmp::getPortNumberOf (   $mac_address)

Obtaint port number with given MAC address.

Parameters
string$mac_addressMAC address of the device (we would like to know to which port is connected)
Returns
string MAC address in format xx:xx:xx:xx:xx:xx
Exceptions
ExceptionOn SNMP error or wrong SNMP response
InvalidArgumentExceptionOn wrong IP address

Reimplemented from Abstract_Snmp.

HP_Snmp::isCompactibleDriverWith (   $device_ip)

Checks if the driver is compactible with the driver.

Parameters
string$device_ipDevice IP address
Returns
bool Is compactible?

Reimplemented from Abstract_Snmp.


The documentation for this class was generated from the following file: