Wireshark-dev: Re: [Wireshark-dev] SMTP: Extracting parametrs

From: "goitom kahsay" <goitom.mit2@xxxxxxxxx>
Date: Fri, 6 Jun 2008 21:03:43 +0300
Dear Steve,

I retrieved the parameters from the packet-smtp.c /dissect_smtp_data  fuction which is used to display the data line by line at the protocol tree. i used a  tap mechanism  as follows.
1.tap.h
2.tap handler so just add 'static int smtp_eo_tap = -1;
3. smtp_eo_tap = register_tap("smtp_eo")
4.In the actual dissector for SMTP protocol

   if(have_tap_listener(smtp_eo_tap))
{
            e_info = ep_alloc(sizeof(smtp_eo_t));
           
            e_info->pkt_num = pinfo->fd->num;
            e_info->sender = (gchar*)temp;
            e_info->reciever = (gchar*)temp2;
            e_info->subject = (gchar*)temp3;
            e_info->time = (gchar*)temp4;
            tap_queue_packet(smtp_eo_tap, pinfo, e_info);
}

5. Interfacing the application using  3 callbacks and two functions.


N.B 1.temp contains a line of string which starts FROM
         2.temp2                                                                     To and so on

But, the content of the parameter doesnot display on the GUI. Please can u help me any idea  how to solve this problem.


Thank u in advance.



On Thu, May 1, 2008 at 9:49 AM, Stephen Fisher <stephentfisher@xxxxxxxxx> wrote:
On Thu, May 01, 2008 at 09:27:06AM +0300, goitom kahsay wrote:

> I want to display these values(the SMTP parameters such as
> FROM,TO,SUBJECT,DATE) in a *new dialog* under the analyze menu. And
> the dialog displays these values from each SMTP packets displayed in
> the packet list pane.

If the contents of the e-mails are gathered also, the best place to
display this information is probably via the Export Object feature (File
- Export - Object menu).  The only object export implemented so far is
HTTP.  See gtk/export_object.c, gtk/export_object_http.c and a small
piece in epan/dissectors/packet-http.c for how this is implemented.
Hint: It uses the tap mechanism to pass the information from the
dissector to the export object dialog.


Steve

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev



--
Benice2all