I added the following code to snmpset.c to display the parsed oid
int oid_count = 0;
prinft("\noid = ");
for (oid_count = 0; oid_count < name_length; oid_count++){
printf("%d.", name[oid_count]);
}
printf("\n");
I was able to use the oid to change the value of the column given a index,
the syntax is
snmpset -v1 -cprivate localhost <column oid>.<index oid>.<index ascii value>
my index field is an ASN_OCTET_STR,
ps/ sorry to double-post, hit the wrong key in yahoo mail editor...
--- On Thu, 10/7/10, Leo Lin <hayashi_...@yahoo.com> wrote:
From: Leo Lin <hayashi_...@yahoo.com>
Subject: Re: snmpset table values using oid instead of textual MIB description
To: "Net-snmp-users" <net-snmp-users@lists.sourceforge.net>
Date: Thursday, October 7, 2010, 12:12 PM
I added the following code to snmpset.c to display the parsed oid
int oid_count = 0;
prinft("\noid = ");
for (oid_count = 0; oid_count < name_length; oid_count++){
}
--- On Wed, 10/6/10, Leo Lin <hayashi_...@yahoo.com> wrote:
From: Leo Lin <hayashi_...@yahoo.com>
Subject: snmpset table values using oid instead of textual MIB description
To: "Net-snmp-users" <net-snmp-users@lists.sourceforge.net>
Date: Wednesday, October 6, 2010, 9:52 AM
Hi,
Is it possible to add a new data row to a table described in data_set.c, but
instead of using textual MIB description, use only oid?
"% snmptranslate -m NET-SNMP-EXAMPLES-MIB -Tp -IR netSnmpIETFWGTable
|+--netSnmpIETFWGTable(1)
| |
| +--netSnmpIETFWGEntry(1)
| | Index: nsIETFWGName
| |
| +-- ---- String nsIETFWGName(1)
| | Size: 1..32
| +-- CR-- String nsIETFWGChair1(2)
| +-- CR-- String nsIETFWGChair2(3)
If this module is compiled into an agent, you should be able to issue snmp
commands that look something like (valid authentication information not shown
in these commands): % snmpwalk localhost netSnmpIETFWGTable
nsIETFWGChair1."snmpv3" = "Russ Mundy"
nsIETFWGChair2."snmpv3" = "David Harrington"
% snmpset localhost nsIETFWGChair1.\"sming\" = "David Durham"
nsIETFWGChair1."sming" = "David Durham"
" Thanks! Leo;
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
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/listinfo/net-snmp-users