I validated my mib with the tool that you have specified I got the following error …
2329           SYNTAX              OCTET STRING {
   (1) syntax error, unexpected '{', expecting STATUS
                                                 None("NA"),

I will use any one of the option you have specified …

 

Thanks Dave

 

-JP  

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shield
Sent: Thursday, September 21, 2006 1:34 PM
To: Jayaprakasha Guddenahalli Naganna
Cc: [email protected]
Subject: Re: enum of syntax OCTET STRING in MIB design ...

 

On 21/09/06, Jayaprakasha Guddenahalli Naganna <[EMAIL PROTECTED]> wrote:

> In rfc2578 "Structure of Management Information Version 2 (SMIv2)" it is

> mentioned that enumeration is not supported for OCTET STRING ,

> I have OID designed as follows,

> CountryCode OBJECT-TYPE

>         SYNTAX              OCTET STRING {

>                               None(NONE),

>                               United States(US),

>                               Andorra(AD)

>                             }

 

 

> When I verified the above OID design with agent, my manager (iReasoning mib

> browser) able to resolve the enumerated values …

> 

>       i.e when my agent sends "US" , manager showed it as "United States" …

> 

> I am not sure whether the above design is correct. (enum of OCTET STRING

> syntax)

 

No - I'm pretty sure that this design is *not* valid.

Just because some random SNMP software doesn't complain - this doesn't

automatically mean that the MIB is valid.   Many software packages

(including Net-SNMP) are relatively forgiving in their handling of MIB

parsing.

   If you want to check the validity of your MIB, you should use one

of the dedicated MIB validation tools, such as "smilint" or the Simple

Web validation page

(http://snmp.cs.utwente.nl/ietf/mibs/validate/)

 

I would be fairly surprised if these tools didn't complain about your

MIB design.

 

 

Two options spring to mind:

  a) either send the actual text you want to be displayed (i.e.

"United States"), or

  b) use an enumerated integer instead:

 

 

> CountryCode OBJECT-TYPE

>         SYNTAX              INTEGER {

>                               None(0),

>                               United States(1),

>                               Andorra(2)

>                             }

 

 

Dave

 

 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to