Ethereal-dev: Re: [ethereal-dev] Patches with POP and FTP support

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

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Wed, 31 Mar 1999 23:47:20 +0900
Hi,

At 01:27 PM 3/29/99 -0800, guy@xxxxxxxxxx (Guy Harris) wrote:
>> +dissect_ftp(const u_char *pd, int offset, frame_data *fd, proto_tree
*tree)
>
>	...
>
>> +	  proto_item_add_subtree(ti, ftp_tree, ETT_POP);
>
>You probably wanted to use ETT_FTP there.
>
>You might also want to look at "dissect_http()" in "packet-http.c"; it
>uses "format_line()" to put out a line from a command-line oriented
>protocol in a fashion that escapes special characters (such as CR and
>LF; this may be useful to see whether some server or client isn't
>putting CR-LF at the end of lines), and also uses "find_line_end()" to
>look for the end of a line in a packet buffer.
>
>FTP, SMTP, and the like might want to work the same way HTTP works
>there.

Hmmm, I see in a subsequent EM that you have made the patches, and that you
reported problems by the look of things with the code looking for a space. 

The same code works for dissect_pop, and does not run into problems with
the three way handshake (it does not get called).

However, an assumption made is that the first output from the server will
have a response and some additional data separated by a space.

I will look into it some more over the weekend.


Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx, NIC-Handle:RJS96
NS Computer Software and Services P/L, 
Ph: +61-8-8281-0063, FAX: +61-8-8250-2080, 
Samba (Team member), Linux, Apache, Digital UNIX, AIX, C, ...