Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] Ethereal addition for analysing RTP data

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

From: "Greg Morris" <GMORRIS@xxxxxxxxxx>
Date: Thu, 06 Mar 2003 16:31:05 -0700
Perhaps I'm a little early and the new changes are not complete from CVS but...
 
I now get the following error
 
tap_rtp.c
tap_rtp.c(147) : error C2059: syntax error : '('
tap_rtp.c(199) : error C2061: syntax error : identifier 'error_type_t'
tap_rtp.c(200) : error C2061: syntax error : identifier 'r_error_type'
 
Greg

>>> Guy Harris <guy@xxxxxxxxxx> 3/6/2003 3:24:46 PM >>>
On Thu, Mar 06, 2003 at 05:04:35PM +0100, Miha Jemec wrote:
> Ok, I made a few changes.

OK, we'll have to make some more.

As per Greg Morris's mail, you can't just include <unistd.h>, as it's
not present on all platforms on which Ethereal runs.

In particular, it's missing on these platforms:

    http://www.microsoft.com/windows95/

    http://www.microsoft.com/windows98/

    http://www.microsoft.com/windowsme/

    http://www.microsoft.com/ntworkstation/

    http://www.microsoft.com/ntserver/

    http://www.microsoft.com/windows2000/

    http://www.microsoft.com/windowsxp/default.asp

    http://www.microsoft.com/windowsserver2003/default.mspx

at least if you're compiling without some "pretend to be UNIX" wrapper.

You have to do

    #ifdef HAVE_UNISTD_H
    #include <unistd.h>
    #endif

It's included because "open()" is being used, which raises *another*
issue - by default, the "open()" wrapper on Windows opens in text mode,
not binary mode, so you need to use O_BINARY.

There are also "fopen()" calls that open with "w" - those files also
appear to be binary, so you need "wb".

(Note also that no check is done whether writes succeed - there is no
guarantee that they will; you could run out of space on the file
system.)

There is also a comment about "%lu" working with guint32 but getting a
warning from the compiler; that warning is there because that will *NOT*
work on platforms with 64-bit "long"s.  There is also a comment saying
that "%d" doesn't work with guint32 - that's because guint32 is
unsigned, not signed.  "%u", which is what is being used, is the right
answer.

(Also, all the CRs in the file cause at least some UNIX C compilers not
to like the code.)

I'll check in fixes for those.

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev