|
Posted by acrux14 on 04/11/06 00:55
Hi,
I need to poll SNMP variables from Cisco routers using SNMPv3 (security
reasons).
I'm trying to use the little-documented SNMPv3 functions (see
http://us3.php.net/manual/en/ref.snmp.php, where argument lists seem to
be truncated, and
http://zugeschaut-und-mitgebaut.de/php/function.snmp3_get.html).
I can get snmp3_get function to work fine, but when I try snmp3_getnext
I get a "Fatal error: Call to undefined function" error... does this
mean that function is not compiled into the system? Seems strange that
snmp3_get is and snmp3_getnext isn't... How can I go about confirming
this? And fixing it? Any pointers will be much appreciated!!!
More details follow:
jschnack@maxwell ~/develop/srt $ cat snmpv3-test.php
<?php
$desc = snmp3_get('x.x.x.x', 'snmpuser', 'authPriv', 'md5', 'password',
'des', 'password', 'sysDescr.0');
print "$desc\n";
?>
jschnack@maxwell ~/develop/srt $ php snmpv3-test.php
STRING: Cisco IOS Software, C2600 Software (C2600-ADVIPSERVICESK9-M),
Version 12.3(11)T7, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Fri 29-Jul-05 22:38 by dchih
jschnack@maxwell ~/develop/srt $
jschnack@maxwell ~/develop/srt $
jschnack@maxwell ~/develop/srt $ cat snmpv3-test2.php
<?php
$x = snmp3_getnext('x.x.x.x', 'snmpuser', 'authNoPriv', 'md5',
'password', 'des', 'password',
'ip.ipRouteTable.ipRouteEntry.ipRouteDest');
print "$x\n";
?>
jschnack@maxwell ~/develop/srt $
jschnack@maxwell ~/develop/srt $ php snmpv3-test2.php
Fatal error: Call to undefined function: snmp3_getnext() in
/home/jschnack/develop/srt/snmpv3-test2.php on line 2
jschnack@maxwell ~/develop/srt $
BTW, I *am* able to poll the ipRouteDest variable using snmp getnext
function from the command line (NET-SNMP version: 5.2.1.2), so I don't
think I'm misinterpreting the SNMP side of the problem.
Thanks,
J.
Navigation:
[Reply to this message]
|