Bluehost.com Web Hosting $6.95

Re: SET request

This is a discussion on Re: SET request within the SNMP Users forums, part of the Networking and Network Related category; On Wed, 2005-12-07 at 06:47 -0800, manik chopra wrote: > i want to set myTableObject2. but to ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-09-2005
Dave Shield
 
Posts: n/a
Default Re: SET request

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/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:17 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0