Hi Karl,
I didn't knew PHP 5 was going to support snmp2_* functions.
Your code for jffnms_snmp2 seems ok.
In the future we may test for the snmp2_* functions before using the net-snmp
binaries directly.
Javier
[EMAIL PROTECTED] wrote:
> Javier,
>
> Here is the change I made to get SNMPv2c internal, rather than an
> external call. I pulled this from the PHP bugs
> list basically. It is my understanding that SNMPv2c will be in
> the next releases of PHP v5. At least it was submitted
> to the PHP developers and one responded.
>
>
>
> After apply'ng this patch and re-compiling PHP 5.0.3. I then
> modified api.network.inc.php.
>
> Im being simplistic, but I essentially took snmp1 and copied and
> changed the function call.
>
> function jffnms_snmp2 ($p) {
>
> $params = array_merge(
> array($p["ip"], $p["community"], $p["oid"]),
> (($p["action"]=="set")
> ?array($p["set_type"], $p["set_value"])
> :array()),
> array($p["timeout"]*1000000,$p["retries"]));
>
> return
> @call_user_func_array("snmp2_".$p["action"].((($p["action"]=="walk") &&
> ($p["include_oid"]))?"oid":""), $params);
> }
>
> So far it appears to be working. The discovery functions appear
> to work correctly. The poller has only been running a short while
> so Im still checking.
>
> --
> Karl S. Hagen, CISSP [EMAIL PROTECTED]
> Vice President, JPMorganChase & Company
> GTI End User Technology, Enterprise Network
> 1111 Polaris Pkwy, MS OH1-1287 (614) 213-8758 Office
> Columbus, OH 43240 (614) 264-8539 Cell
>
> This transmission may contain information that is privileged, confidential
> and/or exempt from disclosure under applicable law. If you are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution, or use of the information contained herein (including any
> reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
> in error, please immediately contact the sender and destroy the material in
> its entirety, whether in electronic or hard copy format. Thank you.
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Javier Szyszlican, Project Leader, JFFNMS
[EMAIL PROTECTED]
I hope JFFNMS or I were helpful to you, if you
can, please donate at http://jffnms.org/donate
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users