You are very welcome. Let me know if you want to discuss any of the
particulars.  For example, it seems like snmpusm.c is also trying to
please the SNMPv3 user MIB by getting everything in the right order
for GETNEXT there.  So my use of a hash-table breaks that,  but that's
OK for me because I am only using the library as a client.  I did
wonder if using something like a red-black tree with a carefully
crafted sort function would allow efficient lookup without breaking
the ordering,  but it was hard to make the logic turn out exactly the
same as it is now (e.g. I think it would require great care to make
sure an entry is removed and added again if it is ever modified in
situ).

Adding or importing your favorite tree implementation to the library
would be a lot of new code,  but could also be used to store
outstanding requests sorted by monotonic-clock "due" time,  which
helps to streamline the timeout mechanism when there are
hundreds/thousands of concurrent requests.

On balance,  however,  it doesn't seem like there is a case for
rocking the boat - especially when most client use-cases (perl,
python, snmpwalk etc.) make only one request in the life cycle of a
session. Plus it looks like you now have to consider multiple threads
too, so using more complex data-structures is hard.  I guess if you
decided to carve out a single-session, single-threaded client API then
it would be more tunable, but as long as the package is also an agent
and is also multi-threaded then it seems like your hands are tied? I
certainly won't object if nothing changes.


On Mon, Oct 18, 2021 at 10:30 AM Wes Hardaker
<harda...@users.sourceforge.net> wrote:
>
> Neil Mckee <neil.mckee...@gmail.com> writes:
>
> > This may have been covered many times before,  but just in case it
> > helps someone, here is a summary of my experience with using net-snmp
> > in a large network.
>
> Thank you for the very useful list of changes.
> --
> Wes Hardaker
> Please mail all replies to net-snmp-coders@lists.sourceforge.net


_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to