On Wed, 6 Jan 2021 at 10:01, Ed Fair <quacksp...@gmail.com> wrote: > Thanks for the reply. The Simple_Async_Application in your link uses one > session/socket/SRC port per agent. I've compiled and run this sample > successfully, but I haven't been able to modify it to use a single > session/socket/SRC port. > It might need to be something more low-level as reusing sockets (therefore the ports) is generally a bad idea.
The netsnmp_session has an attribute of local_port. If this is set to zero (the default) then it picks it randomly. I'd try setting that and see what happens. A quick look in the snmplib source code shows it is used for creating the transport. I understand "don't hammer agents" but I don't understand your "one query > per agent" limit - is this a limitation of the API? > Not at all, a lot of agents are terrible and do stupid things like have exclusive locks on important components of the system. I've killed many devices (the remote agents, not my code) by being too enthusiastic about querying them. > I'm new to this API, I might be missing key concepts... but I am confused > by the "traditional vs single" distinction, and I'm curious what > "subsessions" are. > Are either of those mentioned in the tutorial? They could mean multiple things but was trying to find the context of what you are asking here. - Craig
_______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders