RE: Multiple sets in one pdu

This is a discussion on RE: Multiple sets in one pdu within the SNMP Users forums, part of the Networking and Network Related category; Dave, Sorry coming back to this topic again, how do I walk through the list in 5.x? for instance, ...


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-07-2005
Yong Chen
 
Posts: n/a
Default RE: Multiple sets in one pdu


Dave,

Sorry coming back to this topic again, how do I walk through the list in
5.x? for instance, the nsLogging example has handle_nsLoggingTable(), is
that the forth input parameter: 'requests', has all incoming varbinds? I
just go through it via "request->next"?

Actually I'm doing SET for a table in UCD 4.x style, then how do I walk
through the incoming varbinds for a SET?

Thanks a lot,
Yong Chen


The usual basic technique is to walk through the full list of
assignments, checking them individually and making any preparations for
acting on them. RESERVE1 ?
Then walk through the list again, updating the individual assignments.
RESERVE2 ?
Then walk through the list *again*, checking that the final state is
consistent. ACTION ?
Then walk through the list again, tidying up. COMMIT ?


-----Original Message-----
From: Dave Shield [mailto:D.T.Shield@csc.liv.ac.uk]=20
Sent: Thursday, October 20, 2005 1:29 AM
To: Yong Chen (yongche)
Cc: net-snmp-users@lists.sourceforge.net
Subject: RE: Multiple sets in one pdu

On Wed, 2005-10-19 at 10:52 -0700, Yong Chen (yongche) wrote:
> But in ChangeLog, it says:
>=20
> Fixes:
> - the agent should properly handle requests in the right order.
> (e.g., restrict the agent to processing only one SET at a time)


Yes - that's concerned with the processing of two *different* SET
requests. Not the processing of two varbind assignments in the
*same* SET request.


If an agent receives:

SET oneFish =3D xxx
SET twoFish =3D yyy

then it should finish handling the "oneFish" assignment *before*
starting to look at the "twoFish" assignment.

If it receives:

SET redFish =3D xxx, blueFish =3D yyy

then it needs to process *both* assignments "at the same time".


> Also the ordering of varbinds in a SET request may have some=20
> significance because of dependency between the varbinds.


That's why handling SET requests properly is Non-Trivial!

The usual basic technique is to walk through the full list of
assignments, checking them individually and making any preparations for
acting on them.
Then walk through the list again, updating the individual assignments.
Then walk through the list *again*, checking that the final state is
consistent.
Then walk through the list again, tidying up.


If one assignment ("oldFish") relies on another ("newFish"), it is *NOT*
valid to assume that the varbinds occur in the most helpful order. The
agent *MUST* be able to process both
SET oldFish =3D xxx, newFish =3D yyy
and
SET newFish =3D yyy, oldFish =3D xxx

with *exactly* the same results in either case.



> Where can I find doc regarding the simultaneously processing SET=20
> assignments?


RFC 3416, section 4.2.5
See p22, second para.


> And I've been reading the code, but not finding the "as if=20
> simultaneously" processing of SETs. Can you please point me to the=20
> code?


There is no One Single Place where this is handled.
Each MIB will have different requirements for what assignments rely on
other ones, so the "as if simultaneous" code will be specific to each
particular MIB.

For an example, have a look at 'agent/mibgroup/agent/nsLogging'.
This shows one possible approach to ensuring that SEt requests will be
processed correctly, independent of varbind order.
I probably wouldn't write this in quite the same way now, but it show
the basic ideas.

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 11:39 AM.


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