On 5 March 2010 12:51, Prakash <[email protected]> wrote:
> I have two mibs as below and I want to merge them into a single MIB.
>
> ABC-MIB :=
> =============================================
>
> abc OBJECT IDENTIFIER
> ::= { application 1 }
> XYZ-MIB :=
> =============================================
>
> xyz OBJECT IDENTIFIER
> ::= { application 1 }
That appears to be using the same OID for two different objects.
This is a Very Bad Idea.
The whole point of an OID is that it a way of *uniquely* referring
to a particular management object. Re-using OIDs in this way
is not good practise. Don't do it!
> Is there a way to define a leaf node (which is noOfMessages) with more than
> one "OBJECT IDENTIFIER" in a single MIB file.
No.
Each node has one object identifier.
Each object identifier should refer to one node.
That's the whole point of having an "identifier" - to identify something.
> Example:
>
> abc OBJECT IDENTIFIER
> ::= { application 1 }
>
> xyz OBJECT IDENTIFIER
> ::= { application 2 }
You've just changed the OID for "xyz".
OID to name mappings should be fixed.
Select them so that they form an unambiguous mapping,
and then don't change them.
> noOfMessages OBJECT-TYPE
>
> SYNTAX INTEGER
> MAX-ACCESS read-write
> STATUS current
> DESCRIPTION "Number of Messages Transfred." "
> ::= { abc 1, xyz 2 }
>
> But it is now working...
(I presume you mean "not" rather than "now"!)
No - it won't work. That is not valid syntax.
You need to define two distinct objects - abcNoOfMessages and xyzNoOfMessages
(The alternative would be to use a table)
Dave
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders