18 years agoFurther tvbuffication, from Ronnie Sahlberg.
guy [Sun, 4 Nov 2001 12:44:02 +0000 (12:44 +0000)]
Further tvbuffication, from Ronnie Sahlberg.

Make it possible for a non-tvbuffied dissector for an andX SMB to call a
tvbuffified dissector for the andX command, and fix the non-tvbuffified
dissectors in question to do so.

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

18 years agoCBCP support in PPP, from Motonori Shindo.
guy [Sun, 4 Nov 2001 04:50:12 +0000 (04:50 +0000)]
CBCP support in PPP, from Motonori Shindo.

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

18 years agoInclude protocols for TCP conversation dissectors in the list of
guy [Sun, 4 Nov 2001 04:12:03 +0000 (04:12 +0000)]
Include protocols for TCP conversation dissectors in the list of
protocols that can be used to decode stuff.

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

18 years agoDeclare routines exported to plugins through the plugin API table as
guy [Sun, 4 Nov 2001 03:55:52 +0000 (03:55 +0000)]
Declare routines exported to plugins through the plugin API table as
extern, so that "plugin_api_defs.h" works on platforms where you have to
use the plugin API table.

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

18 years agoAdditional routines made available to plugins, from Tomas Kukosa.
guy [Sun, 4 Nov 2001 03:37:29 +0000 (03:37 +0000)]
Additional routines made available to plugins, from Tomas Kukosa.

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

18 years agoIn "plugin_api_defs.h", just do
guy [Sun, 4 Nov 2001 03:16:47 +0000 (03:16 +0000)]
In "plugin_api_defs.h", just do

addr_XXX p_XXX;

for all the declarations, to simplify things, as per Tomas Kukosa's

Fix a couple of comments.

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

18 years agoAllow a dissector to register preferences that it no longer supports as
guy [Sun, 4 Nov 2001 02:50:21 +0000 (02:50 +0000)]
Allow a dissector to register preferences that it no longer supports as
obsolete; we silently ignore attempts to set those in a preferences
file, so that we don't spam the user with error messages caused by them
having saved preferences in an earlier release that contained those

Make the Diameter and iSCSI dissectors register obsolete preferences.

Crash if some code tries to register a preferences module with a name
that contains something other than lower-case ASCII letters, numbers, or
underscores, or that has already been registered, or if some code tries
to register a preference with a name that contains something other than
lower-case ASCII letters, numbers, underscores, or periods, or that has
already been registered, so that we don't put code like that in a
release and have to shovel code into "prefs.c" to fix it up later.  (The
problem with multiple modules or preferences with the same name should
be obvious; the problem with names with blanks, or upper-case letters,
or punctuation, is that they're a pain to type on the command line.)

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

18 years agoUpdates from Mark Burton.
guy [Sun, 4 Nov 2001 00:58:23 +0000 (00:58 +0000)]
Updates from Mark Burton.

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

18 years agoMore tvbuffication, from Ronnie Sahlberg.
guy [Sun, 4 Nov 2001 00:53:46 +0000 (00:53 +0000)]
More tvbuffication, from Ronnie Sahlberg.

When converting DOS-date years to "struct tm" years, add 1980 and
subtract 1900, to make it clearer what the conversion involves (DOS-date
years are (year - 1980); "struct tm" years are (year - 1900)).

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

18 years agoCheck for a zero word count in LogoffandX requests and replies.
guy [Sat, 3 Nov 2001 23:53:48 +0000 (23:53 +0000)]
Check for a zero word count in LogoffandX requests and replies.

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

18 years agoClean up the Info column, by leaving the ": " that separates bad
guy [Sat, 3 Nov 2001 23:13:03 +0000 (23:13 +0000)]
Clean up the Info column, by leaving the ": " that separates bad
packet/flag information from the PDU type if there's no bad packet or
flag informatin.

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

18 years agoCrash if a dissector tries to create more than one preference with the
guy [Sat, 3 Nov 2001 21:37:00 +0000 (21:37 +0000)]
Crash if a dissector tries to create more than one preference with the
same name; if that happens, there's no way to tell to which of them a
line in a preferences file, or an option supplied with "-o", refers, so
it's clearly a bug in the code.  This has happened in the past, and
fixing that required some preference renaming *and* code in the
preferences-file-reading code to try to preserve the user's settings and
not spew warnings when starting Ethereal or Tethereal; let's try to
catch it *before* the code gets into the code base.

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

18 years agoCooperative Route Filtering Capability support, and Route Refresh
guy [Sat, 3 Nov 2001 21:25:12 +0000 (21:25 +0000)]
Cooperative Route Filtering Capability support, and Route Refresh
Message bug fix, in BGP, from Motonori Shindo.

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

18 years agoSupport for desegmentation of Diameter-over-TCP, from David Frascone.
guy [Sat, 3 Nov 2001 12:19:56 +0000 (12:19 +0000)]
Support for desegmentation of Diameter-over-TCP, from David Frascone.

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

18 years agoClean up the display of the Flags and Flags2 fields, and add a missing
guy [Sat, 3 Nov 2001 12:10:34 +0000 (12:10 +0000)]
Clean up the display of the Flags and Flags2 fields, and add a missing
bit to Flags2.

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

18 years agoTvbuffification of Negotiate Protocol, from Ronnie Sahlberg.
guy [Sat, 3 Nov 2001 11:42:50 +0000 (11:42 +0000)]
Tvbuffification of Negotiate Protocol, from Ronnie Sahlberg.

Fix up Info column to put "Request" or "Response" *after* the name of
the request.

Give the Negotiate Protocol request its full name.

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

18 years agoFirst tvbuffication change, from Ronnie Sahlberg. Also changes SMB
guy [Sat, 3 Nov 2001 06:56:56 +0000 (06:56 +0000)]
First tvbuffication change, from Ronnie Sahlberg.  Also changes SMB
command names to match later SMB specs.

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

18 years agoIn "addStaticAVP()", add the new entry to the list of AVP types after
guy [Sat, 3 Nov 2001 04:09:46 +0000 (04:09 +0000)]
In "addStaticAVP()", add the new entry to the list of AVP types after
it's filled in.

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

18 years agoTVBUFF_SUBSET tvbuffs share a "ds_name" with the parent tvbuff, so their
guy [Sat, 3 Nov 2001 03:49:34 +0000 (03:49 +0000)]
TVBUFF_SUBSET tvbuffs share a "ds_name" with the parent tvbuff, so their
"ds_name"s shouldn't be freed when the tvbuff is freed.  (Thanks and a
tip of the Hatlo hat to the FreeBSD memory allocator for complaining
about multiple frees of the same string.)

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

18 years agoMore indentation fixes.
guy [Sat, 3 Nov 2001 03:41:35 +0000 (03:41 +0000)]
More indentation fixes.

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

18 years agoPut the error code into the Info column symbolically, if possible.
guy [Sat, 3 Nov 2001 02:25:26 +0000 (02:25 +0000)]
Put the error code into the Info column symbolically, if possible.

Put the error message string into the Info column as well.

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

18 years agoPut stuff in the Info column regardless of whether we're building a
guy [Sat, 3 Nov 2001 02:19:10 +0000 (02:19 +0000)]
Put stuff in the Info column regardless of whether we're building a
protocol tree or not.

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

18 years agoSmall fix to include the arrow pixmaps in the distribution, from Andrew
guy [Sat, 3 Nov 2001 01:56:11 +0000 (01:56 +0000)]
Small fix to include the arrow pixmaps in the distribution, from Andrew
C. Feren.

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

18 years agoWhen freeing the "gpa_hfinfo" pointer array, free the array itself, as
guy [Sat, 3 Nov 2001 01:19:59 +0000 (01:19 +0000)]
When freeing the "gpa_hfinfo" pointer array, free the array itself, as
well as the structure containing it.

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

18 years agoRename the "private" member of the "packet_info" structure to
guy [Sat, 3 Nov 2001 00:58:52 +0000 (00:58 +0000)]
Rename the "private" member of the "packet_info" structure to
"private_data", to keep C++ compilers from getting heartburn.

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

18 years agoFix the indentation.
guy [Sat, 3 Nov 2001 00:19:26 +0000 (00:19 +0000)]
Fix the indentation.

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

18 years agoFix leak of ds_name. Thanks to Sirop Erable <matrix_ottawa@yahoo.ca>
gram [Fri, 2 Nov 2001 21:39:34 +0000 (21:39 +0000)]
Fix leak of ds_name. Thanks to Sirop Erable <matrix_ottawa@yahoo.ca>

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

18 years agoAhhh,
sharpe [Fri, 2 Nov 2001 20:52:59 +0000 (20:52 +0000)]

That feels better. Some real programming for once.

Guided by Guy, I have cleaned up tftp a bit and added some useful stuff to
the summary line.

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

18 years agoSupport DLT_CISCO_IOS.
gram [Fri, 2 Nov 2001 13:00:30 +0000 (13:00 +0000)]

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

18 years agoAdd support for 64-bit signed integers in "int-64bit.[ch]", add an
guy [Fri, 2 Nov 2001 10:09:51 +0000 (10:09 +0000)]
Add support for 64-bit signed integers in "int-64bit.[ch]", add an
FT_INT64 type, and make the Diameter dissector use it.

Handle the 64-bit integer types in the display filter semantics checks.

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

18 years agoDon't assume that all UNIX platforms have <iconv.h> - explicitly check
guy [Fri, 2 Nov 2001 10:01:00 +0000 (10:01 +0000)]
Don't assume that all UNIX platforms have <iconv.h> - explicitly check
whether it's present.

This puts HAVE_ICONV_H in the "config.h" file, so put in an entry for it
in "config.h.win32" - an entry that doesn't define it - and get rid of
the check for WIN32 in "xmlstub.h".

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

18 years agoInstall the files for the XML Diameter dictionary.
guy [Thu, 1 Nov 2001 21:55:08 +0000 (21:55 +0000)]
Install the files for the XML Diameter dictionary.

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

18 years agoFrom David Frascone: duUpdate to Diameter dissector to load the
guy [Thu, 1 Nov 2001 21:52:44 +0000 (21:52 +0000)]
From David Frascone: duUpdate to Diameter dissector to load the
dictionary as an XML file rather than building it in, and various
Diameter updates.

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

18 years agoFix some declarations to match the signatures of "tvb_find_guint8()" and
guy [Thu, 1 Nov 2001 09:53:13 +0000 (09:53 +0000)]
Fix some declarations to match the signatures of "tvb_find_guint8()" and

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

18 years agoAdd an option to show the File Offset of a frame. Not useful for
gram [Thu, 1 Nov 2001 04:00:56 +0000 (04:00 +0000)]
Add an option to show the File Offset of a frame. Not useful for
general packet analyzing, but useful when developing wiretap code or
other such low-level development.
Default preference is *not* to show File Offset.

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

18 years agoDisplay unknown extension types in decimal, not hex (the RFCs give them
guy [Wed, 31 Oct 2001 22:16:25 +0000 (22:16 +0000)]
Display unknown extension types in decimal, not hex (the RFCs give them
in decimal, and the "Extension Type" field is BASE_DEC).

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

18 years agoSupport for Mobile IP's use of ICMP Router Advertisements, from David
guy [Wed, 31 Oct 2001 22:03:53 +0000 (22:03 +0000)]
Support for Mobile IP's use of ICMP Router Advertisements, from David

Small white-space fix.

Display the preference level in router advertisements as signed, not
unsigned, as per RFC 1256, which says it's a "signed, twos-complement

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

18 years agoSigh. Well, if you make the function declarations external, that means
guy [Wed, 31 Oct 2001 10:40:58 +0000 (10:40 +0000)]
Sigh.  Well, if you make the function declarations external, that means
that they're external when the plugin is compiled, and there's no
definition to satisfy the extern, so plugins fail to compile.

Add a "plugins/plugin_api_defs.h" header file that defines them, and
include that in one (and only one) source file for a particular plugin.

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

18 years agoUpdate the code for the DHCP authentication option to match RFC 3118,
guy [Wed, 31 Oct 2001 08:43:09 +0000 (08:43 +0000)]
Update the code for the DHCP authentication option to match RFC 3118,
and update the URL for the DHCP parameter value assignments; support a
code of 90 for DHCP authentication, as that's what RFC 3118 specifies.

Show symbolic values for some of the fields in the DHCP authentication
option, and base the decision on whether to dissect the authentication
data as HMAC-MD5 data on whether that's what the protocol and algorithm
field specified.  Show the replay detection value as a 64-bit number
only if it's specified to be a monotonically-increasing counter;
otherwise, just show it as bytes.

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

18 years agoBug fixes and enhancements to Mobile IP, from David Frascone.
guy [Wed, 31 Oct 2001 07:58:43 +0000 (07:58 +0000)]
Bug fixes and enhancements to Mobile IP, from David Frascone.

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

18 years agoPut "extern" in front of a pile of function declarations.
guy [Wed, 31 Oct 2001 07:47:27 +0000 (07:47 +0000)]
Put "extern" in front of a pile of function declarations.

It makes no difference if they really are function declarations;
however, in plugins, when building on OSes that don't let
dynamically-loaded modules access functions in the main program (e.g.,
Windows), when compiling a plugin, <plugin_api.h> defines the names of
those functions as (*pointer_name), so they turn into declarations of
pointer variables pointing to the functions in question, and, on
platforms with a def/ref model in the linker, if a plugin has more than
one source file that gets linked into the plugin, the linker may get
upset at two definitions of the same variable.

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

18 years agoAdd the Ethereal Web site's mirror of WinPcap to the dialog popped up if
guy [Wed, 31 Oct 2001 07:11:08 +0000 (07:11 +0000)]
Add the Ethereal Web site's mirror of WinPcap to the dialog popped up if
you try to capture on Windows without having WinPcap installed.

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

18 years agoGet rid of a bunch of stuff that was there to support non-tvbuffified
guy [Wed, 31 Oct 2001 05:59:20 +0000 (05:59 +0000)]
Get rid of a bunch of stuff that was there to support non-tvbuffified
dissectors and that's no longer needed.

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

18 years agoFix to desegmentation crash, from Ronnie Sahlberg.
guy [Tue, 30 Oct 2001 22:22:26 +0000 (22:22 +0000)]
Fix to desegmentation crash, from Ronnie Sahlberg.

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

18 years agoPut in a note telling people NOT to use "tvb_get_ntohl()" or
guy [Tue, 30 Oct 2001 21:35:09 +0000 (21:35 +0000)]
Put in a note telling people NOT to use "tvb_get_ntohl()" or
"tvb_get_letohl()" to fetch IPv4 addresses.

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

18 years agoFix a bunch of places where "tvb_get_letohl()" was being used to fetch
guy [Tue, 30 Oct 2001 21:31:15 +0000 (21:31 +0000)]
Fix a bunch of places where "tvb_get_letohl()" was being used to fetch
IP addresses - either use "tvb_memcpy()", or just use
"proto_tree_add_item()" and leave the fetching up to the core Ethereal

In the DVMRP dissector, replace a bunch of other "proto_tree_add_XXX()"
calls with "proto_tree_add_item()", and use
"tvb_reported_length_remaining()" rather than "tvb_length_remaining()"
(if we didn't capture enough data because the snapshot length was too
low, we *want* an exception to be thrown, so that the frame is marked as
a "Short Frame").

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

18 years agoIPv4 addresses should be entered in host byte order, not forced
guy [Tue, 30 Oct 2001 10:40:38 +0000 (10:40 +0000)]
IPv4 addresses should be entered in host byte order, not forced
little-endian byte order.

Use "proto_tree_add_item()" wherever possible.

Get rid of line commented out with a C++ comment, as not all C compilers
accept C++ comments.

Don't put the user name into the protocol tree if it's not there (we
really should do TCP segment reassembly for this, but this is at least a
good first cut).

When checking whether data exists in the packet, use
"tvb_offset_exists()", don't compare the offset in the tvbuf with
"pinfo->len" - "pinfo->len" is the length of the entire packet, not of
the tvbuff.

Fix some references to "pi" to refer to "*pinfo" instead.

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

18 years agoIPv4 addresses should be entered in host byte order, not forced
guy [Tue, 30 Oct 2001 10:18:47 +0000 (10:18 +0000)]
IPv4 addresses should be entered in host byte order, not forced
little-endian byte order.

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

18 years agoSmall fix to previous patch, from Motonori Shindo.
guy [Tue, 30 Oct 2001 10:16:51 +0000 (10:16 +0000)]
Small fix to previous patch, from Motonori Shindo.

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

18 years agoSquelch a GCC complaint.
guy [Tue, 30 Oct 2001 10:15:53 +0000 (10:15 +0000)]
Squelch a GCC complaint.

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

18 years agoFrom Shinsuke Suzuki: fix IPv6 PIM checksum computation code to match
guy [Tue, 30 Oct 2001 10:11:00 +0000 (10:11 +0000)]
From Shinsuke Suzuki: fix IPv6 PIM checksum computation code to match

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

18 years agoIn "u64toa()":
guy [Tue, 30 Oct 2001 08:39:02 +0000 (08:39 +0000)]
In "u64toa()":

If the byte being investigated is 0, don't just do a "continue";
this might be one of the passes on which we have to propagate
carries, so skip the processing of that byte's bits, but fall
through to the carry processing.

In the carry processing loop, don't use "i" as the loop index,
as we're already using it as the outer loop index.

In "u64toh()", use lower-case letters rather than upper-case letters, as
we use "%x" rather than "%X" to print 8, 16, 24, and 32-bit integral
values in the "proto.c" code.

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

18 years agoStop using "tvb_get_ntohll()" and "%llX" in the BOOTP dissector, as the
guy [Mon, 29 Oct 2001 21:56:50 +0000 (21:56 +0000)]
Stop using "tvb_get_ntohll()" and "%llX" in the BOOTP dissector, as the
former depends on having "guint64" and the latter depends on
"%ll[douxX]" being what's used to print 64-bit integers, and there are
platforms on which Etheeal runs that don't have "guint64" or that don't
use "%ll[douxX]" to print 64-bit integers.

Get rid of the routines to extract 64-bit integers into "gint64"s and
"guint64"s, as per Ronnie Sahlberg's suggestion, to discourage people
from writing code that won't work on all platforms; they should be using
FT_UINT64, or the routines in "int-64bit.c", instead.

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

18 years agoConstify arguments and variables.
guy [Mon, 29 Oct 2001 21:53:58 +0000 (21:53 +0000)]
Constify arguments and variables.

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

18 years agoDissector converted to TVBuffers. The changes are originally from
jfoster [Mon, 29 Oct 2001 21:45:12 +0000 (21:45 +0000)]
Dissector converted to TVBuffers. The changes are originally from
Pia Sahlberg <piabar@hotmail.com.

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

18 years agoFrom Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integers
guy [Mon, 29 Oct 2001 21:13:13 +0000 (21:13 +0000)]
From Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integers
without requiring compiler support for them, and updates to the
Diameter, L2TP, NFS, and NLM dissectors to use it and to the ONC RPC
dissector to allow ONC RPC subdissectors to use it.

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

18 years agoUpdates from Mike Frisch to reflect NFSv4 protocol changes.
guy [Mon, 29 Oct 2001 20:49:28 +0000 (20:49 +0000)]
Updates from Mike Frisch to reflect NFSv4 protocol changes.

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

18 years agoThe previous checkin also added PPP compressed datagram support.
guy [Mon, 29 Oct 2001 19:50:53 +0000 (19:50 +0000)]
The previous checkin also added PPP compressed datagram support.

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

18 years agoPPP CCP support, from Motonori Shindo.
guy [Mon, 29 Oct 2001 19:48:45 +0000 (19:48 +0000)]
PPP CCP support, from Motonori Shindo.

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

18 years agoClean up another signed vs. unsigned comparison warning - if
guy [Sun, 28 Oct 2001 01:55:10 +0000 (01:55 +0000)]
Clean up another signed vs. unsigned comparison warning - if
"snprintf()" returns a negative number, that's an error, and we assume
"errno" was set and return NULL, otherwise we cast its return value to
"size_t" and compare it with the size of the buffer we were given, and,
if it was bigger, we know that "snprintf()" didn't generate all the
characters it could be cause they wouldn't have fit, so we set "errno"
to ENOSPC and return NULL.

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

18 years agoInclude <unistd.h>, if we have it, to declare "unlink()".
guy [Sun, 28 Oct 2001 01:51:46 +0000 (01:51 +0000)]
Include <unistd.h>, if we have it, to declare "unlink()".

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

18 years agoCheck, in the configure script in the epan directory, whether we have
guy [Sun, 28 Oct 2001 01:27:59 +0000 (01:27 +0000)]
Check, in the configure script in the epan directory, whether we have
"strptime()" and, if not, define NEED_STRPTIME_H.

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

18 years agoFrom Mike Frisch: Win32 systems don't have "strptime()", so we need to
guy [Sun, 28 Oct 2001 00:57:15 +0000 (00:57 +0000)]
From Mike Frisch: Win32 systems don't have "strptime()", so we need to
use a replacement "strptime()" on those systems, and thus need to
include "strptime.h" to declare "strptime()".

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

18 years ago"ftypes" and "dfilter" should depend on "config.h", so that if it
guy [Sun, 28 Oct 2001 00:52:28 +0000 (00:52 +0000)]
"ftypes" and "dfilter" should depend on "config.h", so that if it
doesn't exist, or is out of date with respect to "config.h.win32", it's
remade - stuff in "ftypes" and "dfilter" includes "config.h", and it
should get the "config.h" in "epan".

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

18 years agoSection D.4.3 "Generating Cryptographic authentication" of RFC 2328 says
guy [Sat, 27 Oct 2001 00:47:26 +0000 (00:47 +0000)]
Section D.4.3 "Generating Cryptographic authentication" of RFC 2328 says
that, when using cryptographic authentication, "The checksum field in
the standard OSPF header is not calculated, but is instead set to 0";
treat a packet checksum value of 0 as meaning "no checksum present".

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

18 years agoHandle the 1.3 and 1.4 Content-Type values in WSP, from Tom Uijldert.
guy [Fri, 26 Oct 2001 19:14:51 +0000 (19:14 +0000)]
Handle the 1.3 and 1.4 Content-Type values in WSP, from Tom Uijldert.

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

18 years agoFix the rest of the signed/unsigned comparison warnings.
gram [Fri, 26 Oct 2001 18:28:17 +0000 (18:28 +0000)]
Fix the rest of the signed/unsigned comparison warnings.

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

18 years agoFix some signed/unsigned comparison warnings. In the case of tvbuff.h,
gram [Fri, 26 Oct 2001 17:29:12 +0000 (17:29 +0000)]
Fix some signed/unsigned comparison warnings. In the case of tvbuff.h,
there were 2 functions which accepted 'maxlength' == -1, but the function
prototypes had maxlength as a guint --- fixed.

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

18 years agoMake the protocol ID argument to "dissect_transform()" an "int", and
guy [Fri, 26 Oct 2001 10:30:16 +0000 (10:30 +0000)]
Make the protocol ID argument to "dissect_transform()" an "int", and
pass -1 in the cases where it's not called from "dissect_proposal()",
i.e. where there *is* no protocol ID to pass it, and have it dissect
the transform ID only as a number if the protocol ID isn't one of the
ones we know about.

Give the payload dissectors other than "dissect_transform()" an extra
"int" argument, so that their signature is the same as that of
"dissect_transform()", put "dissect_transform()" back in the
"strfuncs[]" table, and get rid of the special-casing of
"dissect_transform()" in "dissect_payloads()".

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

18 years agoIn "get_pointer_value()", don't include the terminating '\0' when
guy [Fri, 26 Oct 2001 10:14:43 +0000 (10:14 +0000)]
In "get_pointer_value()", don't include the terminating '\0' when
formatting the string as text.

In "add_pointer_param()", make the offset in the text item for the
string the offset in the string area, not the offset of the pointer

Fix some items in item lists to have "lm_null" rather than a null
pointer, so that if we don't find an entry for the detail level, we
don't blow up dereferencing a null pointer, we just dissect all the
items based on the type in the descriptor string.

If we don't have a data descriptor for response data, just put in an
entry for the data; that may happen if we only dissected part of the
request to which the stuff we're dissecting is a reply, e.g. because the
snapshot length didn't let us capture all of the request.

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

18 years agoGuard against erroneously calculating a negative length during the
gram [Fri, 26 Oct 2001 02:55:20 +0000 (02:55 +0000)]
Guard against erroneously calculating a negative length during the
processing of sub-options.

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

18 years agoFix improper uses of proto_tree_add_item(). When possible, switch to
gram [Fri, 26 Oct 2001 02:09:01 +0000 (02:09 +0000)]
Fix improper uses of proto_tree_add_item(). When possible, switch to
using proto_tree_add_item().

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

18 years agoWe no longer try to dissect payloads of type "None", so get rid of
guy [Thu, 25 Oct 2001 23:51:26 +0000 (23:51 +0000)]
We no longer try to dissect payloads of type "None", so get rid of

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

18 years agoLoop over all the sub-payloads of a Security Association payload; make a
guy [Thu, 25 Oct 2001 23:40:28 +0000 (23:40 +0000)]
Loop over all the sub-payloads of a Security Association payload; make a
common routine that loops over payloads.

Have that routine check for a payload of type "None", which means that
there's extra data after a payload that claimed to be the last one (by
virtue of having a next payload type of "None").

When dissecting a Security Association payload, make sure we have enough
data for the Domain of Interpretation field before putting it into the
tree, dissect the situation as a 4-byte quantity followed by a set of
sub-payloads only of the DOI is "IPSEC" (otherwise dissect it as raw
data), and make sure we have enough data for the 4-byte situation field
before putting it into the tree.

When dissecting a Proposal payload, show the raw bytes of the SPI.

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

18 years agoDon't try to dissect a gnutella sub-header if the length of the sub-header
gram [Thu, 25 Oct 2001 21:25:51 +0000 (21:25 +0000)]
Don't try to dissect a gnutella sub-header if the length of the sub-header
is 0.

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

18 years agoGuard against 'size' being too small; the value comes from the packet,
gram [Thu, 25 Oct 2001 21:00:34 +0000 (21:00 +0000)]
Guard against 'size' being too small; the value comes from the packet,
so it can be corrupt.

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

18 years agoInterface type 0x07 is Ethernet.
gram [Thu, 25 Oct 2001 20:36:26 +0000 (20:36 +0000)]
Interface type 0x07 is Ethernet.

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

18 years agoGet rid of signed/unsigned comparison warnings in wiretap.
gram [Thu, 25 Oct 2001 20:29:24 +0000 (20:29 +0000)]
Get rid of signed/unsigned comparison warnings in wiretap.

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

18 years agoUpdate from Frank Singleton:
guy [Thu, 25 Oct 2001 19:57:06 +0000 (19:57 +0000)]
Update from Frank Singleton:

 - Handle "short" as a union discriminant type
 - Handle case where union discriminant may be a typedef
 - Change integer template to long template
 - Initial code for \n and \t as  union case labels.

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

18 years agoUse "g_warning" to print warning messages from "pcap_open_live()", as
guy [Thu, 25 Oct 2001 08:06:15 +0000 (08:06 +0000)]
Use "g_warning" to print warning messages from "pcap_open_live()", as
that should cause it to show up in a console window if run from Ethereal
on Windows.

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

18 years agoHandle "pcap_open_live()" succeeding but returning a warning; print the
guy [Thu, 25 Oct 2001 06:41:48 +0000 (06:41 +0000)]
Handle "pcap_open_live()" succeeding but returning a warning; print the
warning before the capture starts.

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

18 years agoFix compile errors and code errors in the Win32 code.
guy [Wed, 24 Oct 2001 09:22:23 +0000 (09:22 +0000)]
Fix compile errors and code errors in the Win32 code.

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

18 years agoHave a routine that takes a file name for a personal configuration file
guy [Wed, 24 Oct 2001 07:18:39 +0000 (07:18 +0000)]
Have a routine that takes a file name for a personal configuration file
and generates the path name; have it, if the file is to be opened for
reading on Win32, check whether it exists and, if not, check for it in
the old home directory-based configuration directory and, if so, return
that path instead, so that files saved with earlier versions of Ethereal
will be seen.

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

18 years agoOn Windows, put Ethereal configuration files under the "Application
guy [Wed, 24 Oct 2001 06:13:07 +0000 (06:13 +0000)]
On Windows, put Ethereal configuration files under the "Application
Data\Ethereal" directory under the user's profile, as that appears to be
the Windows 2000 standard.

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

18 years agoShow parameter types in hex.
guy [Tue, 23 Oct 2001 20:14:20 +0000 (20:14 +0000)]
Show parameter types in hex.

Make enumerated types be fields with a value_string table, so that you
can filter on them by name.

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

18 years agoIn some versions of GRE, you can have ACK-only packets; if a packet
guy [Tue, 23 Oct 2001 19:02:59 +0000 (19:02 +0000)]
In some versions of GRE, you can have ACK-only packets; if a packet
doesn't have the S bit set, check whether it has any payload before
attempting to hand off the payload to the next dissector.

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

18 years agoInclude <direct.h> on Windows systems, to declare "mkdir()".
guy [Tue, 23 Oct 2001 08:15:11 +0000 (08:15 +0000)]
Include <direct.h> on Windows systems, to declare "mkdir()".

On Windows, put the ".ethereal" directory under the user profile
directory rather than the home directory.

Update the documentation to reflect that, and to fix other out-of-date
information, as well as some typos.

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

18 years agoWhen putting protocols into the list of protocols, do a case-insensitive
guy [Tue, 23 Oct 2001 05:40:36 +0000 (05:40 +0000)]
When putting protocols into the list of protocols, do a case-insensitive

Give iSCSI the short name "iSCSI" rather than "ISCSI".

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

18 years agoFix some field names to begin with "iua", not "hf".
guy [Tue, 23 Oct 2001 05:23:58 +0000 (05:23 +0000)]
Fix some field names to begin with "iua", not "hf".

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

18 years agoAdd a new routine to create the ".ethereal" directory for a user.
guy [Tue, 23 Oct 2001 05:01:02 +0000 (05:01 +0000)]
Add a new routine to create the ".ethereal" directory for a user.

Use that routine rather than duplicating that code in the routines to
write out the preference file and filter files.

Use it in the code for the color filter dialog, so that the directory in
question is created if necessary.

As that routine returns an error indication, have the code that calls
that routine put up a message box if the attempt fails.

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

18 years agoAdditional items for RADIUS tunnels, from Pavel Novotny.
guy [Tue, 23 Oct 2001 04:11:58 +0000 (04:11 +0000)]
Additional items for RADIUS tunnels, from Pavel Novotny.

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

18 years agoInclude <stdio.h> to declare "sprintf()".
guy [Tue, 23 Oct 2001 03:40:39 +0000 (03:40 +0000)]
Include <stdio.h> to declare "sprintf()".

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

18 years agoThe only reason we care about the user's home directory is that their
guy [Mon, 22 Oct 2001 23:16:01 +0000 (23:16 +0000)]
The only reason we care about the user's home directory is that their
".ethereal" directory is under it; get rid of "get_home_dir()", and put
its code inside "get_persconffile_dir()".  (The personal configuration
file directory may move, on Windows, to the user's profile directory.)

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

18 years agoAdd a routine to get the directory in which personal configuration files
guy [Mon, 22 Oct 2001 22:59:26 +0000 (22:59 +0000)]
Add a routine to get the directory in which personal configuration files
reside.  Use it, rather than concatenating the user's home directory and
".ethereal" in a number of files.

Fix up some additional places to use G_DIR_SEPARATOR_S as the pathname

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

18 years agoFix Martti Kuparinen's e-mail address, as per his request.
guy [Mon, 22 Oct 2001 21:05:15 +0000 (21:05 +0000)]
Fix Martti Kuparinen's e-mail address, as per his request.

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

18 years agoFrom Yaniv Kaul - handle UDP-encapsulated IPSec NAT Keepalive packets.
guy [Mon, 22 Oct 2001 20:45:58 +0000 (20:45 +0000)]
From Yaniv Kaul - handle UDP-encapsulated IPSec NAT Keepalive packets.

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

18 years agoFrom Georg von Zezschwitz: fix an uninitialized variable, dissect the
guy [Mon, 22 Oct 2001 20:37:51 +0000 (20:37 +0000)]
From Georg von Zezschwitz: fix an uninitialized variable, dissect the
S-max-age value in Cache-Control headers, and handle the 1.1, 1.3, and
1.4 encoding of Cache-Control headers.

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

18 years agoUse G_DIR_SEPARATOR_S rather than "/" as a pathname separator in format
guy [Sun, 21 Oct 2001 21:56:05 +0000 (21:56 +0000)]
Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in format
strings used to generate pathnames.

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

18 years agoUse G_DIR_SEPARATOR_S rather than "/" as a pathname separator in format
guy [Sun, 21 Oct 2001 21:48:00 +0000 (21:48 +0000)]
Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in format
strings used to generate pathnames.

Move the definition of PF_DIR from <epan/epan.h> to <epan/filesystem.h>,
so that files requiring only the definition of PF_DIR don't have to
include <epan/epan.h>, and get rid of no-longer-necessary includes of

Add a routine to get the directory for "system files" such as
"/etc/ethers" - it's "/etc" on UNIX, and the datafile directory on
Windows (as there's no "/etc" on Windows).  Use that to construct the
pathname of the ethers and ipxnet files.

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

18 years agoOn Windows, get the "ethers" and "ipxnets" file from the directory in
guy [Sun, 21 Oct 2001 19:54:49 +0000 (19:54 +0000)]
On Windows, get the "ethers" and "ipxnets" file from the directory in
which the Ethereal binary is found; there's no notion of "/etc" or of
"/etc/ethers" or "/etc/ipxnets" files on Windows.

Update the documentation to reflect that, and fix a typo in the Ethereal
and Tethereal man pages.

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