Commit Graph

64 Commits

Author SHA1 Message Date
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 26c2759ebc Get rid of an unused typedef.
svn path=/trunk/; revision=13239
2005-02-02 10:19:35 +00:00
Guy Harris 90c434d5ac Add casts of OBJECT_SET_DATA() arguments in cases where that's
appropriate.

Use %u, not %d, to convert unsigned values to strings.

svn path=/trunk/; revision=12921
2005-01-01 23:54:32 +00:00
Guy Harris 71217a8007 As we've made the tap_specific_data field of a tap_packet_t structure a
const pointer (so that we don't get complaints when we make the
tap-specific data argument to "tap_queue_packet()" a const pointer,
allowing dissectors to hand const data to a tap without a complaint), we
should make the tap per-packet function take a const pointer as an
argument as well.  Do so.

In some taps, use _U_, or actually use the argument, rather than
sticking in dummy "X = X" assignments to fake use of parameters.  (This
means that the tap functions in question no longer have the notion that
they act on a particular static structure wired in.)

svn path=/trunk/; revision=12910
2005-01-01 02:57:02 +00:00
Guy Harris e75910e7cb In column sort routines, make the row pointers "const" pointers, as the
arguments passed in corresponding to those pointers are gconstpointers.

svn path=/trunk/; revision=12884
2004-12-31 00:33:54 +00:00
Guy Harris f1deabed56 Make the tone of the error messages a bit less formal, by using
contractions.  (Safari does, at least when you're trying to open a file
to which you don't have read access.)

svn path=/trunk/; revision=12852
2004-12-29 01:08:20 +00:00
Guy Harris f516cf141f From Francisco Alcoba: handle inverted time stamps without hanging.
svn path=/trunk/; revision=12656
2004-12-02 08:38:59 +00:00
Guy Harris e4ae2aa011 From Francisco Alcoba:
add IPv6 support;

	replace "delay" with "delta".

svn path=/trunk/; revision=12636
2004-12-01 11:54:41 +00:00
Guy Harris ee26f8b9bb From Alejandro Vaquero: in the RTP analysis code, don't analyze packets
that have an RTP version other than 2.

svn path=/trunk/; revision=12332
2004-10-17 22:14:47 +00:00
Anders Broman e90f317e77 From: "Alejandro Vaquero : Add IP bandwidth calculation in RTP analysis (in Kbps).
svn path=/trunk/; revision=12251
2004-10-11 05:23:31 +00:00
Guy Harris bd5bfa9893 From Alejandro Vaquero: make the window bigger so we don't have
overlapped buttons.

svn path=/trunk/; revision=12213
2004-10-06 07:21:05 +00:00
Guy Harris 919c62cc39 Don't use a terminating entry in the clock_map table, compute the number
of entries in it and check that many entries - that squelches a compiler
warning.

From Alejandro Vaquero: get rid of an unused argument to
"rtp_packet_add_graph()".

svn path=/trunk/; revision=12201
2004-10-05 08:51:16 +00:00
Guy Harris 01f4257058 From Alejandro Vaquero:
RTP graphic analysis;

	assorted bug fixes;

	display delay and jitter in milliseconds, and add the percentage
	of lost packets to the statistics.

svn path=/trunk/; revision=12166
2004-10-01 07:14:50 +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
Guy Harris 456b2c075f From Lars Ruoff: don't hardwire the RTP sampling clock rate to 8000
samples/second, determine it from the payload type for payload types
with a known clock rate.

svn path=/trunk/; revision=11390
2004-07-17 10:14:03 +00:00
Guy Harris 272a2055ab On at least some platforms, a #define of O_BINARY is needed even if
<fcntl.h> is included, as <fcntl.h> doesn't define it.

svn path=/trunk/; revision=11276
2004-06-30 06:58:59 +00:00
Ulf Lamping a24b176c32 define of O_BINARY not needed, if fcntl.h is included
other #include related cleanups

svn path=/trunk/; revision=11272
2004-06-29 20:51:26 +00:00
Ulf Lamping 14bf83c340 add details for doxygen, various code cleanups as a result of this
svn path=/trunk/; revision=11052
2004-06-01 17:33:37 +00:00
Ulf Lamping 8d121bfb92 use gtk_window_set_default_size() instead of WIDGET_SET_SIZE() for the dialogs,
as WIDGET_SET_SIZE() will prevent the user from shrinking the dialog,
and gtk_window_set_default_size() will not

svn path=/trunk/; revision=11021
2004-05-27 19:59:50 +00:00
Ulf Lamping 7d37fc9d23 more code cleanup from dialog things:
changed window_xy (dialog) function calling in a lot of gtk files
cleanup of file selection code
cleanup in dlg_utils/file_dlg/ui_util
Please report any problems!!!

svn path=/trunk/; revision=11003
2004-05-26 03:49:24 +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
Ulf Lamping d6eeb0936d going to have a standard behaviour of the dialogs
(including remebering of the dialog size in recent file).
for a first step, I replaced all window_new() calls from dialogs
into dlg_window_new() ones, and removed all gtk_window_set_position
calls, this should be done in a more generalized way

svn path=/trunk/; revision=10964
2004-05-22 19:56: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 90cf9a6b7b The HIG's and/or GUI toolkit documentation for:
Mac OS X

	GNOME

	Qt

	KDE

	Windows

all indicate that {message,alert} boxes are modal, at least for the
window to which they apply.  (Presumably the idea is that not forcing
the user to pay attention to the alert box, and allowing more than one
alert box to be up for a given window, causes more problems than not
letting the user do stuff to that window in order to figure out what the
underlying problem is or figure out what to do to fix it - the message
should be sufficient, in most if not all cases, to let you know what the
problem is.)

Make "simple_dialog()" unconditionally make the alert box modal, and get
rid of ESD_TYPE_MODAL.  XXX - we need to make it possible to make an
alert box modal for a given window, rather than just the top-level
window.

svn path=/trunk/; revision=10051
2004-02-12 22:24:28 +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
Guy Harris 3a4e71a724 Add "write_failure_alert_box()" to put up an alert box for a failed
attempt to write to a file (or close a file opened for writing).

Get rid of no-longer-needed #includes of <epan/filesystem.h>.

svn path=/trunk/; revision=10027
2004-02-11 01:37:13 +00:00
Guy Harris 727b913bbd Add an "open_failure_alert_box()" routine to pop up an alert box for a
failed attempt to open/create a file.

Fix one call to pass the right value for the "for_writing" flag.

svn path=/trunk/; revision=10026
2004-02-11 01:23:25 +00:00
Ulf Lamping 5297f06717 replaced every appearance of gtk_scrolled_window_new() with
scrolled_window_new().
added gtk_scrolled_window_set_policy(AUTOMATIC,AUTOMATIC) to
scrolled_window_new()
added GTK2's gtk_scrolled_window_set_shadow(GTK_SHADOW_IN)
to every place needed

svn path=/trunk/; revision=9999
2004-02-06 19:19:12 +00:00
Guy Harris d4857dc706 Add to the _rtp_info structure a "info_all_data_present" boolean, which
is TRUE if all the RTP raw data is present in the tvbuff and FALSE
otherwise.  If it's not all present, also set "info_data_len" to 0 and
"info_data" to NULL.

In the RTP Analysis "Save Payload..." operation, check the
"info_all_data_present" flag and fail if it's not set, and use
"rtpinfo->info_data" and "rtpinfo->info_payload_offset" to get at the
payload, rather than using "cfile.pd", as the latter doesn't necessarily
refer to the current frame data.

Note that the RTP Streams save operation should also check the
"info_all_data_present" flag.

svn path=/trunk/; revision=9920
2004-01-31 09:48:26 +00:00
Guy Harris 1980fa5dbf Pass ESD_BTN_OK rather than NULL as a second argument to
"simple_dialog()"; NULL might be #defined to be a pointer expression on
some platforms, causing compiler warnings (and, on platforms where a
null pointer doesn't have all its bits 0, possibly causing misbehavior,
although I don't think there are any such platforms on which Ethereal
runs).

Don't allow 0 as button mask argument to "simple_dialog()".

Squelch a compiler warning.

Report fatal problems as errors, not warnings.

Report file I/O errors with "file_open_error_message()".

Report file write errors (including those reported by "close()", e.g.
some errors writing to an NFS server) when saving raw packet data to a
file.

svn path=/trunk/; revision=9915
2004-01-31 03:22:42 +00:00
Ulf Lamping 25edd1c53e renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR to
better reflect the real error text

svn path=/trunk/; revision=9913
2004-01-31 02:25:46 +00:00
Olivier Biot 6dd857b59c From Lars Ruoff:
- use create_tempfile() to create the temporary files (causes temp files to be
  created at the same location as other Ethereal temp files). Changed temp
  filenames to "ether_rtp_dXXXXXX", where d is the stream direction.
- fixed a bug with temp files not being removed

svn path=/trunk/; revision=9886
2004-01-27 18:05:32 +00:00
Guy Harris d6cd61061e Have the Wiretap open, read, and seek-and-read routines return, in
addition to an error code, an error info string, for
WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and
WTAP_ERR_BAD_RECORD errors.  Replace the error messages logged with
"g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed
strings returned as the error info string, and change the callers of
those routines to, for those errors, put the info string into the
printed message or alert box for the error.

Add messages for cases where those errors were returned without printing
an additional message.

Nobody uses the error code from "cf_read()" - "cf_read()" puts up the
alert box itself for failures; get rid of the error code, so it just
returns a success/failure indication.

Rename "file_read_error_message()" to "cf_read_error_message()", as it
handles read errors from Wiretap, and have it take an error info string
as an argument.  (That handles a lot of the work of putting the info
string into the error message.)

Make some variables in "ascend-grammar.y" static.

Check the return value of "erf_read_header()" in "erf_seek_read()".

Get rid of an unused #define in "i4btrace.c".

svn path=/trunk/; revision=9852
2004-01-25 21:55:17 +00:00
Guy Harris 557d5430af Check for write errors when writing CSV data as well.
Check for write errors when opening the CSV file to write the reverse
data information.

For some reason (perhaps having to do with the sort indicators in
titles, the column titles don't show up in the GtkCList structure, so
they don't get printed; just directly use the table of column titles.

svn path=/trunk/; revision=9832
2004-01-25 02:14:05 +00:00
Guy Harris 10552e3169 Check whether the "fopen()" that creates a CSV file fails and, if so,
report the error and don't dismiss the file selection dialog box.

svn path=/trunk/; revision=9831
2004-01-25 01:58:58 +00:00
Guy Harris 88535b9a99 From Lars Ruoff (who also contributed the previous change; my apologies
to both Larses):

	- Comfort noise (CN) packets and packets following them
	  immediately are excluded from maximum delay calculation (as
	  well as marked packets are)
	- Payload changes between CN and regular packets are ignored.
	- Added a "Marker missing?" status warning for packets following
	  CN that don't have the marker bit set (cf. RFC1890 4.1)
	- Changed status "Ok" to "[ Ok ]", so that when sorting by status
	  column, all non-Oks are grouped together.
	- Minor GUI updates: reduced size of box, borders, spacing,
	  changed highlight colors.

svn path=/trunk/; revision=9819
2004-01-24 01:15:24 +00:00
Guy Harris 7f727e9119 From Lars Roland:
- "Refresh" button is back again.  Everything should work fine now
	  with multiple windows on the same streams.
	- made packet list sortable by column.
	- show a warning when user chooses "RTP Streams/Analyze"
	  without having a RTP packet selected instead of displaying the
	  streams box.
	- minor GUI updates, renamed button "Next" to "Next non-Ok" for
	  more clarity.

svn path=/trunk/; revision=9788
2004-01-23 00:29:52 +00:00
Ulf Lamping 503a830e48 The progressbar had a parameter to specify the text of the Cancel/Stop button.
As this will always be a Cancel of a running operation, this parameter was removed.
This makes us also able to use a stock button for this.

svn path=/trunk/; revision=9774
2004-01-21 22:00:28 +00:00
Ulf Lamping e3dd2f5472 use stock buttons whereever possible,
added some ethereal specific stock icons

svn path=/trunk/; revision=9763
2004-01-21 03:54:32 +00:00
Ulf Lamping 1108d88e29 commented out refresh_bt, as it's currently unused
svn path=/trunk/; revision=9755
2004-01-20 19:31:46 +00:00
Olivier Biot bc8d20be32 From Lars Ruoff: temporarily comment out the code for the "refresh" button;
register and unregister the tap listener in a thread-safe manner.

svn path=/trunk/; revision=9742
2004-01-19 23:35:32 +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
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
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 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