Re: multiple Sub-agents managing the same table

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 05/09/06, Arnaud BODENAN <[email protected]> wrote:
> Sorry Dave, but I give you my MIB in previous mails;

Err... no.  Not that I can see.
I'd checked back through this thread to make sure, before my previous reply.


> My table is defined something like that:
> genRoot (99999)
> ---- genTestRoot (10000)
> --------- genMetrics (1)
> --------------- genServerTable (1)
> ---------------------genServerEntry (1)
> -------------------------- genServerIndex (1)
> -------------------------- genServerName (2)
> -------------------------- genServerProductName (3)
> -------------------------- genServerHostname (4)
> -------------------------- genServerPID (5)

I'd have preferred to see the actual MIB, but that gives the basic
idea.  Thanks.

> // Strangely, it has to begin with the index 2... @todo
> while ( allocatedIndex <= 1 && allocatedIndex > 0 )

i.e.     "while (allocatedIndex == 1 )"  ??


> // Define the oid of the first column from the index returned
> oid genServerAllocatedOid[] =
>     { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, allocatedIndex };
> size_t genServerAllocatedOidLen = OID_LENGTH(genServerAllocatedOid);
> // Set the range_subid to the first column of the row
> handlerServerTable->range_subid = genServerAllocatedOidLen;

No.
I think that's the index of the 'allocatedIndex' subidentifier.
You need the subidentifier that identifies the *column* object.
i.e. genServerAllocatedOidLen-1

This means that you'll end up registering:
    { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, allocatedIndex };
    { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 2, allocatedIndex };
    { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 3, allocatedIndex };
    { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 4, allocatedIndex };
    { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 5, allocatedIndex };

At the moment, I think you're registering
    { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, allocatedIndex };
        :
    { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, 5 };


As I'm sure I've said before, you should walk the nsRegistryTable, to
check exactly what is getting registered and how this compares to what
you expect to be registered.

Dave

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.