Iterate handler helper - Do I really understand how it works?
"Makavy, Erez (Erez)" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <AAB4B3D3CF0F454F98272CBE187FDE2F09BCBF15@is0004avexu1.global.avaya.com> |
Hey,
I'm starting to get the hand of this helper...but still a few questions:
1) in the table_handler funciton (generated by mib2c.iterate.conf):
within the case MODE_GET: it goes over the requests list:
What is in this list: variable_bindings of the same GET
request?
2) How come I don't see any variableN structues registered (like in the
old ucd API)?
(this is general about table registratiion)
How does the engine know the types of the culomns (which are not
indexes)?
(in order to perform validity checks)
3) When are the (generated) function createEntry and removeEntry called?
does the iterator already support Row-Create? (guess not?)
4) I think I finaly understood the basis of how this table_iterator
works, so let ME explain,
tell me if I'm wrong (please be passiant):
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------
- The iterator gets a GET request for a specific OID, say OID=X.Y (where
x is the leaf and y is the suffix/instance).
- The iterator uses get_first_data_point and get_next_data_point , to
iterate through my data structure until it find the request Y.
(this it done by cleverly comparing:
* the put_index_data returned from each entry
* the indexes definitions that were registered to the table
helper
* the request instance (Y)
)
- for a GET_NEXT request, the iterator HAS to iterate through all the
entries,
and return the instance which is (closest to && higher than) the
requested Y.(if it exists)
(I'm really not sure about this, I just made it up)
- The function that does all this is the
netsnmp_extract_iterator_context.
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------
Thank you very much for reading up to here!
Erez.
-------------------------------------------------------
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_idv37&alloc_id865&op=click
_______________________________________________
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