On 5/8/24 1:42 AM, Teus Benschop wrote:
I have implemented the f_setup_session() callback in
the snmpTCPBaseDomain.h/.c files.
This callback obtains the port number and copies that into the session
object.
Then from the session object, the local_port is available while
processing the SNMP requests.
I am happy it works and that we can use this local_port in our
software, that is so helpful.
The patch with the above modification is attached.
It would be so great if this patch can make it in the official tarball
of Net-SNMP.
A slightly different patch has been applied on the V5-9-patches and
master branches. Please take a look and please help with testing that
patch. See also commit 8f3cedfa723c ("libsnmp: Copy the listening port
number into snmp_session.local_port").
Thanks,
Bart.
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders