Hi, there,
I wrote a agent in net-snmp and use commercial MIB browser (iReasoning
and MG-soft) to talk to it.
I try to set values to different OID.  When I use snmpset of net-snmp,
it works fine, but when I use the MIB browser, the values was wrong.
1.      I set an octets string  value "12345"  in OID:
1.3.6.1.4.1.3231.101.4.1.102.1.0,  the agent get the correct value
"12345".
2.      I set another  octets string  value "67" in the same OID, the
agent did not get "67", instead it got "67345".
3.      I set octets string  value "89" to another OID:
1.3.6.1.4.1.3231.101.4.1.102.2.0, the agent did not get  "89", instead
it got "89345".
What did I do wrong?
The set code is as following:
        case MODE_SET_ACTION:
            /* XXX: perform the value change here */
                        strcpy(set_val,(void
*)requests->requestvb->val.string);
                        DEBUGMSG(("testAgent", set_val));
The set_val is defined as char set_val[50];

Thanks
Chi


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
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

Reply via email to