Bluehost.com Web Hosting $6.95

Question about netsnmp_call_handlers() function in snmp_agent.c

This is a discussion on Question about netsnmp_call_handlers() function in snmp_agent.c within the SNMP Users forums, part of the Networking and Network Related category; Hi, I've a question regarding netsnmp_call_handlers(), if I have a SET pdu as following: set a=3D1, b=3D2, ...


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 Question about netsnmp_call_handlers() function in snmp_agent.c


Hi,

I've a question regarding netsnmp_call_handlers(), if I have a SET pdu
as following:

set a=3D1, b=3D2, c=3D3

Is netsnmp_call_handlers() called once for all 3 varbinds, or it is
called three times, each for one varbind?
(one for 'a', one for 'b', one for 'c')?

Based on the code in handle_var_requests():

for (i=3D0; i<=3Dasp->treecache_num; i++)
{
...
netsnmp_call_handlers();
...
}

I tend to think netsnmp_call_handlers() is called 3 times, but I found
somewhere on internet talking about UCD-SNMP vs Net-SNMP which has
following:

Q: If an snmp querye PDU contains 3 (eg) varbinds, all from the same
table, in
the ucd code we know the agent sends 3 requests to the individual set
funcs
of the varbinds. If we go to the new style would the agent
"collect" these
and make a single call?=20
A: yes, the new style will collect into one request to the handler.
There is
even a 'row merge' helper which will break/merge it into one call per
row,
so all the requests for a certain row will come in together.

So I don't know how varbinds are passed to handlers (and write funcs in
ucd code)

Also is there any place I can find description regarding
asp->treecache[]? What is it for? What is asp->treecache_num?

Thanks,
Yong Chen


-------------------------------------------------------
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 07:02 AM.


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