Ethereal-dev: Re: [Ethereal-dev] Patch to packet-ftp.c

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 6 Oct 2003 20:53:22 -0700
On Mon, Oct 06, 2003 at 01:10:05PM +0100, Giles Scott wrote:
> This patch adds functionality to be able to use display filters against the
> FTP PORT and PASSIVE commands;
> 
> Also it checks to see if there is a NAT issue by checking the SIP and the IP
> address in the port command are the same.

I've checked in code based on that - I reorganized it somewhat (making
some code paths common to the NAT and non-NAT case, for example), and
made it put the IP address and port information into the protocol tree
after putting the raw text from the request or response line.

> I'm not sure if it will work on Unix as I think there might be an endian
> issue, when converting the string IP address.

That's not a UNIX vs.  Windows issue - any endian issues on Windows will
also show up on my main UNIX desktop at home (in fact, my main UNIX
desktop machine at home is also my main Windows desktop at home, as it's
a quad-booting PC).  However, it appears to work on both an x86 PC
(FreeBSD) and a Mac (Mac OS X), so it appears to work OK on both
little-endian (x86) and big-endian (PowerPC) machines.