>>>>> On Fri, 11 Mar 2005 10:58:13 -0500, "Haizhu Liu" <[EMAIL PROTECTED]> said:

Haizhu> int rc = snmp_add_var(pdu, myoid, sizeof(myoid)/sizeof(oid), type,
Haizhu> action_str.data());

snmp_add_var expects a string as the lang argument, not an integer.
thus, passing "2" would have worked when 2 would not have.

Haizhu> It failed with SNMPERR_BAD_NAME, I also tried to uxsse string
Haizhu> action_str = "2" (just for testing purpose), the snmp_add_var
Haizhu> succeeded but snmpset failed with unknown error, but this
Haizhu> tells me that I did not use the wrong oid.

I'd have to see what the OID is that you're using and how it was
encoded.  The agent rejected it it sounds like.

-- 
Wes Hardaker
Sparta


-------------------------------------------------------
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
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to