adding additional functionality to the wireshark gui with gtk+ june 18, 2009 stephen fisher

17
SHARKFEST '09 | Stanford University | June 15–18, 2009 Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher Wireshark Core Developer Network Engineer SHARKFEST '09 Stanford University June 15-18, 2009

Upload: janus

Post on 11-Feb-2016

24 views

Category:

Documents


0 download

DESCRIPTION

Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher Wireshark Core Developer Network Engineer SHARK FEST '09 Stanford University June 15-18, 2009. What is GTK+. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Adding Additional Functionality to the Wireshark GUI with GTK+

June 18, 2009

Stephen FisherWireshark Core DeveloperNetwork Engineer

SHARKFEST '09Stanford UniversityJune 15-18, 2009

Page 2: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

What is GTK+ GTK+ is short for the GIMP Toolkit. It was originally

created for use by the GNU Image Manipulation Program(GIMP).

GTK+ is available for Unix (X), Microsoft Windows and MacOS X .

GTK+ is written in C and comes with a C based API. APIs for other languages are available.

Page 3: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

How Wireshark uses GTK+ Almost all GUI presentations in Wireshark are done

through GTK+. A notable exception is the native Microsoft Windows File Save dialogs.

Page 4: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

The Export Objects featureIn the GUI, go to:

Find Export Objects

We will be studying how the the HTTP Export Object’s GUI was created.

Page 5: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Main Menu To Export Objectgtk/main_menu.c

gtk/export_object.c

gtk/export_object_http.cWe use _U_ to tellgcc that the parameter is unused in the function.

The underline in front of a letter means that letter is the shortcut key in the menu.

Page 6: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Creating the Windowgtk/export_object.c: export_object_window() continued

gtk/export_object.h: epan/prefs.h:

(pixels)

Page 7: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Creating the Window(cont.)gtk/export_object.c: export_object_window() continued

Page 8: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Creating the Window(cont.)gtk/export_object.c: export_object_window() continued

Page 9: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Creating the Window(cont.)gtk/export_object.c: export_object_window() continued

Page 10: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Creating the Window(cont.)gtk/export_object.c: export_object_window() continued

(Repeated for each column…)

Page 11: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Creating the Window(cont.)gtk/export_object.c: export_object_window() continued

Page 12: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Creating the Window(cont.)gtk/export_object.c: export_object_window() continued

(repeated for each button …)

Page 13: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Creating the Window(cont.)gtk/export_object.c: export_object_window() continued

Page 14: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

The Finished Window

Page 15: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Window Filled With Tap Data

Page 16: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Further readingGTK+ Reference Manual:http://library.gnome.org/devel/gtk/stable/

GTK+ Index of All Symbols (functions and such):http://library.gnome.org/devel/gtk/stable/api-index-full.html

GTK+ 2.0 Tree View Tutorial:http://scentric.net/tutorial/

Wireshark Developer’s Guide:http://www.wireshark.org/docs/wsdg_html_chunked/

Wireshark Developer README:http://anonsvn.wireshark.org/viewvc/trunk/doc/README.developer?view=co or doc/README.developer in source code tree

Page 17: Adding Additional Functionality to the Wireshark GUI with GTK+ June 18, 2009 Stephen Fisher

SHARKFEST '09 | Stanford University | June 15–18, 2009

Questions ?I’m happy to answer any of your questions now, after this session or any time you see me during the conference.

Ask other core and non-core developers; a number of which are proficient at GTK programming.

Ask them on the [email protected] mailing list (subscription required to get the responses to your question). I am subscribed to this mailing list.

Review existing code in the gtk/ directory in the source code tree