Ethereal-users: [Ethereal-users] Undefined struct 'sockaddr_storage' compiling under Win32

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Ross Carlson" <rcarlson@xxxxxxxxxx>
Date: Thu, 4 Aug 2005 13:53:09 -0400

I am attempting to compile ethereal-0.10.12 under Win32.

 

I am using WinPCap 3.1 beta 4 Developer's Pack and MSVC++6.

 

I am able to compile 0.10.12 successfully using the WinPCap 3.0 Dev Pack.

 

This is what happens when running 'nmake -f Makefile.nmake':

 

*********************************

 

sctp_assoc_analyse.c

sctp_chunk_stat_dlg.c

sctp_chunk_stat.c

sctp_stat_dlg.c

sip_stat.c

smb_stat.c

tcp_graph.c

voip_calls_dlg.c

wsp_stat.c

Generating Code...

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\bin\cl.exe"' : return code '0x2'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\bin\NMAKE.EXE"' : return code '0x2'

Stop.

 

*********************************

 

However, simply trying 'nmake -f Makefile.nmake' again seems to bypass the above error and move on to the following error:

 

*********************************

 

capture_if_details_dlg.c

C:\ethereal-win32-libs\WPdpack\include\Packet32.h(204) : error C2079: 'IPAddress' uses undefined struct 'sockaddr_storage'

C:\ethereal-win32-libs\WPdpack\include\Packet32.h(205) : error C2079: 'SubnetMask' uses undefined struct 'sockaddr_storage'

C:\ethereal-win32-libs\WPdpack\include\Packet32.h(206) : error C2079: 'Broadcast' uses undefined struct 'sockaddr_storage'

NMAKE : fatal error U1077: 'cl' : return code '0x2'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\bin\NMAKE.EXE"' : returncode '0x2'

Stop.

 

*********************************

 

Looks like capture_if_details_dlg.c includes Packet32.h and the relevant part of Packet32.h looks like:

 

**********************************

 

/*!

  \brief Addresses of a network adapter.

 

  This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with

  an adapter.

*/

typedef struct npf_if_addr {

            struct sockaddr_storage IPAddress;       ///< IP address.

            struct sockaddr_storage SubnetMask;    ///< Netmask for that address.

            struct sockaddr_storage Broadcast;       ///< Broadcast address.

}npf_if_addr;

 

************************************

 

Anyone have any ideas on the problem? Ulf?

 

(This is the same issue reported earlier this week, but I thought I would be more precise in this problem report than the last one...)

 

Ross