Re: snmptranslate -IR -Tp reserved word problem

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/12/31 Mike Ayers <[email protected]>:
>        I do not believe you can place comment markers (--) inside a comment.
>        I believe you need to add a space after the comment markers.
>        I do not believe you can put a comment marker within a comment,

That's not strictly true.
The ASN.1 comment marker  '--'   works in a similar manner
to the C-style /*  */  comments (as well as C++-style // comments).
   I.e. double-dash denotes the start of a comment, and a second
double-dash (or the end of the line) denotes the end of the comment.

So
     myObject -- this is a comment --  OBJECT IDENTIFIER
is perfectly valid syntax.


This means that a line of dashes will work correctly,
as long as there are an even number (or 4n-1) of dashes
in the line.   But if you have 4n+1 dashes, then the first 4n
will be interpreted as n (empty) comments, and the final
dash will be parsed as active syntax, and throw an error.

So you *can* use lines of dashes to separate different sections
of the MIB, and you've fot a 75% chance of getting away with it!


But I would agree with Mike's advice:

>      i.e., don't do "----------------------".

If you want to have horizontal rules in your MIB,
try something like

   - - = = = = = = = = = =

(without the spaces!)

Dave

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.