metze/wireshark/wip.git
11 years agotvb_length_remaining() can return -1, so don't assign its return value to an unsigned...
Chris Maynard [Fri, 13 Jul 2012 21:03:54 +0000 (21:03 -0000)]
tvb_length_remaining() can return -1, so don't assign its return value to an unsigned integer.  Fixes Coverity CID 281367: Improper use of negative value.

svn path=/trunk/; revision=43698

11 years agotvb_length_remaining() can return -1, so don't assign its return value to an unsigned...
Chris Maynard [Fri, 13 Jul 2012 20:47:08 +0000 (20:47 -0000)]
tvb_length_remaining() can return -1, so don't assign its return value to an unsigned integer.  Fixes Coverity CID's 280233 and 280234.

svn path=/trunk/; revision=43697

11 years agotvb_length_remaining() can return -1, so don't assign its return value to an unsigned...
Chris Maynard [Fri, 13 Jul 2012 20:43:55 +0000 (20:43 -0000)]
tvb_length_remaining() can return -1, so don't assign its return value to an unsigned integer.  Fixes Coverity CID's 280233 and 280234.

svn path=/trunk/; revision=43696

11 years agotp->name can't be NULL, but perhaps tp can be?
Chris Maynard [Fri, 13 Jul 2012 20:09:29 +0000 (20:09 -0000)]
tp->name can't be NULL, but perhaps tp can be?
Fixes Coverity CID 709597: Array compared against 0.

svn path=/trunk/; revision=43695

11 years agoFix Coverity CID 709600: Resource leak.
Chris Maynard [Fri, 13 Jul 2012 20:04:28 +0000 (20:04 -0000)]
Fix Coverity CID 709600: Resource leak.

svn path=/trunk/; revision=43694

11 years agoRemove unused filters found by checkhf.pl
Pascal Quantin [Fri, 13 Jul 2012 17:16:28 +0000 (17:16 -0000)]
Remove unused filters found by checkhf.pl

svn path=/trunk/; revision=43693

11 years agoFrom Harald Welte via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7476 :
Pascal Quantin [Fri, 13 Jul 2012 17:04:43 +0000 (17:04 -0000)]
From Harald Welte via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7476 :
UMA dissector incorrectly passes MAC addresses to wireshark core

svn path=/trunk/; revision=43692

11 years agoUpdate 3GPP-RAT-Type values
Pascal Quantin [Fri, 13 Jul 2012 16:56:11 +0000 (16:56 -0000)]
Update 3GPP-RAT-Type values

svn path=/trunk/; revision=43691

11 years agoUpdate dissector to match asn1/pkcs1 sources.
Chris Maynard [Fri, 13 Jul 2012 12:34:36 +0000 (12:34 -0000)]
Update dissector to match asn1/pkcs1 sources.

svn path=/trunk/; revision=43690

11 years agoFix incorrect(duplicate) value in artnet_oem_code_vals[] value string array;
Bill Meier [Fri, 13 Jul 2012 04:52:40 +0000 (04:52 -0000)]
Fix incorrect(duplicate) value in artnet_oem_code_vals[] value string array;

   { 0x0ae0, "chainzone:RoundTable:0 DMX Inputs,
   ...
-  { 0x0ae0, "STC Mecatronica:DDR 2404 Digital Dimmer Rack:...
+  { 0x0b00, "STC Mecatronica:DDR 2404 Digital Dimmer Rack:...

Correct value obtained from Bug #7407 attachment #8684:
  "Art-Net OEM manufacturer codes for 1.4be specification"
     https://bugs.wireshark.org/bugzilla/attachment.cgi?id=8684

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

(Issue noticed because value_string_ext search was 'linear' for this array).

svn path=/trunk/; revision=43689

11 years agoFix crash in geoip_db_pref_init() when changing to a new profile.
Bill Meier [Fri, 13 Jul 2012 00:54:53 +0000 (00:54 -0000)]
Fix crash in geoip_db_pref_init() when changing to a new profile.
(Use g_free() not free() for g_malloc'd memory).

svn path=/trunk/; revision=43688

11 years agoAdd some comments, remove more left-overs from tcp_graph.c.
Martin Mathieson [Fri, 13 Jul 2012 00:35:18 +0000 (00:35 -0000)]
Add some comments, remove more left-overs from tcp_graph.c.

svn path=/trunk/; revision=43687

11 years agoAdd a preference to that when the window scaling options are not
Martin Mathieson [Thu, 12 Jul 2012 23:57:51 +0000 (23:57 -0000)]
Add a preference to that when the window scaling options are not
visible, we can still configure a scaling factor and therefore get
better TCP sequence analysis and see better stream graphs.

A single preference is used for any/all streams for which the true value
isn't known.  I tried to make it obvious when showing the calculated
window size that it came fromt he preference setting.  The default value
for this preference is off, i.e. it won't change existing behaviour.

This was discussed a little at Sharkfest and raised on the developers
list last week.

svn path=/trunk/; revision=43686

11 years agoTry not to print funny characters.
Gerald Combs [Thu, 12 Jul 2012 23:39:25 +0000 (23:39 -0000)]
Try not to print funny characters.

svn path=/trunk/; revision=43685

11 years agoFix building (and running) on OS X.
Gerald Combs [Thu, 12 Jul 2012 22:39:04 +0000 (22:39 -0000)]
Fix building (and running) on OS X.

svn path=/trunk/; revision=43684

11 years agoDo expert "telegrams lost" only of field is > 0;
Bill Meier [Thu, 12 Jul 2012 20:08:34 +0000 (20:08 -0000)]
Do expert "telegrams lost" only of field is > 0;
Don't call expert...() under 'if (tree)'

svn path=/trunk/; revision=43683

11 years agoDon't call subdissector / expert...() under 'if (tree)'
Bill Meier [Thu, 12 Jul 2012 19:36:35 +0000 (19:36 -0000)]
Don't call subdissector / expert...() under 'if (tree)'
Reformat hf[] entries.

svn path=/trunk/; revision=43682

11 years agoDon't call subdissectors / expert...() / col...() under 'if (tree)'
Bill Meier [Thu, 12 Jul 2012 17:22:47 +0000 (17:22 -0000)]
Don't call subdissectors / expert...() / col...() under 'if (tree)'
Also:
 Remove some uneeded initializers;
 Do some whitespace cleanup and re-formatting.

svn path=/trunk/; revision=43681

11 years agoAdd crc7 calculation abillity.
Anders Broman [Thu, 12 Jul 2012 14:24:19 +0000 (14:24 -0000)]
Add crc7 calculation abillity.

svn path=/trunk/; revision=43680

11 years agoAdd svn:keywords & svn:eol-style properties
Bill Meier [Thu, 12 Jul 2012 14:23:25 +0000 (14:23 -0000)]
Add svn:keywords & svn:eol-style properties

svn path=/trunk/; revision=43679

11 years agoSpeed up reading of out-header values, and add a couple of 'monitor'
Martin Mathieson [Thu, 12 Jul 2012 01:26:08 +0000 (01:26 -0000)]
Speed up reading of out-header values, and add a couple of 'monitor'
fields.

svn path=/trunk/; revision=43678

11 years agoUse win32_open_file in qtshark on Windows.
Gerald Combs [Thu, 12 Jul 2012 00:04:53 +0000 (00:04 -0000)]
Use win32_open_file in qtshark on Windows.

svn path=/trunk/; revision=43677

11 years agoMSDN says DIALOG resources are obsolete. Use DIALOGEXes instead. We aren't
Gerald Combs [Wed, 11 Jul 2012 21:25:42 +0000 (21:25 -0000)]
MSDN says DIALOG resources are obsolete. Use DIALOGEXes instead. We aren't
adding extra controls to the save dialog any more so remove its template.

svn path=/trunk/; revision=43676

11 years agomemcpy() is quite a bit faster than g_strlcpy()!
Martin Mathieson [Wed, 11 Jul 2012 20:53:24 +0000 (20:53 -0000)]
memcpy() is quite a bit faster than g_strlcpy()!

svn path=/trunk/; revision=43675

11 years agoFix compile error.
Bill Meier [Wed, 11 Jul 2012 20:52:52 +0000 (20:52 -0000)]
Fix compile error.

svn path=/trunk/; revision=43674

11 years agoAdd some initializers to prevent some not really valid compiler warnings.
Bill Meier [Wed, 11 Jul 2012 20:49:35 +0000 (20:49 -0000)]
Add some initializers to prevent some not really valid compiler warnings.

svn path=/trunk/; revision=43673

11 years agoDon't call col_...() and expert...() functions under 'if (tree)'
Bill Meier [Wed, 11 Jul 2012 20:44:22 +0000 (20:44 -0000)]
Don't call col_...() and expert...() functions under 'if (tree)'

svn path=/trunk/; revision=43672

11 years agoDon't call col...() and expert..() functions under 'if (tree)';
Bill Meier [Wed, 11 Jul 2012 20:40:13 +0000 (20:40 -0000)]
Don't call col...() and expert..() functions under 'if (tree)';
Reformat hf[] entries and various other.

svn path=/trunk/; revision=43671

11 years agoRemove unneeded #includes;
Bill Meier [Wed, 11 Jul 2012 20:31:47 +0000 (20:31 -0000)]
Remove unneeded #includes;
Rename header_fields[] tp hf[] as per convention;
Reformat hf[] entries;
Remove empty proto_reg_handoff...().

svn path=/trunk/; revision=43670

11 years agoExplicit value_string array size specifier not required.
Bill Meier [Wed, 11 Jul 2012 20:26:24 +0000 (20:26 -0000)]
Explicit value_string array size specifier not required.

svn path=/trunk/; revision=43669

11 years agoFrom Martin Kaiser via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7468 :
Pascal Quantin [Wed, 11 Jul 2012 20:20:10 +0000 (20:20 -0000)]
From Martin Kaiser via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7468 :
DVB-CI/CI+: fix offset error in operator_info apdu

svn path=/trunk/; revision=43668

11 years agoDon't call expert_...() under 'if (tree)';
Bill Meier [Wed, 11 Jul 2012 20:18:23 +0000 (20:18 -0000)]
Don't call expert_...() under 'if (tree)';
Prefs callback not needed.

svn path=/trunk/; revision=43667

11 years agoFix [-Werror=sign-compare] compiler warning
Bill Meier [Wed, 11 Jul 2012 18:43:30 +0000 (18:43 -0000)]
Fix  [-Werror=sign-compare] compiler warning

svn path=/trunk/; revision=43666

11 years agoSimplify code ....
Bill Meier [Wed, 11 Jul 2012 18:32:20 +0000 (18:32 -0000)]
Simplify code ....

svn path=/trunk/; revision=43665

11 years agoRemove "comment to myself".
Bill Meier [Wed, 11 Jul 2012 16:24:01 +0000 (16:24 -0000)]
Remove "comment to myself".

svn path=/trunk/; revision=43664

11 years agoGeneral cleanup:
Bill Meier [Wed, 11 Jul 2012 15:28:31 +0000 (15:28 -0000)]
General cleanup:
- Fix potential array overflow;
- Calls to expert...() should not be under 'if (tree)';
- Don't use DISSECTOR_ASSERT for bad data; use expert...();
- Add some XXX comments about enum item values different than
   specified in the comments associated with the enum items;
- Init global 'mfgCommandFlag' as appropriate before use;
- Add missing hf[] entries;
- #if 0 various unused #defines and enums;
- Reduce (somewhat) repeated fetches of the same tvb data;
- Remove unneeded initializers;
- Don't use 'l' as a variable name;
- Reformat long lines, hf[] array entries and other;;
- Fix some indentation;

svn path=/trunk/; revision=43663

11 years agofailure cause is an OCTET STRING not a string.
Anders Broman [Wed, 11 Jul 2012 14:41:21 +0000 (14:41 -0000)]
failure cause is an OCTET STRING not a string.

svn path=/trunk/; revision=43662

11 years agoRevert part of revision 43107 which broke sub dissection of
Anders Broman [Wed, 11 Jul 2012 14:40:35 +0000 (14:40 -0000)]
Revert part of revision 43107 which broke sub dissection of
Signal and events as a new tvb wasn't created.
|BASE_EXT_STRING also removed.

svn path=/trunk/; revision=43661

11 years agoe_addr_resolve has a new member.
Anders Broman [Wed, 11 Jul 2012 10:39:49 +0000 (10:39 -0000)]
e_addr_resolve has a new member.

svn path=/trunk/; revision=43660

11 years agoAdd a new preference to make it possible to only use the hosts file
Anders Broman [Wed, 11 Jul 2012 08:52:51 +0000 (08:52 -0000)]
Add a new preference to make it possible to only use the hosts file
for a profile for name resolution.

svn path=/trunk/; revision=43659

11 years agoDon't ask for information about an interface greater than the maximum
Guy Harris [Wed, 11 Jul 2012 03:57:13 +0000 (03:57 -0000)]
Don't ask for information about an interface greater than the maximum
interface for which we have information.

Fixes bug 7467.

Should also cause an error message, rather than an unreadable capture
file, to be produced for the cases in bug 7381.  (This isn't a fix for
bug 7381; it's arguably an improvement, in the sense that a circuit
breaker tripping or a fuse blowing for a short circuit is an improvement
over a fire starting, but it's not a *fix*, any more than a circuit
break or fuse *fixes* the short circuit.)

#BACKPORT

svn path=/trunk/; revision=43657

11 years agoAARGH. There are two lumps of (almost-)identical code to handle
Guy Harris [Wed, 11 Jul 2012 03:50:28 +0000 (03:50 -0000)]
AARGH.  There are two lumps of (almost-)identical code to handle
interface information when opening an output file, one of which I fixed
in my previous checkin and the other of which I didn't notice.  Shuffle
code around a little bit so that the lumps are identical and then put
them into a common routine (*with* the fix in question).

#BACKPORT

svn path=/trunk/; revision=43655

11 years agoSpeed up line drawing by no longer creating and destroying a cairo_t
Martin Mathieson [Wed, 11 Jul 2012 02:43:00 +0000 (02:43 -0000)]
Speed up line drawing by no longer creating and destroying a cairo_t
object for each line - rather create one and use it for the entire list,
then destroy it.

Simplify the allocation of segments, by no longer messing around with a
static that may or may not be used.  Also, there was a good chance the
last one would be leaked (if it was not part of the stream we are
interested in).

Note that both of these improvements would also apply to tcp_graph.c -
will wait a couple of days to be sure the changes are good.

svn path=/trunk/; revision=43654

11 years agoSet the time units per second correctly if, in wtap_dump_open_ng(),
Guy Harris [Tue, 10 Jul 2012 19:59:39 +0000 (19:59 -0000)]
Set the time units per second correctly if, in wtap_dump_open_ng(),
we're making a fake interface description (it should match the time
stamp resolution).  The dump code for pcap-NG now requires the time
units per second value, as it needs to correctly compute the time stamp
value to write out in an EPB.

svn path=/trunk/; revision=43652

11 years agoFrom Ben Bowen:
Guy Harris [Tue, 10 Jul 2012 19:43:55 +0000 (19:43 -0000)]
From Ben Bowen:

Add additional named fields for IMAP.

svn path=/trunk/; revision=43651

11 years agoWhen writing an EPB, calculate the time stamp based on the resolution
Guy Harris [Tue, 10 Jul 2012 19:12:37 +0000 (19:12 -0000)]
When writing an EPB, calculate the time stamp based on the resolution
for the interface, not based on the default resolution of 1 microsecond.
Fixes bug 7457.

Fix a comment.

Clean up indentation.

#BACKPORT

svn path=/trunk/; revision=43649

11 years agoFix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7438 :
Pascal Quantin [Tue, 10 Jul 2012 15:43:03 +0000 (15:43 -0000)]
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7438 :
Do not call tvb_ensure_length_remaining on an empty tvb

svn path=/trunk/; revision=43648

11 years agoObey the new use-external-resolvers preference when translating IP
Jeff Morriss [Tue, 10 Jul 2012 15:02:23 +0000 (15:02 -0000)]
Obey the new use-external-resolvers preference when translating IP
addresses into host names (in get_host_ipaddr() and get_host_ipaddr6()).

This may resolve
http://ask.wireshark.org/questions/12542/what-is-use-external-network-name-resolver-setting

svn path=/trunk/; revision=43647

11 years agoUpdate the packet list and details if name resolution is changed.
Anders Broman [Tue, 10 Jul 2012 14:48:23 +0000 (14:48 -0000)]
Update the packet list and details if name resolution is changed.

svn path=/trunk/; revision=43646

11 years agohost_lookup() and host_lookup6() are both called even when network-name
Jeff Morriss [Tue, 10 Jul 2012 14:33:19 +0000 (14:33 -0000)]
host_lookup() and host_lookup6() are both called even when network-name
resolution is NOT enabled (it's always been like this and I'm not sure why
and I was hesitant to change that).  So: don't use the external name resolver
unless both network-name resolution AND use-external-resolvers are enabled.

svn path=/trunk/; revision=43645

11 years agoUpdate the /View/NameResolution menu when activated in case the
Anders Broman [Tue, 10 Jul 2012 14:01:36 +0000 (14:01 -0000)]
Update the /View/NameResolution menu when activated in case the
settings has ben altered elswhere in the GUI.

svn path=/trunk/; revision=43644

11 years agoFrom Guy Davies via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7462 :
Jeff Morriss [Tue, 10 Jul 2012 13:26:25 +0000 (13:26 -0000)]
From Guy Davies via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7462 :

There have been some updates to the dictionary.erx since it was last synced
from FreeRADIUS.  Please find attached an updated dictionary for Juniper
Networks ERX.

svn path=/trunk/; revision=43643

11 years agoFrom Edwin Groothuis via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7461 :
Jeff Morriss [Tue, 10 Jul 2012 13:22:46 +0000 (13:22 -0000)]
From Edwin Groothuis via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7461 :

When showing the TCP (and UDP and other protocols) port numbers in the
framelist columns, they are left aligned. This is sub-optimal if you are
scanning the list for a certain port.

This patch, very small, will properly right justify these numbers:
UNRESOLVED DST PORT
UNRESOLVED SRC PORT
DST PORT
SRC PORT

svn path=/trunk/; revision=43642

11 years agoIntroduce a preference setting for application context version.
Anders Broman [Tue, 10 Jul 2012 11:39:06 +0000 (11:39 -0000)]
Introduce a preference setting for application context version.

svn path=/trunk/; revision=43641

11 years agoFrom Martin Kaiser:
Anders Broman [Tue, 10 Jul 2012 11:37:25 +0000 (11:37 -0000)]
From Martin Kaiser:
Add rlc_lte_graph.c

svn path=/trunk/; revision=43640

11 years agoChange the button order in all places.
Anders Broman [Tue, 10 Jul 2012 07:50:34 +0000 (07:50 -0000)]
Change the button order in all places.

svn path=/trunk/; revision=43639

11 years agoGroup the network name resolution boxes together and make a more verbose explanation...
Anders Broman [Tue, 10 Jul 2012 07:24:01 +0000 (07:24 -0000)]
Group the network name resolution boxes together and make a more verbose explanation on the intended use.

svn path=/trunk/; revision=43638

11 years agoMove LPP and LPPe dissectors to the ASN.1 dirty library
Pascal Quantin [Tue, 10 Jul 2012 07:19:40 +0000 (07:19 -0000)]
Move LPP and LPPe dissectors to the ASN.1 dirty library

svn path=/trunk/; revision=43637

11 years agoTrivial indentation fixes.
Martin Mathieson [Tue, 10 Jul 2012 02:19:34 +0000 (02:19 -0000)]
Trivial indentation fixes.

svn path=/trunk/; revision=43636

11 years agoFrom Evan Huus:
Guy Harris [Tue, 10 Jul 2012 01:57:55 +0000 (01:57 -0000)]
From Evan Huus:

Fix an uninitialized-variable error that was breaking compile with gcc.

Also remove some cruft that looks like it was copy-pasted from
ui/gtk/tcp_graph.c

Fixes bug 7460.

svn path=/trunk/; revision=43635

11 years agoAdd a sequence graph for LTE RLC channels under Telephony | LTE.
Martin Mathieson [Tue, 10 Jul 2012 01:32:54 +0000 (01:32 -0000)]
Add a sequence graph for LTE RLC channels under Telephony | LTE.

svn path=/trunk/; revision=43634

11 years agoFix up some comments.
Guy Harris [Mon, 9 Jul 2012 23:14:50 +0000 (23:14 -0000)]
Fix up some comments.

svn path=/trunk/; revision=43633

11 years agoFix another comment.
Guy Harris [Mon, 9 Jul 2012 23:12:21 +0000 (23:12 -0000)]
Fix another comment.

svn path=/trunk/; revision=43632

11 years agoFix some comments.
Guy Harris [Mon, 9 Jul 2012 23:10:45 +0000 (23:10 -0000)]
Fix some comments.

svn path=/trunk/; revision=43631

11 years agoThe names "etherpeek" and "airopeek" are a bit misleading, as the
Guy Harris [Mon, 9 Jul 2012 23:07:28 +0000 (23:07 -0000)]
The names "etherpeek" and "airopeek" are a bit misleading, as the
"etherpeek.c" file format is used by AiroPeek and the "airopeek9.c" file
format is used by EtherPeek.

Instead, use the names that WildPackets apparently uses for those
formats - "classic" and "tagged".

svn path=/trunk/; revision=43630

11 years agoUpdate comments
Pascal Quantin [Mon, 9 Jul 2012 21:04:50 +0000 (21:04 -0000)]
Update comments

svn path=/trunk/; revision=43629

11 years agoAdd LTE Positioning Protocol Extensions dissector
Pascal Quantin [Mon, 9 Jul 2012 20:55:09 +0000 (20:55 -0000)]
Add LTE Positioning Protocol Extensions dissector
Upgrade LTE Positioning Protocol to V10.5.0

svn path=/trunk/; revision=43628

11 years agoAs suggested by Richard Sharpe: rename VALS_GROUP_NAMES[] so it's not all
Jeff Morriss [Mon, 9 Jul 2012 20:45:14 +0000 (20:45 -0000)]
As suggested by Richard Sharpe: rename VALS_GROUP_NAMES[] so it's not all
upper case.

Don't mark stat_group_name()'s 'group' parameter unused: it is unused.

svn path=/trunk/; revision=43627

11 years agoMinor formatting changes: Surround Clement Marrast's e-mail with <> like everyone...
Chris Maynard [Mon, 9 Jul 2012 14:45:30 +0000 (14:45 -0000)]
Minor formatting changes:  Surround Clement Marrast's e-mail with <> like everyone else's and no need to capitalize Clement's entire last name.  Convert some spaces to tabs.  Remove spaces surrounding " [AT] ", as it seems that initially that's how they were being written.

svn path=/trunk/; revision=43626

11 years agoUpdate AVP dissection.
Anders Broman [Mon, 9 Jul 2012 14:10:40 +0000 (14:10 -0000)]
Update AVP dissection.

svn path=/trunk/; revision=43625

11 years agoDissect Release 8 CDR:s
Anders Broman [Mon, 9 Jul 2012 14:09:59 +0000 (14:09 -0000)]
Dissect Release 8 CDR:s

svn path=/trunk/; revision=43624

11 years agoFrom Evan Huus: Struct cleanup in packet-assa_r3.c
Bill Meier [Mon, 9 Jul 2012 03:00:03 +0000 (03:00 -0000)]
From Evan Huus: Struct cleanup in packet-assa_r3.c

Cleanup and simplify structures and arrays in packet-assa_r3.c as described in
my email to the -dev list [1].

[1] http://www.wireshark.org/lists/wireshark-dev/201207/msg00050.html

From me:
 Do the same as above for the commandDissectorParser_t struct mentioned in the EMail
 (but not fixed in the patch).

svn path=/trunk/; revision=43623

11 years agoFrom Michael Mann:
Anders Broman [Mon, 9 Jul 2012 02:40:20 +0000 (02:40 -0000)]
From Michael Mann:
disable hide checkboxes with error messages

Updated preference dialog to include text if hide checkbox is disabled.

Used error message for "Local Interfaces" dialog.

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

svn path=/trunk/; revision=43622

11 years agoFrom Evan Huus:
Anders Broman [Mon, 9 Jul 2012 02:33:39 +0000 (02:33 -0000)]
From Evan Huus:
IO Graph Fixes

- Allow counting *any* type of field, FT_NONE, FT_PROTOCOL, whatever, by moving
FT_NONE case to default case per Jakub's suggestion.

- Fix get_it_value() for FT_PROTOCOL fields by breaking CALC_TYPE_COUNT_FRAMES
and CALC_TYPE_COUNT_FIELDS out of the adv_type switch statement just like
COUNT_TYPE_FRAMES.

- Avoid an overflow in pixmap_clicked_event() that was causing crashes when
clicking outside the data portion of the graph (when the capture hasn't enough
files to fill the entire graph window),

svn path=/trunk/; revision=43621

11 years agoFrom Martin Kaiser:
Anders Broman [Mon, 9 Jul 2012 02:28:14 +0000 (02:28 -0000)]
From Martin Kaiser:
DVB-CI/CI+: dissect the payload of LSC messages.

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

svn path=/trunk/; revision=43620

11 years agoFrom Martin Kaiser:
Anders Broman [Mon, 9 Jul 2012 02:24:07 +0000 (02:24 -0000)]
From Martin Kaiser:
CID 280531: "Argument cannot be negative" in lemon
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7453

svn path=/trunk/; revision=43619

11 years agoFrom Evan Huus:
Anders Broman [Mon, 9 Jul 2012 02:02:03 +0000 (02:02 -0000)]
From Evan Huus:
Redundant conditions in iax2_analysis.c

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

svn path=/trunk/; revision=43618

11 years agoFrom Evan Huus:
Anders Broman [Mon, 9 Jul 2012 01:56:27 +0000 (01:56 -0000)]
From Evan Huus:
Fix leaks

- don't g_strdup a string just to use it in a g_strdup_printf
- clean up properly in error cases in lua bindings
- misc. other missing g_free() calls
- one missing fclose() in the new 80211_utils

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

svn path=/trunk/; revision=43617

11 years agoFrom Evan Huus:
Anders Broman [Mon, 9 Jul 2012 01:49:02 +0000 (01:49 -0000)]
From Evan Huus:
Grab-bag of unused variables.

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

svn path=/trunk/; revision=43616

11 years agoFrom Michael Mann:
Anders Broman [Mon, 9 Jul 2012 01:36:54 +0000 (01:36 -0000)]
From Michael Mann:
GUI use external name resolver proliferation

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

svn path=/trunk/; revision=43615

11 years ago[Automatic manuf, services and enterprise-numbers update for 2012-07-08]
Gerald Combs [Sun, 8 Jul 2012 14:03:29 +0000 (14:03 -0000)]
[Automatic manuf, services and enterprise-numbers update for 2012-07-08]

svn path=/trunk/; revision=43611

11 years agoAdd a function to packet-giop.c that does what the code that
Jeff Morriss [Sun, 8 Jul 2012 03:57:35 +0000 (03:57 -0000)]
Add a function to packet-giop.c that does what the code that
template_get_CDR_string (in wireshark_gen.py) did.  This eliminates another
whole pile of function-local variables in packet-parlay.c.

Unfortunately it doesn't seem to speed up compilation (or eliminate the
variable tracking size limit problem).  But it does eliminate a lot of
lines of code...

svn path=/trunk/; revision=43610

11 years agoEliminate a lot of function-local variables by not storing the result of
Jeff Morriss [Sun, 8 Jul 2012 03:29:49 +0000 (03:29 -0000)]
Eliminate a lot of function-local variables by not storing the result of
(several of the) get_CDR_*() functions: instead call the function directly
in the proto_tree_add_text() calls.

Eliminate a lot of global variables that are only later used in (a single)
strcmp().

All the GIOP dissectors are built-in now; don't include the (#if'd out) plugin
registration code in the generated dissector.

Try to clean up the formatting of the generated code a bit.

Regenerate the IDL dissectors; as noted in r39932, this seems to involve a
lot of function re-ordering in packet-parlay.c (making the delta bigger).

These changes decrease the time to compile packet-parlay.c by, on my system,
about half.  But it still complains:

variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without

and it still takes "too long."

svn path=/trunk/; revision=43609

11 years agoUnless NL80211_BAND_ATTR_HT_CAPA is defined, assume we don't have
Guy Harris [Sun, 8 Jul 2012 02:07:38 +0000 (02:07 -0000)]
Unless NL80211_BAND_ATTR_HT_CAPA is defined, assume we don't have
channel-type-setting capabilities, and don't build the code to set the
channel type or fetch any channel types other than "no HT".

(It *looks* as if nl80211.h defines NL80211_BAND_ATTR_HT_CAPA as a
member of an enum *and* as a #define, at least in the kernels I've
looked at, so we can test for it with #ifdef - perhaps that's *why* it's
#defined.)

svn path=/trunk/; revision=43608

11 years agoDon't bother printing the Description of STATIC_TEXT and UAT preferences:
Jeff Morriss [Sun, 8 Jul 2012 01:48:52 +0000 (01:48 -0000)]
Don't bother printing the Description of STATIC_TEXT and UAT preferences:
they don't make it into the preferences file anyway...

svn path=/trunk/; revision=43607

11 years agoKeep the NL80211_CHAN_ and WS80211_CHAN_ values distinct; only the
Guy Harris [Sun, 8 Jul 2012 01:43:14 +0000 (01:43 -0000)]
Keep the NL80211_CHAN_ and WS80211_CHAN_ values distinct; only the
Linux version of the platform-dependent 802.11 stuff should use the
NL80211_CHAN_ stuff.  Map from the WS80211_CHAN_ values to the
corresponding NL80211_CHAN_ values in ws80211_set_freq(), and have the
channel_types bitset use bits indexed by WS80211_CHAN_ values rather
than NL80211_CHAN_.

This won't fix the problem of building this on Linuxes with old
nl80211.h headers that lack NL80211_CHAN_, but it narrows the set of
code that needs the NL80211_CHAN_ values, perhaps allowing the fix to be
a bit cleaner, as well as making it easier to make this work on
platforms other than Linux.

svn path=/trunk/; revision=43606

11 years agoFirst phase of fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7380 :
Jeff Morriss [Sun, 8 Jul 2012 01:31:48 +0000 (01:31 -0000)]
First phase of fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7380 :

Add a new name resolution option: whether or not use the configured (in the OS)
name resolver (e.g., DNS) to resolve network names.  When this option is disabled
but network name resolution is enabled then Wireshark will resolve only those
names that it can from local sources.  This includes (at least, AFAIK):

- name resolutions that Wireshark picks up on from DNS packets it decodes
- the "user hosts file" (~/.wireshark/hosts on *NIX)
- what Wireshark reads out of capture file (the PCAPNG name resolution block)

This new preference defaults to "use external resolvers" for backward
compatibility (so people turning on network name resolution will get the old
behavior).

This option can be set via Edit->Preferences and on the command line; there
remain several UIs (e.g., the "open capture file" dialog, the
View->Name Resolution menu, etc.) that don't have the new option yet.

Also expand on the "description" for the name resolution preferences: these
are used not only in the tooltips but are also written to the preferences
file.  The previous text didn't include enough context when written do the
preferences file.

svn path=/trunk/; revision=43605

11 years agoFrom Evan Huus:
Guy Harris [Sun, 8 Jul 2012 01:17:19 +0000 (01:17 -0000)]
From Evan Huus:

Don't initialize GeoIP from epan_init(), as we probably haven't loaded the
preferences for it yet (thanks to it's new use of the UAT framework).

Instead, register a post_update callback with UAT and load it there. As a
bonus, this also means that applying GeoIP preferences no longer requires
restarting Wireshark - everything should Just Work with the new databases right
away.

Fixes bug 7446.

svn path=/trunk/; revision=43604

11 years agoUATs could be put into "categories". The categories were defined only
Guy Harris [Sun, 8 Jul 2012 01:00:46 +0000 (01:00 -0000)]
UATs could be put into "categories".  The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603

11 years agoFrom Evan Huus:
Guy Harris [Sat, 7 Jul 2012 22:40:02 +0000 (22:40 -0000)]
From Evan Huus:

There is no guarantee that uat->category is non-null, so check whether
it's null before checking whether it's UAT_CAT_FIELDS or not.

Fixes bug 7444.

#BACKPORT

svn path=/trunk/; revision=43602

11 years agoUse -D_FORTIFY_SOURCE=2 only if the gc optimization level is greater than 0.
Bill Meier [Sat, 7 Jul 2012 22:35:55 +0000 (22:35 -0000)]
Use -D_FORTIFY_SOURCE=2 only if the gc optimization level is greater than 0.

Fixes Bug #7449: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7449

-----
Issue:

Building Wireshark with '-O0 -D_FORTIFY_SOURCE=2 ...' fails

The warning [error] message:

/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Werror=cpp]`

A bit of research shows that this warning was added to a recent version of
glibc (on at least Fedora).

 See: http://sourceware.org/bugzilla/show_bug.cgi?id=13979

The warning message occurs if -D_FORTIFY_SOURCE=... is used and the gcc
'optimization level' == 0 (-O0).

Unfortunately when building with -O0 this warning message:

1. Causes compiles to fail (if -Werror [stop  on warning])
2. Causes ./configure to fail with an (incorrect) message
   about the pcap header being older than the libpcap version.

svn path=/trunk/; revision=43601

11 years agoFix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7445 :
Jeff Morriss [Sat, 7 Jul 2012 14:54:14 +0000 (14:54 -0000)]
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7445 :

"Find Next Mark" was duplicated in the Edit menu and "Find Previous Mark" was
missing (the 2nd "Find Next Mark" would, if selected, find the previous mark).

svn path=/trunk/; revision=43600

11 years agoFrom Evan Huus: Fix "Useless null checks in packet-dcerpc*"
Bill Meier [Sat, 7 Jul 2012 14:21:20 +0000 (14:21 -0000)]
From Evan Huus: Fix "Useless null checks in packet-dcerpc*"

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

svn path=/trunk/; revision=43599

11 years agoFrom Evan Huus: fix "Unused variable in packet-ansi_a.c"
Bill Meier [Sat, 7 Jul 2012 14:11:38 +0000 (14:11 -0000)]
From Evan Huus: fix "Unused variable in packet-ansi_a.c"

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

svn path=/trunk/; revision=43598

11 years agoFrom Michael Mann:
Guy Harris [Sat, 7 Jul 2012 08:15:41 +0000 (08:15 -0000)]
From Michael Mann:

Add a preference for the packet length statistics.

Fixes bug 3239.

svn path=/trunk/; revision=43597

11 years agoOnly one place is needed for creating preference panes; this clears up
Guy Harris [Sat, 7 Jul 2012 02:49:17 +0000 (02:49 -0000)]
Only one place is needed for creating preference panes; this clears up
some warnings from GTK+.

For interior nodes in the preference module tree, we create a page even
if the module itself has no preferences, so there's *something* we can
show if the user clicks on it.  (Showing the top-level protocols page is
a bit weird, and requires us to keep track of it.)

svn path=/trunk/; revision=43596

11 years agoAsk about a possible simplification (by just handling all modules by
Guy Harris [Sat, 7 Jul 2012 02:10:44 +0000 (02:10 -0000)]
Ask about a possible simplification (by just handling all modules by
pathname, so that any module we create for a protocol is just created as
being under "Protocols/").

svn path=/trunk/; revision=43595

11 years agoClean up mix of tabs and 4-space-tab indents.
Guy Harris [Sat, 7 Jul 2012 01:26:58 +0000 (01:26 -0000)]
Clean up mix of tabs and 4-space-tab indents.

svn path=/trunk/; revision=43594

11 years agoUniformly use two-space indents (most of the file uses it).
Guy Harris [Sat, 7 Jul 2012 00:41:12 +0000 (00:41 -0000)]
Uniformly use two-space indents (most of the file uses it).

svn path=/trunk/; revision=43593

11 years agoGet rid of most tabs (which cleans up mixed indenting with tabs and
Guy Harris [Sat, 7 Jul 2012 00:30:47 +0000 (00:30 -0000)]
Get rid of most tabs (which cleans up mixed indenting with tabs and
4-tab spaces).

svn path=/trunk/; revision=43592