obnox/wireshark/wip.git
13 years agoFound by clang 3.0 (built from trunk): various implicit conversion from
sfisher [Fri, 22 Apr 2011 16:27:01 +0000 (16:27 +0000)]
Found by clang 3.0 (built from trunk): various implicit conversion from
enumeration type 'xxx' to different enumeration type 'xxx'

Fix: Create different structs based on the enum type contained within.

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

13 years agoUse _U_ for unused function parameters instead of assigning a variable
sfisher [Fri, 22 Apr 2011 15:53:34 +0000 (15:53 +0000)]
Use _U_ for unused function parameters instead of assigning a variable
to itself.  Found by clang compiler.

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

13 years agoIf we're using GNUC, use attribute warn_unused_result to verify that the
morriss [Fri, 22 Apr 2011 15:15:10 +0000 (15:15 +0000)]
If we're using GNUC, use attribute warn_unused_result to verify that the
return value of proto_item_add_subtree() is used.

(The WARN_IF_UNUSED macro doesn't belong here...  But where should it go?)

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

13 years agoUse the return value of proto_item_add_subtree(): put the filter masks in their own...
morriss [Fri, 22 Apr 2011 14:48:10 +0000 (14:48 +0000)]
Use the return value of proto_item_add_subtree(): put the filter masks in their own subtree (as it appears was intended).

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

13 years agoDon't create subtrees that are not used (and don't create subtrees which might
morriss [Fri, 22 Apr 2011 14:41:26 +0000 (14:41 +0000)]
Don't create subtrees that are not used (and don't create subtrees which might
have--if the original code was different--contained only one sub-item).
Remove some no-longer-used ett variables.

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

13 years agoDon't assume that a proto_item is equivalent to a proto_tree.
morriss [Fri, 22 Apr 2011 14:33:58 +0000 (14:33 +0000)]
Don't assume that a proto_item is equivalent to a proto_tree.
Use the return value from proto_item_add_subtree().

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

13 years agoDon't create a subtree that is not used.
morriss [Fri, 22 Apr 2011 14:32:35 +0000 (14:32 +0000)]
Don't create a subtree that is not used.

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

13 years agoUse the return value of proto_item_add_subtree()
morriss [Fri, 22 Apr 2011 14:30:19 +0000 (14:30 +0000)]
Use the return value of proto_item_add_subtree()

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

13 years agoDon't assume that a proto_item is equivalent to a proto_tree.
morriss [Fri, 22 Apr 2011 14:29:00 +0000 (14:29 +0000)]
Don't assume that a proto_item is equivalent to a proto_tree.
Use the return value from proto_item_add_subtree().

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

13 years agoDon't create a subtree that is not used.
morriss [Fri, 22 Apr 2011 14:17:34 +0000 (14:17 +0000)]
Don't create a subtree that is not used.

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

13 years agoUse the return value of proto_item_add_subtree()
morriss [Fri, 22 Apr 2011 14:13:20 +0000 (14:13 +0000)]
Use the return value of proto_item_add_subtree()

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

13 years agoEnhance BT-UTP dissector:
alagoutte [Fri, 22 Apr 2011 13:16:45 +0000 (13:16 +0000)]
Enhance BT-UTP dissector:
* Add type (syn, data, reset...) in column info
* Split dissect_utp_header(...) function to
* dissect_utp_header_v0(...)
* dissect_utp_header_v1(...)
* dissect_utp_extensions(...)

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

13 years agoFix (latest) Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Fri, 22 Apr 2011 13:11:52 +0000 (13:11 +0000)]
Fix (latest) Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFrom http://www.wireshark.org/lists/wireshark-dev/201104/msg00231.html
alagoutte [Fri, 22 Apr 2011 13:07:11 +0000 (13:07 +0000)]
From wireshark.org/lists/wireshark-dev/201104/msg00231.html
Always use the returned tree value of proto_tree_add_subtree (and not the item!)

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

13 years agoCleanup emem_verify_pointer()
darkjames [Fri, 22 Apr 2011 12:25:01 +0000 (12:25 +0000)]
Cleanup emem_verify_pointer()

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

13 years agoAdd some casts to squelch complaints about alignment; our little slab
guy [Fri, 22 Apr 2011 07:58:19 +0000 (07:58 +0000)]
Add some casts to squelch complaints about alignment; our little slab
allocator should return properly-aligned items.

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

13 years agoRemove invalid svn:executable property
darkjames [Fri, 22 Apr 2011 07:36:37 +0000 (07:36 +0000)]
Remove invalid svn:executable property

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

13 years agoAdd return instructions for system without support for G_GNUC_NORETURN (e.g. some...
darkjames [Fri, 22 Apr 2011 07:15:45 +0000 (07:15 +0000)]
Add return instructions for system without support for G_GNUC_NORETURN (e.g. some older gcc compilers).
Reported by Anders Broman on -dev list.

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

13 years agoWe deal with pointer alignment ourselves, so we ensure the casts are
guy [Fri, 22 Apr 2011 04:04:20 +0000 (04:04 +0000)]
We deal with pointer alignment ourselves, so we ensure the casts are
safe.  Tell the compiler so.

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

13 years agoEither the buf argument to emem_scrub_memory() is properly aligned or it
guy [Fri, 22 Apr 2011 04:01:30 +0000 (04:01 +0000)]
Either the buf argument to emem_scrub_memory() is properly aligned or it
isn't.  If it is, we don't need to worry about alignment, so the XXX
comment doesn't belong there; if it isn't, then we should do what the
comment says.  For now, assume the comment before the XXX comment is
correct, and just cast away the alignment warning.

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

13 years agoep_alloc() returns a properly-aligned value for all uses; that's why it
guy [Fri, 22 Apr 2011 03:53:01 +0000 (03:53 +0000)]
ep_alloc() returns a properly-aligned value for all uses; that's why it
returns void * rather than guint8 *.  Don't pointer-convert that
information away; otherwise, compilers might whine about safe pointer
casts.

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

13 years agoStuff that comes back from ep_alloc() is properly aligned for all uses;
guy [Fri, 22 Apr 2011 03:34:39 +0000 (03:34 +0000)]
Stuff that comes back from ep_alloc() is properly aligned for all uses;
that's why it returns "void *", not "guint8 *".  Don't pointer-convert
that information away; otherwise, compilers might whine at you about
unsafe casts.

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

13 years agoCast away bogus warnings. (I begin to see why C++ has templates here,
guy [Fri, 22 Apr 2011 03:31:06 +0000 (03:31 +0000)]
Cast away bogus warnings.  (I begin to see why C++ has templates here,
complicated though they might be for both users and implementors....)

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

13 years ago*Properly* get rid of bogus cast.
guy [Fri, 22 Apr 2011 03:27:40 +0000 (03:27 +0000)]
*Properly* get rid of bogus cast.

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

13 years ago"guint8 *" means "pointer to array of bytes that may or may not be
guy [Fri, 22 Apr 2011 03:25:48 +0000 (03:25 +0000)]
"guint8 *" means "pointer to array of bytes that may or may not be
properly aligned"; "void *", at least when it's the return value of
ep_malloc(), means "pointer to properly-aligned chunk of memory".  Use
"void *" in get_sdp_data_element() and its callers in that case, to
squelch compiler warnings.

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

13 years agoCast away alignment warnings about pointers where we never actually
guy [Fri, 22 Apr 2011 03:12:18 +0000 (03:12 +0000)]
Cast away alignment warnings about pointers where we never actually
directly dereference pointers to the field members.

Get rid of an unnecessary cast that provokes warnings.

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

13 years agoCast away warnings about "struct sockaddr" -> "struct sockaddr_XXX"
guy [Fri, 22 Apr 2011 03:11:14 +0000 (03:11 +0000)]
Cast away warnings about "struct sockaddr" -> "struct sockaddr_XXX"
casts that are actually safe.

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

13 years agoMake all the fields in the various structures just arrays of bytes, so
guy [Fri, 22 Apr 2011 03:10:22 +0000 (03:10 +0000)]
Make all the fields in the various structures just arrays of bytes, so
we can cast not-necessarily-aligned pointers to pointers to those
structures without risk of compiler warnings *or* the underlying problem
the compiler's trying to warn us about (no, you can't always dereference
an unaligned pointer - SPARC traps, and at least some ARM processors may
do something other than what you want, for example).

This also caught some cases where we were not even properly
byte-swapping on big-endian platforms.

This also lets us not muck around with splitting 64-bit times into two
32-bit fields - we have pletohll(), after all.

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

13 years agoRemove unneeded #include <errno>,<math>,<ctype> & "isprint";
wmeier [Thu, 21 Apr 2011 22:49:36 +0000 (22:49 +0000)]
Remove unneeded #include <errno>,<math>,<ctype> & "isprint";
Do minoir whitespace & indentation cleanup.

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

13 years agoAdd #include <ctype.h> before #include "isprint.h";
wmeier [Thu, 21 Apr 2011 22:42:32 +0000 (22:42 +0000)]
Add #include <ctype.h> before #include "isprint.h";
Remove an unneeded line of code;
Do some indentation & whitespace cleanup.

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

13 years agoAvoid passing a NULL string pointer to format routines: some libc's (e.g.,
morriss [Thu, 21 Apr 2011 22:38:41 +0000 (22:38 +0000)]
Avoid passing a NULL string pointer to format routines: some libc's (e.g.,
Solaris') will seg-fault on that.

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

13 years ago#include <errno.h> & #include <math.h> not req'd;
wmeier [Thu, 21 Apr 2011 22:31:45 +0000 (22:31 +0000)]
#include <errno.h> & #include <math.h> not req'd;

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

13 years agoRemove unneeded #include <ctype.h> and "isprint.h";
wmeier [Thu, 21 Apr 2011 22:26:27 +0000 (22:26 +0000)]
Remove unneeded #include <ctype.h> and "isprint.h";
Do minor whitespace cleanup.

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

13 years agoRemove some unneeded #includes;
wmeier [Thu, 21 Apr 2011 22:13:56 +0000 (22:13 +0000)]
Remove some unneeded #includes;
Correct some typos;
Use consistent indentation & do some whitespace cleanup.

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

13 years agoRemove some uneeded #includes;
wmeier [Thu, 21 Apr 2011 21:50:35 +0000 (21:50 +0000)]
Remove some uneeded #includes;
Minor indentation & whitespace cleanup.

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

13 years agoRemoved some unneeded variables with initialization.
stig [Thu, 21 Apr 2011 20:56:01 +0000 (20:56 +0000)]
Removed some unneeded variables with initialization.

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

13 years agoRemoved some unneeded assignments.
stig [Thu, 21 Apr 2011 20:44:56 +0000 (20:44 +0000)]
Removed some unneeded assignments.

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

13 years agoFrom Stefan Metzmacher and Gregor Beck via https://bugs.wireshark.org/bugzilla/show_b...
morriss [Thu, 21 Apr 2011 19:51:05 +0000 (19:51 +0000)]
From Stefan Metzmacher and Gregor Beck via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5850 :

The smallest LDAP PDU is 7 bytes, not 4.

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

13 years agoIn a dump_open routine, you don't need to seek to the beginning of the
guy [Thu, 21 Apr 2011 18:33:20 +0000 (18:33 +0000)]
In a dump_open routine, you don't need to seek to the beginning of the
file before doing any writes - it starts out at the beginning of the
file.  This means that you *can* write a Network Instruments capture
file to a pipe, or write it out in compressed form, now that its
dump_open routine no longer seeks.

NetXRay format and K12 binary format, however, *do* require a seek when
writing them.

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

13 years agoAvoid passing a NULL string pointer to format routines: some libc's (e.g.,
morriss [Thu, 21 Apr 2011 18:09:13 +0000 (18:09 +0000)]
Avoid passing a NULL string pointer to format routines: some libc's (e.g.,
Solaris') will core on that.

Also clean up indentation and white space.

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

13 years agoIn file_wrappers.c, explicitly set err_info to null for all errors that
guy [Thu, 21 Apr 2011 17:51:19 +0000 (17:51 +0000)]
In file_wrappers.c, explicitly set err_info to null for all errors that
don't have an "additional information" string.

Get rid of WTAP_ERR_ZLIB; just report an internal error with
WTAP_ERR_INTERNAL instead.  (If they start happening, we can think about
supplying an "additional information" string for compression errors on
output.)

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 16:01:26 +0000 (16:01 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 16:01:03 +0000 (16:01 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 16:00:38 +0000 (16:00 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 15:59:58 +0000 (15:59 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 15:56:43 +0000 (15:56 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoOups
alagoutte [Thu, 21 Apr 2011 14:32:39 +0000 (14:32 +0000)]
Oups
Wrong fix in Rev36755 (Miss +2)

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

13 years agoInclude time.h as compilation might fail with old gilb (2.4)
etxrab [Thu, 21 Apr 2011 13:56:06 +0000 (13:56 +0000)]
Include time.h as compilation might fail with old gilb (2.4)
Thanks Jeff.

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:45:37 +0000 (13:45 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:45:14 +0000 (13:45 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoFix Dead Store (Dead assignement/Dead increment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:43:23 +0000 (13:43 +0000)]
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoRemove is_continuation_line variable (Unused for 3 years with add SMTP Command Pipeli...
alagoutte [Thu, 21 Apr 2011 13:42:15 +0000 (13:42 +0000)]
Remove is_continuation_line variable (Unused for 3 years with add SMTP Command Pipelining (RFC2920) Rev24989)

Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:35:09 +0000 (13:35 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:34:43 +0000 (13:34 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:34:22 +0000 (13:34 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:33:59 +0000 (13:33 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:33:43 +0000 (13:33 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:33:23 +0000 (13:33 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:33:04 +0000 (13:33 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:32:34 +0000 (13:32 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:32:11 +0000 (13:32 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:31:42 +0000 (13:31 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoFix Dead Store (Dead nested assignment) Warning found by Clang
alagoutte [Thu, 21 Apr 2011 13:31:04 +0000 (13:31 +0000)]
Fix Dead Store (Dead nested assignment) Warning found by Clang

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

13 years agoInclude config.h only from .c files.
stig [Thu, 21 Apr 2011 13:13:39 +0000 (13:13 +0000)]
Include config.h only from .c files.

This avoids a warning building epan.c which includes both config.h and wslua.h
(duplicate defines from config.h)

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

13 years agoRevert the previous commit, I was confused :-)
etxrab [Thu, 21 Apr 2011 12:04:02 +0000 (12:04 +0000)]
Revert the previous commit, I was confused :-)

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

13 years agoAdd missing code to handle fields with an extended value_string (BASE_EXT_STRING)
darkjames [Thu, 21 Apr 2011 09:50:12 +0000 (09:50 +0000)]
Add missing code to handle fields with an extended value_string (BASE_EXT_STRING)

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

13 years agoAdd a new WTAP_ERR_DECOMPRESS error, and use that for errors discovered
guy [Thu, 21 Apr 2011 09:41:52 +0000 (09:41 +0000)]
Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discovered
by the gunzipping code.  Have it also supply a err_info string, and
report it.  Have file_error() supply an err_info string.

Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to
suggest a decompression error - into the rawshark and tshark errors,
along the lines of what other programs print.

Fix a case in the Netscaler code where we weren't fetching the error
code on a read failure.

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

13 years agoAdd a cast as there seems to be a problem on some sytems
etxrab [Thu, 21 Apr 2011 08:12:55 +0000 (08:12 +0000)]
Add a cast as there seems to be a problem on some sytems
conversations_table.c: In function `ct_create_popup_menu':

conversations_table.c:1938: warning: passing arg 2 of `gtk_action_group_add_actions' discards qualifiers from pointer target type

make: *** [libui_a-conversations_table.o] Error 1

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

13 years ago"Upgrade" gtk_combo to 'E'.
etxrab [Thu, 21 Apr 2011 06:05:55 +0000 (06:05 +0000)]
"Upgrade" gtk_combo to 'E'.

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

13 years agoFix ep_check_canary_integrity to use proper variable.
darkjames [Thu, 21 Apr 2011 05:31:11 +0000 (05:31 +0000)]
Fix ep_check_canary_integrity to use proper variable.

Previously it would sigsegv (accessing (void *) -1), instead of displaying error.

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

13 years agoAlways check whether NEXT() failed - and rename it to GZ_GETC(), as it
guy [Wed, 20 Apr 2011 21:36:23 +0000 (21:36 +0000)]
Always check whether NEXT() failed - and rename it to GZ_GETC(), as it
has semantics similar to getc().

If it fails due to an EOF, set state->err to WTAP_ERR_SHORT_READ to
report a premature EOF; otherwise, raw_read() has already set
state->err, so don't set state->err to something else - that loses the
errno value in favor of a generic "bad data" error.

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

13 years agoSimplify the test in a loop.
martinm [Wed, 20 Apr 2011 21:25:38 +0000 (21:25 +0000)]
Simplify the test in a loop.

This was in response to a VS Code Analysis warning.  Not sure if it was confused by lack of parenthesis, or if it detected that we had an && where both sides would always have the same value, but it was confusing.

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

13 years agoAdd code to dissect "original uTP header format"
wmeier [Wed, 20 Apr 2011 20:32:26 +0000 (20:32 +0000)]
Add code to dissect "original uTP header format"
 as described in the LibuTP utp.cpp source code;
Add a kludgy heuristic to differentiate between
 original and "V1" header formats.
 TBD: validity of the heuristic; is there a better way ?

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

13 years agoReplace the capture interface deprecated gtk_combo_new() with gtk_combo_box_entry_new...
etxrab [Wed, 20 Apr 2011 20:17:20 +0000 (20:17 +0000)]
Replace the capture interface deprecated gtk_combo_new() with gtk_combo_box_entry_new_text.

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

13 years agoUse [hi|lo]_nibble macros, leave room in str[] for invalid BCD digits to be
cmaynard [Wed, 20 Apr 2011 20:12:40 +0000 (20:12 +0000)]
Use [hi|lo]_nibble macros, leave room in str[] for invalid BCD digits to be
displayed as blanks.  Since imsi_to_str() and ip_to_str() do the same thing,
just have imsi_to_str() call ip_to_str() rather than having two different
implementations of the same thing.  Use a BCD2CHAR macro instead of doing a
table lookup.

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

13 years agoSigh. The "data" element of a GArray is, alas, a "gchar *", not a "void
guy [Wed, 20 Apr 2011 18:04:43 +0000 (18:04 +0000)]
Sigh.  The "data" element of a GArray is, alas, a "gchar *", not a "void
*", and some compilers complain when you cast that pointer to something
requiring stricter alignment.  Maybe the intent is to nudge you into
thinking about whether the pointer really is properly aligned, but....

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

13 years agopntohll() takes a guint8 * as an argument; there's no need to cast to a
guy [Wed, 20 Apr 2011 17:53:11 +0000 (17:53 +0000)]
pntohll() takes a guint8 * as an argument; there's no need to cast to a
guint64 *, and it causes clang to complain.

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

13 years ago- New-style dissectors need to always return "bytes dissected" (not just when tree...
wmeier [Wed, 20 Apr 2011 17:25:07 +0000 (17:25 +0000)]
- New-style dissectors need to always return "bytes dissected" (not just when tree != NULL);
- The dissector probably shouldn't return a value for "bytes dissected" which is larger
   than the tvb length (altho there's actually no harm given the current implementation).
- Don't try to do an 'add_item' with an offset past the end of the tvb (altho again there's
   no actual harm in this case).

ToDo: Handle "original format" uTP headers.

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

13 years agoAdd Makefile.common to the dependency list for register.c.
gerald [Wed, 20 Apr 2011 17:08:40 +0000 (17:08 +0000)]
Add Makefile.common to the dependency list for register.c.

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

13 years agoFix a typo in a text string; use consistent indentation.
wmeier [Wed, 20 Apr 2011 16:35:42 +0000 (16:35 +0000)]
Fix a typo in a text string; use consistent indentation.

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

13 years agoProperly (re)initialise structs used for keeping track of UEs/TTI.
martinm [Wed, 20 Apr 2011 10:23:41 +0000 (10:23 +0000)]
Properly (re)initialise structs used for keeping track of UEs/TTI.

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

13 years agoOh, dear, autoconf thinks clang is GCC, because it defines __GNUC__.
guy [Wed, 20 Apr 2011 09:31:47 +0000 (09:31 +0000)]
Oh, dear, autoconf thinks clang is GCC, because it defines __GNUC__.

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

13 years agoBy default, clang only warns about unknown -W options, it doesn't
guy [Wed, 20 Apr 2011 09:16:44 +0000 (09:16 +0000)]
By default, clang only warns about unknown -W options, it doesn't
generate an error for them.  Force them to be treated as errors, so we
correctly test whether an option is supported.

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

13 years agoInstead of having GCC and CLANG variables, just have
guy [Wed, 20 Apr 2011 08:37:45 +0000 (08:37 +0000)]
Instead of having GCC and CLANG variables, just have
ac_supports_gcc_flags and ac_supports_W_linker_passthrough flags, the
first of which, for now, we set for GCC and clang, and the latter of
which we set for GCC, clang, and xlc (probably true for some other
compilers as well).

Rename AC_WIRESHARK_GCC_LDFLAGS_CHECK to AC_WIRESHARK_LDFLAGS_CHECK, as
it's not checking for anything GCC-specific.  (Leave
AC_WIRESHARK_GCC_CFLAGS_CHECK unrenamed for now, as the flags we test
with it are originally GCC flags that clang also supports for GCC
compatibility.)

Fix some string-equality tests to use = rather than ==; the former is
what the test/[ command uses.

Don't turn on "-no-cpp-precomp" for clang - it whines if you do.

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

13 years agoOnly add /SafeSEH to LDFLAGS if WIRESHARK_TARGET_PLATFORM != win64. The
cmaynard [Wed, 20 Apr 2011 05:21:32 +0000 (05:21 +0000)]
Only add /SafeSEH to LDFLAGS if WIRESHARK_TARGET_PLATFORM != win64.  The
Windows-7-x64 buildbot doesn't like it and reports the following:
LINK : fatal error LNK1246: '/SAFESEH' not compatible with 'x64' target machine; link without '/SAFESEH'

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

13 years agoFirst cut at support for clang. We may want to have specific items for
guy [Wed, 20 Apr 2011 03:22:19 +0000 (03:22 +0000)]
First cut at support for clang.  We may want to have specific items for
"supports GCC-style -W flags", etc., and may want to improve the check
for "is this clang", as well as deciding what other stuff should be done
if we have clang as well.  clang should, I think, largely be
gcc-compatible at the command line.

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

13 years agoAdded Vladimir Kazansky for his contribution to bug 5849.
cmaynard [Wed, 20 Apr 2011 02:32:19 +0000 (02:32 +0000)]
Added Vladimir Kazansky for his contribution to bug 5849.

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

13 years agoFrom Vladimir Kazansky via bug 5849: Fix msisdn_to_str() so it converts all BCD
cmaynard [Wed, 20 Apr 2011 02:24:16 +0000 (02:24 +0000)]
From Vladimir Kazansky via bug 5849: Fix msisdn_to_str() so it converts all BCD
digits and not just 1.

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

13 years agoFrom Georg Mueller via bug #5851: Add not handled IDs to BitTorrent
sfisher [Tue, 19 Apr 2011 21:31:02 +0000 (21:31 +0000)]
From Georg Mueller via bug #5851: Add not handled IDs to BitTorrent
dissector

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

13 years agoCID 1161: Not really used variable
jmayer [Tue, 19 Apr 2011 21:20:15 +0000 (21:20 +0000)]
CID 1161: Not really used variable

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

13 years agoCID 1162: Not really used variable
jmayer [Tue, 19 Apr 2011 21:15:58 +0000 (21:15 +0000)]
CID 1162: Not really used variable

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

13 years agoFrom Cecco via bug #5605: bug on gtk wireshark telephony->mtp3->msus
sfisher [Tue, 19 Apr 2011 19:52:50 +0000 (19:52 +0000)]
From Cecco via bug #5605: bug on gtk wireshark telephony->mtp3->msus
[doesn't show contents of window]

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

13 years agoExplicitly add /GS to CFLAGS and /SafeSEH & /FIXED:no to LDFLAGS.
gerald [Tue, 19 Apr 2011 19:20:03 +0000 (19:20 +0000)]
Explicitly add /GS to CFLAGS and /SafeSEH & /FIXED:no to LDFLAGS.

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

13 years agoAdd Xiao Xiangquan to the AUTHORS file ....
wmeier [Tue, 19 Apr 2011 16:43:01 +0000 (16:43 +0000)]
Add Xiao Xiangquan to the AUTHORS file ....

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

13 years agoWhitespace cleanup; Remove an uneeded col_clear().
wmeier [Tue, 19 Apr 2011 16:37:39 +0000 (16:37 +0000)]
Whitespace cleanup; Remove an uneeded col_clear().

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

13 years agoThis file had an identical copy appended to the end of it. Remove
sfisher [Tue, 19 Apr 2011 16:24:29 +0000 (16:24 +0000)]
This file had an identical copy appended to the end of it.  Remove
duplicate.

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

13 years agoReplace the capture filter deprecated gtk_combo_new() with gtk_combo_box_entry_new_text,
etxrab [Tue, 19 Apr 2011 16:02:07 +0000 (16:02 +0000)]
Replace the capture filter deprecated gtk_combo_new() with gtk_combo_box_entry_new_text,

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

13 years agoSet svn:eol-style & svn:keywords properties
wmeier [Tue, 19 Apr 2011 16:00:20 +0000 (16:00 +0000)]
Set svn:eol-style & svn:keywords properties

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

13 years agoFrom Xiao Xiangquan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5846
alagoutte [Tue, 19 Apr 2011 15:23:51 +0000 (15:23 +0000)]
From Xiao Xiangquan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5846
A new dissector for uTorrent Transport Protocol

From me :
* Add link to spec BEP-0029
* Add note about type/version
* Rework extensions loop
* Use 2-space indenting

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

13 years agoFrom Xiao Xiangquan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5846
alagoutte [Tue, 19 Apr 2011 15:23:06 +0000 (15:23 +0000)]
From Xiao Xiangquan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5846
A new dissector for uTorrent Transport Protocol

From me :
* Add link to spec BEP-0029
* Add note about type/version
* Rework extensions loop
* Use 2-space indenting

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