Commit Graph

613 Commits

Author SHA1 Message Date
Guy Harris b083cf0b39 Fields can be up to 2^32-1 bytes long, as they may have come from a
reassembled packet and are thus not limited to the maximum frame size;
leave room for a Really Big number in the length item in the status bar,
and use "snprintf()" to format the length item Just To Be Sure.

svn path=/trunk/; revision=5839
2002-07-07 22:14:03 +00:00
Guy Harris 192749474f From Liviu Daia <Liviu.Daia[AT]imar.ro>: move "col_init()" call after
the command-line options are processed, so that we don't crash if you've
set the "column.format" preference from the command line.

Fix a grammaro in a comment.

svn path=/trunk/; revision=5838
2002-07-07 21:52:51 +00:00
Gerald Combs 0255b96a8f From a suggestion by PEN <codes [at] lycos.com>, add the length in bytes to
the status bar when a tree item is selected.

svn path=/trunk/; revision=5825
2002-07-06 16:47:17 +00:00
Guy Harris e65f81cc5c Trim leading and trailing white space from the capture device in the
preference setting, and, if it's empty, treat that as an indication that
the user doesn't want to wire in a default device, and just wants the
first device in the list chosen.

svn path=/trunk/; revision=5773
2002-06-28 01:59:46 +00:00
Guy Harris c2df675f3f From Anand V. Narwani: add in two missing files, so they're put into the
source tarball.

Update Gerald's e-mail address.

svn path=/trunk/; revision=5769
2002-06-27 19:08:43 +00:00
Guy Harris e46414058e Update the URL for WinPcap.
svn path=/trunk/; revision=5759
2002-06-24 20:56:15 +00:00
Guy Harris 15509f46f4 As we've done with the hex dump output for printing, use as many digits
to display the offset as are necessary to show the largest offset -
which could be bigger than 65535, so there may be more than 4 digits.

svn path=/trunk/; revision=5751
2002-06-24 00:08:28 +00:00
Guy Harris 25a058a7b1 From Devin Heitmueller: give the user a warning if they click "New" in
the filter list editing code without having specified a filter name and
string.

svn path=/trunk/; revision=5737
2002-06-22 20:00:26 +00:00
Jeff Foster d2f365249b Added MS Window printing to ethereal.
svn path=/trunk/; revision=5711
2002-06-19 20:44:05 +00:00
Guy Harris 3baa49d71d Handle the "bool" members the same way we handled the members for
enumerated values - "boolp" for pointers, "boolval" for values.

svn path=/trunk/; revision=5678
2002-06-16 00:58:38 +00:00
Guy Harris 3a407d9567 From Chris Waters: don't use "bool" as a variable name or structure
member, as it's a C++ keyword.

svn path=/trunk/; revision=5677
2002-06-16 00:53:20 +00:00
Guy Harris f103a8a076 From Graeme Hewson: varargs code cleanup in "simple_dialog.c".
svn path=/trunk/; revision=5617
2002-06-04 11:24:35 +00:00
Guy Harris 117f95bb39 Clean up white space.
svn path=/trunk/; revision=5615
2002-06-04 07:48:57 +00:00
Guy Harris 392a7dfc04 Get rid of the "data_src" member of the "frame_data" structure; put it
in the "packet_info" structure instead, as we don't need a pointer for
every single frame in the capture file, just for each frame for which we
currently have an open "epan_dissect_t".

svn path=/trunk/; revision=5614
2002-06-04 07:03:57 +00:00
Guy Harris b5f0786318 Don't assume that just because a purported font name begins with "-"
it's an XLFD font name.

svn path=/trunk/; revision=5596
2002-05-30 00:44:50 +00:00
Guy Harris 7d85ca00df Clean up the data structures for the color filter code a bit. The old
"colfilter" structure contained items of use only when the colorizing
dialog was up, so make the items in it private to "gtk/color_dlg.c".
Make the "Edit" and "Delete" buttons sensitive only when a row is
selected, and make the "Up" and "Down" buttons sensitive only when a row
is selected *and* that row has somewhere to move in the specified
direction.

svn path=/trunk/; revision=5575
2002-05-27 22:00:37 +00:00
Guy Harris ad6e52bd25 Get rid of an unused variable.
svn path=/trunk/; revision=5540
2002-05-24 07:05:44 +00:00
Gerald Combs ae64e9539c Save the whole capture device name in the preferences file. Under
Windows, this saves the description + device name.

svn path=/trunk/; revision=5534
2002-05-23 15:56:05 +00:00
Guy Harris e2630eed79 Command-line interface cleanups, from Graeme Hewson:
- Exit if an error is found in the options or arguments.

	- In print_usage(), improve the visibility of any getopt() error
	  message by suppressing the version information when -h is not
	  specified, and by adding an empty line.

	Ethereal:

	- If the -k option is specified, use the interface in the preferences
	  file, if present.

	- Prevent the user from specifying any hidden options which are used
	  internally in -S mode.

	Tethereal:

	- Fix a memory leak in the processing of the -f option.

	- In print_usage(), change "capture file type" to "output file type",
	  which I think is clearer; move the -q flag from the non-libpcap case
	  to the libpcap case.

svn path=/trunk/; revision=5525
2002-05-22 23:22:56 +00:00
Gerald Combs 0bc4c2d329 In the Windows capture dialog, place the interface description before the
interface name.

svn path=/trunk/; revision=5499
2002-05-18 02:41:46 +00:00
Guy Harris 976a82b06a Use "-G fields" rather than "-G" in Makefiles.
Print an error and exit if an invalid option is given for the "-G" flag.

svn path=/trunk/; revision=5466
2002-05-14 18:27:28 +00:00
Guy Harris e390d7e0cc Make the "-G" flag take an argument. If no arugment is specified, or if
the argument is "fields", dump out a table of the fields, as we
currently do; if the argument is "protocols", dump out a table of the
protocols.

svn path=/trunk/; revision=5462
2002-05-14 10:15:12 +00:00
Guy Harris 71f8208bf9 From Didieer Gautheron:
Don't show progress bar for quick "Find Frame" searches
	Add "Find Next" and "Find Previous" to repeat searches

Add documentation for "Find Next" and "Find Previous".

svn path=/trunk/; revision=5378
2002-05-03 21:55:15 +00:00
Guy Harris 4df4388b91 Make the filter list combo box case-sensitive, as filter expressions are
case-sensitive.

Squelch a compiler complaint.

svn path=/trunk/; revision=5369
2002-05-03 03:30:15 +00:00
Guy Harris 433e8801a1 Clean up the handling of filter strings:
have "filter_packets()" make a copy of the filter string handed
	to it, as it may save the filter string in the "capture_file"
	structure, and the caller of "filter_packets()" shouldn't have
	to worry about the string it passed to "filter_packets()" being
	stashed away somewhere so that it can't just free that string or
	change it;

	have callers of "filter_packets()" free up the string they
	handed to it, if the string was allocated and they're done with
	it;

	plug some memory leaks in "match_selected_cb_do()".

Check for an illegal "action" argument being passed to
"match_selected_cb_do()".

Move some keys out of "keys.h" into "gtk/main.c", as they're only used
in "gtk/main.c".

Make the pointer to the filter list a data item for the combo box, as
it's a copy of the list of strings for the combo box, rather than
attaching it to the widgets that activate the filter (a pointer to the
combo box *itself* is a data item for those widgets).

In "filter_activate_cb()", make a copy of the text from the text entry
field as soon as we fetch it, and use that copy.  Free that copy if
we didn't add the filter to the filter list.

Don't make a copy of the entire filter list and use that to set the
combo box's list of items - just use the list itself.  Also, when the
list is changed, make the new value the data for the combo box (the list
pointer will actually not be changed, because we happen to be using
"g_list_append()", but let's not rely on that).

svn path=/trunk/; revision=5368
2002-05-03 03:24:47 +00:00
Guy Harris 0705d7ff0b Remove some no-longer-applicable XXX comments.
When you click "OK" on the dialog box, destroy the dialog box *before*
activating any text widget into which we've stuffed the filter
expression, so we don't get the dialog box destroyed out from under us
before we try to destroy it ourselves.

svn path=/trunk/; revision=5367
2002-05-02 23:49:21 +00:00
Guy Harris 9a80f0a521 Removal (or, at least, #ifdeffing out) of unused variables and
functions, from David Frascone.

svn path=/trunk/; revision=5288
2002-04-29 08:20:18 +00:00
Guy Harris 1f7177270d Use the value of "bv_size" as the size of a byte view notebook when
creating it.

svn path=/trunk/; revision=5229
2002-04-23 06:42:05 +00:00
Guy Harris 3a47e97c26 Get rid of unused variables, and mark unused arguments as such.
svn path=/trunk/; revision=5228
2002-04-23 06:25:37 +00:00
Guy Harris 432ad02810 Eliminate some unused variables.
svn path=/trunk/; revision=5224
2002-04-22 09:50:54 +00:00
Gerald Combs c64fb4b223 Polish the column prefs a bit. Make the column tile entry and format
menu modify the currently-selected item directly.  Remove the "Change"
button since it's no longer needed.  Make the column list a clist, and
add a column which shows the format.  Make the format option menu not
fill the entire table cell.  Update the man page accordingly.

svn path=/trunk/; revision=5214
2002-04-22 02:03:53 +00:00
Guy Harris d40820124b On Windows, include "capture-wpcap.h", to define "has_wpcap".
svn path=/trunk/; revision=5209
2002-04-20 20:29:28 +00:00
Guy Harris 3e35c8a9b1 On Windows, don't put the capture preferences item into the
"Preferences" dialog box if we couldn't load WinPcap.

svn path=/trunk/; revision=5204
2002-04-19 20:49:28 +00:00
Gerald Combs b6b2aa4906 Update wiretapped mirror links.
svn path=/trunk/; revision=5156
2002-04-14 20:06:04 +00:00
Gerald Combs 67250b71cc Change "http://netgroup-mirror.ethereal.com/winpcap" URLs to
"http://winpcap.mirror.ethereal.com/", since that's how we're mirroring
the Politecnico di Torino sites now.

svn path=/trunk/; revision=5155
2002-04-14 19:24:26 +00:00
Gilbert Ramirez 5c10ad55a8 More static-ization.
svn path=/trunk/; revision=5131
2002-04-08 20:30:56 +00:00
Guy Harris 4072fc2120 "expand_tree()" and "collapse_tree()" can be called on leaf nodes, so
don't blow up if "finfo->tree_type" is -1, just don't expand anything.

svn path=/trunk/; revision=5127
2002-04-08 19:10:09 +00:00
Guy Harris 5de2533f2d Start assigning ett_ values at 0, rather than 1; get rid of the reserved
ETT_NONE entry.

Initialize the "tree_type" field of a "field_info" structure to -1,
meaning "this has not been given a subtree".  Add checks before using
that field that it's in range.  That way, you have to create a subtree
before putting protocol tree items under another item.

We allocate the "tree_is_expanded" array when we've registered all
dissectors; there's no need to allocate it while we're registering
dissectors and, in fact, doing so means we leak memory (the memory for
the version we allocated while registering dissectors).

svn path=/trunk/; revision=5068
2002-04-01 02:00:53 +00:00
Guy Harris f5c5669291 Get rid of unused arguments.
Use the "nb" argument to "redraw_hex_dump()", so we redraw the specified
byte view pane, rather than always redrawing the main window's byte view
pane (and never redrawing the byte view pane of additional packet
windows, so that the font for them doesn't change if you change the font
preference).

svn path=/trunk/; revision=5066
2002-03-31 23:11:04 +00:00
Guy Harris 48214be46f Get rid of an unused argument to "set_active_all()".
Mark as unused arguments that are now unused as a result of not passing
them to "set_active_all()".

svn path=/trunk/; revision=5065
2002-03-31 22:58:27 +00:00
Guy Harris 63e8447614 From Joerg Mayer: get rid of unused arguments, and mark those that can't
be eliminated (because the function is called through a pointer, and
other functions called through the same pointer *do* use the argument)
as unused.

svn path=/trunk/; revision=5050
2002-03-31 20:57:02 +00:00
Guy Harris d5cd7aca15 A double-click in a filter name in the list-of-filters dialog box should
activate the text widget into which the filter text is put only if
clicking "OK" in the list-of-filters dialog box does so.  Make it so.

svn path=/trunk/; revision=4955
2002-03-16 22:02:55 +00:00
Guy Harris 6327b456db Get rid of the "--enable-snmp" option; instead, use "--with-ucdsnmp".
Make the directory option to "--with-ucdsnmp" optional.  Handle
"--with-ucdsnmp" similar to the way "--with-pcap" is handled.

Get rid of unnecessary #defines in "packet-cops.c".

Get rid of no-longer-necessary include of "dlfcn.h" in "packet-snmp.c".

svn path=/trunk/; revision=4930
2002-03-12 10:37:04 +00:00
Guy Harris 37dd5f340c Remove code to show the presence, and version number, of the CMU SNMP
library, as we no longer support linking with that library.

svn path=/trunk/; revision=4917
2002-03-10 23:19:44 +00:00
Guy Harris 43ca2567dc Don't say "without SNMP"; that can confuse people into thinking it means
Ethereal doesn't dissect SNMP if not linked with an SNMP library (and
*did* confuse at least one person into thinking that).  Say "without
SNMP MIB support", instead, as you only lose the ability to read SNMP
MIBs and interpret OIDs and variable bindings according to those MIBs.

svn path=/trunk/; revision=4894
2002-03-06 23:37:12 +00:00
Guy Harris e28f56867d From Joerg Mayer: remove unused variables.
svn path=/trunk/; revision=4879
2002-03-05 12:03:27 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +00:00
Guy Harris e300f4db52 Have "wtap_seek_read()" return 0 on success and -1 on failure, and take
an "err" argument that points to an "int" into which to put an error
code if it fails.

Check for errors in one call to it, and note that we should do so in
other places.

In the "wtap_seek_read()" call in the TCP graphing code, don't overwrite
"cfile.pseudo_header", and make the buffer into which we read the data
WTAP_MAX_PACKET_SIZE bytes, as it should be.

In some of the file readers for text files, check for errors from the
"parse the record header" and "parse the hex dump" routines when reading
sequentially.

In "csids_seek_read()", fix some calls to "file_error()" to check the
error on the random stream (that being what we're reading).

svn path=/trunk/; revision=4874
2002-03-05 05:58:41 +00:00
Guy Harris 2a2df000a5 Cut down the vertical spacing in the "Capture Options" dialog box.
svn path=/trunk/; revision=4870
2002-03-05 02:25:09 +00:00
Gilbert Ramirez d96747f550 In follow.c, initialize data_out_file to NULL, as it used to
be initialized in gtk/follow_dlg.c

In gtk/follow_dlg.c, declare data_out_file as 'extern'.

In tethereal.c, no longer define 'data_out_file', as the storage
for it is now in follow.c.

svn path=/trunk/; revision=4830
2002-02-28 19:35:09 +00:00