Re: String to Integer
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
2008/10/13 Mike Ayers <[email protected]>: >> From: Clement Sciammas [mailto:[email protected]] >> We are using net-snmp 5.3.0.1-25.25 and.doing an extend query >> that is returning a string but we would like it to return an >> integer because it is used by another application that will >> only accept integer input. > > The extend command only returns strings. That's actually a slight over-simplification. The extend command actually returns two values: - the output of the command (a string), and - the exit value of the command (an integer) This latter value can be retrieved using the OID .1.3.6.1.4.1.8072.1.3.2.3.1.4."index" Unfortunately, this return code is limited to the range 0-255 (being the values handled by _exit(2)) So that probably doesn't help you with this particular problem. Mike's suggestion of having the client side convert from string to integer is probably the best approach. Dave ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ 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