7 years agoTry to fix Windows compilation
Pascal Quantin [Fri, 23 Nov 2012 23:13:22 +0000 (23:13 -0000)]
Try to fix Windows compilation

svn path=/trunk/; revision=46160

7 years agoHoist all the friendly-name/vendor-description stuff up into
Guy Harris [Fri, 23 Nov 2012 22:28:06 +0000 (22:28 -0000)]
Hoist all the friendly-name/vendor-description stuff up into

svn path=/trunk/; revision=46159

7 years agoImprove dissection;
Bill Meier [Fri, 23 Nov 2012 21:11:47 +0000 (21:11 -0000)]
Improve dissection;
- Properly handle DataBlocks with optional fields at end;
- Fix a few field dissections;
General code cleanup;
- Remove almost all tests using tvb_length_remaining():
   If there's not enough data available, just let an
   exception be thrown.
- Fix a memory leak;
- Simplify code in various places.
- Add a reference to the (a ?) Microsoft spec for RDP.

Fixes Bug #7862 in a more complete manner than SVN #45566.

svn path=/trunk/; revision=46158

7 years agoError: the name for hf_bfcp_queue_pos ("bfcp.queue_pos") has trailing space in packet...
Anders Broman [Fri, 23 Nov 2012 16:04:20 +0000 (16:04 -0000)]
Error: the name for hf_bfcp_queue_pos ("bfcp.queue_pos") has trailing space in packet-bfcp.c

svn path=/trunk/; revision=46157

7 years agoUpdate dissetion of the header flags.
Anders Broman [Fri, 23 Nov 2012 14:02:12 +0000 (14:02 -0000)]
Update dissetion of the header flags.

svn path=/trunk/; revision=46156

7 years ago'if 0' wrapping of config.h no longer required;
Bill Meier [Fri, 23 Nov 2012 13:59:56 +0000 (13:59 -0000)]
'if 0' wrapping of config.h no longer required;
Also, '#include winsock2.h' should be before '#include windows.h'
Based upon information provided by Gisle Vanem.


and message thread starting at

svn path=/trunk/; revision=46155

7 years agoAdd dissection of attributes.
Anders Broman [Fri, 23 Nov 2012 13:44:31 +0000 (13:44 -0000)]
Add dissection of attributes.

svn path=/trunk/; revision=46154

7 years agoFix bug reported in
Irene Rüngeler [Fri, 23 Nov 2012 13:16:04 +0000 (13:16 -0000)]
Fix bug reported in

svn path=/trunk/; revision=46153

7 years agoCell Identity (CI) is 2 octets.
Anders Broman [Fri, 23 Nov 2012 12:00:21 +0000 (12:00 -0000)]
Cell Identity (CI) is 2 octets.

svn path=/trunk/; revision=46152

7 years agoFrom mathewt via bug 8012:
Stig Bjørlykke [Fri, 23 Nov 2012 11:20:35 +0000 (11:20 -0000)]
From mathewt via bug 8012:
Fixed lua le_int64() and le_uint64().

svn path=/trunk/; revision=46151

7 years agoWe don't need ole32.lib any more; don't link with it and don't include a
Guy Harris [Fri, 23 Nov 2012 08:33:00 +0000 (08:33 -0000)]
We don't need ole32.lib any more; don't link with it and don't include a
header file for it.

We also don't monkey around with wide characters any more, so don't
include <tchar.h>.

Depending on the SDK you're using and/or the version of Windows on which
you're building, NDIS_IF_MAX_STRING_SIZE and NETIO_STATUS might not be
defined; define them if not.  Thanks to Gisle Vanem for that fix.

svn path=/trunk/; revision=46150

7 years agoParse the GUID ourselves; that leaves fewer error cases to worry about,
Guy Harris [Fri, 23 Nov 2012 08:10:49 +0000 (08:10 -0000)]
Parse the GUID ourselves; that leaves fewer error cases to worry about,
and thus fewer places where we would need to report an error rather than
just saying "well, this name doesn't end in a GUID, so it doesn't
correspond to an interface whose friendly name we can ask for".

svn path=/trunk/; revision=46149

7 years agoIf the interface name doesn't contain a valid GUID string, that's *not*
Guy Harris [Thu, 22 Nov 2012 20:07:05 +0000 (20:07 -0000)]
If the interface name doesn't contain a valid GUID string, that's *not*
an error - not all interface names contain GUIDs (e.g., AirPcap devices,
or \Device\NPF_GenericDialupAdapter).  Don't log a message in that case,
just say "sorry, no friendly name".

Get rid of a g_log() call and fflush() calls that look as if they were
copied-and-pasted from sync pipe code.

Correct some comments.

svn path=/trunk/; revision=46148

7 years agoWe don't need Cocoa or Core Services for anything.
Guy Harris [Thu, 22 Nov 2012 18:19:37 +0000 (18:19 -0000)]
We don't need Cocoa or Core Services for anything.

What we *do* need is:

the Application Services framework, for GUI applications;

System Configuration, for anything that would try to get
interface friendly names;

Core Foundation for everything that uses either of those and/or
everything that displays system version information.

We're currently assuming that the only Apple platform on which we build
is OS X, in which case we have the OS X frameworks; update a comment.

cfutils.c is part of WIRESHARK_COMMON_SRC, which is included in
tshark_FILES; it doesn't need to be included in tshark_FILES.

svn path=/trunk/; revision=46147

7 years agoDon't set HAVE_LIBNL1 if we have don't libnl at all.
Guy Harris [Thu, 22 Nov 2012 18:01:42 +0000 (18:01 -0000)]
Don't set HAVE_LIBNL1 if we have don't libnl at all.

svn path=/trunk/; revision=46146

7 years agoAdd cfutils.c + capture_unix_ifnames.c + SystemConfiguration. Sort our
Gerald Combs [Thu, 22 Nov 2012 17:29:58 +0000 (17:29 -0000)]
Add cfutils.c + capture_unix_ifnames.c + SystemConfiguration. Sort our

svn path=/trunk/; revision=46145

7 years agoLink with CoreFoundation and SystemConfiguration and add cfuitils.c on
Gerald Combs [Thu, 22 Nov 2012 16:49:17 +0000 (16:49 -0000)]
Link with CoreFoundation and SystemConfiguration and add cfuitils.c on
OS X where needed. Dumpcap, rawshark and tshark don't appear to require
Cocoa so remove it.

svn path=/trunk/; revision=46144

7 years agoFix the expert info dealing with parameter padding. The final parameter
Michael Tüxen [Thu, 22 Nov 2012 16:03:19 +0000 (16:03 -0000)]
Fix the expert info dealing with parameter padding. The final parameter
in a chunk is not padded, but the padding bytes are considered padding
of the chunk.

svn path=/trunk/; revision=46143

7 years agoRevert
Anders Broman [Thu, 22 Nov 2012 12:45:50 +0000 (12:45 -0000)]

looks like the worong variables may be used in the for loops.

../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataAdjust_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4420:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataReal_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4542:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
../../../plugins/profinet/packet-dcerpc-pn-io.c:4491:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataCheck_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4570:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_MrpInstanceDataCheck_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:5426:160: error: unused parameter 'u16BodyLength' [-Werror=unused-parameter]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_ARBlockReq_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:6873:9: error: format '%x' expects a matching 'unsigned int' argument [-Werror=format]
../../../plugins/profinet/packet-dcerpc-pn-io.c:6811:13: warning: variable 'u16ARDevAccess' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: At top level:
../../../plugins/profinet/packet-dcerpc-pn-io.c:7628:1: error: 'dissect_IRTFrameBlock_block' defined but not used [-Werror=unused-function]
cc1: all warnings being treated as errors

svn path=/trunk/; revision=46142

7 years agoFrom Preben Guldberg:
Anders Broman [Thu, 22 Nov 2012 12:33:21 +0000 (12:33 -0000)]
From Preben Guldberg:
Add a tooltip for a pkt_comment column to show packet comment.

Modified to check frame data for packet_comment and show it as
a tooltip for the entire row.

svn path=/trunk/; revision=46141

7 years agoFrom Wido Kelling:
Anders Broman [Thu, 22 Nov 2012 12:12:12 +0000 (12:12 -0000)]
From Wido Kelling:
Updates to conform IEC 61158.
major change:
reassembling of PNIO fragments (only works if OpenSafty dissector is disabled)
see Bug 7997

minor changes:
improved handling of DFP Frames

added / updated
MRP Block decoding
SubdirFrameData corrected display and subblocks added
PDIRGlobalData complete dissection
decoding of FrameDataProperties and ARTypes updated to conform the STD
removed now usuported RTC2 ranges

svn path=/trunk/; revision=46140

7 years ago- Include capture_win_ifnames.h
Anders Broman [Thu, 22 Nov 2012 11:38:04 +0000 (11:38 -0000)]
- Include capture_win_ifnames.h
- false -> FALSE

svn path=/trunk/; revision=46139

7 years agoIt's get_windows_interface_friendlyname(), not
Guy Harris [Thu, 22 Nov 2012 08:08:52 +0000 (08:08 -0000)]
It's get_windows_interface_friendlyname(), not

svn path=/trunk/; revision=46138

7 years agoGet the friendly name for interfaces. Also, no Windows interfaces are
Guy Harris [Thu, 22 Nov 2012 08:08:06 +0000 (08:08 -0000)]
Get the friendly name for interfaces.  Also, no Windows interfaces are
loopback interfaces.

svn path=/trunk/; revision=46137

7 years agoSome more if_info_t updates.
Guy Harris [Thu, 22 Nov 2012 07:33:39 +0000 (07:33 -0000)]
Some more if_info_t updates.

svn path=/trunk/; revision=46135

7 years agoFix another reference to the "description" member of an if_info_t (in
Guy Harris [Thu, 22 Nov 2012 07:02:53 +0000 (07:02 -0000)]
Fix another reference to the "description" member of an if_info_t (in
commented-out code).

svn path=/trunk/; revision=46134

7 years agoAdd capture_unix_ifnames.c to the list of files needed when building for
Guy Harris [Thu, 22 Nov 2012 07:00:23 +0000 (07:00 -0000)]
Add capture_unix_ifnames.c to the list of files needed when building for

svn path=/trunk/; revision=46133

7 years agoFix a reference to the "description" member of an if_info_t.
Guy Harris [Thu, 22 Nov 2012 06:54:35 +0000 (06:54 -0000)]
Fix a reference to the "description" member of an if_info_t.

svn path=/trunk/; revision=46132

7 years agoOn UN*X, if an interface has a description, use it as the "friendly
Guy Harris [Thu, 22 Nov 2012 06:02:49 +0000 (06:02 -0000)]
On UN*X, if an interface has a description, use it as the "friendly
name".  If it doesn't have a description, on OS X, use the System
Configuration framework to attempt to get a "friendly name" for

If a loopback device doesn't have a friendly name, give it "Loopback" as
the friendly name.

Move the "turn a CFString into a mallocated C string" routine into
common code, as it's used in more than one place.

svn path=/trunk/; revision=46131

7 years agoGet rid of an unused variable.
Guy Harris [Thu, 22 Nov 2012 05:50:47 +0000 (05:50 -0000)]
Get rid of an unused variable.

svn path=/trunk/; revision=46130

7 years agoAssume, at least for now, that "Darwin" means "OS X"; don't bother
Guy Harris [Thu, 22 Nov 2012 05:46:49 +0000 (05:46 -0000)]
Assume, at least for now, that "Darwin" means "OS X"; don't bother
checking whether the relevant frameworks are available.  (An iOS port's
going to require a *lot* more work, and I don't know whether
Darwin-the-pure-OS even builds and runs any more.)

We don't need Core Services any more, as we're no longer using
Gestalt().  We just need Core Foundation for getting the OS version and
Application Services for firing up Web browser or file manager windows.

svn path=/trunk/; revision=46129

7 years agoFix potential buffer overflow crash; (Bug #7880).
Bill Meier [Thu, 22 Nov 2012 02:27:40 +0000 (02:27 -0000)]
Fix potential buffer overflow crash; (Bug #7880).
Rework code logic slightly so same code path (and tests)
 used whether or not 'if(tree)'.

svn path=/trunk/; revision=46128

7 years agoClean up indentation.
Guy Harris [Thu, 22 Nov 2012 02:09:46 +0000 (02:09 -0000)]
Clean up indentation.

svn path=/trunk/; revision=46127

7 years agoFix indentation.
Guy Harris [Thu, 22 Nov 2012 02:02:08 +0000 (02:02 -0000)]
Fix indentation.

svn path=/trunk/; revision=46126

7 years agofix
Martin Kaiser [Wed, 21 Nov 2012 22:20:22 +0000 (22:20 -0000)]

/home/wireshark/builders/trunk/ubuntu1204x64/build/epan/dissectors/packet-bssgp.c: In function de_bssgp_son_transfer_app_id:
/home/wireshark/builders/trunk/ubuntu1204x64/build/epan/dissectors/packet-bssgp.c:3173:12: error: variable next_tvb set but not used
cc1: all warnings being treated as errors

svn path=/trunk/; revision=46125

7 years agodisplay the content of cc status fields in the info colum
Martin Kaiser [Wed, 21 Nov 2012 21:55:29 +0000 (21:55 -0000)]
display the content of cc status fields in the info colum

svn path=/trunk/; revision=46124

7 years agoall CI+ SAC messages are encrypted
Martin Kaiser [Wed, 21 Nov 2012 21:42:50 +0000 (21:42 -0000)]
all CI+ SAC messages are encrypted
there's no point in displaying this fact in the info column

svn path=/trunk/; revision=46123

7 years agodissect config and cftable tuples in the Card Information Structure
Martin Kaiser [Wed, 21 Nov 2012 21:37:22 +0000 (21:37 -0000)]
dissect config and cftable tuples in the Card Information Structure

svn path=/trunk/; revision=46122

7 years agofix copy&paste error
Martin Kaiser [Wed, 21 Nov 2012 21:21:07 +0000 (21:21 -0000)]
fix copy&paste error

svn path=/trunk/; revision=46121

7 years agoClean up white space (no tabs).
Guy Harris [Wed, 21 Nov 2012 21:09:32 +0000 (21:09 -0000)]
Clean up white space (no tabs).

svn path=/trunk/; revision=46120

7 years agocc status 0x03 means either "authentication failed" or "no srm required"
Martin Kaiser [Wed, 21 Nov 2012 21:08:43 +0000 (21:08 -0000)]
cc status 0x03 means either "authentication failed" or "no srm required"

svn path=/trunk/; revision=46119

7 years agoMake the error message for "we didn't get the error message we expected"
Guy Harris [Wed, 21 Nov 2012 19:04:21 +0000 (19:04 -0000)]
Make the error message for "we didn't get the error message we expected"
clearer - it's not as if we didn't expect to get an error message, we
just didn't expect to get *that particular* error message.

svn path=/trunk/; revision=46118

7 years agoFor invalid interfaces, just check for "The capture session could not be
Guy Harris [Wed, 21 Nov 2012 19:01:16 +0000 (19:01 -0000)]
For invalid interfaces, just check for "The capture session could not be
initiated", as we used to do.

svn path=/trunk/; revision=46117

7 years agoWe aren't using pcap_create()/pcap_activate() to open interfaces on
Guy Harris [Wed, 21 Nov 2012 18:59:27 +0000 (18:59 -0000)]
We aren't using pcap_create()/pcap_activate() to open interfaces on
Windows, as there isn't yet a WinPcap based on libpcap 1.0.0, so we
don't get PCAP_ERROR_NO_SUCH_DEVICE as a return value and thus don't
just report "No such device exists" for an invalid interface.

svn path=/trunk/; revision=46116

7 years agoIf we're not on Windows, assume we don't have sufficient privileges to
Guy Harris [Wed, 21 Nov 2012 18:56:25 +0000 (18:56 -0000)]
If we're not on Windows, assume we don't have sufficient privileges to
open any capture devices, so "-i invalid_interface" will fail with a "no
permission" error rather than a "no such device" error.

svn path=/trunk/; revision=46115

7 years agoThe previous change means the "len" argument is now being used.
Guy Harris [Wed, 21 Nov 2012 18:13:51 +0000 (18:13 -0000)]
The previous change means the "len" argument is now being used.

svn path=/trunk/; revision=46113

7 years agoIn capture_opts_add_iface_opt(), only *require* us to get the interface
Guy Harris [Wed, 21 Nov 2012 18:11:57 +0000 (18:11 -0000)]
In capture_opts_add_iface_opt(), only *require* us to get the interface
list if the user specified a number; otherwise, if we couldn't get the
list, just use what the user specified, so they can specify interfaces
in order to test them to see why they're not showing up in the list.

svn path=/trunk/; revision=46112

7 years agoFrom l.wachowski:
Anders Broman [Wed, 21 Nov 2012 17:59:19 +0000 (17:59 -0000)]
From  l.wachowski:
Allign the tables for dissection.
From me try to fix the dissection of SONtransferApplicationIdentity_PDU.

svn path=/trunk/; revision=46111

7 years agoGive a better failure message for the cases where a test failed not
Guy Harris [Wed, 21 Nov 2012 17:54:14 +0000 (17:54 -0000)]
Give a better failure message for the cases where a test failed not
because of an incorrect exit status but because of the error message not
being what we expected.

Include the name of the program being tested in the capture
filter/interface options tests.

svn path=/trunk/; revision=46110

7 years agoIf we don't find the specified interface name in the list, use it
Guy Harris [Wed, 21 Nov 2012 17:33:02 +0000 (17:33 -0000)]
If we don't find the specified interface name in the list, use it
anyway, so that, for example, if an interface doesn't show up in the
list for some reason, the user can try specifying it explicitly for
testing purposes.

svn path=/trunk/; revision=46109

7 years agoOn error, have capture_opts_trim_iface() return the exit status that
Guy Harris [Wed, 21 Nov 2012 17:14:54 +0000 (17:14 -0000)]
On error, have capture_opts_trim_iface() return the exit status that
should be used (on success, have it return 0).  Exit with that exit
status; if the problem is that we couldn't get the interface list or if
there are no interfaces in that list, return 2, as that's not a
command-line syntax error.

svn path=/trunk/; revision=46108

7 years agoMake the "Invalid capture filter" message resemble that of other programs.
Guy Harris [Wed, 21 Nov 2012 16:05:21 +0000 (16:05 -0000)]
Make the "Invalid capture filter" message resemble that of other programs.

svn path=/trunk/; revision=46107

7 years agoHandle an error message that includes single quotes.
Guy Harris [Wed, 21 Nov 2012 09:03:30 +0000 (09:03 -0000)]
Handle an error message that includes single quotes.

svn path=/trunk/; revision=46105

7 years agoAdd dumpcap command-line option tests; run them before TShark tests, so
Guy Harris [Wed, 21 Nov 2012 09:01:39 +0000 (09:01 -0000)]
Add dumpcap command-line option tests; run them before TShark tests, so
that if dumpcap isn't working right, we don't try TShark tests, as
TShark tests that involve capturing probably won't work.

svn path=/trunk/; revision=46104

7 years agoFix the error message to test for when testing "-i invalid_interface".
Guy Harris [Wed, 21 Nov 2012 07:06:57 +0000 (07:06 -0000)]
Fix the error message to test for when testing "-i invalid_interface".

svn path=/trunk/; revision=46103

7 years agoFix the capitalization of the error message printed if you specify an
Guy Harris [Wed, 21 Nov 2012 01:11:19 +0000 (01:11 -0000)]
Fix the capitalization of the error message printed if you specify an
invalid interface index.

svn path=/trunk/; revision=46102

7 years agoWhen dumpcap is being run by another program, its standard error gets
Guy Harris [Wed, 21 Nov 2012 00:44:21 +0000 (00:44 -0000)]
When dumpcap is being run by another program, its standard error gets
consumed by that program, and that program only ends up reporting one of
those errors.  Therefore, only log one of them; we're seeing errors in
the buildbot, and we want the more detailed error, so don't log a
message after GetInterfaceFriendlyNameFromDeviceGuid() returns an error,
just rely on the error logged by

Ultimately, we don't want to print anything to the standard output or
error at all, as that stuff ends up being consumed by the program in
question; we should either ignore the error (if it's an "expected"
error) or report it through the API so the the caller can, in turn,
report it appropriately.

svn path=/trunk/; revision=46099

7 years agoFrom Stephen Tarr: Fix 'misspelling (typo) in display filter field name'.
Bill Meier [Wed, 21 Nov 2012 00:41:32 +0000 (00:41 -0000)]
From Stephen Tarr: Fix 'misspelling (typo) in display filter field name'.
ipv6.framgent --> ipv6.fragment

svn path=/trunk/; revision=46098

7 years agoSCSI: Sense buffers come in two flavors. Start decoding the descriptor format.
Ronnie Sahlberg [Tue, 20 Nov 2012 03:17:46 +0000 (03:17 -0000)]
SCSI: Sense buffers come in two flavors. Start decoding the descriptor format.

svn path=/trunk/; revision=46097

7 years agoClean up white space.
Guy Harris [Tue, 20 Nov 2012 01:15:00 +0000 (01:15 -0000)]
Clean up white space.

Clarify that the other "friendly name" is NDIS's idea of a "friendly

svn path=/trunk/; revision=46096

7 years agoWe don't use get_windows_interface_friendlyname() in capture_opts.c, so
Guy Harris [Tue, 20 Nov 2012 01:12:57 +0000 (01:12 -0000)]
We don't use get_windows_interface_friendlyname() in capture_opts.c, so
we don't need to include capture_win_ifnames.h.

Clean up white space.

svn path=/trunk/; revision=46095

7 years agoIncluding config.h causes compile errors; Comment out for now...
Bill Meier [Mon, 19 Nov 2012 23:48:07 +0000 (23:48 -0000)]
Including config.h causes compile errors; Comment out for now...

svn path=/trunk/; revision=46094

7 years agoHAVE_CONFIG_H no longer req'd
Bill Meier [Mon, 19 Nov 2012 23:21:54 +0000 (23:21 -0000)]
HAVE_CONFIG_H no longer req'd

svn path=/trunk/; revision=46093

7 years agoAttempt to fix the Windows Qt builds.
Jeff Morriss [Mon, 19 Nov 2012 22:16:39 +0000 (22:16 -0000)]
Attempt to fix the Windows Qt builds.

svn path=/trunk/; revision=46092

7 years agoI thought the test suite was run with capture permissions; that does not appear to...
Jeff Morriss [Mon, 19 Nov 2012 22:11:07 +0000 (22:11 -0000)]
I thought the test suite was run with capture permissions; that does not appear to be true.  Fix the expected output for the "invalid interface" test (again).

svn path=/trunk/; revision=46091

7 years agoPut a line of code on its own line (instead of following a comment).
Jeff Morriss [Mon, 19 Nov 2012 22:01:07 +0000 (22:01 -0000)]
Put a line of code on its own line (instead of following a comment).

svn path=/trunk/; revision=46090

7 years agoFailure to find the interface should cause *shark to exit with a status of 1, not 2.
Jeff Morriss [Mon, 19 Nov 2012 21:41:40 +0000 (21:41 -0000)]
Failure to find the interface should cause *shark to exit with a status of 1, not 2.

svn path=/trunk/; revision=46089

7 years agoAs suggested by Evan: just make the variable a size_t instead of casting away the...
Jeff Morriss [Mon, 19 Nov 2012 21:32:39 +0000 (21:32 -0000)]
As suggested by Evan: just make the variable a size_t instead of casting away the warning.

svn path=/trunk/; revision=46088

7 years agoI'm pretty confident the string length will fit in 32 bits; cast away the "possible...
Jeff Morriss [Mon, 19 Nov 2012 21:00:44 +0000 (21:00 -0000)]
I'm pretty confident the string length will fit in 32 bits; cast away the "possible loss of data" warning on the Win64 build.

svn path=/trunk/; revision=46087

7 years agor46083 added interface name matching which changed the error text when an interface...
Jeff Morriss [Mon, 19 Nov 2012 20:56:20 +0000 (20:56 -0000)]
r46083 added interface name matching which changed the error text when an interface can't be found.  Update the test to check for the new wording.

svn path=/trunk/; revision=46086

7 years agoFrom Roland Knall:
Anders Broman [Mon, 19 Nov 2012 20:20:34 +0000 (20:20 -0000)]
From Roland Knall:
Allow for specific enabling and disabling of heuristic dissectors.

svn path=/trunk/; revision=46085

7 years agoFrom Krishnamurthy Mayya:
Anders Broman [Mon, 19 Nov 2012 20:13:57 +0000 (20:13 -0000)]
From Krishnamurthy Mayya:
Enhancement to support MPLS-TP FM and LI payloads as per RFC 6427 and RFC 6435

Fixed some errors found by checkapi, changed filter names to use
proto abbr.

svn path=/trunk/; revision=46084

7 years agoFrom Mike Garratt:
Anders Broman [Mon, 19 Nov 2012 20:07:27 +0000 (20:07 -0000)]
From Mike Garratt:
Friendly Names for interfaces on Windows

Notes on the changes the patch covers:
* if_info_t struct: addition of friendly_name
* Dumpcap Interface list format changes:
  + Win32: "dumpcap -D" shows friendly_name in place of descript if known
  + All: machine interface "dumpcap -D -Z none" includes friendly_name in the
list in addition to the existing parameters
* interface_options struct: addition of console_display_name
  + When an interface name is displayed in a console, it will typically be the
console_display_name (instead of name).
  + console_display_name is used as the basis of the autogenerated temp
  + console_display_name is typically set to the friendly_name if known,
otherwise it is set to the interface name
* Enhancements to capture_opts_add_iface_opt() (the function which process -i
  + Can now specify the interface using its name and friendly_name
  + Interface name matching is case insenstive
  + Name matching first attempts exact matching, then falls back to prefix
    (e.g. dumpcap -i local)
  + Validates interface names, instead of blindly sending them off to
  + Interface specification by number is still supported.
* capture_opts_trim_iface() has been refactored:
  + Instead of repeating a decent chunk of the cost in
capture_opts_add_iface_opt(), it calls capture_opts_trim_iface() to specify the
* introduction of capture_win_ifnames.[ch] (windows only code)
  + Implements static function GetInterfaceFriendlyNameFromDeviceGuid() - a
windows version independant function to convert an interface guid into its
friendly name.  Uses published api functions on windows vista and higher, but
falls back to unpublished API functions on older windows releases.
  + void get_windows_interface_friendlyname(/* IN */ char
*interface_devicename, /* OUT */char **interface_friendlyname); - extracts the
GUID from the interface_devicename, then uses
GetInterfaceFriendlyNameFromDeviceGuid() to do the resolution
* Auto temp filename generation:
  + Now uses wireshark_pcapng_* or  wireshark_pcap_* depending on file format
  + Basis temp filename format on console_display_name
  + Win32: if console_display_name is a windows interface guid, extracts
numbers from GUID here (instead of in interface option processing)

* Dialog that displays when you click the "Manage Interfaces" button (within
Capture Options dialog) has been renamed from "Add new interfaces" to
"Interface Management"
* ui/gtk/capture_dlg.c: new_interfaces_w variable renamed to
* Win32: Local Interfaces tab on Interface Management dialog, shows includes
friendly name as far left column
* Interface Management dialog defaults to larger size on win32 - so it fits
without resizing local interfaces tab
* Interface Management dialog now saves preferences when you click the apply
button (local hidden interfaces was not persisting across restarts)
* Tweaks: "Interface Details" dialog (Interface list->Capture Interfaces ->
  + "Friendly Name" renamed to "NDIS Friendly Name"
  + Added "OS Friendly Name" to the top of the list
* Win32: The "Capture Interfaces" dialog now shows the friendly name instead of
device guid
* Welcome screen:
  + The height of the interface list scrollbox dynamically adjusts & updates to
the number visible interfaces.
    Up to 10 interfaces can be listed without a scroll bar, the minimum height
is for 2 interfaces.
  + Win32: now shows just the Friendly Name if known - in place of

svn path=/trunk/; revision=46083

7 years agoMake it easier to switch between GTK2 and GTK3.
Anders Broman [Mon, 19 Nov 2012 19:29:36 +0000 (19:29 -0000)]
Make it easier to switch between GTK2 and GTK3.

svn path=/trunk/; revision=46082

7 years agoFrom l.wachowski:
Anders Broman [Mon, 19 Nov 2012 18:59:09 +0000 (18:59 -0000)]
From  l.wachowski:
- In de_bssgp_pdu_in_error() use current_offset isof 0.
- in function de_bssgp_ran_inf_error_rim_cont. Error rim
container doesn't have field rim sequence number. This field exists in the rest
of containers but not in this one. So I have removed this field.
In this function we have field pdu in error and this field is mandatory, not

svn path=/trunk/; revision=46081

7 years agoIf tshark doesn't fail when building the tree, try again without -V.
Jeff Morriss [Mon, 19 Nov 2012 00:04:08 +0000 (00:04 -0000)]
If tshark doesn't fail when building the tree, try again without -V.

svn path=/trunk/; revision=46080

7 years agoWas not allocating a large enough element array for tput graphs.
Martin Mathieson [Sun, 18 Nov 2012 19:52:48 +0000 (19:52 -0000)]
Was not allocating a large enough element array for tput graphs.

svn path=/trunk/; revision=46079

7 years agoAdded check for missing/empty ProtoField abbrev.
Stig Bjørlykke [Sun, 18 Nov 2012 19:15:34 +0000 (19:15 -0000)]
Added check for missing/empty ProtoField abbrev.

svn path=/trunk/; revision=46078

7 years agoCheck if we have a filter name.
Anders Broman [Sun, 18 Nov 2012 18:12:50 +0000 (18:12 -0000)]
Check if we have a filter name.

svn path=/trunk/; revision=46077

7 years agoEnhance error output.
Anders Broman [Sun, 18 Nov 2012 18:10:48 +0000 (18:10 -0000)]
Enhance error output.

svn path=/trunk/; revision=46076

7 years agoFrom Wido Kelling
Martin Kaiser [Sun, 18 Nov 2012 17:52:55 +0000 (17:52 -0000)]
From Wido Kelling

updated Port3 status values to conform to IEC 61158
added decoding of some more values

svn path=/trunk/; revision=46075

7 years ago- Make perform_zoom() quickly return if graph already fully zoomed out
Martin Mathieson [Sun, 18 Nov 2012 15:56:29 +0000 (15:56 -0000)]
- Make perform_zoom() quickly return if graph already fully zoomed out
- Restore zooming out with middle-button + shift
- Lose unused graph->next and register_tap_listener_tcp_graph()
- Fix up some whitespace

svn path=/trunk/; revision=46072

7 years ago[Automatic manuf, services and enterprise-numbers update for 2012-11-18]
Gerald Combs [Sun, 18 Nov 2012 15:03:31 +0000 (15:03 -0000)]
[Automatic manuf, services and enterprise-numbers update for 2012-11-18]

svn path=/trunk/; revision=46070

7 years agoFix some blurbs that matched the field tag.
Guy Harris [Sun, 18 Nov 2012 08:03:05 +0000 (08:03 -0000)]
Fix some blurbs that matched the field tag.

De-RTMP-ize more AMF-related names and move more of the AMF stuff

svn path=/trunk/; revision=46069

7 years agoMove all the AMF stuff under the AMF protocol, as AMF, while it's used
Guy Harris [Sun, 18 Nov 2012 04:30:10 +0000 (04:30 -0000)]
Move all the AMF stuff under the AMF protocol, as AMF, while it's used
with RTMP, can be sent over HTTP, for example, as well.

svn path=/trunk/; revision=46068

7 years agoMore TODOs:
Guy Harris [Sun, 18 Nov 2012 01:59:05 +0000 (01:59 -0000)]
More TODOs:

We hand the user data in a CR or CC packet to the subdissectors,
but don't tell the subdissectors that - do we need to?

We don't hand the data in an ED packet to the subdissectors -
should we, and do we need to tell them that it's an ED packet?

svn path=/trunk/; revision=46067

7 years agoYou can't return from inside a TRY/CATCH/ENDTRY block (see
Guy Harris [Sun, 18 Nov 2012 01:39:32 +0000 (01:39 -0000)]
You can't return from inside a TRY/CATCH/ENDTRY block (see
epan/exceptions.h; it crashes).

Try BER first, including both the test dissection and the check of the
results.  If that fails due to an exception being thrown, or due to the
results not indicating that it's a BER-encoded T.125 packet, try PER, so
that if the BER dissection doesn't work we don't just give up.

Get rid of some _U_s attached to parameters that are, in fact, used.

svn path=/trunk/; revision=46066

7 years agoSupport the older format of SR failure for a while longer.
Martin Mathieson [Sun, 18 Nov 2012 01:33:43 +0000 (01:33 -0000)]
Support the older format of SR failure for a while longer.

svn path=/trunk/; revision=46065

7 years agoIn the heuristic T.124 dissector, catch BoundsError and
Guy Harris [Sun, 18 Nov 2012 01:32:31 +0000 (01:32 -0000)]
In the heuristic T.124 dissector, catch BoundsError and
ReportedBoundsError exceptions when attempting to dissect the first bit
of the packet and, if either is thrown, assume the packet isn't a packet
for what we were trying to dissect, rather than just completely failing.

Return TRUE if the heuristic T.124 dissector recognizes the packet.

Get rid of some _U_s attached to parameters that are, in fact, used.

svn path=/trunk/; revision=46064

7 years agoAdd channel type & ID to sequence analysis expert item strings.
Martin Mathieson [Sat, 17 Nov 2012 23:41:07 +0000 (23:41 -0000)]
Add channel type & ID to sequence analysis expert item strings.

Also simplify a hash function - haven't measured collisions, but before
change sometimes wrong results would get attached.  Don't think I fixed
it, and don't understand how equality function could have matched even
if hash function were colliding...

svn path=/trunk/; revision=46063

7 years agoSquelch another warning.
Guy Harris [Sat, 17 Nov 2012 23:05:03 +0000 (23:05 -0000)]
Squelch another warning.

svn path=/trunk/; revision=46062

7 years agoSquelch a warning (not enough data flow analysis is done to know that
Guy Harris [Sat, 17 Nov 2012 22:35:13 +0000 (22:35 -0000)]
Squelch a warning (not enough data flow analysis is done to know that
cotp_tree actually never will be used uninitialized).

svn path=/trunk/; revision=46061

7 years agoHandle the pseudo-trailer for the ATN extended checksums by passing in
Guy Harris [Sat, 17 Nov 2012 22:12:37 +0000 (22:12 -0000)]
Handle the pseudo-trailer for the ATN extended checksums by passing in
the source and destination address lengths and data, and adding them in,
rather than by copying those fields to a fixed-size static buffer - that
gets rid of a global variable (global variables considered harmful), and
also means that we don't try to copy 24 bytes of length+address from
packets that don't *have* 24 bytes of length+address (which caused
exceptions to be thrown on some OSI captures I have).

Construct some LI #defines out of other LI #defines, to make it a bit
clearer why they have the values they do.

Support the "additional information related to the clearing of the
connection" variable part parameter of the COTP DR packet (which just
means giving it a name, as its contents are user-defined - some HP-UX
OSI stack appears to just stick in a string saying that it's said

Make the code that decodes the variable part of a DR packet look like
the code that decodes the variable part of most other packets.

For COTP CR packets, determine the class up front by checking whether
the length is > 2.  (At some point we might want to associate a class
indication with the COTP connection, if we see the connection setup,
and, if we have that indication, use it in preference to the

Make the code to handle various length indicator values in the ATN case
more like the code in the non-ATN case.

Dissect the variable part of COTP ER packets.

Fix tpyos (TDPU->TPDU, tdpu->tpdu) and typpoes (accross->across).

Clean up white space.

svn path=/trunk/; revision=46060

7 years agoFix tpyoes.
Guy Harris [Sat, 17 Nov 2012 19:46:33 +0000 (19:46 -0000)]
Fix tpyoes.

svn path=/trunk/; revision=46059

7 years agoThere's no point in initializing variables to 0 when we unconditionally assign
Evan Huus [Sat, 17 Nov 2012 13:58:02 +0000 (13:58 -0000)]
There's no point in initializing variables to 0 when we unconditionally assign
a new value to them on the very next line. Caught by cppcheck.

svn path=/trunk/; revision=46058

7 years agoFrom Stephen Wall:
Jaap Keuter [Sat, 17 Nov 2012 12:16:05 +0000 (12:16 -0000)]
From Stephen Wall:
This patch allows one to specify telnet or syslog as the protocol in an SSL Decrypt profile.

svn path=/trunk/; revision=46057

7 years agoDefault to *not* decoding the ATN flavor of COTP, so that, for example,
Guy Harris [Sat, 17 Nov 2012 11:24:13 +0000 (11:24 -0000)]
Default to *not* decoding the ATN flavor of COTP, so that, for example,
we don't, by default, break the dissection of RDP (or anything else that
happens to run atop class 0 or 1).

svn path=/trunk/; revision=46056

7 years agodissect ask_release_reply apdu
Martin Kaiser [Sat, 17 Nov 2012 11:19:09 +0000 (11:19 -0000)]
dissect ask_release_reply apdu

svn path=/trunk/; revision=46055

7 years agoGet rid of extra blank lines and trailing white space.
Guy Harris [Sat, 17 Nov 2012 10:25:03 +0000 (10:25 -0000)]
Get rid of extra blank lines and trailing white space.

svn path=/trunk/; revision=46054

7 years agoClean up white space.
Guy Harris [Sat, 17 Nov 2012 09:54:51 +0000 (09:54 -0000)]
Clean up white space.

Add a comment noting that the value of the length indicator in a DT TPDU
is not as constrained as one might think.

svn path=/trunk/; revision=46053