Ethereal-dev: Re: [Ethereal-dev] Error: field 'ts' has incomplete type

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Thu, 2 May 2002 15:12:12 -0700
On Fri, May 03, 2002 at 12:03:50AM +0200, Alex Gonz�lez wrote:
> I am developing a dissector for the WAL protocol.  Actually, I had
> finally made it work under ethereal 0.9.0.  I have downloaded ethereal
> 0.9.3 and tried my disector with this version.  After a few
> modifications to suit the disector to the new version I proceed to
> compile and I am returned the next error:
> 
> In file included from epan/packet.h:28
>                      from packet-wal.c: 32
> wiretap/wtap.h: 289 field 'ts' has incomplete type
> wiretap/wtap.h: 293 confused by earlier errors, bailing out

On what platform are you compiling this?

"ts" is presumbly the "struct timeval ts" in the "wtap_pkthdr"
structure; it should be declared, on UNIX, in <sys/time.h> or something
included by <sys/time.h>, and, on Windows, in <winsock.h> or something
included by <winsock.h>

<sys/time.h> is included by "wiretap/wtap.h" if HAVE_SYS_TIME_H is
defined; it should be defined by the "config.h" file, as generated by
the configure script, on UNIX.

<winsock.h> is included by "wiretap/wtap.h" if HAVE_WINSOCK_H is
defined; if you're compiling on Windows using Microsoft Visual C++,
Makefile.nmake should have copied "config.h.win32" to 'config.h", so
HAVE_WINSOCK_H should be defined in "config.h".

Are you compiling this on some flavor of UNIX, or are you compiling it
on Windows with, for example, Cygwin, using GCC?  If you're compiling it
on Windows with Cygwin, note that the "README.win32" file says, at the
end:

	Instructions for Cygwin
	-----------------------
	No one has ever compiled Ethereal entirely with Cygwin.  It should not
	be difficult, however.  This spot is reserved for your instructions on
	how to compile Ethereal with Cygwin.

so you may have to make changes in order to make it work.  If you do,
send them to us, so we can look at including them in the main Ethereal
source base, so that the *next* person trying it won't have to duplicate
your effort.