Issues with Mixed Strings, Inegers in Multi OID SNMPGET Request

This is a discussion on Issues with Mixed Strings, Inegers in Multi OID SNMPGET Request within the SNMP Coders forums, part of the Networking and Network Related category; Hello all. I have written a program that performs several SMNPGET's in a single call. The problem is that ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-04-2005
larryjadams@comcast.net
 
Posts: n/a
Default Issues with Mixed Strings, Inegers in Multi OID SNMPGET Request

Hello all. I have written a program that performs several SMNPGET's in a single call. The problem is that when I parse the results into an array using the following function:

for (vars = response->variables; vars; vars = vars->next_variable) {
snprint_value(snmp_oids[i].result, sizeof(snmp_oids[i].result)-1, vars->name, vars->name_length, vars);
i++;
}

I get a blank string for the values that are parsed as STRINGS. We first noticed this with the UCD/NET SNMP load average OID values. They would normaly return "0.01", etc. as STRING.

The problem is not consistent either, but working with a few users, I have found a way to isolate and remove the problem, but I would rather just eliminate it from happening at all. First off, if I run in Cygwin windows I experience no problems.

Also, if a user, on a system that is experiencing the problem, deletes/moves all the MIB files poited to by the MIBDIRS environment variable, the problem also goes away.

In addition, if that same user uses the SNMPGET application, the information that is returned is accurate.

This appears to be associated with MIB parsing. The only problem is that I don't know what library calls to make to prevent this error from occuring. Any help would be appreciated.

Regards,

Larry Adams (aka TheWitness)
The Cacti Group


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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
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

vB 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 01:25 AM.


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