metze/wireshark/wip.git
22 years agoUse the gdb "x" (examine memory) command instead of "print" to obtain
Gilbert Ramirez [Wed, 6 Mar 2002 06:14:21 +0000 (06:14 -0000)]
Use the gdb "x" (examine memory) command instead of "print" to obtain
the packet data.  "print" will only show the first 200 members of an array,
whereas "x" doesn't seem to have a limit.

svn path=/trunk/; revision=4884

22 years agoFrom Mike Frisch: remove debug printf statements.
Guy Harris [Wed, 6 Mar 2002 04:02:02 +0000 (04:02 -0000)]
From Mike Frisch: remove debug printf statements.

svn path=/trunk/; revision=4883

22 years agoCheck to make sure SNMP_IPADDR items are 4 bytes long and SNMP_COUNTER64
Guy Harris [Wed, 6 Mar 2002 03:52:13 +0000 (03:52 -0000)]
Check to make sure SNMP_IPADDR items are 4 bytes long and SNMP_COUNTER64
items are 8 bytes long.

svn path=/trunk/; revision=4882

22 years agoAdd ability to pull packet from add_packet_to_packet_list() frame.
Gilbert Ramirez [Wed, 6 Mar 2002 03:34:50 +0000 (03:34 -0000)]
Add ability to pull packet from add_packet_to_packet_list() frame.

svn path=/trunk/; revision=4881

22 years agoThe length field in the TPKT header contains the length of the packet
Guy Harris [Tue, 5 Mar 2002 22:15:21 +0000 (22:15 -0000)]
The length field in the TPKT header contains the length of the packet
*including the length of the TPKT header itself*, not just the length of
the payload.

svn path=/trunk/; revision=4880

22 years agoFrom Joerg Mayer: remove unused variables.
Guy Harris [Tue, 5 Mar 2002 12:03:27 +0000 (12:03 -0000)]
From Joerg Mayer: remove unused variables.

svn path=/trunk/; revision=4879

22 years agoFrom Joerg Mayer: use _U_ to flag unused arguments.
Guy Harris [Tue, 5 Mar 2002 11:56:00 +0000 (11:56 -0000)]
From Joerg Mayer: use _U_ to flag unused arguments.

svn path=/trunk/; revision=4878

22 years agoFrom Adam Sulmicki: fixes to typos in comments.
Guy Harris [Tue, 5 Mar 2002 11:04:15 +0000 (11:04 -0000)]
From Adam Sulmicki: fixes to typos in comments.

svn path=/trunk/; revision=4877

22 years agoFix another problem found by the PROTOS captures - in
Guy Harris [Tue, 5 Mar 2002 09:18:58 +0000 (09:18 -0000)]
Fix another problem found by the PROTOS captures - in
"asn1_string_value_decode()", don't pass "g_malloc()" an argument of 0,
as "g_malloc()" will return NULL in that case, and the callers of
"asn1_string_value_decode()" aren't necessarily prepared for a null
argument.

svn path=/trunk/; revision=4876

22 years agoMake "wtap_seek_read()" return TRUE on success and FALSE on error, like
Guy Harris [Tue, 5 Mar 2002 08:40:27 +0000 (08:40 -0000)]
Make "wtap_seek_read()" return TRUE on success and FALSE on error, like
"wtap_read()".

Add some additional error checks to the Sniffer file reader.

svn path=/trunk/; revision=4875

22 years agoHave "wtap_seek_read()" return 0 on success and -1 on failure, and take
Guy Harris [Tue, 5 Mar 2002 05:58:41 +0000 (05:58 -0000)]
Have "wtap_seek_read()" return 0 on success and -1 on failure, and take
an "err" argument that points to an "int" into which to put an error
code if it fails.

Check for errors in one call to it, and note that we should do so in
other places.

In the "wtap_seek_read()" call in the TCP graphing code, don't overwrite
"cfile.pseudo_header", and make the buffer into which we read the data
WTAP_MAX_PACKET_SIZE bytes, as it should be.

In some of the file readers for text files, check for errors from the
"parse the record header" and "parse the hex dump" routines when reading
sequentially.

In "csids_seek_read()", fix some calls to "file_error()" to check the
error on the random stream (that being what we're reading).

svn path=/trunk/; revision=4874

22 years agoThere's just a single H.225 dissector, for both Call Signaling and
Guy Harris [Tue, 5 Mar 2002 03:10:52 +0000 (03:10 -0000)]
There's just a single H.225 dissector, for both Call Signaling and
Registration, Admission, and Status, so just call it "h225", not
"h225_cs".

svn path=/trunk/; revision=4871

22 years agoCut down the vertical spacing in the "Capture Options" dialog box.
Guy Harris [Tue, 5 Mar 2002 02:25:09 +0000 (02:25 -0000)]
Cut down the vertical spacing in the "Capture Options" dialog box.

svn path=/trunk/; revision=4870

22 years agoFrom David Frascone: fix pathname of Diameter directory file.
Guy Harris [Tue, 5 Mar 2002 00:24:24 +0000 (00:24 -0000)]
From David Frascone: fix pathname of Diameter directory file.

svn path=/trunk/; revision=4869

22 years agoFrom David Frascone: dictionary fixes to NASREQ command codes.
Guy Harris [Tue, 5 Mar 2002 00:21:02 +0000 (00:21 -0000)]
From David Frascone: dictionary fixes to NASREQ command codes.

svn path=/trunk/; revision=4868

22 years agoFrom Michael Tuexen: SCCP-atop-M3UA support.
Guy Harris [Tue, 5 Mar 2002 00:09:21 +0000 (00:09 -0000)]
From Michael Tuexen: SCCP-atop-M3UA support.

svn path=/trunk/; revision=4867

22 years agoSCCP support, from Jeff Morriss.
Guy Harris [Mon, 4 Mar 2002 22:39:22 +0000 (22:39 -0000)]
SCCP support, from Jeff Morriss.

svn path=/trunk/; revision=4866

22 years agoAdd entries for March.
Gerald Combs [Mon, 4 Mar 2002 03:31:10 +0000 (03:31 -0000)]
Add entries for March.

svn path=/trunk/; revision=4861

22 years agoNote the update to the SCTP checksum code.
Guy Harris [Mon, 4 Mar 2002 01:39:12 +0000 (01:39 -0000)]
Note the update to the SCTP checksum code.

svn path=/trunk/; revision=4860

22 years agoUpdate the "README.win32" file to reflect Andrew Feren's changes to use
Guy Harris [Mon, 4 Mar 2002 01:26:40 +0000 (01:26 -0000)]
Update the "README.win32" file to reflect Andrew Feren's changes to use
Python iff PYTHON is defined in "config.nmake".

svn path=/trunk/; revision=4859

22 years agoFix some items.
Guy Harris [Mon, 4 Mar 2002 00:31:26 +0000 (00:31 -0000)]
Fix some items.

svn path=/trunk/; revision=4858

22 years agoCheck for errors in seeks, "tell"s, and "stat()"s/"fstat()"s.
Guy Harris [Mon, 4 Mar 2002 00:25:35 +0000 (00:25 -0000)]
Check for errors in seeks, "tell"s, and "stat()"s/"fstat()"s.

For file types where we allocate private data, add "close" routines
where they were missing, to free the private data.  Also fix up the code
to clean up after some errors by freeing private data where that wasn't
being done.

Get rid of unused arguments to "wtap_dump_open_finish()".

Fix indentation.

svn path=/trunk/; revision=4857

22 years agoBump the version to 0.9.2. Update NEWS to include everything from February.
Gerald Combs [Sun, 3 Mar 2002 23:59:29 +0000 (23:59 -0000)]
Bump the version to 0.9.2.  Update NEWS to include everything from February.

svn path=/trunk/; revision=4856

22 years agoFrom Michael Tuexen: report the type of an unrecognized parameter.
Guy Harris [Sun, 3 Mar 2002 22:42:08 +0000 (22:42 -0000)]
From Michael Tuexen: report the type of an unrecognized parameter.

svn path=/trunk/; revision=4855

22 years agoFrom Heikki Vatiainen: make "get_host_ipaddr()" require dotted-quad IP
Guy Harris [Sun, 3 Mar 2002 21:42:54 +0000 (21:42 -0000)]
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

22 years agoReport ASN.1 BER parsing errors closer to the point at which they're
Guy Harris [Sun, 3 Mar 2002 01:26:01 +0000 (01:26 -0000)]
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

22 years agoAs there's nothing to dissect for LDAP_REQ_UNBIND, set "ret" to
Guy Harris [Sat, 2 Mar 2002 21:51:52 +0000 (21:51 -0000)]
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

22 years agoDon't check the message type if it's not of class ASN1_APL; instead,
Guy Harris [Sat, 2 Mar 2002 21:28:19 +0000 (21:28 -0000)]
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

22 years agoTreat LDAP_REQ_UNBIND as a request with nothing in it, not as an unknown
Guy Harris [Sat, 2 Mar 2002 21:07:31 +0000 (21:07 -0000)]
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

22 years agoFrom Joerg Mayer: get rid of "-Wno-unused" flag in some configure
Guy Harris [Sat, 2 Mar 2002 20:51:46 +0000 (20:51 -0000)]
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

22 years agoFrom Joerg Mayer: get rid of "-Wno-unused" flag in some configure
Guy Harris [Sat, 2 Mar 2002 20:41:08 +0000 (20:41 -0000)]
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

22 years agoTell people not to use "ulong" or "ushort".
Guy Harris [Sat, 2 Mar 2002 07:56:16 +0000 (07:56 -0000)]
Tell people not to use "ulong" or "ushort".

svn path=/trunk/; revision=4845

22 years agoFrom Michael Tuexen: update the CRC32 checksum code to match
Guy Harris [Sat, 2 Mar 2002 07:29:10 +0000 (07:29 -0000)]
From Michael Tuexen: update the CRC32 checksum code to match
draft-ietf-tsvwg-sctpcsum-03.

svn path=/trunk/; revision=4844

22 years agoTypo fix, from Michael Tuexen.
Guy Harris [Sat, 2 Mar 2002 07:23:56 +0000 (07:23 -0000)]
Typo fix, from Michael Tuexen.

svn path=/trunk/; revision=4843

22 years ago"ulong" isn't defined on MacOS X (and probably isn't defined on some
Guy Harris [Sat, 2 Mar 2002 07:22:20 +0000 (07:22 -0000)]
"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

22 years agoUpdates from Mike Frisch.
Guy Harris [Fri, 1 Mar 2002 22:14:22 +0000 (22:14 -0000)]
Updates from Mike Frisch.

svn path=/trunk/; revision=4840

22 years agoAdded RSVP support for the Administrative Status object.
Ashok Narayanan [Fri, 1 Mar 2002 21:39:01 +0000 (21:39 -0000)]
Added RSVP support for the Administrative Status object.

svn path=/trunk/; revision=4839

22 years agoFix two references to "proto_item_set_text()" and
Guy Harris [Fri, 1 Mar 2002 20:19:44 +0000 (20:19 -0000)]
Fix two references to "proto_item_set_text()" and
"proto_item_append_text()" to use the right names.

svn path=/trunk/; revision=4838

22 years agoFrom Andrew Feren: add ifdefs to the top-level Makefile.nmake to avoid
Guy Harris [Fri, 1 Mar 2002 06:52:14 +0000 (06:52 -0000)]
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

22 years agoDon't link with the SNMP library by default.
Gerald Combs [Fri, 1 Mar 2002 03:42:13 +0000 (03:42 -0000)]
Don't link with the SNMP library by default.

svn path=/trunk/; revision=4836

22 years agoHave the routines that supply a pointer to a newly-constructed item
Guy Harris [Fri, 1 Mar 2002 03:02:36 +0000 (03:02 -0000)]
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

22 years agoAdd a routine to "asn1.c" to translate ASN1_ERR_ values to strings. Use
Guy Harris [Fri, 1 Mar 2002 02:48:10 +0000 (02:48 -0000)]
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

22 years agoImprove the note on how to deal with items with subtrees when the text
Guy Harris [Thu, 28 Feb 2002 23:23:12 +0000 (23:23 -0000)]
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

22 years agoHandle NBSS messages where the NBSS *header* is split across TCP segment
Guy Harris [Thu, 28 Feb 2002 23:09:03 +0000 (23:09 -0000)]
Handle NBSS messages where the NBSS *header* is split across TCP segment
boundaries.

svn path=/trunk/; revision=4831

22 years agoIn follow.c, initialize data_out_file to NULL, as it used to
Gilbert Ramirez [Thu, 28 Feb 2002 19:35:09 +0000 (19:35 -0000)]
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

22 years agoDeclare osinl_subdissector_table as 'extern'.
Gilbert Ramirez [Thu, 28 Feb 2002 19:24:24 +0000 (19:24 -0000)]
Declare osinl_subdissector_table as 'extern'.

svn path=/trunk/; revision=4829

22 years agoFix the declaration of "addr_call_dissector" to match the function
Guy Harris [Wed, 27 Feb 2002 21:26:37 +0000 (21:26 -0000)]
Fix the declaration of "addr_call_dissector" to match the function
signature of "call_dissector()".

svn path=/trunk/; revision=4828

22 years agoRemove unused variables, structure definitions, and functions.
Gilbert Ramirez [Wed, 27 Feb 2002 18:54:33 +0000 (18:54 -0000)]
Remove unused variables, structure definitions, and functions.
From Joerg Mayer.

svn path=/trunk/; revision=4827

22 years agoSupport for IEEE 802.1w RST BPDUs, from Alex Ruzin.
Guy Harris [Wed, 27 Feb 2002 10:03:10 +0000 (10:03 -0000)]
Support for IEEE 802.1w RST BPDUs, from Alex Ruzin.

svn path=/trunk/; revision=4825

22 years agoFrom Joerg Mayer:
Guy Harris [Wed, 27 Feb 2002 09:42:52 +0000 (09:42 -0000)]
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

22 years agoFrom Joerg Mayer: remove unused variables and declarations of
Guy Harris [Wed, 27 Feb 2002 08:57:25 +0000 (08:57 -0000)]
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

22 years agoLabel the data source for various forms of reassembled data with the
Guy Harris [Wed, 27 Feb 2002 05:45:48 +0000 (05:45 -0000)]
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

22 years agoDisplay a different message in the COL_INFO field for anonymous session
Tim Potter [Wed, 27 Feb 2002 02:42:19 +0000 (02:42 -0000)]
Display a different message in the COL_INFO field for anonymous session
setup packets.

svn path=/trunk/; revision=4818

22 years agoFrom John Mackenzie: register GIOP dissector as a UDP heuristic
Guy Harris [Wed, 27 Feb 2002 00:30:22 +0000 (00:30 -0000)]
From John Mackenzie: register GIOP dissector as a UDP heuristic
dissector.

svn path=/trunk/; revision=4817

22 years agoFix "create_dissector_handle()" to properly create a handle for an
Guy Harris [Wed, 27 Feb 2002 00:26:29 +0000 (00:26 -0000)]
Fix "create_dissector_handle()" to properly create a handle for an
old-style dissector.

svn path=/trunk/; revision=4816

22 years agoFrom Kari Tiirikainen: use the SNMP library, if present, to print the
Guy Harris [Tue, 26 Feb 2002 12:26:06 +0000 (12:26 -0000)]
From Kari Tiirikainen: use the SNMP library, if present, to print the
textual names of the PIB OIDs.

svn path=/trunk/; revision=4814

22 years agoProperly (for English) pluralize names beginning with "s".
Guy Harris [Tue, 26 Feb 2002 12:22:30 +0000 (12:22 -0000)]
Properly (for English) pluralize names beginning with "s".

svn path=/trunk/; revision=4813

22 years agoFrom Ronnie Sahlberg: add "alias name" and "group name" fields for alias
Guy Harris [Tue, 26 Feb 2002 12:06:32 +0000 (12:06 -0000)]
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

22 years agoAllow dissectors to be registered as "old-style" or "new-style"
Guy Harris [Tue, 26 Feb 2002 11:55:39 +0000 (11:55 -0000)]
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

22 years agoFrom Michael Tuexen: support for another message type.
Guy Harris [Tue, 26 Feb 2002 10:18:22 +0000 (10:18 -0000)]
From Michael Tuexen: support for another message type.

svn path=/trunk/; revision=4810

22 years agoJust put a full EAP tree under the EAP-message TLV; we will eventually
Guy Harris [Tue, 26 Feb 2002 00:51:41 +0000 (00:51 -0000)]
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

22 years agoDon't give the raw data for SSL-encapsulated stuff in an EAP message its
Guy Harris [Mon, 25 Feb 2002 23:55:21 +0000 (23:55 -0000)]
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

22 years agoEditorial corrections, from Michael Tuexen.
Guy Harris [Mon, 25 Feb 2002 23:41:58 +0000 (23:41 -0000)]
Editorial corrections, from Michael Tuexen.

svn path=/trunk/; revision=4807

22 years agoAdd an EAP dissector that doesn't create a top-level tree and doesn't
Guy Harris [Mon, 25 Feb 2002 23:28:32 +0000 (23:28 -0000)]
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

22 years agoMark the columns non-writable before calling the EAP dissector, so the
Guy Harris [Mon, 25 Feb 2002 22:33:13 +0000 (22:33 -0000)]
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

22 years agoSmall fix from Adam Sulmicki to an off-by-2 problem.
Guy Harris [Mon, 25 Feb 2002 21:11:20 +0000 (21:11 -0000)]
Small fix from Adam Sulmicki to an off-by-2 problem.

svn path=/trunk/; revision=4804

22 years agoNote that we could save some overhead if we require the name argument to
Guy Harris [Mon, 25 Feb 2002 21:02:10 +0000 (21:02 -0000)]
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

22 years agoGet rid of a bunch of initializations of variables that aren't
Guy Harris [Mon, 25 Feb 2002 07:56:59 +0000 (07:56 -0000)]
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

22 years agoTypo fix, from Adam Sulmicki.
Guy Harris [Mon, 25 Feb 2002 07:13:28 +0000 (07:13 -0000)]
Typo fix, from Adam Sulmicki.

svn path=/trunk/; revision=4801

22 years agoPut all the capture options into a structure.
Guy Harris [Sun, 24 Feb 2002 09:25:36 +0000 (09:25 -0000)]
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

22 years agoDon't copy the entire EAP header, just extract stuff from it a field at
Guy Harris [Sun, 24 Feb 2002 08:10:07 +0000 (08:10 -0000)]
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

22 years agoGet rid of "init_all_protocols()"; instead, have a routine
Guy Harris [Sun, 24 Feb 2002 06:45:14 +0000 (06:45 -0000)]
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

22 years agoHave "get_positive_int()" really check for positive integers, not just
Guy Harris [Sun, 24 Feb 2002 06:01:03 +0000 (06:01 -0000)]
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

22 years ago"autostop_filesize" and "autostop_duration" don't need to be in the
Guy Harris [Sun, 24 Feb 2002 03:33:05 +0000 (03:33 -0000)]
"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

22 years agoFree all the stuff pointed to by elements in the "tcp_segment_table"
Guy Harris [Sun, 24 Feb 2002 02:59:30 +0000 (02:59 -0000)]
Free all the stuff pointed to by elements in the "tcp_segment_table"
hash table before freeing the memory chunks for those elements.

Destroy that hash table when we're done, and set the pointer to it to
null so that we'll reallocate it.

svn path=/trunk/; revision=4794

22 years agoFrom Peter Valchev: fix editcap to assign the result of "getopt()" to an
Guy Harris [Sun, 24 Feb 2002 01:26:45 +0000 (01:26 -0000)]
From Peter Valchev: fix editcap to assign the result of "getopt()" to an
"int" and to check "getopt()"s return value with -1 rather than EOF.

Fix other "getopt()" loops to check against -1 as well (EOF is -1 on
most if not all platforms, but the Single UNIX Specification says
"getopt()" returns -1, so we should check against -1, not EOF).

svn path=/trunk/; revision=4793

22 years agoIn the Q.931-over-TPKT-over-TCP dissector, if the TCP segment we're
Guy Harris [Sat, 23 Feb 2002 21:07:48 +0000 (21:07 -0000)]
In the Q.931-over-TPKT-over-TCP dissector, if the TCP segment we're
handed looks as if it contains only a TPKT header (4 bytes long, and
those 4 bytes look like a TPKT header according to "is_tpkt()"), call
the "dissect TPKT over a TCP stream" routine.  If we're doing
reassembly, that routine will force a reassembly because the TPKT
payload isn't in that segment, and the various heuristic XXX-over-TPKT
dissectors will be called again, this time with enough data for them to
say whether the TPKT payload is for them or not; if we're not doing
reassembly, we'll dissect the TPKT header and then call the "dissect a
Q.931 PDU" routine, which will throw an exception because there isn't
any payload from which to fetch data (and that's what we want to
happen).

In the "dissect TPKT over a TCP stream" routine, if reassembly is
enabled, do the check to see if we need to do reassembly to get the
payload before dissecting the TPKT header, so that we don't dissect the
TPKT header and then decide "oops, we need some more data to get the
TPKT payload".

svn path=/trunk/; revision=4792

22 years ago"is_tpkt()" is always used to check a TCP segment to see if it might
Guy Harris [Sat, 23 Feb 2002 02:30:16 +0000 (02:30 -0000)]
"is_tpkt()" is always used to check a TCP segment to see if it might
have a TPKT header at the beginning, so there's not need for it to have
an offset as an argument; its callers don't have to know how big the
TPKT header is (or we can put a #define in "packet-tpkt.h" for it).  Get
rid of the second argument.

svn path=/trunk/; revision=4791

22 years agoFrom John Mackenzie: put missing initializations of table entries in
Guy Harris [Sat, 23 Feb 2002 02:16:12 +0000 (02:16 -0000)]
From John Mackenzie: put missing initializations of table entries in
"plugins.c".

svn path=/trunk/; revision=4790

22 years agoDissect the payload of EAPOL Key messages.
Guy Harris [Fri, 22 Feb 2002 23:05:16 +0000 (23:05 -0000)]
Dissect the payload of EAPOL Key messages.

Put in a comment noting that the payload of EAPOL Encapsulated ASF Alert
messages should perhaps be dissected as SNMP Trap messages.

Put the type of the message into the Info column.

svn path=/trunk/; revision=4789

22 years agoAdd some necessary "volatile" declarations.
Guy Harris [Fri, 22 Feb 2002 21:52:09 +0000 (21:52 -0000)]
Add some necessary "volatile" declarations.

svn path=/trunk/; revision=4788

22 years agoGet rid of an unnecessary "volatile".
Guy Harris [Fri, 22 Feb 2002 21:51:18 +0000 (21:51 -0000)]
Get rid of an unnecessary "volatile".

Give the type field a value_string array, and use that field when
putting the type into the protocol tree.

Display the data under the EAPOL tree, as it's part of the EAPOL PDU.

Just use "next_tvb" as the tvbuff for the data; don't create a new one
that, the different fourth argument to "tvb_new_subset()"
nonwithstanding, refers to the same data as "next_tvb".

Call the EAP dissector through a handle.

Nobody directly calls the EAP dissector any more, they all call it
through handles; make it static.

svn path=/trunk/; revision=4787

22 years agoFrom Adam Sulmicki: dissect EAP messages inside RADIUS.
Guy Harris [Fri, 22 Feb 2002 21:31:49 +0000 (21:31 -0000)]
From Adam Sulmicki: dissect EAP messages inside RADIUS.

svn path=/trunk/; revision=4786

22 years agoFixed up value_string for SMBE_unknownlevel error.
Tim Potter [Fri, 22 Feb 2002 21:29:02 +0000 (21:29 -0000)]
Fixed up value_string for SMBE_unknownlevel error.

svn path=/trunk/; revision=4785

22 years agoSet "snaplen", not "has_snaplen", to the snapshot length specified in
Guy Harris [Fri, 22 Feb 2002 11:41:22 +0000 (11:41 -0000)]
Set "snaplen", not "has_snaplen", to the snapshot length specified in
the capture preferences dialog box.

svn path=/trunk/; revision=4783

22 years agoCatch the ReportedBoundsError exception in the DNS and TPKT dissectors
Guy Harris [Fri, 22 Feb 2002 11:28:03 +0000 (11:28 -0000)]
Catch the ReportedBoundsError exception in the DNS and TPKT dissectors
when dissecting messages over TCP, so that an error in one message
doesn't stop us from dissecting the next message in the segment, if any.

Put an XXX comment before the code that constructs the tvbuff for each
message inside a TCP segment, noting that we really want tvbuffs to have
three lengths and to have a new type of exception thrown if you go past
the second length but not past the reported length.

svn path=/trunk/; revision=4782

22 years agoCOPS-PR extension support, from Kari Tiirikainen.
Guy Harris [Fri, 22 Feb 2002 11:16:13 +0000 (11:16 -0000)]
COPS-PR extension support, from Kari Tiirikainen.

Add support for desegmentation of COPS messages and for multiple COPS
messages per TCP segment.

svn path=/trunk/; revision=4781

22 years agoFrom Adam Sulmicki: additional AVPs for RADIUS. and making
Guy Harris [Fri, 22 Feb 2002 09:57:04 +0000 (09:57 -0000)]
From Adam Sulmicki: additional AVPs for RADIUS. and making
RD_TP_CONNECT_INFO a RADIUS_STRING rather than a RADIUS_STRING_TAGGED.

svn path=/trunk/; revision=4780

22 years agoFrom Adam Sulmicki <adam[AT]cfar.umd.edu>:
Guy Harris [Fri, 22 Feb 2002 09:52:01 +0000 (09:52 -0000)]
From Adam Sulmicki <adam[AT]cfar.umd.edu>:
Add more type values for EAP.
Fix off-by-one bug when displaying Code of EAP message.

Get rid of an unnecessary "volatile".

Give the code and type fields value_string arrays, and use them when
putting the code and type into the protocol tree.

Base the decision of whether to put the type field into the tree on the
request code, not on the length of the packet.

Display the Type-Data field, under that name, under the EAP tree, as
it's part of the EAP PDU.

svn path=/trunk/; revision=4779

22 years agoHandle TPKT packets split across segment boundaries, and multiple TPKT
Guy Harris [Fri, 22 Feb 2002 08:56:48 +0000 (08:56 -0000)]
Handle TPKT packets split across segment boundaries, and multiple TPKT
packets per segment.

Instead of having a routine for dissectors such as the Q.931 dissector
to call to dissect the TPKT header, have a routine that does all the
reassembly and multiple-packets-per-segment work, and have the Q.931
dissector call it.  Export "is_tpkt()", and the new routine, to plugins.

Add preferences for TPKT and Q.931 reassembly.

svn path=/trunk/; revision=4778

22 years agoProperly set the length of the top-level item.
Guy Harris [Fri, 22 Feb 2002 08:54:54 +0000 (08:54 -0000)]
Properly set the length of the top-level item.

svn path=/trunk/; revision=4777

22 years agoRedo the DNS-over-TCP code to handle the DNS-over-TCP header being split
Guy Harris [Fri, 22 Feb 2002 08:45:02 +0000 (08:45 -0000)]
Redo the DNS-over-TCP code to handle the DNS-over-TCP header being split
across segment boundaries and to, for each DNS-over-TCP PDU, create a
tvbuff containing the header and the body of the PDU, handing that to
the DNS PDU dissector.

svn path=/trunk/; revision=4776

22 years agoFrom Dermot Bradley:
Guy Harris [Fri, 22 Feb 2002 07:23:25 +0000 (07:23 -0000)]
From Dermot Bradley:

support for Openwave-specific WSP headers;

support for Openwave-specific field names;

support for additional content types from Openwave;

support for additional language values.

svn path=/trunk/; revision=4775

22 years agoProperly handle the "no data" data frames.
Guy Harris [Fri, 22 Feb 2002 07:16:35 +0000 (07:16 -0000)]
Properly handle the "no data" data frames.

svn path=/trunk/; revision=4774

22 years agoAiroPeek captures have an extra 4 bytes of gunk at the end of every
Guy Harris [Fri, 22 Feb 2002 07:15:28 +0000 (07:15 -0000)]
AiroPeek captures have an extra 4 bytes of gunk at the end of every
packet; don't hand that gunk to the 802.11 dissector.

svn path=/trunk/; revision=4773

22 years agoAdded a preference to allow for setting the COPS tcp port.
Ed Warnicke [Fri, 22 Feb 2002 02:56:58 +0000 (02:56 -0000)]
Added a preference to allow for setting the COPS tcp port.

svn path=/trunk/; revision=4772

22 years agoInitial quota support, from Ronnie Sahlberg.
Guy Harris [Fri, 22 Feb 2002 00:05:02 +0000 (00:05 -0000)]
Initial quota support, from Ronnie Sahlberg.

svn path=/trunk/; revision=4771

22 years agoUse the right format (one with a numerical format item rather than a
Guy Harris [Thu, 21 Feb 2002 23:54:03 +0000 (23:54 -0000)]
Use the right format (one with a numerical format item rather than a
string format item) as the third argument to "val_to_str()".

svn path=/trunk/; revision=4770

22 years agoThe number of bytes of tagged parameters should be computed by seeing
Guy Harris [Thu, 21 Feb 2002 23:34:33 +0000 (23:34 -0000)]
The number of bytes of tagged parameters should be computed by seeing
how many bytes remain in the packet starting at the initial offset of
the tagged parameters, not by seeing how many bytes remain in the packet
starting 4 bytes later.  (If you're trying to avoid counting a CRC that
appears at the end of the packet data, then you need to be sure there
*is* a CRC first; this may require using a different DLT_ type, in
libpcap, for those captures.)

svn path=/trunk/; revision=4769

22 years agoExport dissect_nt_sec_desc() so it can be used by other dissectors.
Tim Potter [Thu, 21 Feb 2002 18:39:49 +0000 (18:39 -0000)]
Export dissect_nt_sec_desc() so it can be used by other dissectors.

A NT security descriptor can be either revision 1 or 2 and seem to be the
same format on the wire.

svn path=/trunk/; revision=4768