I'd like to add my_proto bar too. I've had a look at packet-ip's capture_ip
routine.
I'll tell you what I want to do:
1) Add #define IP_PROTO_MY_PROTO to ipproto.h
2) dissector_add ("ip_proto", IP_PROTO_MY_PROTO, my_proto_handle) to
packet-my_proto.c
3) add 'case IP_PROTO_MY_PROTO: ' to packet-ip.c
4) add the following couple of lines to capture_info_dlg.c :
info->counts[11].title = "MY_PROTO"
info->counts[11].value_ptr = &(cinfo->counts->my_proto)
Is that all?
thanx
From: "Gilbert Ramirez" <gram@xxxxxxxxxxxxxxx>
Reply-To: Ethereal development <ethereal-dev@xxxxxxxxxxxx>
To: "Ethereal development" <ethereal-dev@xxxxxxxxxxxx>
Subject: Re: [Ethereal-dev] Question
Date: Wed, 5 Apr 2006 09:35:29 -0500
The code for that is in gtk/capture_info_dlg.c; you'll have to add
your progress bar there. Then, similar to dissect_*, there are a
series of functions named "capture_*" that act as mini-dissectors
during the capture phase. Look at catpure_ip in
epan/dissectors/packet-ip.c. Somehow, a function like that will have
to identify your protocol and increment it's counter (a new counter)
in the packet_counts structure. But I don't know the details of your
protocol, so I can't saw how to proceed.
Oh, and the packet_counts structure is in epan/packet.h
--gilbert
On 4/4/06, manu romu <eucalipto_75@xxxxxxxxxxx> wrote:
> Hello, List
> I'd like to add a progressing 'my-proto' bar on the dialog box that
appears
> once a capture's started (something like UDP, IP bars). How can I do?
> manuela
>
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>
>
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev
_________________________________________________________________
250MB per la tua casella di posta http://www.msn.it/hotmail/minisite_10
Trova immediatamente qualsiasi tipo di file.