2009/7/8 François Dumont <francoisdumon...@gmail.com>:
> I reduced the python script to this :
>
>> qosType = raw_input("Enter the new type (0 = rbCG, 1 = rbRT, 2 = rbNRT, 3
>> = rbBE) :\n")
>> value = "rbQoSProfileType"
>> oid = netsnmp.Varbind(value, profileNb, qosType)
>> resultSet = netsnmp.snmpset(oid, DestHost = "10.0.0.1", Community =
>> "private", Version = 2)
>> #resultGet = netsnmp.snmpget(oid, DestHost = "10.0.0.1", Community =
>> "private", Version = 2)
>> print("get result : %s") %(resultSet)
>> #print("%s = %s") %(value,resultGet)
>
> If I run this python script, it returns (resultSet) 0, so the set didn't
> succeed. If I uncomment the two commented lines, it returns a segmentation
> fault. I followed step by step what does the script with the pdb debogger,
> and I found that this is when it enters the get function that it fails (and
> gives the segmentation fault).

OK - that's progress.

How about reducing it further.   Something like:

     qosType = "0"
     profileNb = "1      ;     # or whatever index you are using
     value = "rbQoSProfileType"

     oid = netsnmp.Varbind(value, profileNb, qosType)
     r = netsnmp.snmpget(oid, DestHost = "10.0.0.1", Community
="private", Version = 2)
     print ("Get1: %s")  %(r)

     oid = netsnmp.Varbind(value, profileNb, qosType)
     r = netsnmp.snmpset(oid, DestHost = "10.0.0.1", Community
="private", Version = 2)
     print ("Set: %s")  %(r)

     #oid = netsnmp.Varbind(value, profileNb, qosType)
     r = netsnmp.snmpget(oid, DestHost = "10.0.0.1", Community
="private", Version = 2)
     print ("Get2: %s")  %(r)


Does the initial GET crash?  Or is it just the GET *following* the SET request?
Does it make a difference if you uncomment the line that re-sets the
oid variable
befor the second GET?



Dave

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to