Igor> I have a question about mib writing.
Igor> Is it correct to use OBJECT-TYPE macro to define a branch?
Igor> The problem is that I'd like to add descriptions to some of the branches
Igor> in my MIB but I do not know how to add DESCRIPTION clause to it if it is
Igor> not OBJECT-TYPE. I could use MODULE-IDENTITY macro but I'm not sure if
Igor> it's only applicable to the topmost branch in my MIB.
Although, in most MIB modules a simple OBJECT IDENTIFIER assignment is
used for this purpose (which does not have the capability to apply
status, description, and reference information), you may consider to
use the OBJECT-IDENTITY construct. See Section 6 of RFC 2578 for
details. It says that
The OBJECT-IDENTITY macro is used to define information about an
OBJECT IDENTIFIER assignment.
Hence, it satisfies your requirements. In my opinion the following text:
[...] All administrative OBJECT IDENTIFIER assignments which
define a type identification value ([...]) should be defined via
the OBJECT-IDENTITY macro. [...]
is just an example, and not the exclusive use-case for the
OBJECT-IDENTITY clause. At least this is the way I can interpret the
specification.
Within all the current 150 MIBs published as RFCs I could find only 5
OBJECT-IDENTITY definitions that are no leaf nodes:
ATM-ACCOUNTING-INFORMATION-MIB::atmAcctngDataObjects
DNS-SERVER-MIB::dns
Printer-MIB::printerV1Alert
RADIUS-ACC-CLIENT-MIB::radiusMIB
RMON-MIB::rmonEventsV2
But I assume, these usages are absolutely legal.
I would appreciate comments from others - maybe the SMIv2 specs
authors - on this question (Cc'ed to the mibs mailing list).