On Fri, Mar 5, 2010 at 7:51 AM, Prakash <[email protected]> wrote:

>
> Thanks Dave,
>
> I have two mibs as below and I want to merge them into a single MIB.
>

According to your original definitions,


> ABC-MIB :=
>
>        abc     OBJECT IDENTIFIER ::=  {  application  1  }
>

... snip ...



> XYZ-MIB :=
>
>        xyz     OBJECT IDENTIFIER ::=  {  application  1  }
>
>

This is the first problem.  You really can't have two different identifiers
for the same leaf.

In your original example you had the equivalent of:

application (x) .abc (1) .noOfMessages (1) at the OID .x.1.1
application (x) .xyz (1) .noOfMessages (2) at the OID .x.1.2

So you really have two separate variables, but the problem is that you
have two definitions for the OID branch .x.1.  It could either be
'abc' or 'xyz'.  You can't really do that.  Although it looks OK when
you look at two seperate MIB files, a good compiler should complain
(I think) if you try to compile both files at the same time.  Note that
if you compile them seperately, each invocation of the seperate
files won't know about the other, and therefore won't complain
about the conflict/ambiguity.

So it all depends on what you are really trying to accomplish...
Your original example has two variables.  But in your next example,
you want to have the same variable at two different locations/leafs...

Is there a way to define a leaf node (which is noOfMessages) with more than
> one "OBJECT IDENTIFIER" in a single MIB file.
> Example:
>
>        abc     OBJECT IDENTIFIER ::=  {  application  1  }
>        xyz     OBJECT IDENTIFIER ::=  {  application  2  }
>
>        noOfMessages    OBJECT-TYPE
>
>                SYNTAX  INTEGER
>                MAX-ACCESS      read-write
>                STATUS          current
>                DESCRIPTION     "Number of Messages Transfred." "
>                ::=  {  abc 1, xyz 2  }
>


Now the problem comes in making the OBJECT's leaf unique too
The closest merge to your original request would be the following


       abc     OBJECT IDENTIFIER ::=  {  application  1  }
       xyz     OBJECT IDENTIFIER ::=  {  application  2  }

       noOfMessages    OBJECT-TYPE
               SYNTAX  INTEGER
               MAX-ACCESS      read-write
               STATUS          current
               DESCRIPTION     "Number of Messages Transfred." "
               ::=  {  abc 1  }

       noOfMessages2    OBJECT-TYPE
               SYNTAX  INTEGER
               MAX-ACCESS      read-write
               STATUS          current
               DESCRIPTION     "Number of Messages Transfred." "
               ::=  {  abc  2 }

Here you end up with two variables each at unique leafs:

application (x) .abc (1) .noOfMessages (1) at the OID .x.1.1
application (x) abc (1) .noOfMessages2 (2) at the OID .x.1.2

But here you would loose the concept of the 'xyz' branch.
------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to