B.13. Structure of a MIB File

When you read a MIB file, you will notice that it is named and defined between BEGIN and END statements. It will describe what it includes from other MIB files, and it will name the module being defined in this MIB file, the contact information for the person responsible for the MIB, and the revision history. Next you will see the definition of the objects in the MIB.

If you look at the IF-MIB, again distributed with the Net-SNMP package, you can see all of these parts. The MIB is enclosed within these lines

IF-MIB DEFINITIONS ::= BEGIN

END

The first section states the external dependencies.

 IMPORTS MODULE-IDENTITY, OBJECT-TYPE, Counter32, Gauge32, Counter64, Integer32, TimeTicks, mib-2, NOTIFICATION-TYPE FROM SNMPv2-SMI ...

Get Linux Appliance Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.