Commit Graph

4788 Commits

Author SHA1 Message Date
Guy Harris ac7e3b7f93 From Heikki Vatiainen: make "get_host_ipaddr()" require dotted-quad IP
addresses to really be quads, i.e. have four numbers.

svn path=/trunk/; revision=4854
2002-03-03 21:42:54 +00:00
Guy Harris 2c3d2f6db0 Report ASN.1 BER parsing errors closer to the point at which they're
detected, so we do a better job of reporting the item with the problem.

svn path=/trunk/; revision=4853
2002-03-03 01:26:01 +00:00
Guy Harris dae2c9c510 As there's nothing to dissect for LDAP_REQ_UNBIND, set "ret" to
ASN1_ERR_NOERROR, as you can't have a dissection error if you've
dissected nothing.

When dissecting a Bind reply, set "ret" to the return value of
"dissect_ldap_response_bind()", so errors get reported properly.

svn path=/trunk/; revision=4851
2002-03-02 21:51:52 +00:00
Guy Harris 09ed04f29b Don't check the message type if it's not of class ASN1_APL; instead,
just display the message type and body as an error.

If the message type isn't a type we dissect, display the "Unknown
message type" entry with the right offset and length.

svn path=/trunk/; revision=4850
2002-03-02 21:28:19 +00:00
Guy Harris c6a1c88214 Treat LDAP_REQ_UNBIND as a request with nothing in it, not as an unknown
request type.

Put the request types in order in the switch statement.

svn path=/trunk/; revision=4849
2002-03-02 21:07:31 +00:00
Guy Harris 52fb615708 From Joerg Mayer: get rid of "-Wno-unused" flag in some configure
scripts, and check in changes to add _U_ to some unused arguments (some
other should perhaps be used, so we leave the _U_ out so that the
warnings serve as a reminder to check those).

svn path=/trunk/; revision=4848
2002-03-02 20:51:46 +00:00
Guy Harris 761ae95b19 From Joerg Mayer: get rid of "-Wno-unused" flag in some configure
scripts, and check in changes to add _U_ to some unused arguments (some
other should perhaps be used, so we leave the _U_ out so that the
warnings serve as a reminder to check those).

svn path=/trunk/; revision=4847
2002-03-02 20:41:08 +00:00
Guy Harris 95ee7f0ac1 Tell people not to use "ulong" or "ushort".
svn path=/trunk/; revision=4845
2002-03-02 07:56:16 +00:00
Guy Harris ceb7646a79 From Michael Tuexen: update the CRC32 checksum code to match
draft-ietf-tsvwg-sctpcsum-03.

svn path=/trunk/; revision=4844
2002-03-02 07:29:10 +00:00
Guy Harris 6dacf7e132 Typo fix, from Michael Tuexen.
svn path=/trunk/; revision=4843
2002-03-02 07:23:56 +00:00
Guy Harris 6472a33533 "ulong" isn't defined on MacOS X (and probably isn't defined on some
other platforms, either) - don't use it.  Instead, use "guint32", as the
item in question is a 32-bit unsigned integer.

In fact, it's a 32-bit unsigned integer containing a bit set, and the
data type isn't a "long", so print it with "0x%08x", rather than
"0x%04lx", so that all 8 hex digits are printed, and so that the format
matches the data type.

It also doesn't have to be initialized - the only code path in which
it's used sets it.

svn path=/trunk/; revision=4842
2002-03-02 07:22:20 +00:00
Guy Harris eae952ee35 Updates from Mike Frisch.
svn path=/trunk/; revision=4840
2002-03-01 22:14:22 +00:00
Ashok Narayanan defeed858d Added RSVP support for the Administrative Status object.
svn path=/trunk/; revision=4839
2002-03-01 21:39:01 +00:00
Guy Harris 37c1109287 Fix two references to "proto_item_set_text()" and
"proto_item_append_text()" to use the right names.

svn path=/trunk/; revision=4838
2002-03-01 20:19:44 +00:00
Guy Harris 56be333a81 From Andrew Feren: add ifdefs to the top-level Makefile.nmake to avoid
using Python if PYTHON isn't defined.

Fix up white space.

svn path=/trunk/; revision=4837
2002-03-01 06:52:14 +00:00
Gerald Combs 00c17fb92b Don't link with the SNMP library by default.
svn path=/trunk/; revision=4836
2002-03-01 03:42:13 +00:00
Guy Harris 1504859258 Have the routines that supply a pointer to a newly-constructed item
always set that pointer if they return ASN1_ERR_NOERROR.  Have the
routines that call them use the value only if the routine returns
ASN1_ERR_NOERROR.  Don't bother setting the pointer before calling the
routine.

Report unknown modify operation types.

svn path=/trunk/; revision=4834
2002-03-01 03:02:36 +00:00
Guy Harris d8a08e186c Add a routine to "asn1.c" to translate ASN1_ERR_ values to strings. Use
that in the SNMP dissector.

Check the return values of ASN.1 routines in the LDAP dissector, and
have all the subroutines in that disesctor that can return error
indications return ASN1_ERR_ values.

Have the routines that can supply a pointer to a newly-created
protocol-tree item use the right type for items ("proto_item *", not
"proto_tree *", even though they are, at least currently, typedefs for
the same type), and use "proto_item" for the type of the item a pointer
to which is passed to those routines.

Before calling those routines, set the item pointer to null, in case the
routine fails.

Don't check the return value of "parse_filter_strings()" against -1 -
that routine can't return -1.

svn path=/trunk/; revision=4833
2002-03-01 02:48:10 +00:00
Guy Harris 84b6b76cf3 Improve the note on how to deal with items with subtrees when the text
for the item should reflect what's in the subtree.

svn path=/trunk/; revision=4832
2002-02-28 23:23:12 +00:00
Guy Harris 02a0666ce9 Handle NBSS messages where the NBSS *header* is split across TCP segment
boundaries.

svn path=/trunk/; revision=4831
2002-02-28 23:09:03 +00:00
Gilbert Ramirez d96747f550 In follow.c, initialize data_out_file to NULL, as it used to
be initialized in gtk/follow_dlg.c

In gtk/follow_dlg.c, declare data_out_file as 'extern'.

In tethereal.c, no longer define 'data_out_file', as the storage
for it is now in follow.c.

svn path=/trunk/; revision=4830
2002-02-28 19:35:09 +00:00
Gilbert Ramirez 12832ed6df Declare osinl_subdissector_table as 'extern'.
svn path=/trunk/; revision=4829
2002-02-28 19:24:24 +00:00
Guy Harris df4072814f Fix the declaration of "addr_call_dissector" to match the function
signature of "call_dissector()".

svn path=/trunk/; revision=4828
2002-02-27 21:26:37 +00:00
Gilbert Ramirez 2e6ded0440 Remove unused variables, structure definitions, and functions.
From Joerg Mayer.

svn path=/trunk/; revision=4827
2002-02-27 18:54:33 +00:00
Guy Harris b1f0163ef0 Support for IEEE 802.1w RST BPDUs, from Alex Ruzin.
svn path=/trunk/; revision=4825
2002-02-27 10:03:10 +00:00
Guy Harris b4971b39bf From Joerg Mayer:
In the "configure.in" files, add

		-D_U_="__attribute__((unused))"

	to CFLAGS if we're using GCC, and add

		-D_U_=""

	otherwise, so _U_ can be used to mark arguments as unused.

Add -D_U_="" arguments to the Makefile.nmake files as well, so _U_ works
with Microsoft Visual C++ as well.

Add comments and RCS IDs to the Makefile.nmake files that don't already
have them.

svn path=/trunk/; revision=4824
2002-02-27 09:42:52 +00:00
Guy Harris cbf5c537c4 From Joerg Mayer: remove unused variables and declarations of
non-existent functions.

Remove the "filetype" argument from the "can_write_encap" functions for
particular capture file types - the argument value is implicit, in that
the routine being called is the routine for that particular file type.

svn path=/trunk/; revision=4823
2002-02-27 08:57:25 +00:00
Guy Harris 03e5890761 Label the data source for various forms of reassembled data with the
protocol that fragmented them, rather than just calling them
"Reassembled".  Do the same with uncompressed WCP data.

svn path=/trunk/; revision=4822
2002-02-27 05:45:48 +00:00
Tim Potter 6bb9d7eaf8 Display a different message in the COL_INFO field for anonymous session
setup packets.

svn path=/trunk/; revision=4818
2002-02-27 02:42:19 +00:00
Guy Harris a3d5f0a6f2 From John Mackenzie: register GIOP dissector as a UDP heuristic
dissector.

svn path=/trunk/; revision=4817
2002-02-27 00:30:22 +00:00
Guy Harris c1333b7964 Fix "create_dissector_handle()" to properly create a handle for an
old-style dissector.

svn path=/trunk/; revision=4816
2002-02-27 00:26:29 +00:00
Guy Harris 92374ed00b From Kari Tiirikainen: use the SNMP library, if present, to print the
textual names of the PIB OIDs.

svn path=/trunk/; revision=4814
2002-02-26 12:26:06 +00:00
Guy Harris 0699980d0d Properly (for English) pluralize names beginning with "s".
svn path=/trunk/; revision=4813
2002-02-26 12:22:30 +00:00
Guy Harris fca0f2f828 From Ronnie Sahlberg: add "alias name" and "group name" fields for alias
and group names, and use them instead of the numeric "alias" and "group"
fields when putting the names into the protocol tree.

svn path=/trunk/; revision=4812
2002-02-26 12:06:32 +00:00
Guy Harris 193b8c9bfb Allow dissectors to be registered as "old-style" or "new-style"
dissectors.  "Old-style" dissectors return nothing.  "New-style"
dissectors return one of:

	a positive integer, giving the number of bytes worth of data in
	the tvbuff that it considered to be part of the PDU in the
	tvbuff;

	zero, if it didn't consider the data in the tvbuff to be a PDU
	for its protocol;

	a negative integer, giving the number of additional bytes worth
	of data in needs to get the complete PDU (for use with
	fragmentation/segmentation when the length of the PDU isn't
	known to the protocol atop the one the dissector is dissecting).

Have "call_dissector()" return the return value of new-style dissectors,
and the length of the tvbuff handed to it for old-style dissectors.

Have "dissector_try_port()" return FALSE if the subdissector is a
new-style dissector and returned 0.

Make the EAP dissector a new-style dissector, and have a "EAP fragment"
dissector that is also a new-style dissector and handles fragmentation
of EAP messages (as happens above, for example, RADIUS).  Also, clean up
some signed vs. unsigned comparison problems.

Reassemble EAP-Message AVPs in RADIUS.

svn path=/trunk/; revision=4811
2002-02-26 11:55:39 +00:00
Guy Harris fa431b988f From Michael Tuexen: support for another message type.
svn path=/trunk/; revision=4810
2002-02-26 10:18:22 +00:00
Guy Harris 103fd1a681 Just put a full EAP tree under the EAP-message TLV; we will eventually
use that tree to stick fragment information when we reassemble
EAP-message fragments.

Fix up some "tvb_new_subset()" calls to set the actual length to the
minimum of the data left in the tvbuff and the length of the subset.

svn path=/trunk/; revision=4809
2002-02-26 00:51:41 +00:00
Guy Harris cd055b0b62 Don't give the raw data for SSL-encapsulated stuff in an EAP message its
own protocol tree item; instead, use the SSL protocol tree for that, and
put it under the EAP tree.  (I infer from mail from Adam Sulmicki that
this is a change he had but couldn't generate and submit due to CVS
problems.)

svn path=/trunk/; revision=4808
2002-02-25 23:55:21 +00:00
Guy Harris 3cb971dd80 Editorial corrections, from Michael Tuexen.
svn path=/trunk/; revision=4807
2002-02-25 23:41:58 +00:00
Guy Harris 5c18f33d5c Add an EAP dissector that doesn't create a top-level tree and doesn't
set the columns, for use with EAP payloads inside RADIUS packets.

From Adam Sulmicki: dissect SSL-encoded stuff inside EAP.

svn path=/trunk/; revision=4806
2002-02-25 23:28:32 +00:00
Guy Harris 8f0c96e3d2 Mark the columns non-writable before calling the EAP dissector, so the
frame is still marked as a RADIUS packet.

svn path=/trunk/; revision=4805
2002-02-25 22:33:13 +00:00
Guy Harris 135cc45809 Small fix from Adam Sulmicki to an off-by-2 problem.
svn path=/trunk/; revision=4804
2002-02-25 21:11:20 +00:00
Guy Harris 0a861db40b Note that we could save some overhead if we require the name argument to
"add_new_data_source()" to be a string constant (or some other static
data item).

svn path=/trunk/; revision=4803
2002-02-25 21:02:10 +00:00
Guy Harris 98d3386019 Get rid of a bunch of initializations of variables that aren't
necessary; most of them also provoke compiler warning with some
compilers, as they assign -1 to unsigned variables.

Also use "guint8" instead of "unsigned char" for 8-bit unsigned integer
variables.

Get rid of one "tvb_get_letohl()"/"proto_tree_add_uint_format()"
combination in favor of "proto_tree_add_item()".

svn path=/trunk/; revision=4802
2002-02-25 07:56:59 +00:00
Guy Harris c499cb2488 Typo fix, from Adam Sulmicki.
svn path=/trunk/; revision=4801
2002-02-25 07:13:28 +00:00
Guy Harris 541c654ff0 Put all the capture options into a structure.
Move the ringbuffer capture options from the "capture_file" structure to
the structure for capture options, as they're a property of an
in-progress capture, not a property of a particular capture file.

svn path=/trunk/; revision=4799
2002-02-24 09:25:36 +00:00
Guy Harris 1be3629f30 Don't copy the entire EAP header, just extract stuff from it a field at
a time, so we dissect as far as we can.

Set the length of the EAP protocol item to the length of an EAP header.

Put information into the Info column about the EAP code and, for a
request or response, the EAP type.

svn path=/trunk/; revision=4798
2002-02-24 08:10:07 +00:00
Guy Harris ca8f79df3d Get rid of "init_all_protocols()"; instead, have a routine
"init_dissection()" which calls "epan_conversation_init()", does the
work that "init_all_protocols()" did, and then calls
"reassemble_init()", so that the standard sequence of dissection
initialization is done in one place, rather than having multiple places
call the same sequence of routines.

svn path=/trunk/; revision=4797
2002-02-24 06:45:14 +00:00
Guy Harris b767826991 Have "get_positive_int()" really check for positive integers, not just
non-negative integers.

Get rid of unused "get_positive_int()" routine in "gtk/capture_dlg.c".

svn path=/trunk/; revision=4796
2002-02-24 06:01:03 +00:00
Guy Harris 8bd63530ed "autostop_filesize" and "autostop_duration" don't need to be in the
"capture_file" structure - they're a property of an in-progress capture,
not a property of an open capture file.  Make them just variables.

The maximum number of packets to be captured should be a variable
separate from the "count" field in the "capture_file" structure - the
latter is a count of the packets in the capture file in question.

Have Boolean variables indicating whether a maximum packet count,
maximum capture file size, and maximum capture duration were specified.
If an option isn't set, and we're doing an "update list of packets in
real time" capture, don't pass the option to the child process with a
command-line argument.

Don't create "stop when the capture file reaches this size" or "stop
when the capture's run for this long" conditions if a maximum capture
file size or a maximum capture duration, respectively, haven't been
specified.  Don't test or free a condition if it wasn't created.

Don't allow a 0 argument to the "-c" flag - the absence of a "-c" flag
is the way you specify "no limit on the number of packets".

Initialize the check boxes and spin buttons for the "maximum packets to
capture", "maximum capture size", and "maximum capture duration" options
to the values they had in the last capture.  If an option wasn't
specified, don't read its value from the dialog box and set the
variable.

svn path=/trunk/; revision=4795
2002-02-24 03:33:05 +00:00