Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


return values of ifTypes

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track)
Author Message
dagonet
Cacti User


Joined: 29 Oct 2005
Posts: 76
Location: Wuerzburg

PostPosted: Mon Mar 03, 2008 2:26 pm    Post subject: return values of ifTypes Reply with quote

Hello everybody,
I hope someone can shed some light of this:
foreach($active_ports_array as $port_info)
{
if (($ifInterfaces[$indexes[$i]]["ifType"] >= 6) && ($ifInterfaces[$indexes[$i]]["ifType"] <= 9))
{
if ($port_info == 1)
{
$ports_active++;
}
$ports_total++;
}
$i++;
}
This is a code snippet of the mactrack_cabletron.php. I took it as an example. As you can see the ifType is compared against integers. But when I query the ifType OID I got always an array that looks like this:
Array
(
[1] => ethernetCsmacd(6)
[2] => ethernetCsmacd(6)
[3] => ethernetCsmacd(6)
[4] => ethernetCsmacd(6)
[5] => ethernetCsmacd(6)
[6] => ethernetCsmacd(6)
[7] => ethernetCsmacd(6)
[8] => ethernetCsmacd(6)
[9] => ethernetCsmacd(6)
...
)
So that's it what make me thinking. Obviously the array contains strings, but I haven't found anything in the mactrack code, that looks like a conversion part.

Any help is appriciated. I do the writting for extreme switches right know and that drives me realy craisy.

Regards
Dagonet
Back to top
dagonet
Cacti User


Joined: 29 Oct 2005
Posts: 76
Location: Wuerzburg

PostPosted: Sat Apr 05, 2008 8:09 am    Post subject: Reply with quote

Thanks for not helping.
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Sat Apr 05, 2008 11:34 am    Post subject: Reply with quote

Dude, chill. The problem here requires me to ask a few questions. Oh, and I keep trying to "make" time to get back to this.

1) What version of PHP are you using, you "SHOULD" be using PHP 5.1++ as it contains a nice new feature.
2) Do you have php_snmp enabled? I need to know that?
3) Are you using the binary mode net-snmp? If so, what version.

The bottom line is that net-snmp should be returning the "numeric" equiv and it is not. We have to find why it is not. The information you provided above, will help answer that. I would like to get to the bottom of it before you upgrade PHP by the way. So, the ball is back in your court.

Larry
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group