obnox/wireshark/wip.git
12 years agoSquelch a compiler warning - but note, in a comment, a real problem the
guy [Tue, 3 May 2011 05:50:30 +0000 (05:50 +0000)]
Squelch a compiler warning - but note, in a comment, a real problem the
warning points out.

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

12 years agoFix indentation (tab stops are not guaranteed to be every 4 spaces).
guy [Tue, 3 May 2011 05:28:39 +0000 (05:28 +0000)]
Fix indentation (tab stops are not guaranteed to be every 4 spaces).

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

12 years agoFrom Tom Brezinski - fix for bug 5869:
guy [Tue, 3 May 2011 05:26:10 +0000 (05:26 +0000)]
From Tom Brezinski - fix for bug 5869:

This patch incorporates the following fixes from the patch attached to
bug 5671 with changes as noted below:

1.) Files where the packet header and packet data are noncontiguous are
handled improperly, resulting in read misalignment and ultimately the
error message, "Observer: bad record: Invalid magic number 0xXXXXXXXX."
This bug is caused by not obeying the packet_entry_header.offset_to_frame
field.

2.) Daylight savings time is not properly accounted for in files using
local time encoding.

3.) As of Observer/GigaStor v13.10 (bug 5671 incorrectly stated v14),
timestamps in the file format changed from local time encoding to GMT
encoding.  Wiretap has been changed to support reading both formats.
Patch submitted with bug 5671 added a separate file type to allow
writing local format.  This patch does not add the separate file type
and always writes GMT.

4.) The wtap_dumper.bytes_dumped field is not being properly incremented
as data is written to files.

This patch also incorporates the following additional enhancements /
fixes not in bug 5671:

1.) Support for reading BFR files which contain Fibre Channel captures.
Test file Fibre_Channel_Capture.bfr attached.

2.) Support for modified file header used in upcoming v15.  New header
file format takes an unused byte from the version string to allow for a
larger offset to the first packet to be specified.  Test file
V15_Lrg_Hdr_Test.bfr is attached, it is also a fuzz test as the number
of TLV items given in the header is less then the actual.

3.) It was found that if the number of TLV items given in the header was
larger then present it would fail to open the file.  Test file
V9_Num_TLVs_Too_Big.bfr is attached.

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

12 years agoDon't bother checking for gzgets(), as we don't use it, and don't even
guy [Tue, 3 May 2011 04:48:02 +0000 (04:48 +0000)]
Don't bother checking for gzgets(), as we don't use it, and don't even
need to use its presence in zlib as a proxy for "not the crufty old zlib
that comes with some versions of X11".

Do, however, check for inflatePrime() there, instead, just in case the
crufty old zlib that comes with some versions of X11 lack it; this is to
prevent the configure script from assuming a shiny new zlib by testing
with a non-X11 program, causing the build to fail when you build
Wireshark.

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

12 years agoOne bit suffices for the "columnized" and "colorized" flags in the
guy [Tue, 3 May 2011 02:03:25 +0000 (02:03 +0000)]
One bit suffices for the "columnized" and "colorized" flags in the
packet list store, and there's one PacketListRecord for every packet, so
that can save some space...

...especially if we move them after all the pointers, rather than before
the pointers, so they don't collectively take up 8 bytes on an LP64 or
LLP64 platform due to pointers having to be 8-byte aligned.

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

12 years agoTShark doesn't need column text attached to each frame; move col_text
guy [Tue, 3 May 2011 01:19:55 +0000 (01:19 +0000)]
TShark doesn't need column text attached to each frame; move col_text
and col_text_len from the frame_data structure to the PacketRecord
structure.

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

12 years agoFix a comment.
guy [Tue, 3 May 2011 00:22:35 +0000 (00:22 +0000)]
Fix a comment.

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

12 years agoFrom Peter Paluch via bug #5877: EIGRP dissector enhancement for RS/EOT
sfisher [Mon, 2 May 2011 16:40:19 +0000 (16:40 +0000)]
From Peter Paluch via bug #5877: EIGRP dissector enhancement for RS/EOT
flags

Me: Add Peter to AUTHORS file.

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

12 years agoFix the (fuzzed) memory allocation failure reported in https://bugs.wireshark.org...
morriss [Mon, 2 May 2011 14:27:48 +0000 (14:27 +0000)]
Fix the (fuzzed) memory allocation failure reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5880 :

Don't attempt to reassemble a message if the length of the fragment is negative.

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

12 years agoSupport content-type x-gzip and x-deflate, as described in RFC2616 as
stig [Mon, 2 May 2011 14:06:33 +0000 (14:06 +0000)]
Support content-type x-gzip and x-deflate, as described in RFC2616 as
equivalent to gzip and deflate.

This fixes bug 5882.

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

12 years agoFor "per packet" file encapsulation, display a list of the encapsulations seen (...
wmeier [Mon, 2 May 2011 02:06:52 +0000 (02:06 +0000)]
For "per packet" file encapsulation, display a list of the encapsulations seen ("long form" report).

Example:
 File type:           Microsoft NetMon 2.x
 File encapsulation:  Per packet
                        IEEE 802.11 plus Network Monitor radio header

ToDo: For the tabular form report display the list of per-packet encapsulations seen.

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

12 years ago[Automatic manuf, services and enterprise-numbers update for 2011-05-01]
gerald [Sun, 1 May 2011 15:03:48 +0000 (15:03 +0000)]
[Automatic manuf, services and enterprise-numbers update for 2011-05-01]

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

12 years agoCheck our PDU length. Fixes the infinite loop found in bug 5876.
gerald [Sat, 30 Apr 2011 17:43:05 +0000 (17:43 +0000)]
Check our PDU length. Fixes the infinite loop found in bug 5876.

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

12 years agoUse correct signature on callbacks.
etxrab [Sat, 30 Apr 2011 08:36:00 +0000 (08:36 +0000)]
Use correct signature on callbacks.

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

12 years agoOops, the Windows HAVE_GZCLEARERR stuff did work; take out the rest.
morriss [Fri, 29 Apr 2011 18:30:16 +0000 (18:30 +0000)]
Oops, the Windows HAVE_GZCLEARERR stuff did work; take out the rest.

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

12 years agoDon't check for the existence of gzclearerr() any more.
morriss [Fri, 29 Apr 2011 18:29:26 +0000 (18:29 +0000)]
Don't check for the existence of gzclearerr() any more.
Check for inflatePrime().

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

12 years agoOn Windows: don't (try but fail--the code did not work) to define
morriss [Fri, 29 Apr 2011 17:30:23 +0000 (17:30 +0000)]
On Windows: don't (try but fail--the code did not work) to define
HAVE_GZLCEARERR.  Define HAVE_INFLATEPRIME if we HAVE_LIBZ.

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

12 years agoAdd "Wireshark ... Copyright ...".
wmeier [Fri, 29 Apr 2011 14:56:40 +0000 (14:56 +0000)]
Add "Wireshark ... Copyright ...".

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

12 years ago#include <epan/prefs.h> not req'd since there are no prefs.
wmeier [Fri, 29 Apr 2011 14:50:13 +0000 (14:50 +0000)]
#include <epan/prefs.h> not req'd since there are no prefs.

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

12 years agoRemove two unneeded forward declarations.
wmeier [Fri, 29 Apr 2011 14:05:55 +0000 (14:05 +0000)]
Remove two unneeded forward declarations.

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

12 years agoReformat long lines in hf[] definition for readability;
wmeier [Fri, 29 Apr 2011 14:02:55 +0000 (14:02 +0000)]
Reformat long lines in hf[] definition for readability;
Replace hf[] "blurbs" by NULLs since the text of the blurb more or less matches the label text.

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

12 years agoconfigure: remove test for gzclearerr (not used anymore), add test for inflatePrime.
darkjames [Fri, 29 Apr 2011 07:49:55 +0000 (07:49 +0000)]
configure: remove test for gzclearerr (not used anymore), add test for inflatePrime.

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

12 years agoUntabify
stig [Fri, 29 Apr 2011 06:55:49 +0000 (06:55 +0000)]
Untabify

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

12 years agoFrom Edwin Groothuis via bug 5870:
stig [Fri, 29 Apr 2011 06:53:29 +0000 (06:53 +0000)]
From Edwin Groothuis via bug 5870:
The supplied patch adds a new option -O, which specifies a list of protocols
(names can be found with the "-G protocols" option) to be fully decoded while
the others only show the layer header.

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

12 years agoUse proto_tree_add_item() when it saves us from having to retrieve the value
morriss [Fri, 29 Apr 2011 02:16:13 +0000 (02:16 +0000)]
Use proto_tree_add_item() when it saves us from having to retrieve the value
and without causing us to potentially run into bug 3834.

Add a couple hf entries for things that had been added with add_text().

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

12 years agoIf we're in a message return (UDTS or XUDTS), set pinfo->in_error_pkt to help
morriss [Fri, 29 Apr 2011 01:45:34 +0000 (01:45 +0000)]
If we're in a message return (UDTS or XUDTS), set pinfo->in_error_pkt to help
make it obvious to the user that this is an error message.

Fix up some indentation.

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

12 years agoAdd default color filters for SCTP abort messages and checksum errors.
morriss [Fri, 29 Apr 2011 01:28:28 +0000 (01:28 +0000)]
Add default color filters for SCTP abort messages and checksum errors.

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

12 years agoFrom Pascal Quantin:
etxrab [Thu, 28 Apr 2011 19:59:14 +0000 (19:59 +0000)]
From Pascal Quantin:
the dissection of the UE capabilities when the RAT
type is set to geran-cs (the value part of Classmark 2 starts at the third byte).
Moreover it adds a subtree to enhance the display of Mobile Station Classmark 2 and 3 and MS Radio Access Capability IEs.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5867

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

12 years agoArray indices are integers, not Booleans. (The code is the same, given
guy [Thu, 28 Apr 2011 19:00:28 +0000 (19:00 +0000)]
Array indices are integers, not Booleans.  (The code is the same, given
that TRUE is #defined as 1 and FALSE is #defined as 0, but let's not
depend on that.)

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

12 years agoRemove an XXX comment;
wmeier [Thu, 28 Apr 2011 18:18:30 +0000 (18:18 +0000)]
Remove an XXX comment;

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

12 years agoExternal subdissectors should be called regardless of 'if(tree)'.
wmeier [Thu, 28 Apr 2011 18:01:38 +0000 (18:01 +0000)]
External subdissectors should be called regardless of 'if(tree)'.

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

12 years agoAdd missing $Id$ and "Wireshark ... Copyright ..."
wmeier [Thu, 28 Apr 2011 15:52:32 +0000 (15:52 +0000)]
Add missing $Id$ and "Wireshark ... Copyright ..."

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

12 years agoRemove an unneeded forward declaration (fixes compiler error);
wmeier [Thu, 28 Apr 2011 15:18:54 +0000 (15:18 +0000)]
Remove an unneeded forward declaration (fixes compiler error);
Move a global variable to be local to proto_reg-handoff...

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

12 years agoAdd missing "Wireshark .... Copyright ..".
wmeier [Thu, 28 Apr 2011 14:59:31 +0000 (14:59 +0000)]
Add missing "Wireshark .... Copyright ..".

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

12 years agoConvert what appears to be the use of "4 space tabs" to spaces.
wmeier [Thu, 28 Apr 2011 14:48:39 +0000 (14:48 +0000)]
Convert what appears to be the use of "4 space tabs" to spaces.

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

12 years ago#include <stdio.h> not req'd;
wmeier [Thu, 28 Apr 2011 14:38:29 +0000 (14:38 +0000)]
#include <stdio.h> not req'd;
Define all internal fcns as static;
fragment_table_init() & reassembled_table_init() need to be
  called form a registered_init fcn;
proto_register... and proto_reg_handoff should be at the end of the file as
  per Wireshark convention;
proto_reg_handoff .... doesn't need 'if (initialized)...';
proto_register... doesn't need 'if (proto_mux27010 == -1)...'

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

12 years agoMinor updates.
etxrab [Thu, 28 Apr 2011 14:22:18 +0000 (14:22 +0000)]
Minor updates.

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

12 years agoAdd grouped AVP:s
etxrab [Thu, 28 Apr 2011 13:43:23 +0000 (13:43 +0000)]
Add grouped AVP:s

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

12 years agoAdd SVN Id tag. Don't use deprecated dissector_add().
morriss [Thu, 28 Apr 2011 13:14:36 +0000 (13:14 +0000)]
Add SVN Id tag.  Don't use deprecated dissector_add().

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

12 years agoTry to fix:
darkjames [Thu, 28 Apr 2011 11:53:29 +0000 (11:53 +0000)]
Try to fix:
value_string.c(175) : warning C4244: '=' : conversion from '__int64' to 'gint', possible loss of data

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

12 years agoChange value_string_ext->_vs_match to return value_string struct (instead of strptr),
darkjames [Thu, 28 Apr 2011 11:15:46 +0000 (11:15 +0000)]
Change value_string_ext->_vs_match to return value_string struct (instead of strptr),
Now index can be easily calculated so remove idx pointer from all match functions.

Just in case change names if someone is using wireshark internals.

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

12 years agoInitialize if_device to NULL at start and when g_free.
stig [Thu, 28 Apr 2011 08:48:35 +0000 (08:48 +0000)]
Initialize if_device to NULL at start and when g_free.
This fixes a bug introduced in revision 36741.

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

12 years agoRemoved unused variables and functions.
stig [Thu, 28 Apr 2011 06:39:56 +0000 (06:39 +0000)]
Removed unused variables and functions.
Terminate strings by setting the first char to 0.

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

12 years agoFrom Hans-Christoph Schemmel:
etxrab [Thu, 28 Apr 2011 05:36:26 +0000 (05:36 +0000)]
From Hans-Christoph Schemmel:
A variant of 3GPP TS 27.010 multiplexing protocol dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5829

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

12 years agoFix warnings:
etxrab [Thu, 28 Apr 2011 05:11:53 +0000 (05:11 +0000)]
Fix warnings:
packet-radiotap.c(240) : error C2220: warning treated as error - no 'object' file generated
packet-radiotap.c(240) : warning C4305: 'initializing' : truncation from 'double' to 'const float'
packet-radiotap.c(310) : warning C4305: 'initializing' : truncation from 'double' to 'const float'
packet-radiotap.c(315) : warning C4305: 'initializing' : truncation from 'double' to 'const float'
packet-radiotap.c(370) : warning C4305: 'initializing' : truncation from 'double' to 'const float'
packet-radiotap.c(380) : warning C4305: 'initializing' : truncation from 'double' to 'const float'

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

12 years agoFrom Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5786 :
morriss [Thu, 28 Apr 2011 03:01:54 +0000 (03:01 +0000)]
From Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5786 :

This patch registers a dissector table to allow other dissectors to register as
subdissectors for modbus/tcp data.

Additionally it registers the dissector, so it can be invoked by another
dissector by name.

Additionally this version of the patch adds the Data field not as a text field,
but rather as a field which can be selected and tested for by name.

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

12 years agoAfter testing for the presence of python-config, fix typo so that we actually
morriss [Thu, 28 Apr 2011 02:24:46 +0000 (02:24 +0000)]
After testing for the presence of python-config, fix typo so that we actually
test whether we found it or not.

If the user asked for Python support, error out if we find we can't use it.

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

12 years agoFix one of the complaints in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id...
morriss [Thu, 28 Apr 2011 01:53:40 +0000 (01:53 +0000)]
Fix one of the complaints in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5818 :

Create the wspy_dissectors data directory (by installing the one example
dissector).  This dissector won't be loaded (its name doesn't match the regexp)
but it forces the presence of the directory (so people will know where to put
their dissectors).

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

12 years agoDon't dump core if Python was not able to load the dissector registration file
morriss [Thu, 28 Apr 2011 01:45:23 +0000 (01:45 +0000)]
Don't dump core if Python was not able to load the dissector registration file
(e.g., due to a syntax error).

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

12 years ago#include <stdlib.h> not needed;
wmeier [Thu, 28 Apr 2011 01:07:43 +0000 (01:07 +0000)]
#include <stdlib.h> not needed;
use consistent indentation.

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

12 years agoFrom Juliusz Chroboczek via bug 5812:
gerald [Wed, 27 Apr 2011 23:20:15 +0000 (23:20 +0000)]
From Juliusz Chroboczek via bug 5812:

This should not trigger with any Babel packets generated by the current
version of babeld, but could potentially do so with a future version
that performs more aggressive compression for IPv4 addresses.

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

12 years agoPicky, picky....
guy [Wed, 27 Apr 2011 23:06:23 +0000 (23:06 +0000)]
Picky, picky....

While we're at it, catch invalid MCS/channel width/GI combinations.

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

12 years agoFrom Pascal Quantin:
etxrab [Wed, 27 Apr 2011 22:18:00 +0000 (22:18 +0000)]
From Pascal Quantin:
Enhance the dissection of MM, GMM, SM, EPS EMM and EPS ESM
protocols according to 3GPP 24.008 V9.6.0 and 24.301 V9.6.0.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5866

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

12 years agoMy version of Python (2.5.2) core dumps if PySequence_Check is called with a
morriss [Wed, 27 Apr 2011 22:15:42 +0000 (22:15 +0000)]
My version of Python (2.5.2) core dumps if PySequence_Check is called with a
NULL pointer (because no dissectors were registered).  Don't call that function
with a NULL pointer.

Also update the output when no dissectors are registered.  Not sure if we
should be printing *anything* in this situation, but for now make the output
interesting.

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

12 years agoPut the rate in for the MCS field, if all the information needed to
guy [Wed, 27 Apr 2011 21:59:47 +0000 (21:59 +0000)]
Put the rate in for the MCS field, if all the information needed to
calculate the rate is present.

Don't put the rate in for MCS indices in the Rate field - we need not
only the MCS index but the bandwidth (20 MHz vs. 40 MHz) and the length
of the guard interval.  Note in a comment that those other items *might*
be available from some other radiotap fields.

Expand a comment on the hack to try to figure out whether a Rate field
with the 0x80 bit set is a FreeBSD MCS index or a high data rate.

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

12 years agoFix part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4878 :
morriss [Wed, 27 Apr 2011 21:26:38 +0000 (21:26 +0000)]
Fix part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4878 :

Put our one python example in the source distribution.

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

13 years agoComment out some unused code;
wmeier [Wed, 27 Apr 2011 19:40:20 +0000 (19:40 +0000)]
Comment out some unused code;
Use #if 0/#endif to comment out some code instead of using /* */;
Use consistent indentation & do some whitespace cleanup.

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

13 years agoRemove unneeded #include <stdlib.h>;
wmeier [Wed, 27 Apr 2011 19:24:32 +0000 (19:24 +0000)]
Remove unneeded #include <stdlib.h>;
Use consistent indentation;
Add editor modelines;
Use #if 0/#endif to comment out code instead of /* */.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 18:13:31 +0000 (18:13 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 18:09:39 +0000 (18:09 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 17:58:22 +0000 (17:58 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 17:39:25 +0000 (17:39 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
  Do some (minor) indentation cleanup..

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 17:30:39 +0000 (17:30 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
  Do some (minor) whitespace cleanup and re-formatting.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 17:22:20 +0000 (17:22 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
  #include <string.h> not req'd.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 17:15:57 +0000 (17:15 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
  #include <stdlib.h> not req'd;
  Do some whitespace cleanup.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 17:06:54 +0000 (17:06 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
  #include <stdlib.h> not req'd.

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

13 years ago#include <stdlib.h> not required;
wmeier [Wed, 27 Apr 2011 17:00:04 +0000 (17:00 +0000)]
#include <stdlib.h> not required;
Whitespace cleanup.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 16:34:37 +0000 (16:34 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 16:29:09 +0000 (16:29 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
  Remove uneeded #include <stdlib.h>, <gmodule.h>;
  Do some whitespace cleanup.

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

13 years agoFrom Yaniv Kaul:
wmeier [Wed, 27 Apr 2011 16:25:05 +0000 (16:25 +0000)]
From Yaniv Kaul:
  Some fixes for 'set but not used' errors that GCC 4.6 emits.

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

13 years agoFrom Mathieu Parent via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5826 :
morriss [Wed, 27 Apr 2011 15:23:20 +0000 (15:23 +0000)]
From Mathieu Parent via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5826 :

Attached patch fixes dissection of ServiceURLStatMessage.

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

13 years agoFrom Anand Thakur via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5843 :
morriss [Wed, 27 Apr 2011 14:10:55 +0000 (14:10 +0000)]
From Anand Thakur via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5843 :

This diff files includes some AVPs from Ericsson GGSN documentation used for Gx
messaging between a GGSN and a PCRF.

From me: correct one spelling mistake.

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

13 years agoPut the length of the country code in parenthesis (for readability).
morriss [Wed, 27 Apr 2011 13:32:28 +0000 (13:32 +0000)]
Put the length of the country code in parenthesis (for readability).

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

13 years agoPacket editor: add support for FT_BOOLEAN, and integer bitmasks.
darkjames [Wed, 27 Apr 2011 12:53:57 +0000 (12:53 +0000)]
Packet editor: add support for FT_BOOLEAN, and integer bitmasks.

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

13 years agoRestore updating packet bar while loading file (removed in r36851)
darkjames [Wed, 27 Apr 2011 09:20:02 +0000 (09:20 +0000)]
Restore updating packet bar while loading file (removed in r36851)

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

13 years agoFrom Yaniv Kaul:
etxrab [Wed, 27 Apr 2011 06:02:16 +0000 (06:02 +0000)]
From Yaniv Kaul:
Fix 'set but not used' errors that GCC 4.6 emits.

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

13 years agoRemove check_col().
etxrab [Wed, 27 Apr 2011 05:55:54 +0000 (05:55 +0000)]
Remove check_col().

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

13 years agoFrom Yaniv Kaul:
etxrab [Wed, 27 Apr 2011 05:32:09 +0000 (05:32 +0000)]
From Yaniv Kaul:
Fix 'set but not used' errors that GCC 4.6 emits.

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

13 years agoFrom Yaniv Kaul:
etxrab [Wed, 27 Apr 2011 05:24:31 +0000 (05:24 +0000)]
From Yaniv Kaul:
Fix 'set but not used' errors that GCC 4.6 emits.

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

13 years agoFrom Yaniv Kaul: some 'set but not used' compilation fixes.
wmeier [Wed, 27 Apr 2011 05:18:58 +0000 (05:18 +0000)]
From Yaniv Kaul: some 'set but not used' compilation fixes.
From me:
 - remove unneeded #include <stdlib.h> and <ctype.h>;
 - Fix some indentation in the file.

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

13 years agoFrom Yaniv Kaul: some 'set but not used' compilation fixes;
wmeier [Wed, 27 Apr 2011 05:09:00 +0000 (05:09 +0000)]
From Yaniv Kaul: some 'set but not used' compilation fixes;
From me:
- Remove unneeded #include <stdlib.h> and <ctype.h>;
- Indentation cleanup.

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

13 years agoFrom Yaniv Kaul: some 'set but not used' compilation fixes.
wmeier [Wed, 27 Apr 2011 05:02:47 +0000 (05:02 +0000)]
From Yaniv Kaul: some 'set but not used' compilation fixes.

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

13 years agoFrom Yaniv Kaul: some 'set but not used' compilation fixes.
wmeier [Wed, 27 Apr 2011 04:27:38 +0000 (04:27 +0000)]
From Yaniv Kaul: some 'set but not used' compilation fixes.

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

13 years agoFrom Yaniv Kaul: some 'set but not used' compilation fixes;
wmeier [Wed, 27 Apr 2011 04:24:44 +0000 (04:24 +0000)]
From Yaniv Kaul: some 'set but not used' compilation fixes;
From me:
 Use consistent indentation in the source file.

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

13 years agoMake the frame_data_sequence structure opaque, and move some other
guy [Wed, 27 Apr 2011 04:11:37 +0000 (04:11 +0000)]
Make the frame_data_sequence structure opaque, and move some other
implementation details into frame_data_sequence.c as well.

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

13 years agoAdd frame_data_sequence.c.
guy [Wed, 27 Apr 2011 03:57:21 +0000 (03:57 +0000)]
Add frame_data_sequence.c.

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

13 years agoFrom Yaniv Kaul: some 'set but not used' compilation fixes;
wmeier [Wed, 27 Apr 2011 03:45:19 +0000 (03:45 +0000)]
From Yaniv Kaul: some 'set but not used' compilation fixes;
From me:
 - #include <stdlib.h> not needed;
 - Use consistent indentation;
 - use #if 0/#endif to comment out code rather than /* */

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

13 years agoBased upon a patch from Yaniv Kaul: Comment out unused assignmeent/variables;
wmeier [Wed, 27 Apr 2011 03:13:08 +0000 (03:13 +0000)]
Based upon a patch from Yaniv Kaul: Comment out unused assignmeent/variables;
From me:
  - remove unneeded #include <stdlib.h>;
  - fix some indentation;
  - use #if 0/#endif rather that /* */ to comment out some code

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

13 years agoDon't free the frame_data_sequence unless we have one.
guy [Wed, 27 Apr 2011 03:13:03 +0000 (03:13 +0000)]
Don't free the frame_data_sequence unless we have one.

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

13 years agoCreate a new frame_data_sequence data type; it represents a dense
guy [Wed, 27 Apr 2011 02:54:44 +0000 (02:54 +0000)]
Create a new frame_data_sequence data type; it represents a dense
sequence of frame_data structures, indexed by the frame number.  Extract
the relevant bits of the capture_file data structure and move them to
the frame_data_sequence, and move the relevant code from cfile.c and
tweak it to handle frame_data_sequence structures.

Have a possibly-null pointer to a frame_data_sequence structure in the
capture_file structure; if it's null, we aren't keeping a sequence of
frame_data structures (we don't keep that sequence when we're doing
one-pass processing in TShark).

Nothing in libwireshark should care about a capture_file structure; get
rid of some unnecessary includes of cfile.h.

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

13 years agoAnother hack to handle the one-pass case.
guy [Wed, 27 Apr 2011 00:43:31 +0000 (00:43 +0000)]
Another hack to handle the one-pass case.

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

13 years agoShort-term hack to fix bug 5855 - don't try to process all the
guy [Tue, 26 Apr 2011 23:17:47 +0000 (23:17 +0000)]
Short-term hack to fix bug 5855 - don't try to process all the
frame_data structures for all the packets if we don't actually *have*
any frame_data structures for any packets, e.g. in TShark in one-pass
mode.

Also:

Use #if 0/#endif instead of commenting out.

Consistently use 4-space indentation.

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

13 years agoIf HAVE_LIBGNUTLS isn't defined, don't build functions that are used
guy [Tue, 26 Apr 2011 23:07:40 +0000 (23:07 +0000)]
If HAVE_LIBGNUTLS isn't defined, don't build functions that are used
only if HAVE_LIBGNUTLS is defined.

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

13 years agoIf HAVE_LIBGNUTLS isn't defined, don't build functions that are used
guy [Tue, 26 Apr 2011 22:56:22 +0000 (22:56 +0000)]
If HAVE_LIBGNUTLS isn't defined, don't build functions that are used
only if HAVE_LIBGNUTLS is defined.

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

13 years agoFrom Adam Langley via bug 4349:
gerald [Tue, 26 Apr 2011 22:51:35 +0000 (22:51 +0000)]
From Adam Langley via bug 4349:

This patch adds support for getting the pre-master secret of a TLS
connection from a log file. Currently Wireshark can decrypt and TLS
connection only if it has the server's private key.

I commonly have a use case where I control the TLS client, but not the
server.  In order to decrypt in this case, I've added support to NSS
(used by Chrome and Firefox) to log the keys to a file on disk:

https://bugzilla.mozilla.org/show_bug.cgi?id=536474

Given this file, Wireshark can then decrypt the resulting TLS connections.

The format is such that Wireshark opens and linearly scans the file each
time it sees a ClientKeyExchange. If the key log grows too large, this
is pretty inefficient. However, it's simple and the number of
interesting TLS connections when debugging is usually very small.

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

13 years agoFrom Ivan Sy via bug 3343:
gerald [Tue, 26 Apr 2011 21:59:11 +0000 (21:59 +0000)]
From Ivan Sy via bug 3343:

- Support for DTLS and SSL RSA keys list using User Accessible Table
- Support for IPv6 SSL as posted by bug#3343 comment#1
- 'any' and 'anyipv4' for IPv4 wildcard
- 'anyipv6' for IPv6 wildcard
- UAT fields validation.

From me:

- Update paramaters to match UAT API changes.
- Change the UAT filename.
- Fix buffer overflow for IPv6 addresses.
- Allow the use of hostnames along with numeric addresses.
- Don't convert strings to addresses twice.
- Don't use the same variable name for different data types.
- Make "any" mean "any IPv4 or any IPv6".
- Bend the concept of obsolete preferences slightly so that we can convert
  and old-style key list to a UAT.
- Clean up whitespace.
- Don't point to a User's Guide section for now; it may make more sense to
  keep using the wiki page.

SSL dissector changes have been tested. DTLS dissector changes have not.

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

13 years agoFrom Yaniv Kaul:
etxrab [Tue, 26 Apr 2011 20:24:53 +0000 (20:24 +0000)]
From Yaniv Kaul:
Fix 'set but not used' errors that GCC 4.6 emits.

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

13 years agoget_host_ipaddr() was returning numeric addresses in host byte order
gerald [Tue, 26 Apr 2011 17:13:37 +0000 (17:13 +0000)]
get_host_ipaddr() was returning numeric addresses in host byte order
and hostnames in network byte order. Have it return everything in
network byte order.

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Tue, 26 Apr 2011 14:43:00 +0000 (14:43 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Tue, 26 Apr 2011 14:42:41 +0000 (14:42 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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