Commit Graph

4012 Commits

Author SHA1 Message Date
Guy Harris 0e68611e41 From Thomas Wittwer: add "prefs_register_string_preference()" to the
list of functions available to plugins.

svn path=/trunk/; revision=3906
2001-09-04 01:05:41 +00:00
Guy Harris 32b1270b4d Change from Thomas Wittwer to register HTTP dissector by name, for other
dissectors to call.

svn path=/trunk/; revision=3905
2001-09-04 01:01:48 +00:00
Guy Harris 1a2d09a302 Use cURL's strategy for parsing 227 responses.
Add comments noting the IPv6 issues for PASV responses.

When adding the FTP dissector for the FTP port, give its protocol as
"proto_ftp", not "proto_ftp_data".

svn path=/trunk/; revision=3904
2001-09-03 20:52:25 +00:00
Guy Harris 14eb1cb5fa Use "tvb_reported_length_remaining()" to check whether there's data left
in the packet; this eliminates a signed vs. unsigned comparison warning
in GCC.

svn path=/trunk/; revision=3903
2001-09-03 18:05:57 +00:00
Guy Harris 554eb35fcf Get rid of a no-longer-used #define.
svn path=/trunk/; revision=3902
2001-09-03 17:57:17 +00:00
Guy Harris 3388bde488 Instead of having a single datum attached to a conversation, have a list
of protocol-id-plus-datum pairs, so that multiple protocols can attach
information to the same conversation.

Dissectors that attach information to a conversation should not assume
that if they find a conversation it has one of its data attached to it;
the conversation might've been created by another dissector.

svn path=/trunk/; revision=3901
2001-09-03 10:33:12 +00:00
Guy Harris 31f2f8cabb Squelch some compiler warnings.
svn path=/trunk/; revision=3900
2001-09-03 08:27:56 +00:00
Guy Harris ab5d4fcca0 Squelch some compiler warnings.
svn path=/trunk/; revision=3899
2001-09-03 08:19:12 +00:00
Guy Harris 24ddb0198b Make routines that are passed an unsigned integer as their last argument
have an unsigned integer as that argument; this squelches some compiler
warnings, and it's the right thing to do in any case.

Don't check whether an unsigned integer value is > 0 - that's the same
as checking whether it's != 0.

svn path=/trunk/; revision=3898
2001-09-03 08:10:46 +00:00
Guy Harris f6c33914fe Don't pass wildcarded arguments to "find_conversation()" to routines
that look up conversations in hash tables, unless they are arguments
that will be ignored; if they're not being ignored, then if the argument
is a null pointer you may get a crash if it's dereferenced, and if it's
not a null pointer you'll only get a match if the conversation has
whatever stuff the arguments points to as its first address or port.

If you match a conversation with a wildcarded address and/or port, and
the address and/or port matched a non-wildcarded search argument, and
the conversation is for a connection-oriented transport protocol, set
the wildcarded address and/or port for the conversation to the value
that matched it.

svn path=/trunk/; revision=3897
2001-09-03 07:31:20 +00:00
Guy Harris c21d49795d Get the IP address, as well as the port, from a PASV reply, and use it
rather than the address from which the PASV reply came when setting up a
conversation.

Don't compare the reply code with "227" unless the reply code is 3
characters long.

Set up the conversation for a PASV response only if we haven't already
processed the packet (and thus haven't already set up the conversation).

svn path=/trunk/; revision=3896
2001-09-03 03:12:01 +00:00
Guy Harris 88cebea17c Fix up the handling of data after the first token on the line.
svn path=/trunk/; revision=3895
2001-09-03 02:41:31 +00:00
Guy Harris 11e21f0f8c Parse the address as well as the port in a PASV response.
Don't have two separate pieces of code that look at the response code of
a response.

svn path=/trunk/; revision=3894
2001-09-03 02:32:10 +00:00
Guy Harris 2c9de0038c In "find_conversation()", do the same type of matching that
"try_conversation_dissector()" does - start with as exact matches as
possible, and then start doing wildcarding - so that it can find
conversations with wildcard addresses or ports even if both address and
port arguments are supplied to it.

svn path=/trunk/; revision=3893
2001-09-03 00:26:31 +00:00
Guy Harris ecb162ee80 Handle, as best we can, the case where the authentication flavor is
GSS-API but the RPCSEC_GSS procedure and service information isn't
available in the captured data.

svn path=/trunk/; revision=3892
2001-09-02 23:57:33 +00:00
Guy Harris 3ad3db9658 Don't attempt to fetch the authentication flavor from a call if it's not
available - just mark it as "authentication flavor unknown".  Don't
dissect the next protocol if the authentication flavor is unknown.

This lets us get some more work done on short frames (although if you
really want to analyze ONC RPC traffic, you should make the snapshot
length large enough to capture enough of the frames).

svn path=/trunk/; revision=3891
2001-09-02 22:49:56 +00:00
Uwe Girlich 9088f16241 Some new commands added. I found them in a recent trace of Q3A 1.27g.
svn path=/trunk/; revision=3890
2001-09-01 14:47:48 +00:00
Guy Harris 8d31fd0690 From Frank Singleton: add some missing includes of <string.h>.
svn path=/trunk/; revision=3889
2001-08-31 19:47:10 +00:00
Guy Harris 2bd9e2c314 Changes from Frank Singleton to add entries for "packet-coseventcomm" to
the lists of source and generated files for plugins.

While we're at it, make all those lists show the files in the same
order.

svn path=/trunk/; revision=3888
2001-08-31 19:46:14 +00:00
Guy Harris ef787a1d84 Update the documentation to reflect the fact that the arguments to
"conversation_new()" and "find_conversation()" do not have fixed
identities as source and destination addresses, and to reflect the name
changes we made to arguments and flags to dispel any notion that they
had such fixed identities.

svn path=/trunk/; revision=3887
2001-08-31 09:04:36 +00:00
Olivier Abad 987acc38a8 Patch from Frank Singleton :
- Use only basename of CORBA IDL file to generate the dissector
  name, and not the fullpath name. Allows idl2eth to generate
  valid "C" code no matter where the IDL file lives (doh!)

svn path=/trunk/; revision=3886
2001-08-30 19:31:53 +00:00
Olivier Abad e76642f9c7 Patches from Frank Singleton :
- update idl2eth man page , now that "unions" are implemented ;
- support for idl2eth man page installation.

svn path=/trunk/; revision=3885
2001-08-30 19:25:39 +00:00
Guy Harris 5715a48382 RPCSEC_GSS fixes, from Mike Frisch.
svn path=/trunk/; revision=3884
2001-08-30 18:33:30 +00:00
Guy Harris c6e93ed482 Update from Yaniv Kaul to dissect UDP-encapsulated AH and to register
the ISAKMP dissector to be called for TCP port 500.

svn path=/trunk/; revision=3883
2001-08-30 02:23:17 +00:00
Guy Harris 1950443fba Call the ESP dissector regardless of whether "tree" is non-null or not.
svn path=/trunk/; revision=3882
2001-08-29 09:02:37 +00:00
Guy Harris a0d0d364b1 Support for UDP encapsulation of IPSec packet draft, from Yaniv Kaul.
svn path=/trunk/; revision=3881
2001-08-29 08:12:32 +00:00
Guy Harris fbe8da33f5 Add a "proto_item_append_text()" routine, which is like
"proto_item_set_text()" except that it appends the result of the
formatting to the item's current text, rather than replacing the item's
current text.  Use it in the DNS dissector.

svn path=/trunk/; revision=3880
2001-08-29 00:51:10 +00:00
Guy Harris aa4cd01b9b Get rid of "proto_tree_add_notext()" - if you create a subtree using it,
but, before you set the text, you throw an exception while putting stuff
under the subtree, you end up with an absolutely blank protocol tree
item, which is really gross.  Instead of calling
"proto_tree_add_notext()", call "proto_tree_add_text()" with at least a
minimal label - yes, it does mean you do some work that will probably be
unnecessary, but, absent a scheme to arrange to do that work if it *is*
necessary (e.g., catching exceptions), the alternative is an ugly
protocol tree display.

svn path=/trunk/; revision=3879
2001-08-28 08:28:19 +00:00
Guy Harris d9019638ee Free allocated memory as soon as we're done with it. In many cases,
this obviates the need to add cleanup handlers for exceptions, if we
move a free call so that there are no tvbuff references between the
allocation and the free.  Checking for that also found some cases where
frees were missing, and one loop where a call was made to allocate stuff
but the free was only done after the exit from the loop.

In cases where we can't move the free up above tvbuff references,
register cleanup handlers, and replace the free with
CLEANUP_CALL_AND_POP.

Eliminate some initializations of pointers to null - the initializations
aren't necessary (or ceased to be necessary after the frees were moved
up).

In the "force an exception" code in "get_CDR_octet_seq()", touch the
first byte after the string, to make it more likely that we'll throw the
correct exception (e.g., throw a "past end of captured data" exception
rather than a "past end of data" exception).

There's no need for "get_CDR_string()" to force an exception, as it just
calls "get_CDR_octet_seq()", which will do it for us.

However, as the result of "get_CDR_string()" is often processed as a
string, if the length is 0 it should just "g_strdup()" a null string,
rather than not doing anything (and relying on the pointer variable
being initialized to null).  It's not always safe to treat a null
pointer as if it pointed to a string (in fact, it is often most
definitely unsafe).

svn path=/trunk/; revision=3878
2001-08-28 07:19:47 +00:00
Guy Harris 9cef3b28ad Put in a comment noting that the "Service" string in a Tree Connect and
X reply is always in ASCII.

svn path=/trunk/; revision=3877
2001-08-27 23:17:30 +00:00
Guy Harris a7f16a41d9 Handle the "Native File System" string in a TconX response as ASCII or
Unicode based on whether strings in the SMB are ASCII or Unicode.

svn path=/trunk/; revision=3876
2001-08-27 20:15:30 +00:00
Guy Harris d4b447c972 Add "idl2eth.1" to the list of files to ignore in CVS; it's a generated
file.

svn path=/trunk/; revision=3875
2001-08-27 20:05:16 +00:00
Guy Harris b39d788d91 Squelch some compiler warnings.
svn path=/trunk/; revision=3874
2001-08-27 20:04:21 +00:00
Guy Harris e18fdae9b6 Use the descriptor strings when dissecting remote APIs; this lets us
handle null pointer entries, and lets us make the dissection of those
APIs more table-driven.

svn path=/trunk/; revision=3873
2001-08-27 09:09:36 +00:00
Guy Harris dee3661ce3 Label the protocol as the "Microsoft Windows Lanman Remote API
Protocol", not just the "Microsoft Windows Lanman Protocol"; LAN Manager
had a number of protocols layered atop SMB, and this is the one used for
remote execution of various APIs.

svn path=/trunk/; revision=3872
2001-08-27 08:42:26 +00:00
Guy Harris 37f355caf5 Show the Capabilities field in a Session Setup and X request as a 32-bit
value.

Put in a comment noting what may be *another* bug in some versions of
Windows when constructing Session Setup and X requests.

svn path=/trunk/; revision=3871
2001-08-27 07:56:49 +00:00
Guy Harris 1e55187184 Show buffer formats symbolically as well as numerically.
svn path=/trunk/; revision=3870
2001-08-27 06:18:24 +00:00
Guy Harris 5c87d84946 Fix a number of SMB dissectors to correctly handle ASCII and Unicode
strings, based on whether the "strings are Unicode" bit is set in the
SMB header or not.

svn path=/trunk/; revision=3869
2001-08-27 05:52:06 +00:00
Guy Harris 44fb959e81 Make a routine to handle fetching strings that are Unicode or ASCII
depending on the setting of the "Strings are Unicode" bit in the SMB.

Correctly handle Unicode strings in Session Setup and X and Tree Connect
and X messages.

Always display the Word Count and Byte Count fields of a Session Setup
and X message, regardless of whether we recognize the word count value
as one we can handle or not.

Correctly handle Session Setup and X messages if extended security
exchanges are being used.

Decode the (known) bits of the Action field in an Session Setup and X
message, and the (known) bits of the optional flags field of a Tree
Connect and X message.  Show the optional flags field as a 16-bit hex
quantity.

svn path=/trunk/; revision=3868
2001-08-27 04:45:39 +00:00
Guy Harris 606d363a9b The return value from "fwrite()" is a "size_t"; make the variable into
which we store it a "size_t", and then fix up the bugs that were
revealed by the compiler warnings that produced - "fwrite()" returns 0,
not a negative number, on an I/O error.

Fix up some other items to have type "size_t", or to have various
unsigned types, while we're at it, to squelch compiler warnings.

svn path=/trunk/; revision=3867
2001-08-25 03:18:48 +00:00
Guy Harris 837e848329 Sigh. Shomiti apparently didn't know that the RFC 1761 data link types
were just DLPI data link types, and didn't know that the list had
expanded at some point and that Sun *used* some of the new types (e.g.,
in atmsnoop), or decided on their own to go beyond those types to encode
an Oh-So-Useful link speed indication, or just didn't *care* that they
were just DLPI data link types.

Therefore, we have to map Shomiti link types to wiretap types using a
different mapping table.  For now, we assume files with a version number
of 2 are snoop files, and version numbers of 3, 4, and 5 are Shomiti
files; Shomiti claims to use a version number of 2 as well, but to
determine whether a file with a version number of 2 is a snoop file or a
Shomiti file requires that we look at the header of the first packet and
assume that if there's more than 3 bytes of padding it's a Shomiti file.

The return value from "fwrite()" is a "size_t"; make the variable into
which we store it a "size_t", and then fix up the bugs that were
revealed by the compiler warnings that produced - "fwrite()" returns 0,
not a negative number, on an I/O error.

svn path=/trunk/; revision=3866
2001-08-25 02:56:31 +00:00
Guy Harris ecccb6e061 "sip_is_request()" is intended to indicate whether a given SIP packet is
a request or reply; make its return value "gboolean", and have it just
return TRUE or FALSE.  Also make an array index variable unsigned, to
squelch a GCC warning.

Support for additional SIP methods, from Jean-Francois Mule.

svn path=/trunk/; revision=3865
2001-08-23 00:18:57 +00:00
Guy Harris 7111f83013 Fixes from Hannes Gredler.
svn path=/trunk/; revision=3864
2001-08-22 18:00:40 +00:00
Guy Harris 4d5ab5490b Additional AVPs, and Event-Timestamp support, in RADIUS, from Terje
Krogdahl.

svn path=/trunk/; revision=3863
2001-08-21 18:56:15 +00:00
Guy Harris 4dd604972b Plug a memory leak.
svn path=/trunk/; revision=3862
2001-08-21 09:11:59 +00:00
Guy Harris 973552df3e Fix some Win32 compilation warnings and errors.
svn path=/trunk/; revision=3861
2001-08-21 08:16:54 +00:00
Guy Harris d7973c6ede Fix a typo.
svn path=/trunk/; revision=3860
2001-08-21 07:03:50 +00:00
Guy Harris d750018d49 The zlib that comes with XFree86 isn't a "mini-zlib", it's an older
version; fix some comments and fix the error message printed if we
detect it.

svn path=/trunk/; revision=3859
2001-08-21 06:52:25 +00:00
Guy Harris 9d601c6799 On Windows, use the directory in which the binary resides as the
directory in which global data files are stored.  If an installed binary
is being run, that's the correct directory for them; if a build-tree
binary is being run, the "manuf" file will be there, and you can put
other data files there as well, if necessary.

Do the same with plugins, except that, if there's no
"plugins\\{version}" subdirectory of that directory, fall back on the
default installation directory, so you at least have a place where you
can put plugins for use by build-tree binaries.  (Should we, instead,
have the Windows build procedure create a subdirectory of the "plugins"
source directory, with the plugin version number as its name, and copy
the plugins there, so you'd use the build-tree plugin binaries?)

Move "test_for_directory()" out of "util.c" and into
"epan/filesystem.c", with the other file system access portability
wrappers and convenience routines.  Fix "util.h" not to declare it - or
other routines moved to "epan/filesystem.c" a while ago.

svn path=/trunk/; revision=3858
2001-08-21 06:39:18 +00:00
Gilbert Ramirez aacb4d90f0 Use system's version of AM_PATH_GLIB macro.
Optimize use of AC_CHECK_FUNC in wiretap/acinclude.m4
Move #include "config.h" to be first include in some files.
From albert chin (china@thewrittenword.com)

svn path=/trunk/; revision=3857
2001-08-20 15:23:34 +00:00