obnox/wireshark/wip.git
23 years agoRe-arrange size and nmemb arguments in fread() (file_read()) calls so
gram [Thu, 31 Aug 2000 16:44:47 +0000 (16:44 +0000)]
Re-arrange size and nmemb arguments in fread() (file_read()) calls so
that these calls work on Win32. I still don't have a good reason as to
why this is necessary, but it fixes the problem. I'll continue looking
for a reason.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2386 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoThe interface list will now be get into an dynamic growing buffer and not
girlich [Thu, 31 Aug 2000 11:12:19 +0000 (11:12 +0000)]
The interface list will now be get into an dynamic growing buffer and not
the (too big) buffer for 1024 network cards.
The code comes directly after the ideas in Steven's book (UNIX network
programming).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2385 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoInitial BXXP dissector ...
sharpe [Wed, 30 Aug 2000 12:42:31 +0000 (12:42 +0000)]
Initial BXXP dissector ...

Lots more work to be done.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2384 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoList pint.h as a source file.
gram [Wed, 30 Aug 2000 02:58:24 +0000 (02:58 +0000)]
List pint.h as a source file.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2383 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd FT_STRINGZ type. NCP dissector is only one that uses it right now.
gram [Wed, 30 Aug 2000 02:50:18 +0000 (02:50 +0000)]
Add FT_STRINGZ type. NCP dissector is only one that uses it right now.

Remove tvb_get_stringz from quake dissector and add tvb_get_nstringz,
tvb_get_nstringz0, and tvb_strnlen to tvbuff.c.

Remove multiple definitions of pntohl and friends from various places
(except for wiretap) and put into pint.h

Consolidate duplicate code for turning FT_* enums into strings (ala the
glossary).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2382 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agocorrect nodeinfo (node addresses). it returns address (16byte) + ttl (4byte),
itojun [Tue, 29 Aug 2000 14:17:12 +0000 (14:17 +0000)]
correct nodeinfo (node addresses).  it returns address (16byte) + ttl (4byte),
not just addresses.  KAME kernel currently uses old format, so ethereal
does not work with current KAME kernel (KAME kernel will be corrected).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2381 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoDon't set the text on a V2 READDIR entry if there's no entry.
guy [Sun, 27 Aug 2000 02:03:31 +0000 (02:03 +0000)]
Don't set the text on a V2 READDIR entry if there's no entry.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2380 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix a minor spelling mistake ...
sharpe [Sat, 26 Aug 2000 11:25:28 +0000 (11:25 +0000)]
Fix a minor spelling mistake ...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2379 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoMove #include <time.h> into wtap-int.h instead of requiring it in
gram [Fri, 25 Aug 2000 21:25:43 +0000 (21:25 +0000)]
Move #include <time.h> into wtap-int.h instead of requiring it in
every C file. I noticed this because of a build break of csids.obj on
Win32.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2378 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAttach my name to the "GtkClist replacement" item; it's a work in
guy [Fri, 25 Aug 2000 20:50:31 +0000 (20:50 +0000)]
Attach my name to the "GtkClist replacement" item; it's a work in
progress, but the beginnings of one exist (it's far from ready for prime
time, but it does read in capture files a lot quicker and consumes a
fair bit less memory).

Get rid of the item about a line-mode capture program - that's
Tethereal.

Get rid of the "Make lines in GTK Tree (proto_tree GUI) user-selectable"
item, as they're now user-selectable.

Put back the item about Kerberos V4 - we hae a V5 dissector, but no V4
dissector yet.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2377 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoRemove some items which are now available.
deniel [Fri, 25 Aug 2000 19:43:28 +0000 (19:43 +0000)]
Remove some items which are now available.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2376 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoNote GTK+ distribution version for 0.8.11 binary release.
gram [Fri, 25 Aug 2000 19:21:24 +0000 (19:21 +0000)]
Note GTK+ distribution version for 0.8.11 binary release.
I finally have working tools, so a 0.8.11 win32 binary release we be
available soon.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2375 f5534014-38df-0310-8fa8-9805f1628bb7

23 years ago- add protocol registration
deniel [Fri, 25 Aug 2000 18:46:11 +0000 (18:46 +0000)]
- add protocol registration
- add some missing Vines IP header fields in protocol tree
- add protocol type as display filter
- miscellaneous code cleaning

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2374 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix comment.
deniel [Fri, 25 Aug 2000 13:05:32 +0000 (13:05 +0000)]
Fix comment.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2373 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix comment and add reference to RFC.
deniel [Fri, 25 Aug 2000 13:00:05 +0000 (13:00 +0000)]
Fix comment and add reference to RFC.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2372 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd protocol registration (pptp).
deniel [Fri, 25 Aug 2000 12:30:30 +0000 (12:30 +0000)]
Add protocol registration (pptp).

Add OLD_CHECK_DISPLAY_AS_DATA().

Add display filters.

Check the magic cookie to see if the decoding or frame is correct
(in most cases, we probably need TCP reassembly).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2371 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoInclude the control-field information in the Info column for LLC frames.
guy [Fri, 25 Aug 2000 06:31:25 +0000 (06:31 +0000)]
Include the control-field information in the Info column for LLC frames.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2370 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoRedo the way we map between libpcap encapsulation type codes and Wiretap
guy [Fri, 25 Aug 2000 06:25:21 +0000 (06:25 +0000)]
Redo the way we map between libpcap encapsulation type codes and Wiretap
encapsulation type codes - for those libpcap type codes whose numerical
value is interpreted differently by different versions of libpcap,
include <pcap.h> if you can and, if you can, use what it defines to
control which Wiretap code we map those type codes to.

Also, map the new libpcap type codes introduced by libpcap 0.5.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2369 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoInclude bus errors and aborts, as well as segmentation violations, as
guy [Thu, 24 Aug 2000 23:33:09 +0000 (23:33 +0000)]
Include bus errors and aborts, as well as segmentation violations, as
examples of errors that generate core dumps, and suggest that a stack
trace from the debugger could be useful for *all* failures that produce
core dumps.

Note that the core dump file may be named "ethereal.core", and note that
"tethereal" rather than "ethereal" should be used in file names if it's
Tethereal that blew up.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2368 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoGive the RFC number of the spec for the portmapper/rpcbind protocols.
guy [Thu, 24 Aug 2000 23:16:16 +0000 (23:16 +0000)]
Give the RFC number of the spec for the portmapper/rpcbind protocols.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2367 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd a comment giving the RFC numbers of specs for ONC RPC.
guy [Thu, 24 Aug 2000 23:09:37 +0000 (23:09 +0000)]
Add a comment giving the RFC numbers of specs for ONC RPC.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2366 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoName updates to stuff in GSS authentication for ONC RPC, from Dug Song.
guy [Thu, 24 Aug 2000 22:58:56 +0000 (22:58 +0000)]
Name updates to stuff in GSS authentication for ONC RPC, from Dug Song.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2365 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoDo not malloc a TCP fragment for a packet that does not contain data.
deniel [Thu, 24 Aug 2000 21:05:16 +0000 (21:05 +0000)]
Do not malloc a TCP fragment for a packet that does not contain data.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2364 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd some dlg_set_cancel().
deniel [Thu, 24 Aug 2000 13:21:29 +0000 (13:21 +0000)]
Add some dlg_set_cancel().

Reduce a bit the button sizes for homogeneousness.

(still need some work on filter color selection, in progress ...)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2363 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFixes to add state keeping and properly decode SMTP.
sharpe [Thu, 24 Aug 2000 11:32:09 +0000 (11:32 +0000)]
Fixes to add state keeping and properly decode SMTP.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2362 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoIf we've thrown away saved state before a rescan of the frames in a
guy [Thu, 24 Aug 2000 09:16:39 +0000 (09:16 +0000)]
If we've thrown away saved state before a rescan of the frames in a
capture, clear the per-frame data pointers of all frames in the capture,
as those pointers now refer to data that's been freed.

Do that to all frames even if the user stops the rescan in the middle -
and clear the "visited" flag for all frames as well.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2361 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoUse 0, rather that 0xffffffff, as the "no reply frame number known yet"
guy [Thu, 24 Aug 2000 08:55:30 +0000 (08:55 +0000)]
Use 0, rather that 0xffffffff, as the "no reply frame number known yet"
- frame numbers are 1-origin, so 0 can be used as an "exception" value.

In the protocol tree for a reply, don't say that the reply is to frame
N, just say that it's to a request starting in frame N - a frame can
contain more than one request, and a request may take more than one
frame.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2360 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoActually, we do have to clear all the dissector information if we're
guy [Thu, 24 Aug 2000 06:45:37 +0000 (06:45 +0000)]
Actually, we do have to clear all the dissector information if we're
redissecting the packets due to some preference changing, as the
preference may affect what state information gets constructed as a
result of some particular frame being dissected.

We don't have to do it when filtering the packets, or colorizing them,
however.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2359 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoInstead of keeping in the information about an RPC call a count of the
guy [Thu, 24 Aug 2000 06:19:53 +0000 (06:19 +0000)]
Instead of keeping in the information about an RPC call a count of the
number of replies seen, keep the frame number of the first request seen
for that call and the first reply seen for that call.  Use that to
determine whether a request or reply is a duplicate or not.

That means that we don't have to reset the table of RPC calls on a
rescan of the capture (which didn't even fix all the cases where we'd
have misreported the original call or reply as a duplicate due to having
seen it once on the initial pass through the file and once again when,
for example, the user clicked on the packet); doing so causes plenty of
other problems, so don't do that - and don't clear the "visited" flag on
frames on a rescan, either, as that's only done because we were clearing
out conversations and calling all protocols' "init" routines.

As a free bonus, this means that, for a reply, we know what frame the
request was in; put that information into the protocol tree for the
reply, snoop-style.

Make the table of RPC call information, and the routines that manipulate
it, static to "packet-rpc.c"; nobody outside "packet-rpc.c" uses them.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2358 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoDon't assume that you get back from "asn1_octet_string_decode()" a
guy [Thu, 24 Aug 2000 05:40:50 +0000 (05:40 +0000)]
Don't assume that you get back from "asn1_octet_string_decode()" a
pointer to a null-terminated string; you get back a null pointer if the
octet string is zero-length, and even if it's not zero-length there's no
guarantee that the string is null-terminated.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2357 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix the appearance of the option menus in the GUI preference box.
gram [Thu, 24 Aug 2000 03:16:47 +0000 (03:16 +0000)]
Fix the appearance of the option menus in the GUI preference box.
It appears to be a buglet in GTK+; by explicitly calling gtk_widget_show()
on the menu item, it comes out with proper spacing. Previously I simply
used gtk_widget_show_all() on the topmost vbox, and while the option menu
menu-items showed, they came out with incorrect vertical spacing.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2356 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix and document the CLEANUP_* macros, allowing the programmer to register
gram [Thu, 24 Aug 2000 02:55:36 +0000 (02:55 +0000)]
Fix and document the CLEANUP_* macros, allowing the programmer to register
cleanup functions for the cases in which an exception is thrown but not
caught in a region where cleanup needs to occur.

Use these macros in proto_tree_add_item, where we need to free the field_info*
in case an exception is thrown when accessing the tvbuff.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2355 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoIf the default build-in fonts are not found, use the "6x13" fonts
deniel [Wed, 23 Aug 2000 21:05:11 +0000 (21:05 +0000)]
If the default build-in fonts are not found, use the "6x13" fonts
but change also the prefs.gui_font_name so that an unexisting font
will not be saved with the preferences.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2354 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoCosmetic changes.
deniel [Wed, 23 Aug 2000 20:55:44 +0000 (20:55 +0000)]
Cosmetic changes.

Add a table so that the first 4 rows of the capture dialog
are correctly aligned.

Remove the unneeded hboxes.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2353 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoDocuments the "marked frame" related menu items and associated
deniel [Wed, 23 Aug 2000 19:40:12 +0000 (19:40 +0000)]
Documents the "marked frame" related menu items and associated
features (e.g. GUI "Colors...").

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2352 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoMissed one IPv4 TOS field display option is the manual.
deniel [Wed, 23 Aug 2000 19:13:33 +0000 (19:13 +0000)]
Missed one IPv4 TOS field display option is the manual.

(why some items are described at two locations ?, one for
menu and one for window ?)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2351 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoIf you "save" your preferences without opening the color
deniel [Wed, 23 Aug 2000 18:52:38 +0000 (18:52 +0000)]
If you "save" your preferences without opening the color
selection dialog, the colors are saved with null values.
So do not call fetch_colors if the colors_changed boolean
is FALSE ...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2350 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoRemove the -D option.
deniel [Wed, 23 Aug 2000 18:22:12 +0000 (18:22 +0000)]
Remove the -D option.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2349 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoDo the same as with colors for the font selection dialog.
deniel [Wed, 23 Aug 2000 16:15:13 +0000 (16:15 +0000)]
Do the same as with colors for the font selection dialog.
Add a boolean that will be set to TRUE if the user hit OK
in the font selection dialog. And do nothing about fonts
in the apply routine if the font dialog has not been used
by the user. This gets rid of a warning which was displayed
each time the preferences are "OK, Saved or cancelled"
and that whether the user has used the font selection
dialog or not (which was very annoying) ...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2348 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix a comment.
deniel [Wed, 23 Aug 2000 10:38:43 +0000 (10:38 +0000)]
Fix a comment.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2347 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoDon't set the marked-packet foreground and background colors in "prefs"
guy [Wed, 23 Aug 2000 07:38:56 +0000 (07:38 +0000)]
Don't set the marked-packet foreground and background colors in "prefs"
until the GUI-preferences fetch routine is called, and don't re-colorize
marked packets until the GUI-preferences apply routine is called;
those preferences shouldn't take effect until the user clicks "OK" or
"Apply", as that's the way other preferences work.

Treat a request to close the color selection dialog the same as a click
on the "Cancel" button.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2346 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoBleah. What was I thinking? "dlg_window_new()" should take the title
guy [Wed, 23 Aug 2000 06:56:31 +0000 (06:56 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2345 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoDo not display "Text (text)" (i.e. FT_TEXT_ONLY) for unfilterable
deniel [Tue, 22 Aug 2000 20:17:27 +0000 (20:17 +0000)]
Do not display "Text (text)" (i.e. FT_TEXT_ONLY) for unfilterable
fields in status bar.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2344 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd a help context identifier for the status bar.
deniel [Tue, 22 Aug 2000 19:40:09 +0000 (19:40 +0000)]
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 ;-)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2343 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoChange u_int32_t to guint32
gram [Tue, 22 Aug 2000 15:07:33 +0000 (15:07 +0000)]
Change u_int32_t to guint32

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2342 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoRemove the "Decode IPv4 TOS field as DiffServ field" option from the
deniel [Tue, 22 Aug 2000 14:39:41 +0000 (14:39 +0000)]
Remove the "Decode IPv4 TOS field as DiffServ field" option from the
display options since it is available from the preferences.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2341 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoSmall update (add accelerator).
deniel [Tue, 22 Aug 2000 14:21:27 +0000 (14:21 +0000)]
Small update (add accelerator).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2340 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd "Colors..." button in GUI preferences.
deniel [Tue, 22 Aug 2000 14:04:52 +0000 (14:04 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2339 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agomore support for icmp6 node information query.
itojun [Tue, 22 Aug 2000 08:30:00 +0000 (08:30 +0000)]
more support for icmp6 node information query.
- DNS name decode (uses function in packet-dns.c)
- supported bitmap

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2338 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoprototype declarations should have no variables names, as #define
itojun [Tue, 22 Aug 2000 08:28:45 +0000 (08:28 +0000)]
prototype declarations should have no variables names, as #define
could play in a strange way (it happens, really).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2337 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoprotect macro expansion - there may be more necessary.
itojun [Tue, 22 Aug 2000 08:19:40 +0000 (08:19 +0000)]
protect macro expansion - there may be more necessary.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2336 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoMore mention of csids support in wiretap.
gram [Tue, 22 Aug 2000 06:50:16 +0000 (06:50 +0000)]
More mention of csids support in wiretap.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2335 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoChange FT_NSTRING_UINT8 to FT_UINT_STRING. The length parameter passed
gram [Tue, 22 Aug 2000 06:38:32 +0000 (06:38 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2334 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoGiven that DLT_ values and libpcap appear to mutate almost as fast as
guy [Tue, 22 Aug 2000 06:04:40 +0000 (06:04 +0000)]
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).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2333 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoPut "-t <time stamp format>" back into the usage message for Ethereal
guy [Tue, 22 Aug 2000 05:06:20 +0000 (05:06 +0000)]
Put "-t <time stamp format>" back into the usage message for Ethereal
with libpcap; I inadvertently deleted it when removing "-b".

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2332 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoInitialize all the fields of the "frame_data" structure, so that, for
guy [Tue, 22 Aug 2000 03:33:41 +0000 (03:33 +0000)]
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).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2331 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoExplain why we don't currently have to defer setting
guy [Mon, 21 Aug 2000 22:35:59 +0000 (22:35 +0000)]
Explain why we don't currently have to defer setting
"prefs.gui_font_name" until the "fetch" routine is called.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2330 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoPut in a comment noting that the "apply" routine for the TCP stream
guy [Mon, 21 Aug 2000 22:31:04 +0000 (22:31 +0000)]
Put in a comment noting that the "apply" routine for the TCP stream
preferences should change the colors for all existing TCP stream
windows.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2329 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoDon't set the "prefs.gui_XXX" values until the "fetch" routine for the
guy [Mon, 21 Aug 2000 22:30:04 +0000 (22:30 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2328 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd prefs.gui_marked_[fb]g color preferences for the
deniel [Mon, 21 Aug 2000 21:24:15 +0000 (21:24 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2327 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoCosmetic change (close button at the right place :-).
deniel [Mon, 21 Aug 2000 20:11:51 +0000 (20:11 +0000)]
Cosmetic change (close button at the right place :-).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2326 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd some menu items related to the "frame mark" feature in
deniel [Mon, 21 Aug 2000 19:36:19 +0000 (19:36 +0000)]
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" ?)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2325 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoChange from Andreas Sikkema to change the "old" and "new" members of the
guy [Mon, 21 Aug 2000 18:36:35 +0000 (18:36 +0000)]
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).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2324 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd the number of marked packets in the summary window.
deniel [Mon, 21 Aug 2000 18:20:19 +0000 (18:20 +0000)]
Add the number of marked packets in the summary window.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2323 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFrames in the packet list can now be marked by the user using
deniel [Mon, 21 Aug 2000 15:45:33 +0000 (15:45 +0000)]
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).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2322 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoPut an indentation in hexdump display of a TCP stream
deniel [Mon, 21 Aug 2000 13:04:05 +0000 (13:04 +0000)]
Put an indentation in hexdump display of a TCP stream
only if both directions are displayed.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2321 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoRevert the last silly change ... :-)
sharpe [Mon, 21 Aug 2000 12:53:10 +0000 (12:53 +0000)]
Revert the last silly change ... :-)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2320 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoA small change ...
sharpe [Mon, 21 Aug 2000 12:48:05 +0000 (12:48 +0000)]
A small change ...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2319 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoMake work better the (hexdump) popup menus.
deniel [Mon, 21 Aug 2000 12:33:22 +0000 (12:33 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2318 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoInstead of each set of built-in preferences having "ok", "save",
guy [Mon, 21 Aug 2000 08:15:48 +0000 (08:15 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2317 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoInstead of each set of built-in preferences having "ok", "save",
guy [Mon, 21 Aug 2000 08:09:17 +0000 (08:09 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2316 f5534014-38df-0310-8fa8-9805f1628bb7

23 years ago"capture_child" isn't declared or defined if HAVE_LIBPCAP isn't defined;
guy [Mon, 21 Aug 2000 01:52:57 +0000 (01:52 +0000)]
"capture_child" isn't declared or defined if HAVE_LIBPCAP isn't defined;
check it only if HAVE_LIBPCAP is defined.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2315 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd a popup menu for the hexdump window. For now, it has only the
deniel [Sun, 20 Aug 2000 21:55:58 +0000 (21:55 +0000)]
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)...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2314 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoCleaning (remove comment and tcp_extra_data).
deniel [Sun, 20 Aug 2000 20:48:55 +0000 (20:48 +0000)]
Cleaning (remove comment and tcp_extra_data).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2313 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix a comment.
deniel [Sun, 20 Aug 2000 19:40:47 +0000 (19:40 +0000)]
Fix a comment.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2312 f5534014-38df-0310-8fa8-9805f1628bb7

23 years ago"ascend" was not working as display filter...
deniel [Sun, 20 Aug 2000 19:16:39 +0000 (19:16 +0000)]
"ascend" was not working as display filter...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2311 f5534014-38df-0310-8fa8-9805f1628bb7

23 years ago- proto_bgp was not added in protocol tree, so "bgp" was not
deniel [Sun, 20 Aug 2000 18:10:12 +0000 (18:10 +0000)]
- proto_bgp was not added in protocol tree, so "bgp" was not
  working as display filter...

- add display filters.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2310 f5534014-38df-0310-8fa8-9805f1628bb7

23 years ago- do not issue the font warning if in the child process (used for real time
deniel [Sun, 20 Aug 2000 15:38:50 +0000 (15:38 +0000)]
- 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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2309 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoSMTP is Simple *Mail* Transfer Protocol not Message.
deniel [Sun, 20 Aug 2000 15:25:17 +0000 (15:25 +0000)]
SMTP is Simple *Mail* Transfer Protocol not Message.

Add [OLD_]CHECK_DISPLAY_AS_DATA call.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2308 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoUse "memset()" to zero byte arrays, and "memcpy" to copy into them.
guy [Sun, 20 Aug 2000 09:07:16 +0000 (09:07 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2307 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoWhen the Win32 GTK+ constructs fake XLFD names for Windows fonts, it
guy [Sun, 20 Aug 2000 09:02:29 +0000 (09:02 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2306 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoRemove references to the "-b" option from the usage messages, as that
guy [Sun, 20 Aug 2000 08:08:30 +0000 (08:08 +0000)]
Remove references to the "-b" option from the usage messages, as that
option has been removed.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2305 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoInstead of having the normal-weight and bold fonts set separately,
guy [Sun, 20 Aug 2000 07:53:45 +0000 (07:53 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2304 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoThis is an SMTP dissector, not a BXXP dissector; fix the comment at the
guy [Sun, 20 Aug 2000 02:16:23 +0000 (02:16 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2303 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdded packet-smtp.c and modified packet.c to include code that was never
sharpe [Sat, 19 Aug 2000 23:06:51 +0000 (23:06 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2302 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdding the first part of packet-smtp.c ...
sharpe [Sat, 19 Aug 2000 23:00:06 +0000 (23:00 +0000)]
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 ...

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2301 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd Mbit/sec to the summary window.
deniel [Sat, 19 Aug 2000 21:36:51 +0000 (21:36 +0000)]
Add Mbit/sec to the summary window.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2300 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix buffer overflow on zlib uncompression errors.
deniel [Sat, 19 Aug 2000 18:31:23 +0000 (18:31 +0000)]
Fix buffer overflow on zlib uncompression errors.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2299 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoFix potential buffer overflows.
deniel [Sat, 19 Aug 2000 18:20:59 +0000 (18:20 +0000)]
Fix potential buffer overflows.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2298 f5534014-38df-0310-8fa8-9805f1628bb7

23 years ago- fix potential buffer overflow problems.
deniel [Sat, 19 Aug 2000 17:53:02 +0000 (17:53 +0000)]
- fix potential buffer overflow problems.

- fix potential memory allocation problems (e.g. if PF_DIR is changed
  to a longer string).

- add some #defines.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2297 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoMichael Tuexen's patch to add "sctp.port" as a dissector table so that
guy [Sat, 19 Aug 2000 08:37:43 +0000 (08:37 +0000)]
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2296 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoMichael Tuexen's changes to define a port type for SCTP ports, handle
guy [Sat, 19 Aug 2000 08:26:04 +0000 (08:26 +0000)]
Michael Tuexen's changes to define a port type for SCTP ports, handle
SCTP ports in "col_set_port()", and add a "get_sctp_port()" routine to
resolve SCTP port numbers to services.

Also, make the "get_XXX_port()" routines format the port number as an
unsigned integer, rather than a signed integer, if the service name for
the port isn't found (the port number passed in is unsigned).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2295 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoavoid pointer typecast, which leads to unaligned access.
itojun [Fri, 18 Aug 2000 15:52:02 +0000 (15:52 +0000)]
avoid pointer typecast, which leads to unaligned access.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2294 f5534014-38df-0310-8fa8-9805f1628bb7

23 years ago- remove ^M
deniel [Fri, 18 Aug 2000 15:45:30 +0000 (15:45 +0000)]
- remove ^M

- add CHECK_DISPLAY_AS_DATA()

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2293 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd Zebra dissector from Jochen.
gram [Fri, 18 Aug 2000 15:26:52 +0000 (15:26 +0000)]
Add Zebra dissector from Jochen.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2292 f5534014-38df-0310-8fa8-9805f1628bb7

23 years ago- move some #preprocessor directives at the fisrt column.
deniel [Fri, 18 Aug 2000 14:22:20 +0000 (14:22 +0000)]
- move some #preprocessor directives at the fisrt column.

- do not silently ignore plugins with incomplete symbols
  or non compilable filter (but report the error to the user).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2291 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoModify the Gryphon plugin code in order to avoid an abort when the
deniel [Fri, 18 Aug 2000 13:47:59 +0000 (13:47 +0000)]
Modify the Gryphon plugin code in order to avoid an abort when the
plugin is enabled -> disabled -> re-enabled due to the fact that
the protocol registration is performed at each plugin_init() call
(and there is no protocol cleanup like with dfilter_cleanup).

Now we use the proto_xxx static variable to check if it is the first
activation or not (in this case, the proto_register_xxx routines are
not called.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2290 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoadd dissector for draft-ietf-ipngwg-icmp-name-lookups-06.txt
itojun [Fri, 18 Aug 2000 12:05:27 +0000 (12:05 +0000)]
add dissector for draft-ietf-ipngwg-icmp-name-lookups-06.txt
(icmp node information query).  not finished yet - need DNS decoding.
for DNS name queries/replies.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2289 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoA6 records are now RFC 2874 (not i-d)
itojun [Fri, 18 Aug 2000 09:05:02 +0000 (09:05 +0000)]
A6 records are now RFC 2874 (not i-d)

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2288 f5534014-38df-0310-8fa8-9805f1628bb7

23 years agoAdd a comment about the use of prefs_register_module() in protocol dissectors
deniel [Thu, 17 Aug 2000 21:02:10 +0000 (21:02 +0000)]
Add a comment about the use of prefs_register_module() in protocol dissectors
(the name should match the one specified at the proto_register_protocol() call).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2287 f5534014-38df-0310-8fa8-9805f1628bb7