Re: Getting listening port number while processing request

2024-05-08 Thread Teus Benschop
On Wed, 3 Apr 2024 at 18:45, Bart Van Assche wrote: > I think this is the callchain for registering the ports that the agent > listens on: > > init_master_agent() > netsnmp_agent_listen_on() > netsnmp_transport_open_server() > netsnmp_register_agent_nsap() > netsnmp_sess_config_tr

Re: Getting listening port number while processing request

2024-05-08 Thread Bart Van Assche via Net-snmp-coders
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 req