Ethereal-dev: Re: [Ethereal-dev] DOUBTS

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 11 Jul 2005 10:07:05 -0700
nimalan s wrote:

I would be happy to have the following doubts cleared
1.is it possible to register two port numbers for the
same protocol.

Yes.

If yes,how?

Call "dissector_add()" twice. :-)

2.How to decode the ascii codes and display the text
messages?

That would depend on how the protocol works.

I assume by "text messages" you mean it's a protocol like FTP or SMTP or HTTP or RTSP or..., where the requests and responses are purely text.

If so, and if the requests and responses are broken up into lines (terminated with LF or CR-LF), see, for example, the dissectors for those protocols for examples of loops that process the lines of requests and responses and display them as text. (SMTP might be more complicated than you need, as it has to maintain state to know whether it's processing request or response text or message text. HTTP includes code to reassemble the request/response line and entity headers if they cross TCP segment boundaries, and to do the same with the entity body; you might not need that, either, depending on how the protocol you're referring to works.)