Commit Graph

1296 Commits

Author SHA1 Message Date
Ulf Lamping d0efc49be5 Change labels from "TCP Streams" to "Colors", to add other color values later
Later, file has to be renamed to color_prefs.dlg (function renaming similar)

svn path=/trunk/; revision=9666
2004-01-14 23:32:48 +00:00
Ulf Lamping 4676bb5bac destroy the "save as" dialog only, if it's existing
svn path=/trunk/; revision=9665
2004-01-14 14:28:25 +00:00
Guy Harris a093c75b59 Use "retap_packets()" rather than "redissect_packets()".
svn path=/trunk/; revision=9660
2004-01-13 22:49:15 +00:00
Guy Harris 4dd10c6687 Add a routine "retap_packet()" that runs through all packets, dissecting
them and running all taps on them, but not reconstructing the packet
list.  Use that in the IO-stat tap rather than "redissect_packet()"; the
latter does more work and redraws the display, neither of which are
necessary.

Call the filter callback when the Calc field is changed, to redraw the
graphs; that change also fixes things so that it's called when the
Filter field is changed.

Rename the "filter_button" member of an io_stat_graph_t to
"filter_field", as it's not the "Filter:" button, it's the text field
containing the filter expression.

svn path=/trunk/; revision=9659
2004-01-13 22:34:10 +00:00
Guy Harris 053ec89a5d "dfilter_compile()" supplies a null dfilter pointer for an empty filter
expression; don't assume it always supplies a non-null pointer.

svn path=/trunk/; revision=9657
2004-01-13 21:10:38 +00:00
Guy Harris 982a4976c7 Add a routine "io_stat_reset()" to reset an io_stat_t; have
"gtk_iostat_reset()" call it, and have calls to
"gtk_iostat_reset(&io->graphs[0])" just call "io_stat_reset(io)".

Add a routine "io_stat_draw()" to draw an io_stat_t; have
"gtk_iostat_draw()" call it, and have calls to
"gtk_iostat_draw(&io->graphs[0])" just call "io_stat_draw(io)".

Add a routine "io_stat_redraw()" to set the "needs_redraw" flag on an
io_stat_t and call "io_stat_draw()" on it, in order to force a redraw.
Use that in place of set flag/io_stat_draw pairs.

Add a routine "enable_graph()" to set an io_stat_graph_t's display flag
to TRUE and register a tap listener for it, and add a routine
"disable_graph()" to, if an io_stat_graph_t's display flag is set, clear
it, remove its tap listener, and turn its display button off.  Use
"disable_graph()" to disable graphs, rather than just turning the
display flag off, so that we ensure that the invariant "tap listener
present iff graph enabled" is preserved - the code to destroy an io-stat
window only removes tap listeners for enabled graphs, so it depends on
that invariant being preserved.

Check the validity of a display filter by compiling it, not by going
through the whole sequence of registering a tap listener.

svn path=/trunk/; revision=9656
2004-01-13 21:04:52 +00:00
Guy Harris d3ee83c0a0 Make the variable into which values from
"gtk_spin_button_get_value_as_float()" be doubles rather than floats -
GTK+ 2.x's "gtk_spin_button_get_value_as_float()" actually returns
doubles.

svn path=/trunk/; revision=9654
2004-01-13 08:25:00 +00:00
Guy Harris b97626862e Rename DISSECTOR_HELPER_{SRC,OBJECTS} to
DISSECTOR_SUPPORT_{SRC,OBJECTS}.

Add some additional files, required by dissectors, to those lists.

Extract the stuff to get version information strings for libraries and
the OS, which is *not* needed by dissectors, from "util.c", which
contains routines that *are* needed by dissectors, and put it into a
separate file.

Make "dftest" link only with the dissector support stuff, not with all
of the Ethereal common files.

svn path=/trunk/; revision=9645
2004-01-11 22:17:43 +00:00
Jörg Mayer 8e6ece35e6 #if 0 out test that causes an always false warning
svn path=/trunk/; revision=9644
2004-01-11 10:02:39 +00:00
Ulf Lamping a6ff7799a2 close the Save (As) dialog, when the capture file is closed
svn path=/trunk/; revision=9642
2004-01-10 17:29:26 +00:00
Ulf Lamping a25df4f95f add a "Save As" button to the toolbar,
changed some tooltips

svn path=/trunk/; revision=9641
2004-01-10 17:10:06 +00:00
Ulf Lamping 685a68e597 using button compatibility macros
svn path=/trunk/; revision=9638
2004-01-10 16:35:10 +00:00
Ulf Lamping 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Ulf Lamping b9cde84cac using button compatibility macros
svn path=/trunk/; revision=9633
2004-01-10 14:11:58 +00:00
Ulf Lamping 02d575db13 added various button compatibility macros,
to be used in the dialogs and elsewhere

svn path=/trunk/; revision=9632
2004-01-10 14:10:43 +00:00
Ulf Lamping 4c047130c8 removed two MSVC warnings (GTK2 related)
svn path=/trunk/; revision=9628
2004-01-10 12:43:04 +00:00
Guy Harris 3f75fe3291 Export "remove_color_filter()", as it's used in "color_dlg.c".
svn path=/trunk/; revision=9615
2004-01-09 20:39:26 +00:00
Guy Harris 6b61f72a9d Include <string.h> to declare "strcmp()".
svn path=/trunk/; revision=9614
2004-01-09 20:36:47 +00:00
Olivier Biot d82c95c87a Part 2 of the "unmarking a packet matching a color filter does not apply
the color filter's colors" bug: keep a list of removed color filters, so
there's no problem if we delete a color filter for which there are one or
more packets that have its colors. Only get rid of the lists when they
ar no longer needed.

svn path=/trunk/; revision=9613
2004-01-09 20:20:42 +00:00
Ulf Lamping ea0a32e92f use the same packet range things for "Print" dialog, as already implemented
in the "Save As" dialog and some other minor changes

svn path=/trunk/; revision=9610
2004-01-09 18:11:21 +00:00
Ulf Lamping 7e20ddc9f6 some code cleanup in range.c
svn path=/trunk/; revision=9609
2004-01-09 14:05:20 +00:00
Guy Harris 563f423d76 Turn the GTK+ 1.2.10 clist code into our own widget; that lets us modify it
to add functionality or improve performance, although, until we make it
work on GTK+ 1.3[.x] and 2.x, we shouldn't count on the performance
improvements, or make its API different from that of the GtkClist API
(other than names).

Move all the code that knows about the packet list into
gtk/packet_list.c, so that the GtkClist vs. EthClist stuff is
encapsulated inside it.

svn path=/trunk/; revision=9608
2004-01-09 08:36:23 +00:00
Olivier Biot f5f60f1ba3 Fix the "unmarking a packet matching a color filter does not apply the color
filter's colors" bug, by storing the pointer to the matching color_filter_t
structure in the frame_data structure.

Replace "frame" and "frames" by "packet" and "packets" in many places.

svn path=/trunk/; revision=9607
2004-01-09 02:57:54 +00:00
Guy Harris c0b33a22f9 If building without libpcap, exclude some stuff that builds only if
you're building with libpcap or that's not necessary if you're not
building with libpcap.

svn path=/trunk/; revision=9601
2004-01-08 20:39:51 +00:00
Ulf Lamping e8232af246 Save As and range: don't use global vars in range.c,
as this will be also used for the print dialog later.
Calculate packet count for user specified ranges

svn path=/trunk/; revision=9598
2004-01-08 10:40:33 +00:00
Jörg Mayer df49dc9409 Include string.h to import strerror
svn path=/trunk/; revision=9597
2004-01-07 22:16:17 +00:00
Guy Harris 1493331f5f Get rid of "gtk_box_pack_start()" call to put the range table into the
range frame - we already have a "gtk_container_add()" call that does that.

svn path=/trunk/; revision=9596
2004-01-07 21:29:59 +00:00
Ulf Lamping bd37ba81eb added some simple_dialogs, if save of raw data fails for some reasons
svn path=/trunk/; revision=9594
2004-01-07 20:14:17 +00:00
Olivier Biot 219940011c Remove extraneous parameters of packet count in case the end-user manually
enters a range of packets. Comment this in the code.

svn path=/trunk/; revision=9590
2004-01-07 19:10:49 +00:00
Jörg Mayer 9422e256ef Not that it really matters as the test still alwas evaluates to false:
An array with 256 elements should not be accessed with an index >= 256,
as we do not count as normal people do.

svn path=/trunk/; revision=9581
2004-01-07 01:44:23 +00:00
Ulf Lamping bba39ed952 save dialog with "Captured" and "Displayed" buttons in packet range
svn path=/trunk/; revision=9580
2004-01-07 00:10:52 +00:00
Guy Harris 73d47925eb Widgets get freed when the reference count goes to zero; we don't need
to explicitly destroy menu items when we remove them from the "recent
files" list.

Clean up indentation.

svn path=/trunk/; revision=9578
2004-01-06 22:38:07 +00:00
Ulf Lamping 65dd8f05bc an enum represents the radio buttons much better,
than an "array" of gbooleans

svn path=/trunk/; revision=9564
2004-01-05 22:21:53 +00:00
Ulf Lamping ba3b94790d removed some MSVC warnings (level 3)
svn path=/trunk/; revision=9560
2004-01-05 18:11:28 +00:00
Richard Sharpe cc1987cf9f User Specified Decodes, since it brings up a dialog box, should be User Specified Decodes...
svn path=/trunk/; revision=9543
2004-01-04 06:16:57 +00:00
Guy Harris 405f9b5f46 A missing piece of Tadaaki Nagao's patches to add a global "disabled
protocols" file.

svn path=/trunk/; revision=9539
2004-01-04 02:24:58 +00:00
Richard Sharpe fa9874ef73 Apply the patches from Tadaaki Nagao for a global version of disabled
protocols ...

svn path=/trunk/; revision=9538
2004-01-03 18:40:08 +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 af8cfdb6aa Mark arguments as unused.
Clean up indentation.

svn path=/trunk/; revision=9532
2004-01-03 05:13:12 +00:00
Ulf Lamping 480cf33874 hide save dialog, while saving
svn path=/trunk/; revision=9527
2004-01-02 21:48:24 +00:00
Ulf Lamping b81609e779 recent files: make submenu insensitive if empty and
add a menu item to clear the list

svn path=/trunk/; revision=9524
2004-01-02 17:27:00 +00:00
Ulf Lamping 976b0a3be3 From Didier: don't update the progress bar more often than every 100ms
svn path=/trunk/; revision=9522
2004-01-02 13:27:00 +00:00
Richard Sharpe ee3018cca3 Tweak the name of the Coloring Rules dialog box to be more consistent ...
svn path=/trunk/; revision=9517
2004-01-02 00:19:59 +00:00
Ulf Lamping af1096b14c label texts changed (tip from Richard)
svn path=/trunk/; revision=9510
2004-01-01 13:41:09 +00:00
Ulf Lamping 20ae160191 rearranged prefs topics
svn path=/trunk/; revision=9509
2004-01-01 13:29:16 +00:00
Ulf Lamping 864fbca295 moved recent files pref, as it splits corresponding dir entries
svn path=/trunk/; revision=9508
2004-01-01 13:16:40 +00:00
Ulf Lamping b14477c11c comment fixed
svn path=/trunk/; revision=9507
2004-01-01 13:10:45 +00:00
Ulf Lamping c8cddf7163 minor changes and a small bugfix
svn path=/trunk/; revision=9492
2003-12-30 01:19:02 +00:00
Guy Harris d177c7d731 Nothing in "range.c" is GTK+-specific, so move it to the top-level
directory.

svn path=/trunk/; revision=9487
2003-12-29 22:43:33 +00:00
Jörg Mayer db3f81b8db range.h moved from gtk to .
svn path=/trunk/; revision=9484
2003-12-29 21:18:12 +00:00
Ulf Lamping bb2245d366 removed a GTK2 warning
svn path=/trunk/; revision=9483
2003-12-29 21:04:47 +00:00
Guy Harris 8124ea2886 Get rid of an unused variable.
svn path=/trunk/; revision=9480
2003-12-29 20:41:37 +00:00
Guy Harris 4c1c3d4591 Add an RCS ID.
Include <ctype.h> to declare "isdigit()".

svn path=/trunk/; revision=9478
2003-12-29 20:40:02 +00:00
Ulf Lamping 14e2a790f9 From Dick Gooris (and me :-)
more ways to choose which packets can be saved,
in the save(as) dialog box

svn path=/trunk/; revision=9476
2003-12-29 20:05:59 +00:00
Guy Harris 4b37928246 Make the "max count of recently-visited files" preference unsigned.
Get rid of an unused variable.

Fix up whitespace.

svn path=/trunk/; revision=9475
2003-12-29 19:59:05 +00:00
Richard Sharpe 930410872f OK, now I have added the preference for recent_files_count_max, and we can
set the value and so on. We put the value in the text field before it is
displayed, and so on ...

svn path=/trunk/; revision=9470
2003-12-29 00:48:56 +00:00
Richard Sharpe 015681b24e Connect the recent_file_count_max variable to the prefs.gui_recent_file_count_max variable entry, and fix a small spelling/grammar mistake.
Now all we need is some enterprising individual to write the small amount of
preferences code to actually allow it to be changed etc, but I have to go to
Costco, so, later...

svn path=/trunk/; revision=9463
2003-12-28 21:10:26 +00:00
Ulf Lamping 0f2765c1f8 removed some MSVC warnings (warning level 2)
svn path=/trunk/; revision=9460
2003-12-28 12:50:42 +00:00
Ulf Lamping cb2658031d removed some MSVC warnings (warning level 2)
svn path=/trunk/; revision=9459
2003-12-28 12:43:40 +00:00
Guy Harris f941ab7b7d Do the "isprint()" hack for GTK+ 2.x or 1.3[.x], whether on UNIX or
Windows - the problem is that GTK+ 1.3[.x] and later assume strings
handed to them are UTF-8 strings, not, for example, ISO 8859/x strings.

In packet-radius.c, re-define "isprint()" rather than #ifdeffing its use
(the old code was also incorrectly treating 0x7f as a printable).

svn path=/trunk/; revision=9436
2003-12-24 01:21:32 +00:00
Guy Harris b136fc7512 Base the count of selected packets on whether there's a
currently-selected packet.

Use "cfile.count" as the total number of packets in the capture.

Use "plurality" to display "packet" vs. "packets".

svn path=/trunk/; revision=9423
2003-12-23 00:32:45 +00:00
Ulf Lamping 467c05b3ea removed some MSVC warnings (conversions between double/float and int)
svn path=/trunk/; revision=9422
2003-12-23 00:16:46 +00:00
Guy Harris 9c89878b2e Have a "toc" file in the help directory, which gives a list of help
topic titles and help file names.

svn path=/trunk/; revision=9416
2003-12-22 21:52:41 +00:00
Ulf Lamping 57b6b53548 Patch from Guy: using distributed help text files,
instead of "#include" built in texts
(and some other minor changes)

svn path=/trunk/; revision=9407
2003-12-22 08:01:01 +00:00
Guy Harris 5c7fd0723c If we don't have any packets, or don't have any filtered packets, don't
even show the averages over the empty sets in question.

svn path=/trunk/; revision=9400
2003-12-21 22:32:07 +00:00
Guy Harris a97af4919b Arrays indexed by a 1-octet unsigned value, if we don't know which
values are permitted, must have 256 elements, not 255 elements.

svn path=/trunk/; revision=9399
2003-12-21 22:24:41 +00:00
Guy Harris ecbfe2fb77 "sizeof(array)" is the size of the array in bytes, not the number of
elements in the array.

svn path=/trunk/; revision=9398
2003-12-21 22:21:45 +00:00
Ulf Lamping 3b77bfee59 removed some MSVC warnings (moved pcap.h before glib.h)
svn path=/trunk/; revision=9393
2003-12-21 12:19:39 +00:00
Jörg Mayer 3f020f582e Compiling with -pedantic:
warning: comma at end of enumerator list

svn path=/trunk/; revision=9383
2003-12-21 04:31:58 +00:00
Olivier Biot 44ea0de58f Move display filter into filtered packets frame.
Fix NaN when a capture and/or a filter don't have any matching packets
so the average packet size is obtained by dividing by zero.

svn path=/trunk/; revision=9369
2003-12-20 12:03:35 +00:00
Guy Harris 39f5418dc0 From Lars Roland:
use the common display filter dialog infrastructure in the MGCP
	service response time tap;

	add common infrastructure for updating the titles of tap dialogs
	when the capture file name changes.

svn path=/trunk/; revision=9366
2003-12-19 23:41:55 +00:00
Richard Sharpe 0023dcd0e1 A small patch from Kai Krueger <kai@kruegernetz.de> to ensure that we
keep the file name around long enough to use it when saving highlighted
data etc.

svn path=/trunk/; revision=9348
2003-12-18 20:36:45 +00:00
Ulf Lamping 1a2ecc19c3 removed some more MSVC warnings (type casting), GTK2 specific
svn path=/trunk/; revision=9333
2003-12-17 23:41:10 +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
Ulf Lamping 1f97bdc27a removed some more MSVC warnings (type casting)
svn path=/trunk/; revision=9326
2003-12-17 22:11:43 +00:00
Ulf Lamping 55e4a8112f removed some MSVC warnings (casting gdouble to gint, which is ok)
svn path=/trunk/; revision=9319
2003-12-17 20:28:49 +00:00
Guy Harris 5b58448744 From Albert Chin: get rid of C++ comments.
svn path=/trunk/; revision=9305
2003-12-17 00:50:22 +00:00
Olivier Abad abb4aec1fe Use gtk compatibility macros (from compat_macros.h) instead of some gtk+
v1.2 functions which are deprecated in gtk+ v2.

Update OBJECT_SET_DATA macros to cast "data" to (gpointer).

svn path=/trunk/; revision=9296
2003-12-16 18:43:35 +00:00
Guy Harris b8eae38ada From Ronnie Sahlberg: when the user selects a filter from the popup
dialog, make the main window come to the front.

svn path=/trunk/; revision=9292
2003-12-16 05:04:11 +00:00
Guy Harris 573fed2ea8 DCE RPC version numbers are unsigned - print them with "%u".
Do the same checks for negative and >255 version numbers in the
Tethereal DCE RPC statistics tap that are done in the Ethereal tap.

In the Ethereal tap, do those checks before looking up the protocol name.

svn path=/trunk/; revision=9290
2003-12-15 20:15:03 +00:00
Ulf Lamping 5321986b03 if user clicks recent capture file item, and this file no longer exists,
remove the menu item

svn path=/trunk/; revision=9289
2003-12-15 06:38:48 +00:00
Guy Harris 524203fddf From Lars Roland: export the value_string tables from packet-h225.c and
use them in the H.225 taps.

svn path=/trunk/; revision=9287
2003-12-15 04:23:55 +00:00
Guy Harris 4f5d2ddcda From Ronnie Sahlberg: fix a crash on Win32 when we resort a column in
the conversation list and then create/apply a filter from the
conversation list popup.

svn path=/trunk/; revision=9284
2003-12-14 10:28:20 +00:00
Guy Harris fbcaaa19f2 From Ronnie Sahlberg: support iostat graphs with 1ms resolution.
svn path=/trunk/; revision=9283
2003-12-14 10:24:24 +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
Guy Harris 7cae9249aa Squelch some compiler warnings.
Clean up white space.

svn path=/trunk/; revision=9278
2003-12-13 22:05:08 +00:00
Ulf Lamping 156be8aa9f added "most recently used" lists for
"opened capture files" and "display filter used",
the settings will be saved in the file "recent" in the users config path

svn path=/trunk/; revision=9275
2003-12-13 18:01:30 +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
Ulf Lamping 8e43886258 mention the GPL license in the Help->About dialog
svn path=/trunk/; revision=9272
2003-12-13 16:30:10 +00:00
Ulf Lamping 16ca6bebf6 set link layer type sensitive only,
if the user has to choose between at least two choices

svn path=/trunk/; revision=9270
2003-12-13 11:00:04 +00:00
Guy Harris 6a91088ed0 Put in a comment about some issues with the way we do "Update list of
packets in real time" captures.

svn path=/trunk/; revision=9269
2003-12-13 03:36:17 +00:00
Guy Harris 399591ce24 Add some sanity checking of arguments.
svn path=/trunk/; revision=9268
2003-12-13 03:30:07 +00:00
Ulf Lamping 776e388c14 sensitivity of packet range options fine tuning:
don't let the user choose "selected packets", when no packets displayed

svn path=/trunk/; revision=9265
2003-12-13 02:42:09 +00:00
Guy Harris ba9290fe08 From Michael Lum:
Fix point code display.

	Add taps for ANSI MAP and ISUP statistics.

svn path=/trunk/; revision=9247
2003-12-12 19:55:28 +00:00
Gerald Combs 9ed6beff38 In "dlg_window_new()" check to see if "top_level" has been initialized,
as is the case for the spawned capture process.

svn path=/trunk/; revision=9245
2003-12-12 02:50:04 +00:00
Ulf Lamping 10e3320115 prevent MSVC warning:
"warning C4761: Gr��enkonflikt im Argument. Konvertierung vorgenommen"
-> size conflict in argument, conversion done

svn path=/trunk/; revision=9244
2003-12-11 21:23:37 +00:00
Guy Harris d9c27dc211 Oops, I checked the wrong tap into CVS somehow.
svn path=/trunk/; revision=9234
2003-12-10 21:21:16 +00:00
Olivier Biot e42f094023 Mark parameter data as unused in callback_create_help().
svn path=/trunk/; revision=9226
2003-12-09 23:45:34 +00:00
Ulf Lamping 4b890b83fd print system enhanced, more print ranges and expanded states
svn path=/trunk/; revision=9223
2003-12-09 22:41:07 +00:00
Ulf Lamping 892700e893 print system enhanced, more print ranges and expanded states
svn path=/trunk/; revision=9222
2003-12-09 22:27:28 +00:00
Guy Harris 15f863dc3c From Michael Lum:
new taps for GSM A-interface;

	fixes for ANSI A-interface taps.

svn path=/trunk/; revision=9220
2003-12-09 18:49:32 +00:00
Guy Harris 11d8817da0 Don't automatically size the columns - that's expensive in large
captures, as it has to compute the width of an auto-resizing column in
every row.  Just pick fixed widths for the columns (and tune the width
of the "Protocol" column so that it's not narrower than the column
title).

svn path=/trunk/; revision=9219
2003-12-09 06:48:40 +00:00
Ulf Lamping 26ac41f3dd moved "File->Save Highlighted Data" to "File->Export->Raw Packet Data"
svn path=/trunk/; revision=9199
2003-12-08 19:25:01 +00:00
Ulf Lamping 32d83ab647 removed seperator between the two print menuitems
svn path=/trunk/; revision=9197
2003-12-08 17:49:20 +00:00
Olivier Abad 96acd9f8bf Update various set_menu_object_data() calls to reflect recent menu
hierarchy changes. This avoids a crash when selecting "Folow TCP stream"
from the "Analyze" menu.

svn path=/trunk/; revision=9193
2003-12-07 09:43:53 +00:00
Guy Harris 33b25ac15e From Jeff Morriss: avoid at least some N^2 behavior when changing the
time stamp format.

svn path=/trunk/; revision=9179
2003-12-06 04:05:02 +00:00
Guy Harris f0b9d12b6a Don't use GNodes for the protocol tree, put the sibling pointer, and
pointers to the first *and* last child, in the "proto_node" structure
itself.  That saves us one level of indirection and memory allocation,
and lets us append to a tree by appending to the last child directly,
rather than having to scan through the list of siblings of the first
child to find the end of that list.

svn path=/trunk/; revision=9171
2003-12-04 10:59:34 +00:00
Guy Harris 64bc566ea8 In GTK+ 2.x, "gtk_entry_get_text()" returns a "const gchar *"; assign
its value to pointer-to-const variables.

svn path=/trunk/; revision=9161
2003-12-04 00:45:39 +00:00
Guy Harris 56c65fa63b From Michael Lum: Ethereal tap for ANSI A-interface.
Tweak some Makefile.nmake whitespace.

svn path=/trunk/; revision=9159
2003-12-03 23:46:23 +00:00
Guy Harris 95ea8dbdec From Greg Morris: the "File->Save Highlighted" menu item has no icon, so
don't use "ITEM_FACTORY_STOCK_ENTRY()" for it.

svn path=/trunk/; revision=9155
2003-12-03 19:59:28 +00:00
Guy Harris dcd98ae8d3 The "ptr_u" unions no longer have a "next" pointer - they now just have
one member - or have one that's not used, so get rid of those unions.

svn path=/trunk/; revision=9151
2003-12-03 09:28:26 +00:00
Guy Harris 0c84e1c329 From Didier Gautheron: for each column format type, save the first and
last columns, if any, with that format, and use that to speed up
processing of columns with a particular format and checking whether
we're displaying a column with a particular format.

svn path=/trunk/; revision=9147
2003-12-02 23:14:32 +00:00
Guy Harris bd9f96738c From Didier Gautheron: put an "fvalue_t" structure into a "field_info"
structure, rather than separately allocating "fvalue_t"s and having the
"field_info" structure point to them - this appears to speed up protocol
tree construction a bit.

svn path=/trunk/; revision=9146
2003-12-02 21:15:49 +00:00
Guy Harris bb0eb4879f "select_file_cb()" only needs a title, not a "construct_args_t" -
"construct_args_t" is for use with filter dialogs, and the members other
than the title apply only to filter dialogs.

Have "select_file_cb()" actually use the title supplied to it.

svn path=/trunk/; revision=9125
2003-12-01 02:01:56 +00:00
Richard Sharpe a168545845 Fix the accelerator issue ...
svn path=/trunk/; revision=9124
2003-12-01 01:57:14 +00:00
Guy Harris 971d7e3816 Not all platforms have <unistd.h> - in particular, Windows doesn't.
If you're using "open()", "close()", "read()", "write()", etc., you
should include <io.h> on Windows.

svn path=/trunk/; revision=9123
2003-11-30 23:05:45 +00:00
Richard Sharpe fc6c270c4b Fix some warnings in proto_draw.c
svn path=/trunk/; revision=9122
2003-11-30 18:01:20 +00:00
Richard Sharpe 45f226fc2c Rename that to Save Highlighted with Ctl-H as the accellerator.
svn path=/trunk/; revision=9121
2003-11-30 04:40:19 +00:00
Richard Sharpe d9cb6a9d64 Add Save Selected as a menu item in the File Menu.
This still has a way to go, though, because the menu item should be greyed out
until something is Highlighted.

svn path=/trunk/; revision=9120
2003-11-30 04:37:50 +00:00
Richard Sharpe 114c52bf0b Move print_file_cb out of gtk/print_dlg.c and into gtk/file_dlg.c and
rename it to select_file_cb to reflect its function.

While this cleans things up a bit, I am still not happy because now
filter_prefs.h must be included before file_dlg.h just to get
construct_args_t.

svn path=/trunk/; revision=9119
2003-11-30 04:21:55 +00:00
Richard Sharpe fa68b4af87 Properly capitalize the string for the menu item.
svn path=/trunk/; revision=9117
2003-11-29 06:15:05 +00:00
Richard Sharpe 02087e332f Add an entry in the byte_view pane that allows the user to save the highlighted
data to a file. This allows the user to select some stuff, and analyse it with
external tools, and is very useful for quickly prototying dissectors etc.

This works by retrieving the info that is needed to define where the selected
region is.

It puts up a dialog box that asks for the file to save in.

However, it is an ugly hack, because it reuses print_file_cb, while
print_file_cb should be moved into file_dlg.c.

It also needs to have some warning dialogs put up in error cases.

Finally, it would be good to be able to select a region in the byte_view,
which you can do with click and drag, and then have a menu item to save the
selected bytes.

svn path=/trunk/; revision=9116
2003-11-29 06:09:54 +00:00
Ulf Lamping 1ef427d649 renamed frame to packet in all GUI elements
moved "Enabled Protocols" and such
from "View" to "Analyze" toplevel menu

svn path=/trunk/; revision=9114
2003-11-28 19:13:25 +00:00
Ulf Lamping e4037df998 renamed frame to packet in all GUI elements
svn path=/trunk/; revision=9113
2003-11-28 19:02:41 +00:00
Ulf Lamping eb209e9438 use dlg_window_new instead of gtk_window_new
svn path=/trunk/; revision=9112
2003-11-28 19:00:28 +00:00
Ulf Lamping 390f20ea6b label changed from "Portions" to "% of total" as suggested by Guy
svn path=/trunk/; revision=9111
2003-11-28 00:44:21 +00:00
Ulf Lamping cd01ca6cb0 using dlg_utils.c functions to catch the ESC key to close the dialog
svn path=/trunk/; revision=9110
2003-11-28 00:13:08 +00:00
Ulf Lamping 131eeab31d using dlg_utils.c functions to catch the ESC key to close the dialog
svn path=/trunk/; revision=9109
2003-11-27 23:25:55 +00:00
Guy Harris 41cedaa088 Show the -z flag in the usage message.
svn path=/trunk/; revision=9105
2003-11-27 22:12:18 +00:00
Ulf Lamping ad6b446228 Redesign of the whole menu structure, to be more intuitive to the user and
conforms somewhat better to the Gnome Human Interface Guideline

svn path=/trunk/; revision=9100
2003-11-27 20:34:01 +00:00
Ulf Lamping 2cd8629c86 using text files from help dir, to display the help texts.
the "dynamic protocol fields" are already moved to gtk/supported_protos_dlg.c

svn path=/trunk/; revision=9098
2003-11-27 00:22:12 +00:00
Ronnie Sahlberg 9d88e58e51 remove another slow GMemChunk from ethereal making ethereal a little bit faster
svn path=/trunk/; revision=9085
2003-11-25 14:07:45 +00:00
Ronnie Sahlberg 4f84e65c50 fvalue_free() is one of the most called functions.
This function is also very small, so small that teh overhead for the actual function call and return is likely to be a significant part
of its execution time.

change it into a macro and make it thus slightly faster by eliminating the function call overhead.

svn path=/trunk/; revision=9083
2003-11-25 13:20:36 +00:00
Guy Harris 122dd3959c Make the recent epan/proto.{c,h} change compile.
svn path=/trunk/; revision=9075
2003-11-24 22:11:55 +00:00
Guy Harris 50917e1ead From Lars Ruoff: use the pointer to the RTP payload, rather than
extracting the data from the frame directly.

svn path=/trunk/; revision=9059
2003-11-21 19:24:00 +00:00
Guy Harris 9687947b5f From Lars Roland:
- added a pointer to raw rtp data to _rtp_info that can be used by
	  taps;

	- RTP packets are passed to the tap queue only if they are not
	  error packets (so that you don't need to filter out ICMP
	  packets)

	- use that pointer in rtp_stream, so it handles packets with
	  padding, and should handle RTP packets fragmented across
	  lower-level packets

	- moved rtp_stream from tap sources to normal files
	  (prevents on-start-up registration of the rtp_stream tap
	  listener)

	- rtp_stream tap gets registered/unregistered with the "RTP
	  Streams" dialog box
	  i.e. the tap is registered as long as the dialog box is open.
	  Alternatively, it is de-/registered on demand if RTP Analysis is
	  called directly on a packet.

	- rtp_stream tap listener no longer uses a filter in dissection
`	  and does not need to have a proto tree being built.
	  (performance increase)

	- fixed: RTP Streams list will get updated in real time if the
	  dialog box is open while a redissection takes place.

svn path=/trunk/; revision=9051
2003-11-20 23:34:31 +00:00
Guy Harris 81ff12e4aa Use "OK" for the "OK" button, as we do elsewhere.
svn path=/trunk/; revision=9025
2003-11-19 01:50:50 +00:00
Ulf Lamping 34dfb0b3d0 redraw supported_protos dialog, if GUI prefs changed
svn path=/trunk/; revision=9022
2003-11-19 00:10:25 +00:00
Ulf Lamping 007b97900c added supported_protos menu item
svn path=/trunk/; revision=9021
2003-11-19 00:04:15 +00:00
Ulf Lamping 3aad138c1b added supported_protos_dlg
svn path=/trunk/; revision=9020
2003-11-19 00:02:42 +00:00
Ulf Lamping 0d636117a1 added supported_protos_dlg.obj
svn path=/trunk/; revision=9019
2003-11-19 00:01:38 +00:00
Ulf Lamping afafa5fd36 seperated "supported protocols and protocol fields" dialog, coming from help_dlg.c/.h
svn path=/trunk/; revision=9018
2003-11-18 23:56:45 +00:00
Ulf Lamping 1aacb3f060 removed MSVC compiler warnings
svn path=/trunk/; revision=9010
2003-11-18 19:29:07 +00:00
Ulf Lamping 02b9fb53cc removed unused vars
svn path=/trunk/; revision=9008
2003-11-18 19:27:39 +00:00
Ulf Lamping 4d0f00fe32 removed MSVC warnings
svn path=/trunk/; revision=8996
2003-11-18 06:06:41 +00:00
Gerald Combs fee0d98c18 Check the environment variables SSH_CONNECTION, SSH_CLIENT, REMOTEHOST,
DISPLAY, and CLIENTNAME (in that order).  If any of them are set, create
a capture filter that excludes their traffic and set it as the default.
The longer filters should be efficient without being overly long; they
may need some tweaking.

svn path=/trunk/; revision=8994
2003-11-18 04:16:28 +00:00
Ulf Lamping 3b0e3efce4 removed some warnings
svn path=/trunk/; revision=8993
2003-11-18 00:46:40 +00:00
Guy Harris dc69087b0c Not all compilers allow array/structure/union members of automatic
variables to be initialized to non-constant values (C89 says that "All
the expressions in an initializer for an object that has static storage
duration or in an initializer list for an object that has aggregate or
union type shall be constant expressions"; presumably the intent of the
former was to avoid run-time initialization and of the latter was to let
the initialization be done by copying from a compile-time-created blob
of memory), so we have to initialize "info->counts" by hand.

svn path=/trunk/; revision=8984
2003-11-17 20:00:37 +00:00
Guy Harris 02a954efe3 "capture()" takes a "struct pcap_stat *" argument, so you need to
include <pcap.h> before including "capture.h".

Include "dlg_utils.h" to declare "dlg_set_cancel()".

svn path=/trunk/; revision=8981
2003-11-17 00:27:33 +00:00
Guy Harris 7bd2e232a9 Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()"
take a "protocol_t *" as an argument, so they don't have to look up the
"protocol_t" - this will probably speed them up considerably, and
they're called on almost every dissector handoff.

Get rid of a number of "proto_is_protocol_enabled()" calls that aren't
necessary (dissectors called through handles, including those called
through dissector tables, or called as heuristic dissectors, aren't even
called if their protocol isn't enabled).

Change some direct dissector calls to go through handles.

svn path=/trunk/; revision=8979
2003-11-16 23:17:27 +00:00
Ronnie Sahlberg 21313199e4 From Lars Roland Service Response times for H225 RAS
svn path=/trunk/; revision=8978
2003-11-16 23:11:20 +00:00
Guy Harris a8fc1d810d From Michael Lum: add <shift><control> hotkeys for Protocols and
Preferences.

svn path=/trunk/; revision=8975
2003-11-15 23:48:52 +00:00
Ulf Lamping 1a42ad1d50 GTK2 specific: use some Ethereal specific stock icons generated in toolbar.c
svn path=/trunk/; revision=8974
2003-11-15 11:46:09 +00:00
Ulf Lamping 0fe5eba745 handlebar removed,
GTK2 specific: generate some Ethereal specific stock icons and
use them in the toolbar

svn path=/trunk/; revision=8973
2003-11-15 11:44:10 +00:00
Ulf Lamping 63aa4a59c0 seperated capture dialog from capture.c and put into new gtk/capture_info_dlg.c,
added some tiny bars, that will indicate the percentage,
added ESC key handler and use of GTK_STOCK button

svn path=/trunk/; revision=8970
2003-11-15 08:53:56 +00:00
Ulf Lamping ee48f3052f added "#include <epan/packet.h>" to be able to include "capture.h"
svn path=/trunk/; revision=8969
2003-11-15 08:50:07 +00:00
Ulf Lamping bca18fcf68 seperated capture dialog from capture.c and put into new gtk/capture_info_dlg.c
svn path=/trunk/; revision=8968
2003-11-15 08:48:14 +00:00
Ulf Lamping 8064140631 completely redesigned print dialog layout, to be more obvious to the user
svn path=/trunk/; revision=8949
2003-11-12 19:04:58 +00:00
Ulf Lamping 27c8d04949 added some print dialog flags, to disable some unsupported print features
(e.g. selection of pages from X to Y)

svn path=/trunk/; revision=8938
2003-11-11 13:59:53 +00:00
Guy Harris c5fad03460 The user interface preference page has only 9 rows in the GTK+ 2.x
version.

svn path=/trunk/; revision=8933
2003-11-11 05:23:23 +00:00
Guy Harris 6108feb655 Create the last two items in the GUI preferences page's first column the
same way the other items are created - in order, going down the page,
and using "pos++" as the table position.

svn path=/trunk/; revision=8932
2003-11-11 05:09:03 +00:00
Ronnie Sahlberg 6073e3b265 Not all LDAP PDUs are aligned to the start of a TCP segment.
If we failed to dissect the GSS-SPNEGO blob it probably means that the segment
is somewhere in the middle of an LDAP PDU.

Just bail out and stop dissecting the PDU instead of aborting ethereal completely
using g_assert() since this is not really a pathological error, its just something that can and will happen normally.

svn path=/trunk/; revision=8925
2003-11-10 07:44:47 +00:00
Guy Harris ed66a067f5 Nothing here should require zlib.h, so we shouldn't need to do
"/I$(ZLIB_DIR)".

svn path=/trunk/; revision=8910
2003-11-07 23:26:15 +00:00
Guy Harris a37ef3e1e2 "File->Open" should be available whether or not we have a captue file
open.

The toolbar equivalent should *not* be available if we have an "Update
list of packets in real time" capture running.

The toolbar "Save" button should not be available if we don't have an
unsaved capture file.

svn path=/trunk/; revision=8902
2003-11-07 01:29:05 +00:00
Guy Harris 27b2678cca Make Shift+Control+S an accelerator for "Save As...", as per the GNOME
HIG.

svn path=/trunk/; revision=8901
2003-11-06 23:02:06 +00:00
Ronnie Sahlberg de20fa6a54 the LDAP service response time dialog
svn path=/trunk/; revision=8886
2003-11-05 09:04:51 +00:00
Ronnie Sahlberg f16f83b154 update for LDAP
measure the response time for some LDAP commands and
add a service response time dialog for it

svn path=/trunk/; revision=8885
2003-11-05 09:04:17 +00:00
Guy Harris 7089251f68 Skip the check for the module if a page doesn't have a module.
svn path=/trunk/; revision=8881
2003-11-04 20:33:13 +00:00
Guy Harris 343a178e33 Clean up the way we find the properties page for a given protocol
somewhat; this fixes a bug wherein we were assuming all modules
necessarily had preference pages (they won't, if the only preferences
for the module are obsolete preferences).

svn path=/trunk/; revision=8880
2003-11-04 20:22:21 +00:00
Guy Harris 85773d34c3 From Olivier Abad: Insert the GTK+ 2.2.4
"gtk_tree_view_expand_to_path()" when building with GTK+ 2.0[.x], so
that we can build with 2.0[.x].

svn path=/trunk/; revision=8871
2003-11-03 21:00:05 +00:00
Guy Harris c682c10915 From Lars Ruoff: fix a problem with wrong maximum delay calculation -
first or marked packets are now ignored when calculating maximum delay.

svn path=/trunk/; revision=8868
2003-11-03 20:45:25 +00:00
Guy Harris ce51c5c700 Don't try to get the list of link-layer header types for an interface if
the interface isn't in the list of known (local) interfaces - that way
we don't try to get entries if the user's in the middle of changing the
"Interface:" text, or if the interface is an rpcap: URL (getting the
link-layer header type list for a remote interface is currently
impossible, and even just getting its *default* interface type could
hang for a long time if the remote machine isn't responding).

Free the link-layer header type list when we're done with it.

Label the option menu for that list "Link-layer header type", as it
doesn't control the data link type of the interface in the only case I
know of where it's settable, namely 802.11 interfaces - it just controls
whether the packets you get from the interface have a fake Ethernet
header or a real 802.11 header.

svn path=/trunk/; revision=8867
2003-11-03 10:40:51 +00:00
Guy Harris c0f8032621 "g_list_first()" takes an arbitrary list entry as an argument; you don't
need to call it if you already have a pointer to the first entry in the
list, which is what "a pointer to the list" is.

svn path=/trunk/; revision=8866
2003-11-03 10:36:45 +00:00
Gerald Combs 2bdac88860 The recent link-layer type additions broke "-r". Make it work again.
svn path=/trunk/; revision=8857
2003-11-02 19:31:20 +00:00
Guy Harris 3c2706c338 Return FALSE from the configure event handler, so that anybody else
who's registered for it can get notified about it.

svn path=/trunk/; revision=8849
2003-11-01 03:03:25 +00:00
Guy Harris 219b6cefa2 Based on a patch from Brian Fundakowski Feldman, add support for setting
link-layer type when capturing, using the "pcap_set_datalink()" and
related APIs.

svn path=/trunk/; revision=8848
2003-11-01 02:30:18 +00:00
Guy Harris 3a6a79c3c9 From Lars Ruoff:
- fix missing detection of first packet when writing payload.
	- fix bug of erroneous handling of confort noise when writing payload.
	- fix bug of possible endless silence insertion on first packet when
	  writing payload.

svn path=/trunk/; revision=8846
2003-10-31 19:45:16 +00:00
Guy Harris b4bdaa5e9f Put quotes around values for FT_ABSOLUTE_TIME variables, and around
values with white space in them.

svn path=/trunk/; revision=8820
2003-10-29 23:15:35 +00:00
Guy Harris 5f01c7a082 Have the "edit display filters" button do the exact same thing as the
"Edit -> Display Filters..." menu item, as per Ulf Lamping - there's
apparently some problem wherein &args doesn't get passed properly to the
callback.

svn path=/trunk/; revision=8819
2003-10-29 22:39:49 +00:00
Guy Harris 1c5ed66f45 From Lars Roland: H.225 message and reason tag counter taps.
svn path=/trunk/; revision=8794
2003-10-28 00:31:17 +00:00
Guy Harris 0a7b08c9e9 Don't draw a Y-axis label if you haven't constructed the label string.
svn path=/trunk/; revision=8792
2003-10-27 23:12:53 +00:00
Richard Sharpe 7dc61c936d Add filter button support to FibreChannel stats and DCERPC stats.
svn path=/trunk/; revision=8785
2003-10-27 01:35:53 +00:00
Richard Sharpe cf1f6efdf6 Add Filter Button support for onc-rpc as well ...
svn path=/trunk/; revision=8784
2003-10-27 01:20:16 +00:00
Richard Sharpe e86c448e78 Make sure that Clicking OK in the filter creation dialog box does not act
as an OK to the dialog box it is called from.

svn path=/trunk/; revision=8783
2003-10-27 01:09:32 +00:00
Richard Sharpe a6a40da79d This changes the Filter: label in the SMB Service Response Time dialog box to
a button that brings up the Create Filter dialog box. While it works, the
problem is that it also acts as an Enter keypress as far as the start_stat
button is concerned.

Probably needs a small fix.

svn path=/trunk/; revision=8782
2003-10-27 00:54:02 +00:00
Ronnie Sahlberg c1ffe5216e Update to cf_get_display_name()
return "<no file>" if there is no file loaded yet instead of crashing in io-stat

io-stat  only print the label for the top tick on the y axis to make it look less cluttered

svn path=/trunk/; revision=8781
2003-10-26 03:09:03 +00:00
Guy Harris 44a967d7e6 From Ulf Lamping: add a preference to control whether to show or hide
the main toolbar (currently no GUI to set it; that's in progress).

svn path=/trunk/; revision=8754
2003-10-22 22:13:13 +00:00
Guy Harris ef74a0b574 If a tap menu item doesn't have a "selected_packet_enabled()" or
"selected_tree_row_enabled()" routine, enable it by default, so that
tap windows can be popped up even if you have no capture file.

Assorted code cleanups.

svn path=/trunk/; revision=8740
2003-10-20 22:28:22 +00:00
Guy Harris 2f34cc8e1f From Ulf Lamping:
put toolbar separators in the right places;

	get rid of the "Capture Stop" button in Win32.

svn path=/trunk/; revision=8736
2003-10-20 19:07:18 +00:00
Olivier Abad 3b90e2f177 In fileopen_dir_changed_cb() :
- return FALSE immediately if the text entry is empty ;
- return FALSE at the end of the function so that the signal is sent to
  the entry. It avoids a Gtk-ERROR (and an abort) :
file: gtkentry.c: line 4338 (blink_cb): assertion failed:
GTK_WIDGET_HAS_FOCUS(entry))

svn path=/trunk/; revision=8735
2003-10-20 06:06:26 +00:00
Olivier Abad daea60d65c From Olivier Biot : remove packet capture code when compiling without
libpcap.

svn path=/trunk/; revision=8726
2003-10-17 17:28:38 +00:00
Olivier Abad 3711ff5a7f Use gtk_tree_view_expand_to_path() in gtk2 code to expand a node, as it
also expands parent nodes if necessary.

svn path=/trunk/; revision=8725
2003-10-17 17:20:32 +00:00
Guy Harris 078d0e15c7 Further expand a comment.
svn path=/trunk/; revision=8724
2003-10-17 08:14:19 +00:00
Olivier Abad 121f855b6c Change the comments about toolbar elements resizing as it is not
necessary in GTK+ 2.x

svn path=/trunk/; revision=8721
2003-10-17 06:06:04 +00:00
Guy Harris ee5c9ff5b8 From Ulf Lamping: add a GUI preference item to control the toolbar
style.

Make the style text arrays static, as nobody uses them outside prefs.c.

Use FALSE and TRUE for the values for the Boolean controlling the
highlighting style.

Note that we're now using stock icons in the toolbar in GTK+ 2.x.

Put back the resizing of elements in the top-level container, at least
for GTK+ 1.2[.x]; otherwise, the toolbar's height never gets smaller,
even if you change the style in such a way as to reduce the height of
the elements (icons+text -> icons or text, icons -> text).

Make some routines and variables not used outside gtk/toolbar.c static.

svn path=/trunk/; revision=8720
2003-10-16 21:19:12 +00:00
Olivier Abad 106c1cea8b Put back Guy's changes from r1.3 (print callback, and "Find frame..."
tooltip).

svn path=/trunk/; revision=8719
2003-10-16 21:04:20 +00:00
Olivier Abad 67e641ff5f - use stock icons in the toolbar when using GTK2
- use GTK1/2 compatibility macros [GS]ET_OBJECT_DATA where needed
- add a set_toolbar_object_data() function which associates the display
  filter entry (from the main window) with the E_DFILTER_TE_KEY for the
  open and reload buttons (it is needed by the open and reload
  callbacks). The function is called in create_main_window()
- reindent

svn path=/trunk/; revision=8718
2003-10-16 20:56:07 +00:00
Guy Harris 18556fed07 There doesn't seem to be any need to set "cfile.dfilter" to the contents
of the filter text entry when reloading the file, and:

	1) that doesn't work with the toolbar "reload" button (the
	   widget passed in for that button doesn't have a
	   E_DFILTER_TE_KEY data item pointing to the text entry);

	2) that causes the Tools > Summary dialog box to report what
	   you've typed in that box, not the filter that's actually in
	   effect (i.e., it causes "cfile.dfilter" to reflect what's
	   been typed, not what's been applied);

so don't bother doing so.  That also means that the "/File/Reload" menu
item doesn't need a E_DFILTER_TE_KEY data item, so don't give it one.

svn path=/trunk/; revision=8713
2003-10-16 00:45:12 +00:00
Guy Harris 524c113219 "Find frame" can do more than search with a display filter.
svn path=/trunk/; revision=8712
2003-10-15 22:37:19 +00:00
Guy Harris 45c28a1487 Note that we might want to use the GTK+ 2.x stock icon mechanism when
building for GTK+ 2.x.

Fix the callback for the "Print" button.

svn path=/trunk/; revision=8711
2003-10-15 22:34:58 +00:00