Bluehost.com Web Hosting $6.95

SNMPERR_BAD_NAME

This is a discussion on SNMPERR_BAD_NAME within the SNMP Coders forums, part of the Networking and Network Related category; I am having a problem with snmpset: this is what I coded to add an integer to snmp set pdu: ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-11-2005
Haizhu Liu
 
Posts: n/a
Default SNMPERR_BAD_NAME

I am having a problem with snmpset:

this is what I coded to add an integer to snmp set pdu:

int action = 2;
char type= 'i';
string action_str((char *)&action, sizeof(action));
.....
pdu = snmp_pdu_create(SNMP_MSG_SET);

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

It failed with SNMPERR_BAD_NAME, I also tried to use string action_str = "2"
(just for testing purpose), the snmp_add_var succeeded but snmpset failed
with unknown error, but this tells me that I did not use the wrong oid. What
does SNMPERR_BAD_NAME actully means? Any suggestion?




-------------------------------------------------------
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
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:41 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0