Ethereal-dev: Re: [Ethereal-dev] Problem in linking the files

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: Wed, 01 Dec 2004 04:33:55 -0800
harsha ss wrote:

I am sending a detailed mail what I want to do,please give me the guidelines.

I want to read a separate file format which is already existing.The file format which
I want to read is not of any of the types which ethereal understands.
When i tried to read that file through the ethereal it was giving the unknown format. Then I went through the wiretap direcory wrote the open routine,and read,seek_read routine.
  Which reads our own file.The routines works and reads the file.

I want to do the decoding of the read packets later.Now I want to print the packet name, Packet_info,source and destination which is in the string format into the summary pane. So As you said I added the routines in dissectors with the registering the protocol followed by dissect_xxx function.I am calling the routines like col_set_str
to print on the summary pane.

4. I tried to rum automake,autoconf and aclocal in dissector path but there is no configure file so we cant.

You should run "./autogen.sh". It will run automake, autoconf, and aclocal for you.

6. To print the information on the summary pane wether i need to initialize any structure members
  of the cinfo structure?.

No.  Dissectors just do

	if (check_col(pinfo->cinfo, COL_xxx))
		col_set_str(pinfo->cinfo, COL_xxx, "string");

where COL_xxx is the #define for the column you're setting, and a "col_add" routine could be used instead of "col_set_str()".

7. For the pcap files the corresponding hexdump is displayed on the
  third window.Which is the routine which is responsible for printing the
    hexdump in the third window.

It's done by code in "gtk/proto_draw.c". Note that dissectors do *NOT* call routines to draw that text; the text that's drawn is just the raw packet data, as supplied by Wiretap, or reassembled data.

8. How to add the information i read to the ethereal summary pane first.
    Please tell me the routines to call.I think the column_utility routines
    itself are responsible for printing on the first window of ethereal.

They're responsible for generating the data used in the summary pane.