Novell Home

TID101257 (imws001) ManageWise Loopback Trap Sample Issue

From Developer Community

ABSTRACT:

WST, the sample that sends a trap to the loopback address may not work as expected under some versions or configurations of the TCPIP stack. This tid demonstrates a change to correct the problem.

DETAILED DESCRIPTION

The file wstest.c in the ManageWise SDK SAMPLESLOOPBACK directory sets the socket address for the destination with the following line:

ForeignSocket.sin_addr.s_addr = ntohl(0x00000000);

With some versions and configurations of the TCPIP stack, the address is not replaced by the local address as assumed. In these cases use:

ForeignSocket.sin_addr.s_addr = inet_addr(127.0.0.1);

for loopback. Using the Novell TCPIP stack, 127 must be listed in the net cp etworks file.


--devsup

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.