Re: Retrieve Value

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/2/26 anand chandragandhi <[email protected]>:
> Get request for 1.3.6.1.2.1.1.1.0 gives
>
> SNMPv2-MIB::sysDescr.0 = STRING: SHARP-MX-2700G
>
> (print_variable API is used) or
>
> STRING: SHARP-MX-2700G
>
> (print_value API is used)
>
> we are supposed to get SHARP-MX-2700G alone
>
> Is there any API to get "SHARP-MX-2700G"  alone.

Please see snmpcmd(1) under OUTPUT OPTIONS
and snmp.conf(5) under OUTPUT CONFIGURATION


For a C-code level interface to the same functionality,
see default_store(3), and the option parsing code in
snmplib/mib.c
   In particular, look at using the tokens
NETSNMP_DS_LIB_PRINT_BARE_VALUE and
NETSNMP_DS_LIB_QUICK_PRINT


Dave

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.