Commit Graph

2248 Commits

Author SHA1 Message Date
Laurent Deniel ec5366cede Fix a long standing bug in the scrolled window handling in follow TCP stream
which make ethereal aborts if the preferences were modified (or cancel) after
the TCP window was closed.

Fix the same bug in the other scrolled window handling (help & protocols).

(forget_scrolled_window() was not called at the window closure).

svn path=/trunk/; revision=2283
2000-08-16 21:08:48 +00:00
Laurent Deniel e4c5d20f3a The "Edit:protocols..." window is now sorted.
svn path=/trunk/; revision=2282
2000-08-16 20:14:24 +00:00
Laurent Deniel df89199498 - remove "Match Selected" from the packet list popup menu.
- reorganise a bit the two right click popup menus :

  . the first part is common to the packet list and protocol tree menus
  . the second part is window-specific.

 (if we had a popup menu for the hexdump window, that would be the same).

svn path=/trunk/; revision=2281
2000-08-16 19:15:11 +00:00
Guy Harris c8cb7ffb19 In "set_plist_sel_browse()", don't unselect the current packet if the
selection mode of the packet list window isn't actually going to be
changed - it's a bit annoying to have the protocol tree window clear out
from under you if all you've done is pop up the Edit->Preferences dialog
and cancelled it (or accepted it without changing any GUI preference).

svn path=/trunk/; revision=2280
2000-08-15 22:22:35 +00:00
Guy Harris 75a756e881 Rename the "Properties" pop-up menu item "Protocol Properties", to make
it clearer what properties it lets you edit.  (Perhaps it should say
"Edit Protocol Properties", to make it even clearer?)

svn path=/trunk/; revision=2279
2000-08-15 21:35:34 +00:00
Guy Harris a0d9061db6 Get rid of an unused variable.
svn path=/trunk/; revision=2278
2000-08-15 21:27:46 +00:00
Laurent Deniel e559d013fc Oups. Forgot some set_menus_for_selected_tree_row calls.
svn path=/trunk/; revision=2277
2000-08-15 21:03:55 +00:00
Laurent Deniel 55d80b7bec Fix a problem with const char *
svn path=/trunk/; revision=2276
2000-08-15 20:53:31 +00:00
Laurent Deniel 5a326952de Implements the "Properties" menu item which displays the preferences window
at the correct notebook page when a particular protocol (which has registered
some preferences) is selected in the tree view.

- add set_menus_for_selected_tree_row() in menu.[ch]

- add prefs_is_registered_protocol() and
      prefs_get_title_by_name() in prefs.[ch]

svn path=/trunk/; revision=2275
2000-08-15 20:46:17 +00:00
Laurent Deniel e784cb0c0f Remove the IPv6 restriction for the Follow TCP stream feature.
svn path=/trunk/; revision=2274
2000-08-15 18:44:52 +00:00
Mike Hall 32eb1e4b8a The caplen and iplen are not always going to be equal. Need to use > and <= instead of != ==.
svn path=/trunk/; revision=2273
2000-08-15 18:19:06 +00:00
Uwe Girlich 2452ceac2b Much cleaner tvb start code for file handle dissection.
svn path=/trunk/; revision=2272
2000-08-14 13:21:15 +00:00
Uwe Girlich c6097bf684 Reversed the latest changes for protocol enable/disable in RPC sub-dissectors.
The RPC layer itself handles all this stuff.

svn path=/trunk/; revision=2271
2000-08-14 11:36:04 +00:00
Guy Harris 364ec7fa05 PPP/WAN captures work on Windows 9x, so speak of them not working only
on NT/2000.

Refer to Tethereal, not to Ethereal, in the long explanations of capture
problems in Tethereal.

svn path=/trunk/; revision=2270
2000-08-14 08:36:41 +00:00
Uwe Girlich 78871aef3a proto_is_protocol_enabled() test for sub-dissectors made here already.
svn path=/trunk/; revision=2269
2000-08-14 07:47:19 +00:00
Laurent Deniel 5a5e16ced7 Add the "Edit:Protocols..." feature which currently only implements
the following:

It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.

Disabling a protocol could be interesting:

- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)

Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)

I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).

Two functions are added in proto.c :

gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);

and two MACROs which can be used in dissectors:

OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)

See also the XXX in proto_dlg.c and proto.c around the new functions.

svn path=/trunk/; revision=2268
2000-08-13 14:20:32 +00:00
Laurent Deniel cc36f0b931 Add the "Edit:Protocols..." feature which currently only implements
the following:

It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.

Disabling a protocol could be interesting:

- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)

Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)

I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).

Two functions are added in proto.c :

gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);

and two MACROs which can be used in dissectors:

OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)

See also the XXX in proto_dlg.c and proto.c around the new functions.

svn path=/trunk/; revision=2267
2000-08-13 14:09:15 +00:00
Guy Harris db31ba13c8 Cope with some of the *other* oddities that Linux ISDN appears to stick
at the beginning of packets.

svn path=/trunk/; revision=2266
2000-08-13 08:53:51 +00:00
Guy Harris 1c910d808a On Win32, if the attempt to open the capture device fails, don't talk
about checking permissions, as the capture devices are probably
available to all users, and talking about permissions will only confuse
the user.  Do, however, warn that Ethereal can't capture on Token Ring
or PPP/WAN interfaces.

On UNIX, if the attempt to open the capture device fails, and the error
message starts with "can't find PPA for ", they are probably running on
HP-UX with a version of libpcap not patched to properly look up PPAs for
network interfaces given the interface name; give them a detailed
warning about this, telling them that they'll have to fix libpcap and
build Ethereal from source, and pointing them at the "README.hpux" file.

svn path=/trunk/; revision=2265
2000-08-13 08:17:03 +00:00
Guy Harris e01997e3d0 Give, in "README.hpux", what appears to be the new URL for the UK HP-UX
Porting and Archive Centre site.

Warn in the very beginning of that file that libpcap may not work very
well without patches.  Give patches to libpcap for:

	vanilla LBL libpcap 0.4

	vanilla tcpdump.org libpcap 0.5

	libpcap 0.4 from the HP-UX Porting and Archive Centre (which is
	the only version that includes configure-script changes to work
	with HP's C compiler as well as GCC)

and put them in files separate from "README.hpux" (to make it easier for
users to apply the patches).

Make those versions of the patch give a slightly different error message
if libpcap fails to find the PPA for the device, to make it easier to
figure out if the user reporting a problem with HP-UX capture has a
patched version of libpcap or not (so that we know whether the problem
may just be that they're using an unmodified libpcap, or if they're
running a patched version and that patch needs more work, e.g. to look
at devices other than just "/dev/dlpi").

Give information on how to find "patch", warn that probably only the
HP-UX Porting and Archive Centre version will work with the HP C
compiler, warn that applying a version of the patch other than the one
for the particular version of libpcap you've downloaded will probably
not work, and warn that you need to download source to libpcap in order
to do any of this in the first place.

(The current libpcap CVS tree at tcpdump.org has this patch in it, so
the next release of libpcap from tcpdump.org should have it; hopefully
the HP-UX Porting and Archive Centre will switch to that version when it
comes out, and people will just be able to push a few buttons to get an
Ethereal that works on HP-UX.)

svn path=/trunk/; revision=2264
2000-08-13 07:48:56 +00:00
Laurent Deniel 60ac4e87b2 - add HAVE_CONFIG_H
- add display filters

svn path=/trunk/; revision=2263
2000-08-12 12:56:23 +00:00
Guy Harris 7810e860d6 Initialize "last_blob" and "current_blob" when the file is opened.
Set "current_blob" when the first read is done from the random file, as
"current_blob" is the current blob in the random file.

svn path=/trunk/; revision=2262
2000-08-12 07:12:46 +00:00
Guy Harris ce2d5b1ac3 RSH dissector, from Robert Tsai.
svn path=/trunk/; revision=2261
2000-08-12 05:41:10 +00:00
Guy Harris 2c6e256a87 "p_get_proto_data()" should, if it finds an entry, return the pointer
supplied in the "p_add_proto_data()" call that created the entry, not
the pointer to the data structure that holds the protocol and data
arguments to "p_add_proto_data()" (the protocol is uninteresting, as
its value is the value supplied as the "proto" argument to
"p_get_proto_data()".

The "frame_proto_data" structure isn't needed outside the code that
handles it; remove its definition from "packet.h" and put it in
"packet.c".

svn path=/trunk/; revision=2260
2000-08-12 00:15:40 +00:00
Laurent Deniel eb587ac5f1 Remove my unmaintained http address and add some stuff
in order to know who to complain :-)

svn path=/trunk/; revision=2259
2000-08-11 22:33:43 +00:00
Laurent Deniel 281e892939 - add ipv6.addr for the source and destination addresses (like ipv4)
- implement the TCP follow feature for TCP over IPv6

svn path=/trunk/; revision=2258
2000-08-11 22:18:22 +00:00
Guy Harris e18d6c34c9 Give them RCS IDs.
Fix a typo in the LGPL in the initial comment.

Move the includes of <stdlib.h> and <ctype.h> out of "snprintf-imp.h"
into "snprintf.c", and put them *before* the include of "snprintf.h", so
that "size_t" is defined before "snprintf.h" is included ("snprintf.h"
uses "size_t").

svn path=/trunk/; revision=2257
2000-08-11 22:03:03 +00:00
Guy Harris a14e4940eb Give it an RCS ID.
svn path=/trunk/; revision=2256
2000-08-11 22:00:49 +00:00
Laurent Deniel 2de43f748b Miscellaneous code cleaning
- add <stdarg.h> or <varargs.h> in snprintf.h
  and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes

- remove the check of multiple inclusions in source (.c)  code
  (there is a bit loss of _cpp_ performance, but I prefer the gain of
   code reading and maintenance; and nowadays, disk caches and VM are
   correctly optimized ;-).

- protect all (well almost) header files against multiple inclusions

- add header (i.e. GPL license) in some include files

- reorganize a bit the way header files are included:

  First:
  #include <system_include_files>
  #include <external_package_include_files (e.g. gtk, glib etc.)>
  Then
  #include "ethereal_include_files"

  with the correct HAVE_XXX or NEED_XXX protections.

- add some HAVE_XXX checks before including some system header files

- add the same HAVE_XXX in wiretap as in ethereal

Please forgive me, if I break something (I've only compiled and regression
tested on Linux).

svn path=/trunk/; revision=2255
2000-08-11 13:46:34 +00:00
Laurent Deniel 6a480953a9 Miscellaneous code cleaning
- add <stdarg.h> or <varargs.h> in snprintf.h
  and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes

- remove the check of multiple inclusions in source (.c)  code
  (there is a bit loss of _cpp_ performance, but I prefer the gain of
   code reading and maintenance; and nowadays, disk caches and VM are
   correctly optimized ;-).

- protect all (well almost) header files against multiple inclusions

- add header (i.e. GPL license) in some include files

- reorganize a bit the way header files are included:

  First:
  #include <system_include_files>
  #include <external_package_include_files (e.g. gtk, glib etc.)>
  Then
  #include "ethereal_include_files"

  with the correct HAVE_XXX or NEED_XXX protections.

- add some HAVE_XXX checks before including some system header files

- add the same HAVE_XXX in wiretap as in ethereal

Please forgive me, if I break something (I've only compiled and regression
tested on Linux).

svn path=/trunk/; revision=2254
2000-08-11 13:37:21 +00:00
Guy Harris 6ad00fc256 Not all compilers like zero-length arrays; comment out the definition of
"hf[]", and the reference to it, for now.

svn path=/trunk/; revision=2253
2000-08-11 08:21:07 +00:00
Guy Harris 74a0606402 Don't bump "offset" in the non-SNAP case - it hasn't been set, and we
don't use it there.

svn path=/trunk/; revision=2252
2000-08-11 08:19:32 +00:00
Guy Harris 4df46758e3 If we have a random stream open for a compressed Sniffer file, have the
sequential pass through the file build a list of information about the
compressed blobs, with the starting offset in the compressed file and in
the uncompressed byte stream for each blob.

When seeking on the random stream, check whether the target location is
within the uncompressed buffer we currently have; if not, use that list
to figure out which blob contains the target location, and read that
blob into the buffer.  Then, as we now know that the target location is
within the uncompressed buffer we currently have, just move the current
pointer into that buffer to the target location.

This means we don't have to read forwards through any uninteresting
blobs in order to seek forwards, and don't have to go all the way back
to the beginning and seek forwards in order to seek backwards.

svn path=/trunk/; revision=2251
2000-08-11 07:28:12 +00:00
Guy Harris fa7f38180a Kerberos 5 dissector, from Wes Hardaker.
svn path=/trunk/; revision=2250
2000-08-11 03:32:53 +00:00
Laurent Deniel 54ddb5b1d3 - remove debugging #ifdef
- protect expensive calls (getXXXbyYYY) with g_resolving_actif check,
  that solves a problem with add_ether_byip which was too expensive
  due to IP address resolution even when g_resolving_actif was disabled.

  I need to clean further.

  Do you think that having inexpensive name resolution (i.e. from
  hash table only which can be filled by dissectors or file reading)
  even if name resolution is disabled (g_resolving_actif = FALSE) is
  preferable than having no name resolution at all (which is currently
  the case). I may change to the first solution in the future if there
  is no objection.

svn path=/trunk/; revision=2249
2000-08-10 22:35:30 +00:00
Laurent Deniel 6f5b18e7cc - rename is_name_from_file to is_dummy_entry since now a real
name can be added from file reading but also from the dissectors.
- add is_dummy_entry in the hosts hashtable.
- check in add_xxx that the entry is not already there, if so
  do nothing except if this is a dummy entry (in this case, it is
  simply replaced).
- add found boolean parameter to host_name_lookup[6]
- add the add_ether_byip procedure which adds a new ether entry
  knowing the IP address (if the IP address can be resolved).
- and finally call this new procedure from ARP dissector.

(ipxnets (among other things) to be updated).

svn path=/trunk/; revision=2248
2000-08-10 20:09:29 +00:00
Guy Harris 9fd68ec37f "test -e" is documented in the Solaris 2.6 man page, but doesn't seem to
work, and it's not even documented in the Solaris 2.5.1 man page; don't
use "-e" to test for the existence of a file, use "-f", which is
documented in the 2.5.1 man page and works.

svn path=/trunk/; revision=2247
2000-08-10 19:43:07 +00:00
Guy Harris 2e2fd5bba8 We must include "snprintf.h" *after* including <stdarg.h>, and
<stdarg.h> is now included by "proto.h", so we must include "snprintf.h"
after including "proto.h".

svn path=/trunk/; revision=2246
2000-08-10 19:41:45 +00:00
Laurent Deniel 4dcd76ae4b - add proto_tree_add_text_valist
- remove stdarg.h include in proto.c and add a more correct one in proto.h
- fix esis_dissect_unknown and isis_dissect_unknown

svn path=/trunk/; revision=2245
2000-08-10 16:04:33 +00:00
Laurent Deniel c1f7e92131 Fix decoding of short ISIS CLV data frames.
But there is still a problem with the isis_dissect_unknown
procedure which calls proto_tree_add_text: the va_list
arguments are incorrectly decoded in proto.c. I suspect
a problem with inclusion of stdarg.h vs. varargs.h but
for now, I can't figure out where ...
(problem on Linux intel with gcc 2.91.66).

svn path=/trunk/; revision=2244
2000-08-10 14:21:09 +00:00
Guy Harris eeb4ab5276 If G_HAVE_GINT64 is defined, so that we can use "gint64" and "guint64"
to refer to 64-bit integral quantities, add "pntohll()" and "phtonll()"
macros, and "tvb_get_ntohll()" and "tvb_get_letohll()" routines, for
fetching 64-bit integral quantities.

(They're still a pain to *print*, as there's no standard "printf" format
code for them - some systems use "%ll[dox]", some use "%q[dox]", and I
think some use formats different from all of them.)

svn path=/trunk/; revision=2243
2000-08-10 07:58:44 +00:00
Laurent Deniel 95c935f216 Add some ethertypes (which were captured on my network, so inuse ;-).
svn path=/trunk/; revision=2242
2000-08-09 22:10:23 +00:00
Laurent Deniel 02fc097017 - make-reg-dot
Do not assume that all dissectors are in the source directory.
This is the case for instance for packet-ncp2222.c which is
generated in the production directory (current).
This is particularly important when the generation is not
made in the source directory.

- ncp2222.py

Remove tabs in generated source to make the generated code
nicer and to make work the make-reg-dotc. Without that fix,
all NCP packet dissections dump core ...

svn path=/trunk/; revision=2241
2000-08-09 21:24:27 +00:00
Guy Harris 86852f4fe8 Add #defines for class values, and use them rather than using the
numeric values.  (Also, just for laughs and for completeness, turn the
CS class into "csnet", even though it's obsolete and supposedly used
only in some examples in obsolete RFCs.)

svn path=/trunk/; revision=2240
2000-08-09 07:15:19 +00:00
Guy Harris 42f7676996 Give the Help menu the more-or-less canonical style from most
Motif/KDE/GNOME(?) and Windows applications, with "Help" above "About",
and separated from "About" by a separator line.

(This also makes "Help->Help" the default, which is probably what most
users would want, especially if, as, and when we fill out the help.)

svn path=/trunk/; revision=2239
2000-08-09 06:43:22 +00:00
Guy Harris 4f08b6f493 Update the man pages to reflect
the addition of support for Cisco Secure Intrusion Detection
	System IPlog output;

	support for selecting only one side of a conversation, for
	showing a conversation in hex, and for saving the displayed data
	to a file, in the "Filter TCP Stream" window.

svn path=/trunk/; revision=2238
2000-08-09 06:38:53 +00:00
Gilbert Ramirez fac3eec39a Make copy_binary_file() static since follow_dlg.c no longer uses it.
svn path=/trunk/; revision=2237
2000-08-09 06:18:16 +00:00
Guy Harris 5e751be764 Phil Techau's fix to BOOTP when client address not supplied.
Give Phil credit for the other stuff he added as well.

svn path=/trunk/; revision=2236
2000-08-09 06:15:14 +00:00
Guy Harris 5225efe134 Make "editcap -h" give the usage message without an error message (i.e.,
specify it in the argument to "getopt()").

svn path=/trunk/; revision=2235
2000-08-09 06:00:54 +00:00
Guy Harris b8a983f558 Document that ranges of packet numbers can be specified.
svn path=/trunk/; revision=2234
2000-08-09 05:58:08 +00:00