Commit Graph

41 Commits

Author SHA1 Message Date
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...

What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.

As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.

Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...

As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +00:00
Guy Harris 13e0b409cf As per a suggestion by Ulf Lamping, rename gtk_*.[ch] to gui_*.[ch], so
that it doesn't appear to be part of GTK+.

svn path=/trunk/; revision=15501
2005-08-21 19:24:11 +00:00
Guy Harris a0e68da918 Add a "register_dfilter_stat()", to register stats that take a display
filter as an argument on the command line and have a dialog box to enter
the display filter through the GUI.  Use it for all stats using
"gtk_tap_dfilter_dlg_cb()".

Add a top-level "stat_menu.h" file to declare "REGISTER_STAT_GROUP_E"
for the benefit of the declaration of "register_dfilter_stat()" in the
top-level "tap_dfilter_dlg.h".  Rename the "stat_menu.h" in the gtk
directory to "gtk_stat_menu.h", so as not to have two headers with the
same name.

Get rid of headers not declaring any functions not being used in the
module.

svn path=/trunk/; revision=15493
2005-08-21 09:48:27 +00:00
Guy Harris 50d77b113c Rename epan/stat.[ch] to epan/stat_cmd_args.[ch] - it only deals with
implementing the "-z" command-line arguments, it doesn't deal with *all*
issues for stats.

svn path=/trunk/; revision=15483
2005-08-20 20:06:05 +00:00
Jörg Mayer 0edcc8920e - Declare some functions static
- Add plugins_dlg.h
- Include .h files in their respective .c files
- Include .h and remove extern declarations in .c files
- set eol-style and keywords on gui_utils.[hc]

svn path=/trunk/; revision=15471
2005-08-20 14:02:00 +00:00
Ulf Lamping eafbbbcabb renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical named ui_util.h in / dir
svn path=/trunk/; revision=15465
2005-08-20 12:09:48 +00:00
Guy Harris 4ddd504bb4 Move the stats.[ch] stuff into epan, so plugins can use it.
svn path=/trunk/; revision=15429
2005-08-19 10:00:14 +00:00
Guy Harris b2807e2ab6 Move the APIs for registering and processing "-z" command-line arguments
and "Statistics" menu items into "stat.h" and "stat.c", to separate them
from the core tapping APIs.  A tap could conceivably not register as a
"-z" command-line argument or "Statistics" menu item, and a stat could
conceivably not be implemented as a tap, and dissectors that implement
tapping points don't need the UI-related stuff from "stat.h", they just
want the tap-related stuff in <epan/tap.h>.

svn path=/trunk/; revision=15427
2005-08-19 09:29:41 +00:00
Guy Harris 5fb6e97fb4 Squelch more const warnings (and fix some memory leaks that found).
_U_-ify some unused arguments, rather than assigning them to themselves.

Un-constify one variable that gets assigned a mallocated pointer.

Clean up indentation.

svn path=/trunk/; revision=15236
2005-08-06 03:44:55 +00:00
Guy Harris 80c1907a36 Rename "register_ethereal_tap()" to "register_tap_listener_cmd_arg()" as
it's used to register a callback for a tap listener invoked if the
specified command line argument is specified to the "-z" flag.

Move it, along with routines to:

	look up a "-z" argument in the table constructed by
	"register_tap_listener_cmd_arg()" and either save the full
	argument to "-z" and the corresponding listener if it's found or
	return a failure indication if it isn't;

	list the available tap listeners;

	call the "init" routines for the tap listeners saved in the
	table above;

and have Ethereal and Tethereal use those routines.

svn path=/trunk/; revision=13993
2005-04-01 09:08:27 +00:00
Ulf Lamping 0861927ce3 huge cleanup of capture file API (functions in file.c/file.h).
This includes: all functions in file.h now have a cf_ prefix, will have doxygen tags, will have the capture_file *cf as the first parameter and I tried to generalize the return values for non trivial functions.

Hopefully, I didn't introduced any new bugs, as I had to change a lot of files...

svn path=/trunk/; revision=13289
2005-02-04 18:44:44 +00:00
Guy Harris 4df2c4abd9 Make the signatures of functions passed to "register_tap_listener()"
match what "register_tap_listener()" expects (rather than squelching
warnings about the differences by casting function pointers to "void
*").

Make static some functions not used outside the module in which they're
defined. 

svn path=/trunk/; revision=12913
2005-01-01 12:49:54 +00:00
Guy Harris dfdc47e63c Put the file name into the window title, so if you have more than one of
them open, you know which one corresponds to which file.

Clean up white space.

svn path=/trunk/; revision=12509
2004-11-12 05:36:25 +00:00
Guy Harris 6472876ab3 Move the tap infrastructure to the epan directory.
svn path=/trunk/; revision=12128
2004-09-29 00:06:36 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Ulf Lamping cc68368037 use new functions in window API (ui_util.h),
use window_new instead of dlg_window_new for the statistics windows
(as these are no dialog windows)
do some code cleanup

svn path=/trunk/; revision=10979
2004-05-23 23:24:07 +00:00
Ronnie Sahlberg 374135cb4a In rpc programs statistics, change RTT (RoundTripTime) to SRT
(ServiceResponseTime) since that is a more appropriate name for these stats.

svn path=/trunk/; revision=10913
2004-05-17 20:06:32 +00:00
Ulf Lamping d4f93b305f added a close button to the dialogs,
use the dlg_window_new function for all dialogs

svn path=/trunk/; revision=10586
2004-04-12 09:48:19 +00:00
Ulf Lamping 92b92f632a various string related changes, mainly replace sprintf/snprintf by g_snprintf
svn path=/trunk/; revision=10371
2004-03-13 12:09:27 +00:00
Ulf Lamping ed6148660b statistics menu redesigned, now looking more like the former menu,
items now again grouped by function, not by ISO layer

svn path=/trunk/; revision=10202
2004-02-23 19:19:39 +00:00
Ulf Lamping cdebea69ce Redesigned the menu structure of the former statistics stuff,
now sorted by ISO-layer, than alphabetically (now longer by functionality).
Seperated the tap registering from the actual menu making stuff,
so the seperate step of registering the tap and the menu is no longer needed.
Removed all things related to this double registering.

svn path=/trunk/; revision=10180
2004-02-22 18:47:04 +00:00
Guy Harris 36ece5a17a Add a "window_new()" routine that creates a window of a given type, sets
the title, and arranges to set the icon for it.  Use that instead of
"gtk_window_new()" and separate calls to set the title and arrange to
set the icon.

Regularize #includes a bit.

Clean up white space.

svn path=/trunk/; revision=10054
2004-02-13 00:53:37 +00:00
Guy Harris 6b1a0bf430 Most taps that now include "tap_menu.h" no longer need to include
<stdio.h> to define FILE; get rid of the include.

svn path=/trunk/; revision=10034
2004-02-11 04:28:49 +00:00
Guy Harris 8e4a1c1cc6 Move the declaration of "register_tap_menu_item()" into a new
"tap_menu.h" file, and have the Ethereal taps include that rather than
"menu.h", so we don't have to worry about making sure we've included
<stdio.h> to define FILE, etc. just because some "menu.h" functions
require it.

svn path=/trunk/; revision=10031
2004-02-11 04:17:05 +00:00
Richard Sharpe 5d7261eb78 Make Analyze/Statistics have an accelerator of Alt+A S and move
Analyze/Summary to Alt+A Y.

svn path=/trunk/; revision=9537
2004-01-03 18:05:57 +00:00
Guy Harris ac48df79f2 From Lars Roland: have common code to handle display filter dialogs in
taps, and use that in the H.225 taps.

svn path=/trunk/; revision=9327
2003-12-17 22:13:08 +00:00
Guy Harris e91d15ac8c Put back "menu.h" - it's needed to declare "register_tap_menu_item()".
svn path=/trunk/; revision=9279
2003-12-13 22:23:18 +00:00
Ulf Lamping 3914b812b0 removed unused #include "menu.h" from the stats.c files
svn path=/trunk/; revision=9273
2003-12-13 17:10:21 +00:00
Guy Harris 4e64afcb25 Pass a pointer to a "capture_file" structure to
"set_menus_for_selected_packet()" and
"set_menus_for_selected_tree_row()", and have them decide whether to
enable or disable menu items based on whether that structure indicates
that a packet or field is selected and, if one is, on its properties.

Pass to the "selected packet enabled" routine for a menu item the
"frame_data" and "edt" members of the "capture_file" structure, and pass
to the "selected tree row enabled" routine the "field_info" member of
that structure.

Clear "cf->current_frame" if no packet is selected.

svn path=/trunk/; revision=8525
2003-09-24 02:36:35 +00:00
Guy Harris e8e9f1bdfe Provide a mechanism by which a tap can arrange to have its menu enabled
or disabled based on a currently-selected packet (or lack of same) or a
currently-selected protocol tree item (or lack of same).  Not currently
used, but necessary if we ever make the TCP graph stuff a tap.  API is
tentative and subject to change.

Also, enable and disable taps based on whether we have any packets to
process.

svn path=/trunk/; revision=8498
2003-09-19 07:24:39 +00:00
Guy Harris 1513888c99 Have "register_tap_menu_item()" put the item under Tools, not
Tools/Statistics; change the taps to put things under Statistics
themselves.  That allows taps to go elsewhere if appropriate.

svn path=/trunk/; revision=8488
2003-09-17 19:39:34 +00:00
Guy Harris 1b872b3648 Make "register_tap_listener()" return NULL on success and a "GString *"
referring to a GString containing an error message on failure, and don't
have it print anything on failure.

If it fails, have its Tethereal-tap callers print an error message
before exiting, and have its Ethereal callers pop up a dialog box with
the error (except in cases where the failure is guaranteed not to be the
user's fault, and where we exit, in which case we just print an error
message before we exit).  In all cases, the error message includes the
text of the GString.

Fix a scanf format string in the DCE RPC statistics Ethereal tap, so
that it properly skips the comma before the filter string.

Fix some Ethereal error messages not to say "tethereal".

svn path=/trunk/; revision=7542
2003-04-23 08:20:06 +00:00
Guy Harris 81ebec370d Have "register_tap_menu_item()" create submenus as necessary for a menu
item.

Convert all Ethereal (GUI) taps to use "register_tap_menu_item()" rather
than having hardcoded menu items in "gtk/menu.c".

svn path=/trunk/; revision=7541
2003-04-23 05:37:23 +00:00
Guy Harris 4cfd8b0f36 Allow taps to have menu item registration routines; the menu item
registration routines, for taps with menu items (taps that can be run
from the "Tools->Statistics" menu), create the menu item for the tap.
"make-tapreg-dotc" constructs a "register_all_tap_menus()" function that
calls all the tap menu item registration routines it finds, and Ethereal
calls that routine after the main window has been constructed (so that
the main menu exists, as the menu items are added to it).  (Tethereal
doesn't call it.)

Get rid of the "menu" and "menu_init" arguments to
"register_ethereal_tap"; the menu item is registered in the tap's menu
item registration routine, not in its main registration routine.

Have the RTP GUI tap register its menu item that way, rather than by
having it compiled into "gtk/menu.c".  (We're not ready yet to have taps
whose menu items are under a submenu register themselves in that
fashion, as "register_tap_menu_item()" can't yet create submenus.)

svn path=/trunk/; revision=7540
2003-04-23 03:51:03 +00:00
Ronnie Sahlberg 4c16bc7ba7 Prettify RPC_PROGRAMS table when reading new capture or when closing and opening it again.
svn path=/trunk/; revision=6787
2002-12-16 07:02:05 +00:00
Olivier Abad 29011060de Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6610
2002-11-11 15:39:06 +00:00
Ronnie Sahlberg b3e0a56390 First step in creating an API to register TAPs for use with ethereal instead of hardcoding them in main.c/menu.c
This adds functions to register the command line arguments to use the API in the same way as is done for tethereal.

Later it may be extended to also register the GUI/Menu entry point to ethereal using this api but that iwll be later since the changes required to menu.c are not as intrusive as the main.c command line parsing ones were.


Some of the latest changes (before this checkin) has made ethereal to produce lots of GTK errors when starting up the extension windows.
They were there before this checking but will be investigated.

svn path=/trunk/; revision=6566
2002-11-06 10:53:36 +00:00
Guy Harris 3266b0bb14 From Ronnie Sahlberg: make the tap listeners for gtk and gtk2 redissect
the packet list immediately when the tap is started.

svn path=/trunk/; revision=6488
2002-10-23 23:17:26 +00:00
Guy Harris 6d8d731412 From Ronnie Sahlberg: pass a pointer to the epan_dissect_t for a packet
to taps.

svn path=/trunk/; revision=6487
2002-10-23 23:12:38 +00:00
Ronnie Sahlberg 5b2510fb8e Tap system supprot for Gtk1 and both rpc_stat and rpc_progs
Gtk1 is still single threaded so if the tap extensions need to do something
time consuming or cpu intensive, then the main application will suffer.

It is better than nothing.

svn path=/trunk/; revision=6215
2002-09-07 10:02:36 +00:00