On Wed, 2005-12-07 at 06:47 -0800, manik chopra wrote:

> i want to set myTableObject2. but to do that i have to specify
> a value of an object which comes prior to this object
> i.e.MY-MIB::myTableObject1 = eth0.

OK - there seems to be a misunderstanding about how to refer
to MIB instances, which is at the heart of your problems.


When working with entries in a MIB table, you need to specify
both with column object you're interested in *and* which row.
I.e. both the MIB object name (e.g. 'myTableObject1') *and*
the index/instance.

Assuming that your table is indexed by a single integer
(probably still the most common situation), then this would
typically be something like

        MY-MIB::myTableObect1.3 = eth0

(where '3' happens to be the index of this particular row).


> I mean if I want to SET myTableObject2 = 99

Exactly the same holds true here.
You can't set a value for the column object in abstract.
You have to set a value for a particular *instance* of
that object - specified in the same way as above

     SET   myTableObject2.3 = 99


> for myTableObject1 = eth0,

The link between the two objects comes from the fact that
you're using the same index value - 3.
If the "eth0" row had an index of 17, then your SET request
would refer to myTableObject2.17 instead.


>  then how do i make this information (i.e.- myTableObject1 = eth0)
> known to the callback function (write_myTableObject2).

The index is part of the OID that's passed to the write routine.
That could should extract this index from the OID, and use this
to decide which row of the table to work with.

It's up to the client side (i.e. the code creating the SET request)
to decide which row to work with, and specify the appropriate index
value.  The agent just works with what it's given.

OK?

Dave



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to