Jaap Keuter | 1 Dec 2011 08:34
Picon
Picon
Favicon

Re: GTK+ 3.2 deprecates vbox and hbox

Hi,

[v|h]box deprecated? Well, that's going to impact nearly any dialog I presume? Wouldn't that call for a gtk3 folder?

Thanks,
Jaap

On 2011-11-29 17:55, Anders Broman wrote:

Hi, I decided to go for gtk_box_new() as a replacement rather than the grid stuff at least to start with as that's GTK 3.0 compatible. Here's an example perhaps it would have been cleaner to #ifdef the whole file. Regards Anders -----Original Message----- From: Anders Broman Sent: den 29 november 2011 17:37 To: a.broman-cgr7CL/LOSDk1uMJSBkQmQ@public.gmane.org Subject: GTK3+ Index: gtk/about_dlg.c =================================================================== --- gtk/about_dlg.c (revision 40034) +++ gtk/about_dlg.c (working copy) <at> <at> -105,7 +105,59 <at> <at> the splash screen window gets updated. */ while (gtk_events_pending()) gtk_main_iteration(); } +#if GTK_CHECK_VERSION(3,0,0) +GtkWidget* +splash_new(const char *message) +{ + GtkWidget *win; + GtkWidget *main_lb; + GtkWidget *main_box; + GtkWidget *percentage_box; + GtkWidget *prog_bar; + GtkWidget *percentage_lb; + + win = splash_window_new(); + + /* When calling about_wireshark(), we must realize the top-level + widget for the window, otherwise GTK will throw a warning + because we don't have a colormap associated with that window and + can't handle the pixmap. */ + gtk_widget_realize(win); + + main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6); + gtk_container_set_border_width(GTK_CONTAINER(main_box), 24); + gtk_container_add(GTK_CONTAINER(win), main_box); + + about_wireshark(win, main_box); + + main_lb = gtk_label_new(message); + gtk_container_add(GTK_CONTAINER(main_box), main_lb); + g_object_set_data(G_OBJECT(win), "splash_label", main_lb); + + main_lb = gtk_label_new(""); + gtk_container_add(GTK_CONTAINER(main_box), main_lb); + g_object_set_data(G_OBJECT(win), "protocol_label", main_lb); + + percentage_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1); + gtk_box_pack_start(GTK_BOX(main_box), percentage_box, TRUE, TRUE, + 3); + + prog_bar = gtk_progress_bar_new(); + gtk_box_pack_start(GTK_BOX(percentage_box), prog_bar, TRUE, TRUE, 3); + g_object_set_data(G_OBJECT(win), "progress_bar", prog_bar); + + percentage_lb = gtk_label_new(" 0%"); + gtk_misc_set_alignment(GTK_MISC(percentage_lb), 0.0f, 0.0f); + gtk_box_pack_start(GTK_BOX(percentage_box), percentage_lb, FALSE, TRUE, 3); + g_object_set_data(G_OBJECT(win), "percentage_label", percentage_lb); + + gtk_widget_show_all(win); + + splash_update_label(win, message); + + return win; +} +#else GtkWidget* splash_new(const char *message) { <at> <at> -157,6 +209,7 <at> <at> return win; } +#endif /* GTK_CHECK_VERSION(3,0,0) */ void splash_update(register_action_e action, const char *message, gpointer client_data) <at> <at> -294,9 +347,49 <at> <at> return FALSE; } +#if GTK_CHECK_VERSION(3,0,0) static GtkWidget * about_wireshark_page_new(void) { + GtkWidget *main_box, *msg_label /*, *icon*/; + gchar *message; + + main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6); + gtk_container_set_border_width(GTK_CONTAINER(main_box), 12); + + g_object_set(gtk_widget_get_settings(main_box), + "gtk-label-select-on-focus", FALSE, NULL); + + about_wireshark(top_level, main_box); + + /* Construct the message string */ + message = g_strdup_printf( + "Version " VERSION "%s\n" + "\n" + "%s" + "\n" + "%s" + "\n" + "%s" + "\n" + "Wireshark is Open Source Software released under the GNU General Public License.\n" + "\n" + "Check the man page and http://www.wireshark.org for more information.", + wireshark_svnversion, get_copyright_info(), comp_info_str->str, + runtime_info_str->str); + + msg_label = gtk_label_new(message); + g_free(message); + gtk_label_set_justify(GTK_LABEL(msg_label), GTK_JUSTIFY_FILL); + gtk_label_set_selectable(GTK_LABEL(msg_label), TRUE); + gtk_container_add(GTK_CONTAINER(main_box), msg_label); + + return main_box; +} +#else +static GtkWidget * +about_wireshark_page_new(void) +{ GtkWidget *main_vb, *msg_label /*, *icon*/; gchar *message; <at> <at> -332,7 +425,7 <at> <at> return main_vb; } - +#endif /* GTK_CHECK_VERSION(3,0,0) */ static GtkWidget * about_authors_page_new(void) { <at> <at> -500,9 +593,88 <at> <at> return page; } +#if GTK_CHECK_VERSION(3,0,0) void about_wireshark_cb( GtkWidget *w _U_, gpointer data _U_ ) { + GtkWidget *main_box, *main_nb, *bbox, *ok_btn; + GtkWidget *page_lb, *about_page, *folders_page; + +#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1) + GtkWidget *plugins_page; +#endif + + GtkWidget *authors_page, *license_page; + + if (about_wireshark_w != NULL) { + /* There's already an "About Wireshark" dialog box; reactivate it. */ + reactivate_window(about_wireshark_w); + return; + } + + /* + * XXX - use GtkDialog? The GNOME 2.x GnomeAbout widget does. + * Should we use GtkDialog for simple_dialog() as well? Or + * is the GTK+ 2.x GtkDialog appropriate but the 1.2[.x] one + * not? (The GNOME 1.x GnomeAbout widget uses GnomeDialog.) + */ + about_wireshark_w = dlg_window_new("About Wireshark"); + /* set the initial position (must be done, before show is called!) */ + /* default position is not appropriate for the about dialog */ + gtk_window_set_position(GTK_WINDOW(about_wireshark_w), GTK_WIN_POS_CENTER_ON_PARENT); + gtk_window_set_default_size(GTK_WINDOW(about_wireshark_w), 600, 400); + gtk_container_set_border_width(GTK_CONTAINER(about_wireshark_w), 6); + + main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12); + gtk_container_set_border_width(GTK_CONTAINER(main_box), 6); + gtk_container_add(GTK_CONTAINER(about_wireshark_w), main_box); + + main_nb = gtk_notebook_new(); + gtk_box_pack_start(GTK_BOX(main_box), main_nb, TRUE, TRUE, 0); + + about_page = about_wireshark_page_new(); page_lb = + gtk_label_new("Wireshark"); + gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), about_page, page_lb); + + authors_page = about_authors_page_new(); page_lb = + gtk_label_new("Authors"); + gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), authors_page, + page_lb); + + folders_page = about_folders_page_new(); page_lb = + gtk_label_new("Folders"); + gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), folders_page, + page_lb); + +#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1) + plugins_page = about_plugins_page_new(); + page_lb = gtk_label_new("Plugins"); + gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), plugins_page, +page_lb); #endif + + license_page = about_license_page_new(); page_lb = + gtk_label_new("License"); + /* set a minmum width to avoid a lot of line breaks at the wrong + places */ gtk_widget_set_size_request(license_page, 600, -1); + gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), license_page, + page_lb); + + /* Button row */ + bbox = dlg_button_row_new(GTK_STOCK_OK, NULL); + gtk_box_pack_start(GTK_BOX(main_box), bbox, FALSE, FALSE, 0); + + ok_btn = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_OK); + gtk_widget_grab_focus(ok_btn); gtk_widget_grab_default(ok_btn); + window_set_cancel_button(about_wireshark_w, ok_btn, + window_cancel_button_cb); + + g_signal_connect(about_wireshark_w, "delete_event", + G_CALLBACK(window_delete_event_cb), NULL); + g_signal_connect(about_wireshark_w, "destroy", + G_CALLBACK(about_wireshark_destroy_cb), NULL); + + gtk_widget_show_all(about_wireshark_w); + window_present(about_wireshark_w); +} +#else +void +about_wireshark_cb( GtkWidget *w _U_, gpointer data _U_ ) { GtkWidget *main_vb, *main_nb, *bbox, *ok_btn; GtkWidget *page_lb, *about_page, *folders_page; <at> <at> -577,6 +749,7 <at> <at> gtk_widget_show_all(about_wireshark_w); window_present(about_wireshark_w); } +#endif /*GTK_CHECK_VERSION(3,0,0)*/ static void about_wireshark_destroy_cb(GtkWidget *win _U_, gpointer user_data _U_) ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev-IZ8446WsY0/dtAWm4Da02A@public.gmane.org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request-IZ8446WsY0/dtAWm4Da02A@public.gmane.org?subject=unsubscribe

 

 
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe
Joerg Mayer | 1 Dec 2011 16:28
Picon

Re: GTK+ 3.2 deprecates vbox and hbox

On Thu, Dec 01, 2011 at 08:34:58AM +0100, Jaap Keuter wrote:
> [v|h]box deprecated? Well, that's going to impact nearly any
> dialog I presume? Wouldn't that call for a gtk3 folder? 

IMO no, we just should not turn on the deprecated features warning when
building with gtk3 and maybe go for a gtk3 only as quickly as possible
(ok, that might mean 1.8 or 1.10 or never, depending on when windows builds
of gtk3 become available and usable).

Are there problems with the availability of gtk3 on other platforms than
windows?

Ciao
    Joerg
--

-- 
Joerg Mayer                                           <jmayer@...>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

vijay | 2 Dec 2011 01:36
Picon

using named pipes in 1.7.0 dev build

hi,


I am using wireshark 1.7 dev build and I want to capture from a named pipe. Earlier versions had a option to type the pipe name in
the box next to "Capture interface" from the Capture options. But 1.7 doest have this and it just lists the list of interfaces to captures from (which doesnt have the pipe name).

I tried to start wireshark with command line option -i pipe name but it didnt listen to the pipe, but just went to the regular start up mode where
we can select the interfaces.

Could some one pls tell me how to capture from a pipe in wireshark 1.7.0.

Thanks
Vijay
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe
Michael Tüxen | 2 Dec 2011 08:43
Picon

Re: using named pipes in 1.7.0 dev build

On Dec 2, 2011, at 1:36 AM, vijay wrote:

> hi,
> 
> I am using wireshark 1.7 dev build and I want to capture from a named pipe. Earlier versions had a option to
type the pipe name in
> the box next to "Capture interface" from the Capture options. But 1.7 doest have this and it just lists the
list of interfaces to captures from (which doesnt have the pipe name).
> 
> I tried to start wireshark with command line option -i pipe name but it didnt listen to the pipe, but just
went to the regular start up mode where
> we can select the interfaces.
> 
> Could some one pls tell me how to capture from a pipe in wireshark 1.7.0.
Hi Vijay,

currently you can specify a pipe only on the command line. Pipe support
in the GUI will come back...

Best regards
Michael
> 
> Thanks
> Vijay
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@...?subject=unsubscribe

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Yegor Yefremov | 2 Dec 2011 16:21

[RFC] CANOpen dissector

Hi

I'm writing a CANOpen dissector
(http://en.wikipedia.org/wiki/CANopen). The dissector itself is almost
ready. The main problem I have is, how do I hook this dissector on to
SocketCan one? CAN has no ports, so I can't decide on this basis. My
suggestion were to create a drop-down list in SocketCan dissector to
select high-level CAN protocol (like CANOpen, DeviceNet etc.). What do
you think about this?

Regards,
Yegor
Attachment (canopen.patch): application/octet-stream, 18 KiB
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe
Stephen Fisher | 2 Dec 2011 17:48

Re: [RFC] CANOpen dissector

On Fri, Dec 02, 2011 at 04:21:15PM +0100, Yegor Yefremov wrote:

> I'm writing a CANOpen dissector 
> (http://en.wikipedia.org/wiki/CANopen). The dissector itself is almost 
> ready. The main problem I have is, how do I hook this dissector on to 
> SocketCan one? CAN has no ports, so I can't decide on this basis. My 
> suggestion were to create a drop-down list in SocketCan dissector to 
> select high-level CAN protocol (like CANOpen, DeviceNet etc.). What do 
> you think about this?

Does the SocketCan protocol have any indication which protocol is next 
(CANOpen, DeviceNet, etc)?  If so, you can use the call_dissector() to 
pass a tvbuff to the next dissector (from SocketCan to CANOpen for 
example).  You would "break off" the rest of the packet that SocketCan 
is dissecting with something like tvb_new_subset() which creates a new 
tvbuff out of a backing tvbuff based on certain offset and length.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Yegor Yefremov | 2 Dec 2011 21:57

Re: [RFC] CANOpen dissector

On Fri, Dec 2, 2011 at 5:48 PM, Stephen Fisher <steve <at> stephen-fisher.com> wrote:
> On Fri, Dec 02, 2011 at 04:21:15PM +0100, Yegor Yefremov wrote:
>
>> I'm writing a CANOpen dissector
>> (http://en.wikipedia.org/wiki/CANopen). The dissector itself is almost
>> ready. The main problem I have is, how do I hook this dissector on to
>> SocketCan one? CAN has no ports, so I can't decide on this basis. My
>> suggestion were to create a drop-down list in SocketCan dissector to
>> select high-level CAN protocol (like CANOpen, DeviceNet etc.). What do
>> you think about this?
>
> Does the SocketCan protocol have any indication which protocol is next
> (CANOpen, DeviceNet, etc)?  If so, you can use the call_dissector() to
> pass a tvbuff to the next dissector (from SocketCan to CANOpen for
> example).  You would "break off" the rest of the packet that SocketCan
> is dissecting with something like tvb_new_subset() which creates a new
> tvbuff out of a backing tvbuff based on certain offset and length.

No SocketCan has no notion of the underlying protocol. AFAIK SocketCAN
gets one CAN frame per read from the kernel. The CAN frame consists of
an ID field with some flags (4 bytes), data length (1 byte) and the
data itself (max. 8 bytes). Each protocol is using these fields for
its purpose, but there are (could be) same CAN frames in each
protocol.

So your play field is very limited. That's why I'm thinking about
making an option to choose the desired high level protocol in
socketcan settings.

Yegor
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev <at> wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request <at> wireshark.org?subject=unsubscribe
Guy Harris | 2 Dec 2011 22:04
Picon
Favicon

Re: [RFC] CANOpen dissector


On Dec 2, 2011, at 12:57 PM, Yegor Yefremov wrote:

> So your play field is very limited. That's why I'm thinking about
> making an option to choose the desired high level protocol in
> socketcan settings.

If the protocol transported atop CAN frames is specified only by out-of-band negotiations (as in
"everything in this {car,factory floor,hospital room,etc.} all use protocol XXX", i.e. the
negotiations take place in a conference room rather than over a network :-)), the only way to choose the
higher-level protocol might well be to have a user provide to Wireshark the results of that negotiation,
meaning a preference.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Chris Maynard | 3 Dec 2011 05:47
Favicon

tap_queue_packet() simple question

Some taps, such as tap-comparestat.c and tap-rtp-common.c, make use of
pinfo->iphdrlen, so shouldn't tap_queue_packet() be called *after* all the pinfo
data is assigned by the dissector?

I had already changed this to be the case for IPv4 (see line 2079), but I just
found the same thing in IPv6 (line 1976), so now I just want to be sure I'm
doing this right, or maybe there's some reason this wasn't being done for both
of them?  Thanks.

- Chris

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Akos Vandra | 3 Dec 2011 11:00
Picon

Adding a new data source

Hi!

I have a custom interface generating packet data. I'd like to use
wireshark to display them and dissect the packets.

The dissection I can do with dissector plugins, but how can I feed the
packet data to wireshark?

Regards,
  Ákos Vandra
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe


Gmane