Larry Hayes
Larry Hayes

Reputation: 66

Editing a MIB module

I have been tasked at the company I work for to make changes to a company generated MIB. That is it lives under the private sub tree.

The MIB has a table with a couple of object defined in the table. They want the name of one of the object renamed. Example:
TableEntry ::= SEQUENCE { yada, yada OldName Integer32 }

Can I just edit the MIB document to use the new name or do I need to deprecate the OldName and add a new entry and object for the new name?

TableEntry ::= SEQUENCE { yada, yada OldName Integer32, NewName Integer32 }

Seems like this would be harder on an NMS to as a GET on the OldName would return no such object for this table.

Upvotes: 0

Views: 306

Answers (1)

Gambit Support
Gambit Support

Reputation: 1473

The object name is purely for human consumption (or for any tools for human consumption, such as a MIB compiler, or IDE). The SNMP protocol deals only with OIDs.

As such, the worst thing would be to deprecate and add a new entry, since then you would break all the applications that rely on the old OID.

Your solution is to REPLACE OldName with NewName, not add it to the SEQUENCE.

If you want to be safe, you could add an OBJECT IDENTIFIER clause that makes a second name equivalence for that OID, in your example, after your definition of NewName, eg.

NewName OBJECT-TYPE
...
::= { tableentry N } 
-- N is a decimal number

you could add

OldName  OBJECT IDENTIFIER ::= { tableentry N }

Upvotes: 1

Related Questions