FAQ:MIBs 07

From Net-SNMP Wiki
Revision as of 21:44, 25 October 2006 by Dts12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The parser doesn't handle comments properly. Why not?

The most likely reason is that the line in question contains two (or more) sequences of pairs of dashes. This is often used to try and "comment out" an unwanted line that already contains a comment:

       --   broken ::= { myMIB 1 }   -- This isn't working yet

The assumption here is that a comment continues to the end of the line. Unfortunately, this assumption is not correct. A comment will continue either to the end of the line, or the next occurance of a pair of dashes. Thus in this case, the definition of "broken" is commented out (as intended) but the following text is treated as part of the MIB, and will generate an error.

A similar effect can be obtained when a line of dashes has been used to try and mark separate parts of a MIB file.

Most of the applications have a command-line option (-Pc) which will work around this problem by treating the whole line as a comment. But this is not strictly legal, and the offending MIB file should really be corrected.

   FAQ:MIBs
   
  1. Where can I find a MIB compiler?
  2. Why aren't my MIB files being read in?
  3. Where should I put my MIB files?
  4. What does "Cannot find module (XXX-MIB)" mean?
  5. I'm getting answers, but they're all numbers. Why?
  6. What does "unlinked OID" mean?
  7. The parser doesn't handle comments properly. Why not?
  8. How can I get more information about problems with MIB files?
  9. What's this about "too many imported symbols"?
  10. Do I actually need the MIB files?