metze/wireshark/wip.git
11 years agoPut the code to convert a GUID string to a GUID structure into a routine
Guy Harris [Sat, 24 Nov 2012 18:55:06 +0000 (18:55 -0000)]
Put the code to convert a GUID string to a GUID structure into a routine
of its own.  Export that routine from capture_win_ifnames.c.

Rename GetInterfaceFriendlyNameFromDeviceGuid() to
get_interface_friendly_name_from_device_guid(), to match the style of
names of the other routines exported from capture_win_ifnames.c, and
export it as well.

Have if_info_new() use those routines, and, if parse_as_guid() fails,
treat the "description" as a friendly name rather than a vendor
description, so that we don't have a vendor description for, for
example, the device offered on some versions of Windows to handle
dial-up devices.

svn path=/trunk/; revision=46170

11 years agoAdd the block allocator to the documentation.
Evan Huus [Sat, 24 Nov 2012 18:49:52 +0000 (18:49 -0000)]
Add the block allocator to the documentation.

svn path=/trunk/; revision=46169

11 years agoReorder the wmem scopes to be ordered by lifetime, which makes more sense than
Evan Huus [Sat, 24 Nov 2012 18:47:50 +0000 (18:47 -0000)]
Reorder the wmem scopes to be ordered by lifetime, which makes more sense than
the old ordering.

svn path=/trunk/; revision=46168

11 years agoAdd svn properties for the new files.
Evan Huus [Sat, 24 Nov 2012 18:44:24 +0000 (18:44 -0000)]
Add svn properties for the new files.

svn path=/trunk/; revision=46167

11 years agoAdd a simple block allocator to wmem (no canaries or anything yet) and use it
Evan Huus [Sat, 24 Nov 2012 18:42:56 +0000 (18:42 -0000)]
Add a simple block allocator to wmem (no canaries or anything yet) and use it
for packet-scope memory.

svn path=/trunk/; revision=46166

11 years agoSet up BFCP conversations
Anders Broman [Sat, 24 Nov 2012 17:06:08 +0000 (17:06 -0000)]
Set up BFCP conversations

svn path=/trunk/; revision=46165

11 years agoFrom Jim Young:
Martin Mathieson [Sat, 24 Nov 2012 14:20:00 +0000 (14:20 -0000)]
From Jim Young:
- restore rendering TCP graph titles with black text (fixing bug 8016)

Plus a couple of updated comments.

svn path=/trunk/; revision=46164

11 years agoThere is no longer an interface_friendlyname argument to
Guy Harris [Sat, 24 Nov 2012 00:31:29 +0000 (00:31 -0000)]
There is no longer an interface_friendlyname argument to
get_windows_interface_friendly_name(); don't refer to it.

svn path=/trunk/; revision=46163

11 years agoConstify argument to get_windows_interface_friendly_name().
Guy Harris [Sat, 24 Nov 2012 00:29:55 +0000 (00:29 -0000)]
Constify argument to get_windows_interface_friendly_name().

svn path=/trunk/; revision=46162

11 years agoRename get_windows_interface_friendlyname() to
Guy Harris [Sat, 24 Nov 2012 00:05:32 +0000 (00:05 -0000)]
Rename get_windows_interface_friendlyname() to
get_windows_interface_friendly_name(), and have it return the friendly
name on success and NULL on failure.

Get rid of the logging in get_windows_interface_friendly_name().

svn path=/trunk/; revision=46161

11 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

11 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
if_info_new().

svn path=/trunk/; revision=46159

11 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

11 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

11 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

11 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.

See
https://www.wireshark.org/lists/wireshark-dev/201211/msg00096.html

and message thread starting at
https://www.wireshark.org/lists/wireshark-dev/201211/msg00108.html

svn path=/trunk/; revision=46155

11 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

11 years agoFix bug reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8011
Irene Rüngeler [Fri, 23 Nov 2012 13:16:04 +0000 (13:16 -0000)]
Fix bug reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8011

svn path=/trunk/; revision=46153

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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
SOURCES.

svn path=/trunk/; revision=46145

11 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

11 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

11 years agoRevert http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=46140
Anders Broman [Thu, 22 Nov 2012 12:45:50 +0000 (12:45 -0000)]
Revert anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=46140

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

11 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.

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

svn path=/trunk/; revision=46141

11 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
ARServerBlock
ARVendorBlock
PDInterfaceDataReal
PDInterfaceAdjust
PDPortStatistic
SubdirFrameData corrected display and subblocks added
PDIRGlobalData complete dissection
decoding of FrameDataProperties and ARTypes updated to conform the STD
removed now usuported RTC2 ranges

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

svn path=/trunk/; revision=46140

11 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

11 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
get_windows_interface_friendly_name().

svn path=/trunk/; revision=46138

11 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

11 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

11 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

11 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
UN*X.

svn path=/trunk/; revision=46133

11 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

11 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
interfaces.

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

11 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

11 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

11 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

11 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

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

svn path=/trunk/; revision=46126

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

/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
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

svn path=/trunk/; revision=46125

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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.

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

svn path=/trunk/; revision=46111

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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
GetInterfaceFriendlyNameFromDeviceGuid().

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

11 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
#BACKPORT

svn path=/trunk/; revision=46098

11 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

11 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
name".

svn path=/trunk/; revision=46096

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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.

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

svn path=/trunk/; revision=46085

11 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

11 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
filenames
  + 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
options).
  + 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
matching
    (e.g. dumpcap -i local)
  + Validates interface names, instead of blindly sending them off to
winpcap/libpcap
  + 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
interface.
* 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)

GUI CHANGES:
* 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
interface_management_w
* 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 ->
Details):
  + "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
"Interfacename_Guid:(Description)"

svn path=/trunk/; revision=46083

11 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

11 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
optional

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

svn path=/trunk/; revision=46081

11 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

11 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

11 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

11 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

11 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

11 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

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

svn path=/trunk/; revision=46075

11 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

11 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

11 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
together.

svn path=/trunk/; revision=46069

11 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

11 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

11 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

11 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

11 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

11 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