Hi Dave,

Thanks, and I have tried it. This time the returned peername changed to
192.168.x.x:162, but the remote_port is still 0, local_port =0, localname =
NULL. The session is not established.

Any other advice? Thanks very much


-----Original Message-----
From: dave.shield@googlemail.com [mailto:dave.shield@googlemail.com] On
Behalf Of Dave Shield
Sent: Saturday, August 26, 2006 5:45 AM
To: Li Gan
Cc: net-snmp-coders@lists.sourceforge.net
Subject: Re: about the function snmpd_parse_config_trap2sink

On 25/08/06, Li Gan wrote:
> In order to dynamically set the trap receiver's ip address, I used
> snmpd_parse_config_trap2sink(), it looks ok, but the session with
> remote port 162 is not established. The following is my code:

> char host[]="192.168.x.x";

What happens if you use "192.168.x.x:162" instead?


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Net-snmp-coders mailing list