obnox/wireshark/wip.git
12 years agoDon't assign to an unused 'proto item *': Coverity 1033 & 906
wmeier [Thu, 19 May 2011 20:21:08 +0000 (20:21 +0000)]
Don't assign to an unused 'proto item *': Coverity 1033 & 906

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

12 years agoIn case we have no interface information in the array, use the global value.
tuexen [Thu, 19 May 2011 20:20:35 +0000 (20:20 +0000)]
In case we have no interface information in the array, use the global value.
This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5935.

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

12 years agoCreate subtree under the correct parent tree: Coverity 1138.
wmeier [Thu, 19 May 2011 20:16:10 +0000 (20:16 +0000)]
Create subtree under the correct parent tree: Coverity 1138.

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

12 years agoDon't assign a value which is never used to a 'proto item *': Covertiy 1135;
wmeier [Thu, 19 May 2011 20:13:54 +0000 (20:13 +0000)]
Don't assign a value which is never used to a 'proto item *': Covertiy 1135;
Remove some unneeded #includes.

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

12 years agoFix markup.
gerald [Thu, 19 May 2011 20:13:33 +0000 (20:13 +0000)]
Fix markup.

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

12 years agoUpdate the version and command output.
gerald [Thu, 19 May 2011 19:52:56 +0000 (19:52 +0000)]
Update the version and command output.

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

12 years ago#if 0 some not currently used code: Fixes Coverity 966 [UNUSED]
wmeier [Thu, 19 May 2011 19:48:39 +0000 (19:48 +0000)]
#if 0 some not currently used code: Fixes Coverity 966 [UNUSED]
Convert apparent "4 space tabs" to "4 spaces".

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

12 years agoRemove unneeded variable and code; Rename a function arg; Fix usage of _U_: Fixes...
wmeier [Thu, 19 May 2011 19:22:49 +0000 (19:22 +0000)]
Remove unneeded variable and code; Rename a function arg; Fix usage of _U_: Fixes Coverity 1146 [UNUSED]

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

12 years agoFOP 0.95 → 1.0.
gerald [Thu, 19 May 2011 19:03:22 +0000 (19:03 +0000)]
FOP 0.95 → 1.0.

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

12 years agoFrom Dirk Jagdmann via bug 5875:
gerald [Thu, 19 May 2011 18:10:21 +0000 (18:10 +0000)]
From Dirk Jagdmann via bug 5875:

My attachment adds a link to a XSLT file to the preamble of the PDML.
The XSLT will transform the PDML to a HTML page, and the HTML page
features a look similar to Wireshark. See
http://cubic.org/~doj/ebay/a.pdml for an example.

The patch also contains a small perl program which converts the
Wireshark colortable into javascript code which is used in the XSLT
file. If you want to use a different color scheme you would execute the
perl program and insert the generated javascript function into your XSLT
file.

To view the HTML you could either place the PDML and XSLT file on your
webserver and verify that your webserver sends the PDML file as
"text/xml".  Then your webbrowser will find the linked XSLT file,
download that as well and convert the PDML to HTML on the fly.

You could also use an XSLT processor like xsltproc to convert the PDML
and XSLT into a static HTML file.

From me:

Minor fixups.

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

12 years agoGive some routines used for info levels that appear both in set and get
guy [Thu, 19 May 2011 16:22:21 +0000 (16:22 +0000)]
Give some routines used for info levels that appear both in set and get
names beginning with dissect_qspi_, and give some of them names with the
info level structure in them rather than the SNIA CIFS specification
section number.

Have separate routines for SMB_INFO_STANDARD and SMB_INFO_QUERY_EA_SIZE;
SMB_INFO_STANDARD is specified differently in the SNIA CIFS
specification and the MS-CIFS specification, and some captures have the
SNIA CIFS version, with the EA length and some have the MS-CIFS version
without it.  The dissector for SMB_INFO_STANDARD will dissect it if it's
there and not say "this structure is truncated" if it's not there.

Rename dissect_qfi_SMB_FILE_ALTERNATE_NAME_INFO() to
dissect_qfi_SMB_FILE_NAME_INFO(), as it also dissects
SMB_QUERY_FILE_NAME_INFO.

Merge the dissectors for SMB_FILE_ALLOCATION_INFO and
SMB_SET_FILE_ALLOCATION_INFO, and for SMB_FILE_END_OF_FILE_INFO and
SMB_SET_FILE_END_OF_FILE_INFO, as the structures are the same.

Dissect some presumed "passthrough info levels" the same way the
corresponding official SMB infos are dissected.

Expand some comments for info level dissectors to give the MS-CIFS
section number and to give some other details.

If an info level is truncated, put in an expert info error.

If we don't know about a given info level, just dissect the body as
"Information level unknown", rather than having it dissected as an
"unknown information" trailer.

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

12 years agoWhen capturing from multiple interface, indicate this in the main status bar.
tuexen [Thu, 19 May 2011 16:11:02 +0000 (16:11 +0000)]
When capturing from multiple interface, indicate this in the main status bar.

This patch is, as all other patches related to capturing from multiple interfaces,
based on work of Irene Ruengeler.

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

12 years agoFix compilation.
tuexen [Thu, 19 May 2011 15:38:44 +0000 (15:38 +0000)]
Fix compilation.

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

12 years agoFix a typo.
etxrab [Thu, 19 May 2011 15:23:19 +0000 (15:23 +0000)]
Fix a typo.

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

12 years agoDon't assign a value to a variable which is then not used: Coverity 1145
wmeier [Thu, 19 May 2011 14:48:05 +0000 (14:48 +0000)]
Don't assign a value to a variable which is then not used: Coverity 1145

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

12 years agoSubdissect 2 3GPP AVP:s that are actually text.
etxrab [Thu, 19 May 2011 14:41:58 +0000 (14:41 +0000)]
Subdissect 2 3GPP AVP:s that are actually text.

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

12 years agoDon't assign to an unused variable; remove variable definition: Coverity 1144.
wmeier [Thu, 19 May 2011 14:32:14 +0000 (14:32 +0000)]
Don't assign to an unused variable; remove variable definition: Coverity 1144.

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

12 years agoDon't assign a value to a variable which is then never used: Coverity 1160 [UNUSED]
wmeier [Thu, 19 May 2011 14:11:01 +0000 (14:11 +0000)]
Don't assign a value to a variable which is then never used: Coverity 1160 [UNUSED]

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

12 years agoWhen capturing from multiple interfaces, indicate this in the window
tuexen [Thu, 19 May 2011 12:19:03 +0000 (12:19 +0000)]
When capturing from multiple interfaces, indicate this in the window
title of the wireshark main window.

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

12 years agoRemove unused define.
tuexen [Thu, 19 May 2011 12:14:27 +0000 (12:14 +0000)]
Remove unused define.

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

12 years agoIt is not an error (anymore) to specify multiple capture filters.
tuexen [Thu, 19 May 2011 11:58:18 +0000 (11:58 +0000)]
It is not an error (anymore) to specify multiple capture filters.
This was
wireshark -i lo0 -f sctp -i en0 -f udp -k
will work.

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

12 years agoThe routines declared in packet-smb.h are defined in packet-smb.c;
guy [Thu, 19 May 2011 09:47:03 +0000 (09:47 +0000)]
The routines declared in packet-smb.h are defined in packet-smb.c;
include packet-smb.h in packet-smb.c so that we check the declarations
against the definitions.

In query ops, info level 2 is Query EA Size, not Query EAs From List.
In set ops, info level 2 is Set EAs, not Query EA Size.

Expand the constants for the Trans2 subcodes to 16 bits.

The tvb argument to dissect_find_file_unix_info2() is used.

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

12 years agoActually use the defaults from the last commit message.
tuexen [Thu, 19 May 2011 05:51:52 +0000 (05:51 +0000)]
Actually use the defaults from the last commit message.
... and switch off debug output.

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

12 years agoAdd a queue and byte limit to the capture queue. Current default
tuexen [Thu, 19 May 2011 05:49:46 +0000 (05:49 +0000)]
Add a queue and byte limit to the capture queue. Current default
values: 1000 packets, 1 MB. Should be made configurable via
command line options.

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

12 years agoFix warnings about unused variables in UI_MANAGER code.
jmayer [Thu, 19 May 2011 05:46:07 +0000 (05:46 +0000)]
Fix warnings about unused variables in UI_MANAGER code.
Move gsm_a_stat.c back to clean dissectors.

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

12 years agoFix two warning in case of UIMANAGER:
jmayer [Thu, 19 May 2011 05:44:32 +0000 (05:44 +0000)]
Fix two warning in case of UIMANAGER:
- Unused variable
- ‘graph_type’ may be used uninitialized

Is the second part of the patch (added inside the else clause)
correct?

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

12 years agoFix another old style function declaration warning
jmayer [Thu, 19 May 2011 05:08:42 +0000 (05:08 +0000)]
Fix another old style function declaration warning

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

12 years agoWhen capturing from multiple interfaces, indicate this in the
tuexen [Thu, 19 May 2011 05:00:28 +0000 (05:00 +0000)]
When capturing from multiple interfaces, indicate this in the
capture info dialog.
This is based on wirk from Irene Ruengeler.

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

12 years agoFix the capture info dialog. Reset the EOF state such that the
tuexen [Thu, 19 May 2011 04:56:04 +0000 (04:56 +0000)]
Fix the capture info dialog. Reset the EOF state such that the
number get actually updated.

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

12 years agoFix an old style function declaration warning.
jmayer [Thu, 19 May 2011 04:42:57 +0000 (04:42 +0000)]
Fix an old style function declaration warning.

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

12 years agoUpdate CMakeLists to follow commit 37219.
jmayer [Thu, 19 May 2011 04:35:04 +0000 (04:35 +0000)]
Update CMakeLists to follow commit 37219.
Remove a duplicate check in configure.in

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

12 years agoMove the debug output for the generated command line arguments to the correct place.
tuexen [Thu, 19 May 2011 04:30:05 +0000 (04:30 +0000)]
Move the debug output for the generated command line arguments to the correct place.

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

12 years agoFor old times' sake: Fix bad dissection of Ethernet Router Hello Messages: Coverity...
wmeier [Thu, 19 May 2011 01:42:49 +0000 (01:42 +0000)]
For old times' sake: Fix bad dissection of Ethernet Router Hello Messages: Coverity 876 & 877 [UNUSED]

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

12 years agoAdd a check that (plain) value_strings that are used in hf items don't have
martinm [Thu, 19 May 2011 01:21:48 +0000 (01:21 +0000)]
Add a check that (plain) value_strings that are used in hf items don't have
any conflicting entries.  i.e. lots of value_strings have repeated items, but
for now only warn for cases where the same numeric value appears with a
different string.

Because this will slow down startup and output distracting warnings, it has been
#if 0'd out for now.  As discussed on the dev mailing list, it'd be good to
create a #define for developer/non-release builds so that tests such as this
can regularly be run.

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

12 years agoOnly declare a variable if its going to be used.
martinm [Thu, 19 May 2011 01:09:05 +0000 (01:09 +0000)]
Only declare a variable if its going to be used.

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

12 years agoImprove AM sequence analysis, check ACK looks sensible compared with latest SN receiv...
martinm [Thu, 19 May 2011 01:05:26 +0000 (01:05 +0000)]
Improve AM sequence analysis, check ACK looks sensible compared with latest SN received in opposite direction.

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

12 years agoSet subheader root length to 1, so if contentsinvalid will already be correctl length.
martinm [Thu, 19 May 2011 01:03:56 +0000 (01:03 +0000)]
Set subheader root length to 1, so if contentsinvalid will already be correctl length.

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

12 years agoDon't create 2 unneeded subtrees; Fixes Coverity 879 & 880 [UNUSED];
wmeier [Wed, 18 May 2011 23:24:50 +0000 (23:24 +0000)]
Don't create 2 unneeded subtrees; Fixes Coverity 879 & 880 [UNUSED];
#include <stdio.h> & <time.h> not needed.

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

12 years agoDon't assign to an unused 'proto_item *': Fixes Coverity 883 [UNUSED];
wmeier [Wed, 18 May 2011 23:09:18 +0000 (23:09 +0000)]
Don't assign to an unused 'proto_item *': Fixes Coverity 883 [UNUSED];
Use correct 'tree' arg in a dissect(...) fcn call: Fixes Coverity 884 [UNUSED];
#include <stdlib.h> not req'd.

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

12 years agoCreate 2 subtrees using the correct 'proto_item *'; Fixes Coverity 900 & 901 [UNUSED];
wmeier [Wed, 18 May 2011 23:01:05 +0000 (23:01 +0000)]
Create 2 subtrees using the correct 'proto_item *'; Fixes Coverity 900 & 901 [UNUSED];
#inclide <stdlib.h> not req'd.

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

12 years ago#include <stdlib.h> not req'd;
wmeier [Wed, 18 May 2011 22:49:33 +0000 (22:49 +0000)]
#include <stdlib.h> not req'd;
Reformat hf[] definition;
Misc whitespace cleanup;

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

12 years agoAdd a missing creation of a subtree: Fixes Coverity 907 [UNUSED];
wmeier [Wed, 18 May 2011 22:01:29 +0000 (22:01 +0000)]
Add a missing creation of a subtree: Fixes Coverity 907 [UNUSED];
Don't create an unused subtree: Fixes Coverity 908 [UNUSED];

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

12 years agoFix tvb_get_bits_buf for LSB.
darkjames [Wed, 18 May 2011 21:33:05 +0000 (21:33 +0000)]
Fix tvb_get_bits_buf for LSB.

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

12 years ago(Trivial) Fix a typo; Add spme punctuation in a coment.
wmeier [Wed, 18 May 2011 21:20:22 +0000 (21:20 +0000)]
(Trivial) Fix a typo; Add spme punctuation in a coment.

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

12 years agoFix some (value) mistakes in value_strings. Found by Martin's patch on the -dev...
morriss [Wed, 18 May 2011 21:07:59 +0000 (21:07 +0000)]
Fix some (value) mistakes in value_strings.  Found by Martin's patch on the -dev list.

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

12 years agoFix a couple (value) mistakes in a value_string, taking the values from the IDL
morriss [Wed, 18 May 2011 20:56:03 +0000 (20:56 +0000)]
Fix a couple (value) mistakes in a value_string, taking the values from the IDL
file.  Found by Martin's patch on the -dev list.

Add a comment to answer the question of whether this file is autogenerated by
pointing to the IDL file.

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

12 years agoFix a (value) mistake in a value_string. Found by Martin's patch on the -dev list.
morriss [Wed, 18 May 2011 20:26:55 +0000 (20:26 +0000)]
Fix a (value) mistake in a value_string.  Found by Martin's patch on the -dev list.

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

12 years agoFix a couple (value) mistakes in value_strings. Found by Martin's patch on the ...
morriss [Wed, 18 May 2011 20:06:17 +0000 (20:06 +0000)]
Fix a couple (value) mistakes in value_strings.  Found by Martin's patch on the -dev list.

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

12 years agoWe don't have the ability to set the capture buffer size on all platforms.
guy [Wed, 18 May 2011 19:29:47 +0000 (19:29 +0000)]
We don't have the ability to set the capture buffer size on all platforms.

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

12 years ago- Optimize tvb_get_bits_buf
darkjames [Wed, 18 May 2011 18:49:33 +0000 (18:49 +0000)]
- Optimize tvb_get_bits_buf
- Add lsb0 (read: least significant bit is 0) parameter to tvb_get_bits_buf()
  (not tested, might be buggy...)

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

12 years agoDon't print too many interface names...
tuexen [Wed, 18 May 2011 18:35:57 +0000 (18:35 +0000)]
Don't print too many interface names...

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

12 years agoAdd support for multiple interfaces for the -L option.
tuexen [Wed, 18 May 2011 18:04:50 +0000 (18:04 +0000)]
Add support for multiple interfaces for the -L option.

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

12 years agoSupport multiple interfaces when used with -L option.
tuexen [Wed, 18 May 2011 18:03:58 +0000 (18:03 +0000)]
Support multiple interfaces when used with -L option.
Show multiple interfaces when capturing from them.

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

12 years agoUse the interface specific parameter array.
tuexen [Wed, 18 May 2011 18:02:30 +0000 (18:02 +0000)]
Use the interface specific parameter array.

This enables the capturing from mulitple interfaces using
tshark and wireshark (at the command line).
(tshark -i lo0 -i en0) or (wireshark -k -i lo0 -i en0)
works. You can capture from multiple remote and local
interfaces.

Based on work from Irene Ruengeler.

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

12 years agoFinish removing tabs and fix up some indentation.
morriss [Wed, 18 May 2011 17:31:48 +0000 (17:31 +0000)]
Finish removing tabs and fix up some indentation.

Add a break after decoding CSData Codec Type.

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

12 years agoMark a function arg as _U_
wmeier [Wed, 18 May 2011 17:19:42 +0000 (17:19 +0000)]
Mark a function arg as _U_

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

12 years agoDo PROTO_ITEM_SET_GENERATED for two 'proto_item *': Fixes Coverity 914 & 915 [UNUSED]
wmeier [Wed, 18 May 2011 17:17:08 +0000 (17:17 +0000)]
Do PROTO_ITEM_SET_GENERATED for two 'proto_item *': Fixes Coverity 914 & 915 [UNUSED]

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

12 years agoAdd a default (else) case in the default case for cause values to avoid passing
morriss [Wed, 18 May 2011 17:09:55 +0000 (17:09 +0000)]
Add a default (else) case in the default case for cause values to avoid passing
a NULL string pointer to format routines.

While we're there, update the cause list from 48.008 v10.1.0.

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

12 years agoDon't assign to an unused 'proto_item *': Coverity 939 [UNUSED];
wmeier [Wed, 18 May 2011 16:52:45 +0000 (16:52 +0000)]
Don't assign to an unused 'proto_item *': Coverity 939 [UNUSED];
Don't create a subtree which is never used: Coverity 940 [UNUSED].

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

12 years agoUse subtree rather than parent tree to add items; Fixes Coverity 973 & 974;
wmeier [Wed, 18 May 2011 16:19:15 +0000 (16:19 +0000)]
Use subtree rather than parent tree to add items; Fixes Coverity 973 & 974;
#include <stdlib.h> not needed;
Minor whitespace cleanup.

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

12 years agoPer destination flags is a 1-byte field. Grab it with tvb_get_guint8(), not
cmaynard [Wed, 18 May 2011 15:56:46 +0000 (15:56 +0000)]
Per destination flags is a 1-byte field.  Grab it with tvb_get_guint8(), not
with tvb_get_letohs().  (Bug surfaced while trying out MESH_OVERRIDES.)

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

12 years agoFrom discussion in dev mailing ( http://www.wireshark.org/lists/wireshark-dev/201105...
alagoutte [Wed, 18 May 2011 15:34:34 +0000 (15:34 +0000)]
From discussion in dev mailing ( wireshark.org/lists/wireshark-dev/201105/msg00235.html )
* Fix a duplicate value_string in cp_version table
* Fix a typo error (Cersion => Version)
Also fix some whitespaces/4tab-spaces (Need more work...)

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

12 years agoFix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5930 :
morriss [Wed, 18 May 2011 15:33:07 +0000 (15:33 +0000)]
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5930 :

with a variant of the patch submitted by Alexander Stein on the -dev list:

Allow FT_FRAMENUMs to be added (as base BASE_NONE).  My change from Alexander's
patch is to disallow BASE_NONE for non-framenum integers.

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

12 years agoRefer to "Capture Help" as "Capture Help below" when there are no interfaces
rbalint [Wed, 18 May 2011 13:08:02 +0000 (13:08 +0000)]
Refer to "Capture Help" as "Capture Help below" when there are no interfaces
to capture on.

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

12 years agoRemoved "Copy" from the profiles popup menu in favour of a "Create from"
stig [Wed, 18 May 2011 08:10:37 +0000 (08:10 +0000)]
Removed "Copy" from the profiles popup menu in favour of a "Create from"
dropdown in the "Create New Profile" window.

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

12 years agoYou cannot just make the "len" field of a GByteArray larger, if there's
guy [Wed, 18 May 2011 07:20:45 +0000 (07:20 +0000)]
You cannot just make the "len" field of a GByteArray larger, if there's
no data to back that length; you can only make it smaller.

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

12 years agoMake some more routines not used outside epan/proto.c static.
guy [Wed, 18 May 2011 03:28:26 +0000 (03:28 +0000)]
Make some more routines not used outside epan/proto.c static.

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

12 years agoConvert tabs to "4 spaces" since it appears that tabs are "4 space tabs";
wmeier [Wed, 18 May 2011 01:37:06 +0000 (01:37 +0000)]
Convert tabs to "4 spaces" since it appears that tabs are "4 space tabs";

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

12 years agoRemove code to generate an unuse sub-tree: Coverity: 976;
wmeier [Wed, 18 May 2011 01:29:25 +0000 (01:29 +0000)]
Remove code to generate an unuse sub-tree: Coverity: 976;
Don't assign to an unused variable: Coverity 977;
#include <stdlib.h> & <string.h> not req'd.

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

12 years agoDon't assign to unused proto_item * variables: Coverity 1015 & 1016.
wmeier [Wed, 18 May 2011 00:59:24 +0000 (00:59 +0000)]
Don't assign to unused proto_item *  variables: Coverity 1015 & 1016.

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

12 years agoRemove altogether code '#if 0'd in SVN #37229.
wmeier [Wed, 18 May 2011 00:37:35 +0000 (00:37 +0000)]
Remove altogether code '#if 0'd in SVN #37229.
Further research shows that registering the dissector
to "tcp.port" and "udp.port" was explicitly removed in SVN #34969
and thus the code to create tcp and udp handles and the associated
dissect_reload_tcp() and dissect_reload_udp() code is no longer
needed.

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

12 years agoGet rid of unused function.
guy [Wed, 18 May 2011 00:29:48 +0000 (00:29 +0000)]
Get rid of unused function.

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

12 years ago#if 0 some unused code & vars: Coverity 1018 & 1019;
wmeier [Wed, 18 May 2011 00:07:32 +0000 (00:07 +0000)]
#if 0 some unused code & vars: Coverity 1018 & 1019;
Add a comment the unused code.

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

12 years agoSquelch a narrowing warning.
guy [Tue, 17 May 2011 23:39:06 +0000 (23:39 +0000)]
Squelch a narrowing warning.

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

12 years agoSquelch a narrowing warning.
guy [Tue, 17 May 2011 23:37:27 +0000 (23:37 +0000)]
Squelch a narrowing warning.

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

12 years agoMake some routines static that aren't used outside the source file in
guy [Tue, 17 May 2011 23:36:25 +0000 (23:36 +0000)]
Make some routines static that aren't used outside the source file in
which they're defined.

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

12 years agoAdd items to subtree rather than tree: Coverity 1026;
wmeier [Tue, 17 May 2011 23:36:12 +0000 (23:36 +0000)]
Add items to subtree rather than tree: Coverity 1026;
Don't assign to an unused variable: Coverity 1027;
#include <stdlib.h> not req'd.

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

12 years agoFix another old-style function definition.
guy [Tue, 17 May 2011 23:35:12 +0000 (23:35 +0000)]
Fix another old-style function definition.

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

12 years agoMake some routines static that aren't used outside the source file in
guy [Tue, 17 May 2011 23:33:23 +0000 (23:33 +0000)]
Make some routines static that aren't used outside the source file in
which they're defined.

Include some header files that declare functions in the source files
that define the functions.

Declare packet_list_get_type() in gtk/packet_list_store.h, as it defines
a macro that uses that function.

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

12 years agoAdd -Wold-style-definition and -Wdeclaration-after-statement to the list
guy [Tue, 17 May 2011 22:24:26 +0000 (22:24 +0000)]
Add -Wold-style-definition and -Wdeclaration-after-statement to the list
of warnings we enable by default; we'll move them if they break any
builds in non-fixable ways.

Add -Wmissing-prototypes and -Wmissing-declarations to the list of
things we don't enable by default, and explain why those, and
-Wstrict-prototypes can't be used.

Also explain why we check for clang before checking whether we can
enable -fexcess-precision=fast.

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

12 years agoAlways add the parameter length field to the tree; only make it visible
morriss [Tue, 17 May 2011 22:21:25 +0000 (22:21 +0000)]
Always add the parameter length field to the tree; only make it visible
if the preference is set.

Add %d to the "not found" string in val_to_str() calls.

Upgrade the "ITU address format seen in ANSI" expert info from NOTE to WARN.

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

12 years agoAdd generic tvb_get_bits_buf() which accepts any no_of_bits.
darkjames [Tue, 17 May 2011 22:20:14 +0000 (22:20 +0000)]
Add generic tvb_get_bits_buf() which accepts any no_of_bits.

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

12 years agoMore eradication of old-style function definitions.
guy [Tue, 17 May 2011 22:18:32 +0000 (22:18 +0000)]
More eradication of old-style function definitions.

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

12 years agoDeclare wtap_dump_has_name_resolution().
guy [Tue, 17 May 2011 22:17:04 +0000 (22:17 +0000)]
Declare wtap_dump_has_name_resolution().

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

12 years agoAdd a filterable item for the length of the GT digits in a subtree under the
morriss [Tue, 17 May 2011 21:59:58 +0000 (21:59 +0000)]
Add a filterable item for the length of the GT digits in a subtree under the
digits.

Since we now have a subtree from which to hang things, make the generic (called
or calling) digits fields visible under this new subtree (one less hidden item).

Don't use add_string_format() to add the GT digits, let epan format it for us.
Use more descriptive field descriptions for these entries.

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

12 years agoThis ain't C++; you have to put "void" in as the argument list of
guy [Tue, 17 May 2011 21:28:07 +0000 (21:28 +0000)]
This ain't C++; you have to put "void" in as the argument list of
functions that take no arguments, otherwise the function is treated as a
crufty old C function with undeclared arguments.

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

12 years agoThis ain't C++; you have to put "void" in as the argument list of
guy [Tue, 17 May 2011 21:26:25 +0000 (21:26 +0000)]
This ain't C++; you have to put "void" in as the argument list of
functions that take no arguments, otherwise the function is treated as a
crufty old C function with undeclared arguments.

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

12 years agoFix docbook errors.
gerald [Tue, 17 May 2011 21:00:58 +0000 (21:00 +0000)]
Fix docbook errors.

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

12 years agoDon't leave the truncation flag unset in any of the info level
guy [Tue, 17 May 2011 20:04:22 +0000 (20:04 +0000)]
Don't leave the truncation flag unset in any of the info level
dissectors.

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

12 years agoFix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5875 :
morriss [Tue, 17 May 2011 19:59:18 +0000 (19:59 +0000)]
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5875 :

Error out if the user asked us to install dumpcap with a particular group but
we are not building dumpcap.

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

12 years ago* Don't declare a used arg as unused.
tuexen [Tue, 17 May 2011 19:51:55 +0000 (19:51 +0000)]
* Don't declare a used arg as unused.
* Really clear the EOF flag. This fixes a bug where
  tshark is not able to do a live capture from a pcapng
  file.

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

12 years agoUpdate the release notes for 1.7/1.8.
gerald [Tue, 17 May 2011 19:26:00 +0000 (19:26 +0000)]
Update the release notes for 1.7/1.8.

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

12 years agoAs suggested by Chris: use val_to_str_const() instead of match_strval() plus a
morriss [Tue, 17 May 2011 18:58:40 +0000 (18:58 +0000)]
As suggested by Chris: use val_to_str_const() instead of match_strval() plus a
NULL-return check.

Use val_to_str_const instead of val_to_str() in a couple places where the string
is constant.

Use val_to_str() instead of blindly passing the return value from match_strval()
into a format routine (to ensure a non-NULL string pointer).  A couple of these
were cases where it could not actually return NULL, but I changed it for
consistency.

Store the return value of match_strval() rather than calling it repeatedly.

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

12 years agoUse val_to_str() instead of blindly passing the return value from match_strval()
morriss [Tue, 17 May 2011 18:53:35 +0000 (18:53 +0000)]
Use val_to_str() instead of blindly passing the return value from match_strval()
into a format routine (to ensure a non-NULL string pointer).

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

12 years agoAs suggested by Chris: use val_to_str_const() instead of match_strval() plus a
morriss [Tue, 17 May 2011 17:40:26 +0000 (17:40 +0000)]
As suggested by Chris: use val_to_str_const() instead of match_strval() plus a
NULL-return check.

Use val_to_str_const instead of val_to_str() in a couple places where the string
is constant.

Use val_to_str() instead of blindly passing the return value from match_strval()
into a format routine (to ensure a non-NULL string pointer).

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

12 years agoAvoid passing a NULL string pointer to format routines: some libc's (e.g.,
morriss [Tue, 17 May 2011 16:07:24 +0000 (16:07 +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@37201 f5534014-38df-0310-8fa8-9805f1628bb7

12 years agoAll ELEM_MAND_* macros ensure curr_len > 0; no need to check again afterwards.
cmaynard [Tue, 17 May 2011 14:41:01 +0000 (14:41 +0000)]
All ELEM_MAND_* macros ensure curr_len > 0; no need to check again afterwards.
Resolves Coverity CIDs 381-382.

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

12 years agoUse the correct value string and bitmasks.
etxrab [Tue, 17 May 2011 08:23:30 +0000 (08:23 +0000)]
Use the correct value string and bitmasks.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5928

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

12 years agoUpdate to FindGTK2 from cmake 2.8.3. Add back quartz options which
jmayer [Tue, 17 May 2011 04:20:35 +0000 (04:20 +0000)]
Update to FindGTK2 from cmake 2.8.3. Add back quartz options which
are not part of the official cmake release.

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

12 years agoAccording to MS-NLMP, the "version" field in the NTLMSSP blobs is
guy [Tue, 17 May 2011 02:29:43 +0000 (02:29 +0000)]
According to MS-NLMP, the "version" field in the NTLMSSP blobs is
present only if the NTLMSSP_NEGOTIATE_VERSION flag is set in the flags
field, and that appears to be true in at least one capture I've seen.

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