Commit Graph

2460 Commits

Author SHA1 Message Date
Guy Harris 56697db466 Bleah. What was I thinking? "dlg_window_new()" should take the title
for the dialog window as an argument (as various dialog creators in GTK+
do), not oblige every caller of it to cut-and-paste a
"gtk_window_set_title()" call after it.

svn path=/trunk/; revision=2345
2000-08-23 06:56:31 +00:00
Laurent Deniel 2f1bab3f96 Do not display "Text (text)" (i.e. FT_TEXT_ONLY) for unfilterable
fields in status bar.

svn path=/trunk/; revision=2344
2000-08-22 20:17:27 +00:00
Laurent Deniel 609806cbd3 Add a help context identifier for the status bar.
This allows the display of a short field description (and
field abbreviation) in the status bar when a field is selected
in the protocol tree window.

The description is the blurb field when available (i.e. not empty),
the name otherwise.

When the item is unselected, the file context (e.g. the file name)
is restored.

Now it is much easier to build a display filter without the manual ;-)

svn path=/trunk/; revision=2343
2000-08-22 19:40:09 +00:00
Gilbert Ramirez 8b916e49be Change u_int32_t to guint32
svn path=/trunk/; revision=2342
2000-08-22 15:07:33 +00:00
Laurent Deniel 7c48f6c0d4 Remove the "Decode IPv4 TOS field as DiffServ field" option from the
display options since it is available from the preferences.

svn path=/trunk/; revision=2341
2000-08-22 14:39:41 +00:00
Laurent Deniel 85a4718c6b Small update (add accelerator).
svn path=/trunk/; revision=2340
2000-08-22 14:21:27 +00:00
Laurent Deniel d56c56cf88 Add "Colors..." button in GUI preferences.
Currently, it allows the selection of the foreground and
background colors of the marked frames but it could be
extended further (e.g. color of normal frames).

Add update_marked_frames() in main.c to update the
display (e.g. colors) of marked frames.

svn path=/trunk/; revision=2339
2000-08-22 14:04:52 +00:00
Jun-ichiro itojun Hagino 35a3dd5ab4 more support for icmp6 node information query.
- DNS name decode (uses function in packet-dns.c)
- supported bitmap

svn path=/trunk/; revision=2338
2000-08-22 08:30:00 +00:00
Jun-ichiro itojun Hagino 52101799a7 prototype declarations should have no variables names, as #define
could play in a strange way (it happens, really).

svn path=/trunk/; revision=2337
2000-08-22 08:28:45 +00:00
Jun-ichiro itojun Hagino 6767faac0c protect macro expansion - there may be more necessary.
svn path=/trunk/; revision=2336
2000-08-22 08:19:40 +00:00
Gilbert Ramirez b27ce4e859 More mention of csids support in wiretap.
svn path=/trunk/; revision=2335
2000-08-22 06:50:16 +00:00
Gilbert Ramirez 7c0421b146 Change FT_NSTRING_UINT8 to FT_UINT_STRING. The length parameter passed
to proto_tree_add_item() will indicate if the length of the string is
indicated by an UINT8, UINT16, UINT24, or UINT32.

Change NCP dissector-maker to produce FT_UINT_STRING.

Fix off-by-one in dissection of some NCP reply packets.

svn path=/trunk/; revision=2334
2000-08-22 06:38:32 +00:00
Guy Harris 064936053c Given that DLT_ values and libpcap appear to mutate almost as fast as
the influenza virus, if "wtap_pcap_encap_to_wtap_encap()" returns
WTAP_ENCAP_UNKNOWN, indicating that the libpcap encapsulation type can't
be mapped to a Wiretap encapsulation type, include the data link type in
the message, so the user can at least give us a clue as to what type it
is that we don't support (or, at least, the DLT_ value for that type -
it could well be some standard type whose value just got gratuitously
changed).

svn path=/trunk/; revision=2333
2000-08-22 06:04:40 +00:00
Guy Harris 0746b8a5ed Put "-t <time stamp format>" back into the usage message for Ethereal
with libpcap; I inadvertently deleted it when removing "-b".

svn path=/trunk/; revision=2332
2000-08-22 05:06:20 +00:00
Guy Harris faccb9665c Initialize all the fields of the "frame_data" structure, so that, for
example, "fdata->pfd" doesn't contain junk that upsets dissectors that
try to attach data to the frame (not that it does them much good in
Tethereal, as the frame is never revisited).

svn path=/trunk/; revision=2331
2000-08-22 03:33:41 +00:00
Guy Harris 3c553f2ec7 Explain why we don't currently have to defer setting
"prefs.gui_font_name" until the "fetch" routine is called.

svn path=/trunk/; revision=2330
2000-08-21 22:35:59 +00:00
Guy Harris 88b2aba937 Put in a comment noting that the "apply" routine for the TCP stream
preferences should change the colors for all existing TCP stream
windows.

svn path=/trunk/; revision=2329
2000-08-21 22:31:04 +00:00
Guy Harris af093a380e Don't set the "prefs.gui_XXX" values until the "fetch" routine for the
GUI preferences is called.

Pull all the code for creating option menus for enumerated
"prefs.gui_XXX" items into a common routine.

svn path=/trunk/; revision=2328
2000-08-21 22:30:04 +00:00
Laurent Deniel ab47385543 Add prefs.gui_marked_[fb]g color preferences for the
color of marked frames.

They are currently only available from preferences file,
but I will add the color selection in GUI later.

svn path=/trunk/; revision=2327
2000-08-21 21:24:15 +00:00
Laurent Deniel c7d9d83ebc Cosmetic change (close button at the right place :-).
svn path=/trunk/; revision=2326
2000-08-21 20:11:51 +00:00
Laurent Deniel dea8f0c202 Add some menu items related to the "frame mark" feature in
the Edit menu which allow you to:

- mark (or unmark) the currently selected frame
- mark all _displayed_ frames
- unmark all _displayed_ frames

Should I be more precise in the menu label ?
(e.g. "Mark All Displayed Frame" instead of "Mark All Frames"
  and "Mark Selected Frame" instead of "Mark Frame" ?)

svn path=/trunk/; revision=2325
2000-08-21 19:36:19 +00:00
Guy Harris 879a38b412 Change from Andreas Sikkema to change the "old" and "new" members of the
"dissector" union in the "conversation_t" structure to "old_d" and
"new_d", to avoid using a C++ reserved word.

Add "old_conversation_set_dissector()" and
"conversation_set_dissector()" routines to set the dissector for a
conversation, to hide the details of how that's done (e.g., details such
as whether there's a union at all - eventually, when all dissectors have
been tvbuffified, there won't be a need for the union - and what the
names of the union members are, and so on).  Convert all dissectors to
use those routines (they had to be changed anyway, due to the name
change).

svn path=/trunk/; revision=2324
2000-08-21 18:36:35 +00:00
Laurent Deniel 05984d233d Add the number of marked packets in the summary window.
svn path=/trunk/; revision=2323
2000-08-21 18:20:19 +00:00
Laurent Deniel 8fbd65cc7f Frames in the packet list can now be marked by the user using
the middle mouse button. The marked packets are displayed in
reverse video but this should change in the future (the color
should be configurable via the GUI).

Then,  the marked packets can be saved (via the "Save as"
window dialog).

Other features will be added in the future (I am waiting for
your comments and wishes).

svn path=/trunk/; revision=2322
2000-08-21 15:45:33 +00:00
Laurent Deniel ff42c86f9a Put an indentation in hexdump display of a TCP stream
only if both directions are displayed.

svn path=/trunk/; revision=2321
2000-08-21 13:04:05 +00:00
Richard Sharpe dbd0407127 Revert the last silly change ... :-)
svn path=/trunk/; revision=2320
2000-08-21 12:53:10 +00:00
Richard Sharpe 3df2d60b80 A small change ...
svn path=/trunk/; revision=2319
2000-08-21 12:48:05 +00:00
Laurent Deniel a3d48f0972 Make work better the (hexdump) popup menus.
- have popup_menu_handler return TRUE or FALSE according
  to the fact that the event is really processed or not.
- use gtk_signal_connect instead of gtk_signal_connect_object
  to have the widget that emitted the signal _and_ the popup
  menu widget.
- call gtk_signal_emit_stop_by_name to abort the propagation
  if the signal was processed.

svn path=/trunk/; revision=2318
2000-08-21 12:33:22 +00:00
Guy Harris aeaaaf65f4 Instead of each set of built-in preferences having "ok", "save",
"cancel", and "delete" methods, give them:

	"fetch" - fetch from the notebook tab any values not already
	stored in "prefs", and store them there, but doesn't apply them;

	"apply" - apply the settings in "prefs";

	"destroy" - clean up any windows created from the tab.

As we no longer have "cancel" methods, we don't have per-preference code
to revert preference values; instead, we have the common preference
dialog box code make a copy of all the current preferences, and, when
the "Cancel" button is clicked, free the current preferences and copy
the saved preferences to it, and apply the preferences.

Add an "Apply" button to the preference dialog box, which applies the
current preferences without closing the dialog box.

Treat a request to delete the preferences dialog box as equivalent to
clicking "Cancel".

Have a "remember_ptree_widget()" routine to remember all protocol tree
widgets, and use the list of those widgets when we set GUI preferences
for the protocol tree widgets, rather than setting the main protocol
tree widget and then using the list of packet windows.  Move that code
out of "main.c" to "proto_draw.c", as it's not used by anything in
"main.c", but is used by stuff in "proto_draw.c".

Make the font one of the preferences we can set on the fly for protocol
tree widgets.  Also make it something we can set on the fly for the
packet list widget.

svn path=/trunk/; revision=2317
2000-08-21 08:15:48 +00:00
Guy Harris 023bf363b5 Instead of each set of built-in preferences having "ok", "save",
"cancel", and "delete" methods, give them:

	"fetch" - fetch from the notebook tab any values not already
	stored in "prefs", and store them there, but doesn't apply them;

	"apply" - apply the settings in "prefs";

	"destroy" - clean up any windows created from the tab.

As we no longer have "cancel" methods, we don't have per-preference code
to revert preference values; instead, we have the common preference
dialog box code make a copy of all the current preferences, and, when
the "Cancel" button is clicked, free the current preferences and copy
the saved preferences to it, and apply the preferences.

Add an "Apply" button to the preference dialog box, which applies the
current preferences without closing the dialog box.

Treat a request to delete the preferences dialog box as equivalent to
clicking "Cancel".

Have a "remember_ptree_widget()" routine to remember all protocol tree
widgets, and use the list of those widgets when we set GUI preferences
for the protocol tree widgets, rather than setting the main protocol
tree widget and then using the list of packet windows.  Move that code
out of "main.c" to "proto_draw.c", as it's not used by anything in
"main.c", but is used by stuff in "proto_draw.c".

Make the font one of the preferences we can set on the fly for protocol
tree widgets.  Also make it something we can set on the fly for the
packet list widget.

svn path=/trunk/; revision=2316
2000-08-21 08:09:17 +00:00
Guy Harris 352f8f1603 "capture_child" isn't declared or defined if HAVE_LIBPCAP isn't defined;
check it only if HAVE_LIBPCAP is defined.

svn path=/trunk/; revision=2315
2000-08-21 01:52:57 +00:00
Laurent Deniel e0a8d41556 Add a popup menu for the hexdump window. For now, it has only the
common items but let's prepare the future (e.g. Match selected)...

svn path=/trunk/; revision=2314
2000-08-20 21:55:58 +00:00
Laurent Deniel ccdbb6ca6d Cleaning (remove comment and tcp_extra_data).
svn path=/trunk/; revision=2313
2000-08-20 20:48:55 +00:00
Laurent Deniel 475fd9fdf9 Fix a comment.
svn path=/trunk/; revision=2312
2000-08-20 19:40:47 +00:00
Laurent Deniel b77c53270f "ascend" was not working as display filter...
svn path=/trunk/; revision=2311
2000-08-20 19:16:39 +00:00
Laurent Deniel 7440dd0ec8 - proto_bgp was not added in protocol tree, so "bgp" was not
working as display filter...

- add display filters.

svn path=/trunk/; revision=2310
2000-08-20 18:10:12 +00:00
Laurent Deniel e74040c295 - do not issue the font warning if in the child process (used for real time
capture) since it has already been done at GUI startup.

- fix a font name in warning message.

svn path=/trunk/; revision=2309
2000-08-20 15:38:50 +00:00
Laurent Deniel b634f019f4 SMTP is Simple *Mail* Transfer Protocol not Message.
Add [OLD_]CHECK_DISPLAY_AS_DATA call.

svn path=/trunk/; revision=2308
2000-08-20 15:25:17 +00:00
Guy Harris c1214ede33 Use "memset()" to zero byte arrays, and "memcpy" to copy into them.
When copying IPv4 or IPv6 addresses, copy the minimum of the number of
bytes in the source and the destination, so that if the prefix length is
bogus, we don't overwrite the buffer.

"tvb_get_ptr()" returns a "guint8 *"; give the variable to which its
value is assigned that type.

svn path=/trunk/; revision=2307
2000-08-20 09:07:16 +00:00
Guy Harris 2f2614652a When the Win32 GTK+ constructs fake XLFD names for Windows fonts, it
uses "normal" rather than "medium" as the weight name for normal-weight
fonts; map "normal", as well as "medium", to "bold" when constructing
the name of the bold version of a font.

svn path=/trunk/; revision=2306
2000-08-20 09:02:29 +00:00
Guy Harris ad934375fa Remove references to the "-b" option from the usage messages, as that
option has been removed.

svn path=/trunk/; revision=2305
2000-08-20 08:08:30 +00:00
Guy Harris e697eb8e9f Instead of having the normal-weight and bold fonts set separately,
generate the name of the boldface font from the Roman font; if the two
fonts don't have the same widths, the display will look weird when a
field is selected, and it's a bit of a pain for the user to have to
select *two* fonts.

On UNIX/X, default to
"-*-fixed-medium-r-semicondensed-*-*-120-*-*-*-*-*-" rather than to
"-*-lucidatypewriter-medium-r-normal-*-*-120-*-*-*-*-iso8859-1" - some
Linux distributions appear to lack the Lucida typewriter font.

Add a "gui.font_name" preference to the preferences file, specifying the
normal-weight font to use.  Have it settable from the "GUI" tab in the
Preferences dialog box - the "Font..." button, when clicked, pops up a
font selection dialog box.

If we either can't open the selected font or the boldfaced version of
the font, default to "6x13" and "6x13bold" as fallbacks - the former
will probably be "fixed", and the latter would be "fixedbold" if X
actually created such an alias, but it doesn't so we use "6x13bold"
instead.

svn path=/trunk/; revision=2304
2000-08-20 07:53:45 +00:00
Guy Harris 2962655ac5 This is an SMTP dissector, not a BXXP dissector; fix the comment at the
beginning.

Pass "pinfo->fd", not "fd", to "p_get_proto_data()", so that it'll
continue to work even when tvbuffified.

Use "strchr()", not "index()" - "strchr()" is in the ANSI C standard,
and may be in some systems that don't have "index()", whereas those
systems that had "index()" but not "strchr()" got with the ANSI C
program a while ago.

Use "old_dissector_add()" and "old_dissector_delete()" to register and
unregister the SMTP dissector, as it's not yet been tvbuffified.

svn path=/trunk/; revision=2303
2000-08-20 02:16:23 +00:00
Richard Sharpe fe7540783e Added packet-smtp.c and modified packet.c to include code that was never
finished ...

The SMTP dissection is a good start, but does not handle the message
body at all ...

On to that next.

svn path=/trunk/; revision=2302
2000-08-19 23:06:51 +00:00
Richard Sharpe 0d41da6914 Adding the first part of packet-smtp.c ...
This needs some additional parts, and points to the
need for a dissector for the ident protocol, but I want to
try to automatically generate that ...

svn path=/trunk/; revision=2301
2000-08-19 23:00:06 +00:00
Laurent Deniel 9110dda9dc Add Mbit/sec to the summary window.
svn path=/trunk/; revision=2300
2000-08-19 21:36:51 +00:00
Laurent Deniel 8d95269d34 Fix buffer overflow on zlib uncompression errors.
svn path=/trunk/; revision=2299
2000-08-19 18:31:23 +00:00
Laurent Deniel 8bc95e98e4 Fix potential buffer overflows.
svn path=/trunk/; revision=2298
2000-08-19 18:20:59 +00:00
Laurent Deniel 69dce2464b - fix potential buffer overflow problems.
- fix potential memory allocation problems (e.g. if PF_DIR is changed
  to a longer string).

- add some #defines.

svn path=/trunk/; revision=2297
2000-08-19 17:53:02 +00:00
Guy Harris d62f730035 Michael Tuexen's patch to add "sctp.port" as a dissector table so that
protocols running atop SCTP can register themselves with a particular
SCTP port number.

Also, clean up the credits for him - there were two entries, one for
some initial SCTP support in "ipprotostr()" and in the capture dialog,
and one for the SCTP dissector itself - the latter subsumes the former,
so just keep the latter.

svn path=/trunk/; revision=2296
2000-08-19 08:37:43 +00:00