<?php
// (C)Copyright John Baker 2004/2005/2006
//
// This file is part of lsms2mrtg.
//
// lsms2mrtg is free software;you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation;either version 2 of the License, or
// (at your option) any later version.
//
// lsms2mrtg is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY;without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with lsms2mrtg;if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// For more informationn please visit http://gnulsms2mrtg.sourceforge.net/
//error_reporting(2);
/************************************************************\
* Get the number of active bricks from the lsms
\************************************************************/
function GetBrickCount($gethost,$getcommunity)
{
return snmpstripq(snmpget($gethost, $getcommunity,".1.3.6.1.4.1.1751.1.56.1.1.2.1.0"));
}
/************************************************************\
* Get the Brick name for Brick Number BrickNum
\************************************************************/
function GetBrickName($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.2.1.2.".$BrickNum));
}
/************************************************************\
* Get the version of Inferno that the Brick BrickNum is running
\************************************************************/
function GetBrickOS($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.2.1.5.".$BrickNum));
}
/************************************************************\
* Get the Brick type for Brick BrickNum
\************************************************************/
function GetBrickType($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.2.1.4.".$BrickNum));
}
/************************************************************\
* Get the LSMS IP for Brick BrickNum
\************************************************************/
function GetBrickManagementIP($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.2.1.6.".$BrickNum));
}
/************************************************************\
* Get the number of IPSEC cards installed in Brick
\************************************************************/
function GetBrickIpsecCards($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.2.1.7.".$BrickNum));
}
/************************************************************\
*
\************************************************************/
function GetBrickInterfaceCount($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.2.1.10.".$BrickNum));
}
/************************************************************\
* Returns the uptime of specified Brick
\************************************************************/
function GetBrickUptime($gethost,$getcommunity,$BrickNum)
{
return timestrip(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.2.".$BrickNum)));
}
/************************************************************\
* Refurns uptime of LSMS - Broken will return "UNKNOWN" by default
\************************************************************/
function GetLSMSUptime($gethost,$getcommunity)
{
// return timestrip(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.2.1"));
return ("UNKNOWN");
}
/************************************************************\
*
\************************************************************/
function GetBrickCPU($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.12.".$BrickNum));
}
/************************************************************\
*
\************************************************************/
function GetBrickAvgCacheMem($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.13.".$BrickNum));
}
/************************************************************\
*
\************************************************************/
function GetBrickPeakCacheMem($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.14.".$BrickNum));
}
/************************************************************\
*
\************************************************************/
function GetBrickAvgMainMem($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.15.".$BrickNum));
}
/************************************************************\
*
\************************************************************/
function GetBrickPeakMaineMem($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.16.".$BrickNum));
}
/************************************************************\
*
\************************************************************/
function GetInterfaceMac($gethost,$getcommunity,$BrickInt)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.7.".$BrickInt));
}
/************************************************************\
*
\************************************************************/
function GetInterfaceSpeed($gethost,$getcommunity,$BrickInt)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.8.".$BrickInt));
}
/************************************************************\
*
\************************************************************/
function GetIfSpeedConfigured($gethost,$getcommunity,$BrickInt)
{
$a=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.9.".$BrickInt));
if ($a==0) return("10");
if ($a==1) return("100");
if ($a==2) return("1000");
if ($a==3) return("Auto");
}
/************************************************************\
*
\************************************************************/
function GetInterfaceType($gethost,$getcommunity,$BrickInt)
{
$a=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.4.".$BrickInt));
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.4.".$BrickInt));
}
/************************************************************\
*
\************************************************************/
function GetInterfaceIP($gethost,$getcommunity,$BrickInt)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.5.".$BrickInt));
}
/************************************************************\
*
\************************************************************/
function GetInterfaceName($gethost,$getcommunity,$BrickInt)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.3.".$BrickInt));
}
/************************************************************\
* Returns Array for Interface Status - [Up=1 Down=0] and Duplex [half=0 full=1]
\************************************************************/
function GetInterfaceStatus($gethost,$getcommunity,$BrickInt)
{
return array(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.6.".$BrickInt)),
snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.10.".$BrickInt))
);
}
/************************************************************\
*
\************************************************************/
function GetInterfaceVlan($gethost,$getcommunity,$BrickInt)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.6.".$BrickInt));
}
/************************************************************\
*
\************************************************************/
function GetInterfaceNum($gethost,$getcommunity,$BrickInt)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.1.".$BrickInt));
}
// LSMS STuff
/************************************************************\
*
\************************************************************/
function GetLSMSName($gethost,$getcommunity)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.2.2.1.1.0"));
}
/************************************************************\
*
\************************************************************/
function GetLSMSIP($gethost,$getcommunity)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.2.2.1.2.0"));
}
/************************************************************\
*
\************************************************************/
function GetLSMSVersion($gethost,$getcommunity)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.2.2.1.3.0"));
}
/************************************************************\
*
\************************************************************/
function GetLSMSAlarmCount($gethost,$getcommunity)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.2.2.3.1.0"));
}
/************************************************************\
*
\************************************************************/
function GetLSMSAlarmLastTime($gethost,$getcommunity)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.2.2.3.2.0"));
}
/************************************************************\
*
\************************************************************/
function islsms($gethost,$getcommunity)
{
$tmpvar1=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.2.2.1.1.0"));
if (($tmpvar1 === FALSE) || ($tmpvar1== "") || ($tmpvar1== "0") ) {
return(0);
}
else { return(1);
}
}
/************************************************************\
* Return the Processed Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickSessStarted($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.3.".$BrickNum)));
}
/************************************************************\
* Return the InPkts Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickInPkts($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.4.".$BrickNum)));
}
/************************************************************\
* Return the PktsDropped Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickPktsDropped($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.5.".$BrickNum)));
}
/************************************************************\
* Return the IpsecPkts Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickIpsecPkts($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.6.".$BrickNum)));
}
/************************************************************\
* Return the PeakSess Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickPeakSess($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.7.".$BrickNum)));
}
/************************************************************\
* Return the PeakNatSess Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickPeakNatSess($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.8.".$BrickNum)));
}
/************************************************************\
* Return the PeakIpsecSess Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickPeakIpsecSess($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.9.".$BrickNum)));
}
/************************************************************\
* Return the PeakProxySesss Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickPeakProxySess($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.10.".$BrickNum)));
}
/************************************************************\
* Return the PeakDynSA Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickPeakDynSA($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.11.".$BrickNum)));
}
/************************************************************\
* Return the PeakCacheMemory Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickPeakCacheMemory($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.13.".$BrickNum)));
}
/************************************************************\
* Return the AvgCacheMemory Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickAvgCacheMemory($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.14.".$BrickNum)));
}
/************************************************************\
* Return the AvgMainMemory Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickAvgMainMemory($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.15.".$BrickNum)));
}
/************************************************************\
* Return the AvgPktMemoryPackets for Brick Int $BrickNum
\************************************************************/
function GetBrickAvgPktMemory($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.16.".$BrickNum)));
}
/************************************************************\
* Return the PeakPktMemory for Brick Int $BrickNum
\************************************************************/
function GetBrickPeakPktMemory($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.3.1.17.".$BrickNum)));
}
/************************************************************\
* Return the Processed Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickIntProPkts($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.10.".$BrickNum));
}
/************************************************************\
* Return the Dropped Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickIntDropPkts($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.11.".$BrickNum));
}
/************************************************************\
* Return the IPSEC Packets for Brick Int $BrickNum
\************************************************************/
function GetBrickIntIPSECPkts($gethost,$getcommunity,$BrickNum)
{
return snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.12.".$BrickNum));
}
/************************************************************\
* Returns array containing the position of all ethernet interfaces
* associated with Brick $BrickInt
\************************************************************/
function bricketherlist($gethost,$getcommunity,$BrickInt)
{
$b=0;
$c=array();
$a = snmpwalkoid($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.4.1.2");
for (reset($a);
$i = key($a);
next($a)) {
$tmpline=$a[$i];
if (snmpstrip($tmpline)==$BrickInt) {
$c[]=(str_replace("enterprises.1751.1.56.1.1.2.4.1.2.","",$i));
$b++;
}
}
return $c;
}
/************************************************************\
* Returns an array of information about Brick BrickInt
* Name, IP ADDRESS, Brick Type, Uptime, OS Ver, Interface Count and CPU usage
*
* Usage $bricktmp=brickinfo("127.0.0.1","public","1")
*
* will return arrray into varable. Access fields by $bricktmp[0.to.7]
\************************************************************/
function brickinfo($gethost,$getcommunity,$BrickInt)
{
return array(GetBrickName($gethost,$getcommunity,$BrickInt),
GetBricktype($gethost,$getcommunity,$BrickInt),
GetBrickInterfaceCount($gethost,$getcommunity,$BrickInt),
GetBrickUptime($gethost,$getcommunity,$BrickInt),
GetBrickOS($gethost,$getcommunity,$BrickInt),
GetBrickManagementIP($gethost,$getcommunity,$BrickInt),
GetBrickCPU($gethost,$getcommunity,$BrickInt),
bricketherlist($gethost,$getcommunity,$BrickInt)
);
}
/************************************************************\
*Returns Info on Brick interface array returns
* Interface Name (ether0-14), IP address, Speed
* VLAN, MAC address, Interface Up/Down, Duplex full/half
* Processed Packets and Droped Packets
\************************************************************/
function bricketherinfo($gethost,$getcommunity,$BrickEth)
{
$tmp1=GetInterfaceStatus($gethost,$getcommunity,$BrickEth);
$tmp2=GetInterfaceIP($gethost,$getcommunity,$BrickEth);
if ($tmp2=="0.0.0.0") {$tmp2="Dynamic Address";
};
return array(
GetInterfaceName($gethost,$getcommunity,$BrickEth),
$tmp2,
GetInterfaceSpeed($gethost,$getcommunity,$BrickEth),
GetInterfaceVlan($gethost,$getcommunity,$BrickEth),
GetInterfaceMac($gethost,$getcommunity,$BrickEth),
$tmp1[0],
$tmp1[1],
GetBrickIntProPkts($gethost,$getcommunity,$BrickEth),
GetBrickIntDropPkts($gethost,$getcommunity,$BrickEth)
);
}
/************************************************************\
*Returns Brick number for given brick name otherwise returns 0
*
\************************************************************/
function bricknametoint($gethost,$getcommunity,$bricknametmp)
{
$brnum=0;
$brickcount=snmpstrip(GetBrickCount($gethost,$getcommunity));
if ($brickcount >=1) {
$listcounter=1;
while ($listcounter <= $brickcount) {
$bricklist=brickinfo($gethost, $getcommunity, $listcounter);
if ($bricklist[0] == $bricknametmp) {$brnum=$listcounter;
}
$listcounter++;
}
}
return ($brnum);
}
/************************************************************\
*Get number of active interfaces for Brick $BrickInt
*
\************************************************************/
function brickactiveint($gethost,$getcommunity,$BrickInt)
{
$acteth=0;
$bricklist=brickinfo($gethost, $getcommunity, $BrickInt);
$etherarray=$bricklist[7];
reset($etherarray);
while (list($key, $listcounter1) = each($etherarray)) {
$tmpvar1=bricketherinfo($gethost,$getcommunity,$listcounter1);
if ($tmpvar1[5]==1) {$acteth++;
}
}
return $acteth;
}
/************************************************************\
*EtherStats for Ethernet BrickInt
*
\************************************************************/
function bricketherstats($gethost,$getcommunity,$Brickname,$BrickInt2)
{
$retarray1=array();
//gets the brick number from its name
$tmpvar1=bricknametoint($gethost,$getcommunity,$Brickname);
// returns aray containing a list of ether locations for brick number
$tmpvar2=bricketherlist($gethost,$getcommunity,$tmpvar1);
// should return ether[x] from previous array
$BrickIntloc=$tmpvar2[$BrickInt2];
/************************************************************\
*BrkIfStatsEntry ::=
* SEQUENCE {
* brkIfStatsIndex Integer32(0..100000),
* brkIfStatsBrickIndex Integer32(0..100000),
* brkIfStatsHCInOctets Counter64,
* brkIfStatsInUcastPkts Counter32,
* brkIfStatsInMulticastPkts Counter32,
* brkIfStatsInBroadcastPkts Counter32,
* brkIfStatsInDiscards Counter32,
* brkIfStatsInErrors Counter32,
* brkIfStatsInUnknownProtos Counter32,
* brkIfStatsHCOutOctets Counter64,
* brkIfStatsOutUcastPkts Counter32,
* brkIfStatsOutMulticastPkts Counter32,
* brkIfStatsOutBroadcastPkts Counter32,
* brkIfStatsOutDiscards Counter32,
* brkIfStatsOutErrors Counter32,
* brkIfStatsdot3StatsAlignmentErrors Counter32,
* brkIfStatsdot3StatsFCSErrors Counter32,
* brkIfStatsdot3StatsSingleCollisionFrames Counter32,
* brkIfStatsdot3StatsMultipleCollisionFrames Counter32,
* brkIfStatsdot3StatsDeferredTransmissions Counter32,
* brkIfStatsdot3StatsLateCollisions Counter32,
* brkIfStatsdot3StatsExcessiveCollisions Counter32,
* brkIfStatsdot3StatsInternalMacTransmitErrors Counter32,
* brkIfStatsdot3StatsCarrierSenseErrors Counter32,
* brkIfStatsdot3StatsFrameTooLongs Counter32,
* brkIfStatsdot3StatsInternalMacReceiveErrors Counter32,
* brkIfStatsdot3StatsSymbolErrors Counter32,
* brkIfStatsFramesIgnored Counter32
* }
*
\************************************************************/
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.3.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.4.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.5.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.6.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.7.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.8.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.9.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.10.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.11.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.12.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.13.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.14.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.15.".$BrickIntloc));
// the following sections is untested, it is here for future stuff
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.16.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.17.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.18.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.19.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.20.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.21.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.22.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.23.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.24.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.25.".$BrickIntloc));
$retarray1[]="0";
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.27.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.28.".$BrickIntloc));
$retarray1[]=snmpstripq(snmpget($gethost, $getcommunity, ".1.3.6.1.4.1.1751.1.56.1.1.2.5.1.29.".$BrickIntloc));
// end section
return($retarray1);
}
?>