Re: Getting listening port number while processing request
Teus Benschop <[email protected]> Thu, 28 Mar 2024 07:13:47 +0100
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <CAFueZ4z89VKathkM7_eUkJKhnxHYoFDV3++Pq20BkvMH8Ua=OA@mail.gmail.com> |
On Thu, 28 Mar 2024 at 00:13, Bart Van Assche <[email protected]> wrote: > Hi Teus, > > Thanks for the background information. I'm not sure the Net-SNMP API needs > to be modified to realize this. How about the following approach: > > - Use netsnmp_register_handler() in MIB implementations to associate > OIDs with callback functions. > - In the handler callback function, use the > reqinfo->asp->session->local_port information. > - Make sure that session->local_port is set correctly. This may > require a code change in Net-SNMP. > > Best regards, > > Bart. > > > Hi Bart, What a great hint this is: No API change, and making sure that the local_port is set correctly. I am going to look into this for sure, and try to get this to work for TCP. Thank you a lot for this information, that is helpful :) Teus. _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders