OoO Pendant le  repas du mercredi 01 juillet  2009, vers 19:23, François
Dumont <[email protected]> disait :

>     import netsnmp

>     oid = "ipIfConfigIpAddress"
>     Version = 2
>     DestHost = "10.0.0.1"
>     Communuty = "private"

>     result = netsnmp.snmpwalk(oid, Version = Version, DestHost = DestHost,
>     Community = Community)


> But with snmpset, it doesn't work (certainly because I don't use it as it has
> to be used) :


>     oid = netsnmp.Varbind('ipIfConfigIpAddress')

Use:
 netsnmp.Varbind('sysName', 'hello')

For  IP  address, I  am  not  really sure  how  you  should  set such  a
value. You should try '127.0.0.1' and struct.pack('bbbb', 127, 0, 0, 1).

>     result = netsnmp.snmpset(oid, Version = Version, DestHost = DestHost,
>     Community = Community)

> It returns "Segmentation fault".

NetSNMP bindings for Python are not error-tolerant.
-- 
I AM NOT DELIGHTFULLY SAUCY
I AM NOT DELIGHTFULLY SAUCY
I AM NOT DELIGHTFULLY SAUCY
-+- Bart Simpson on chalkboard in episode 1F14

------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to