-1

I have the integer field with scientific notation. But I have the next warnings:

 pThreshold OBJECT-TYPE
        SYNTAX INTEGER { b10E-2(2), b10E-3(3) }
       (4) warning: named number `b10E-2' must not include a hyphen in SMIv2
       (4) warning: named number `b10E-3' must not include a hyphen in SMIv2
            MAX-ACCESS read-write
            STATUS current
            DESCRIPTION
                "........"
            DEFVAL { b10E-3 }
           ::= { pGeneralEntry 3 }

What's wrong?

user1310873
  • 389
  • 1
  • 6
  • 17
  • Perhaps SNMP does not like scientific notation? Also, what makes you think that `b10E-2` is valid scientific notation? `10E-2` - yes, but starting `b` makes it `b10E` identifier followed by `-`. – mvp Sep 09 '13 at 11:23
  • SNMP doesn't care about notations because it packs all formats using binary encoding (ASN.1) during network communications. However NetSNMP may have some restrictions in notation in MIBs. Have you tried expressing your numbers in base-10 notation? Also a negative exponent implies a floating point, not integer, number; are you sure those are the numbers you want to express? – PP. Sep 09 '13 at 12:38

1 Answers1

0

Have you checked out the standard of SMIv2?

Per RFC 2578, https://www.rfc-editor.org/rfc/rfc2578#page-21 when you state SYNTAX INTEGER { b10E-2(2), b10E-3(3) } you are using the named-number enumerations.

So as labels, b10E-2 and b10E-3 are obviously unqualified as they should not contain hyphens at all.

SMIv1 does allow hyphens but it has been obsolete since the introduction of SMIv2. Thus, NET-SNMP warns you and you should try to remove hyphens.

Community
  • 1
  • 1
Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • But how I can express a number 10E-9? is 0.000000001 the only way? – user1310873 Sep 12 '13 at 07:42
  • What do you want to specify? SNMP only provides you INTEGER and a limited set of types to use for objects. If you want to serve complex data types, you might either pass raw bytes (via OCTET STRING), or define a meaningful string (also via OCTET STRING). Please learn about TEXTUAL-CONVENTION, http://www.faqs.org/rfcs/rfc2579.html – Lex Li Sep 12 '13 at 09:20