Re: oids not displayed as strings when send in traps
Dharm S <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAFyUrtZBeNC52106CBsXPEZ=eyRTy_cBB2Mi3opnCgo=wVRvBA@mail.gmail.com> |
Thank You Bill. I am sorry that I had mentioned ServiceTime instead of StatusCodeIns. I included the string length and its working fine now. On Thu, Oct 2, 2014 at 6:29 PM, Bill Fenner <[email protected]> wrote: > On Wed, Oct 1, 2014 at 8:04 AM, Dharm S <[email protected]> wrote: > >> Hi All, >> >> I have the following in one of the notification template. >> >> const oid sipCommonCfgServiceStartTime_oid[] = { >> 1,3,6,1,2,1,149,1,1,1,1,3, /* insert index here */ }; >> >> It has 3 index values : two integers and one string. >> > > This is strange, since the sipCommonCfgServiceStartTime in the MIB has one > index value, just the applIndex. > > >> How am I supposed to include the string value? >> >> i tried using row->indexes->index_oid instead of the below oid. >> >> But when received at trap, it replaces string by ascii values (ACK) as >> follows >> SIP-COMMON-MIB::sipCommonStatusCodeIns.1.65.67.75.0.183 >> > > sipCommonStatusCodeIns is a different OID than you supplied above. Its > INDEXes are applIndex, > sipCommonStatusCodeMethod, sipCommonStatusCodeValue. That's > INTEGER, SipTCMethodName (OCTET STRING), and Unsiged32. > > According to http://tools.ietf.org/html/rfc2578#section-7.7 part (3), you > have to prepend the length of the string - so the interpretation of the OID > that you provided is that there's a 65-byte string, but there are not 65 > bytes left in the OID so the parser just punts on trying to represent it as > a string. The proper encoding of that string in that OID is > > SIP-COMMON-MIB::sipCommonStatusCodeIns.1.3.65.67.75.183 > > and if you check with the command-line tool, that does translate: > > % snmptranslate SIP-COMMON-MIB::sipCommonStatusCodeIns.1.3.65.67.75.183 > SIP-COMMON-MIB::sipCommonStatusCodeIns.1."ACK".183 > > Bill > > > >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> 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 >> >> > ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ 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