Bluehost.com Web Hosting $6.95

Re: snprint_value formating

This is a discussion on Re: snprint_value formating within the SNMP Users forums, part of the Networking and Network Related category; On Thu, 2005-12-01 at 13:26 -0800, marc schneider wrote:=20 > I'm using snprint_value to format ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-13-2005
Dave Shield
 
Posts: n/a
Default Re: snprint_value formating

On Thu, 2005-12-01 at 13:26 -0800, marc schneider wrote:=20
> I'm using snprint_value to format data retrieve from the RMON field
> captureBufferPacketData. The MIB defines this as octet data. Sometimes
> this data is formated by snprint_value as Hex-STRING and sometimes it
> is formatted as STRING. Is there a way to force this to always be
> formatted as Hex-STRING?


$ man snmpcmd
=20
OUTPUT OPTIONS
-Oa If a string-valued object definition does not
include a Display Hint, then the library attempts
to determine whether it is an ascii or binary
string, and displays the value accordingly. This
flag bypasses this check, and displays all strings
as ASCII. Note that this does not affect objects
that do have a Display Hint.

-Ox This works similarly to =E2=80=99-Oa=E2=80=99, but displays s=
trings
as Hex.


Or

case 'a':
netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_STRING_OUTPUT_FORMAT,
NETSNMP_STRING_OUTPUT_ASCII);
break;
case 'x':
netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_STRING_OUTPUT_FORMAT,
NETSNMP_STRING_OUTPUT_HEX);
break;

Dave=20


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
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/...net-snmp-users
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 10:13 AM.


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