Ethereal-dev: Re: [ethereal-dev] more real-time capture and full display

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Mon, 10 May 1999 14:57:04 -0500
On Mon, May 10, 1999 at 02:30:12PM -0500, guy@xxxxxxxxxx wrote:
> 
> 
> > I'm not sure yet. I am trying to compile the latest code on sparc, but
> > alignment.h defines macros only for i386. I'll have a little time today
> > to work on alignment.h
> 
> Actually, we already have macros that do most if not all of what the
> "G*" macros in "alignment.h" do, and the "P*" macros aren't used
> (Ethereal is read-only :-)).
> 
> I.e., we have "pletohs()" and "pletohl()".
> 
> The following appeared to work when I tried it on a capture file I have.
> Any votes on whether to
> 
>         1) go with this file (with any fixes required);
> 
>         2) replace the G* macros with direct calls to "pletoh*()" for
>            2-or-4-byte quantities and direct "&pd[offset]" references
>            for 1-byte quantities?

I would guess that Richard finds his G* macros more readable since he
doesn't have to use lots of punctuation (&[], etc.), he just has to pass
2 arguments to each macro. So 1) should be okay. Perhaps we could put
the macros in packet.h with the other convenience functions.

--gilbert