Commit Graph

43562 Commits

Author SHA1 Message Date
Guy Harris ca74add1c9 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
2012-11-21 18:11:57 +00:00
Anders Broman 66c80c0f60 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
2012-11-21 17:59:19 +00:00
Guy Harris 6a205fd224 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
2012-11-21 17:54:14 +00:00
Guy Harris 4c019d6807 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
2012-11-21 17:33:02 +00:00
Guy Harris d415d3d87c 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
2012-11-21 17:14:54 +00:00
Guy Harris 03f4fa5223 Make the "Invalid capture filter" message resemble that of other programs.
svn path=/trunk/; revision=46107
2012-11-21 16:05:21 +00:00
Guy Harris 17d0007030 Handle an error message that includes single quotes.
svn path=/trunk/; revision=46105
2012-11-21 09:03:30 +00:00
Guy Harris 0e59a15714 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
2012-11-21 09:01:39 +00:00
Guy Harris d37123f4d5 Fix the error message to test for when testing "-i invalid_interface".
svn path=/trunk/; revision=46103
2012-11-21 07:06:57 +00:00
Guy Harris 323fabab95 Fix the capitalization of the error message printed if you specify an
invalid interface index.

svn path=/trunk/; revision=46102
2012-11-21 01:11:19 +00:00
Guy Harris 7a9aef34a9 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
2012-11-21 00:44:21 +00:00
Bill Meier 303ce49ecd From Stephen Tarr: Fix 'misspelling (typo) in display filter field name'.
ipv6.framgent --> ipv6.fragment
#BACKPORT

svn path=/trunk/; revision=46098
2012-11-21 00:41:32 +00:00
Ronnie Sahlberg 323100545d SCSI: Sense buffers come in two flavors. Start decoding the descriptor format.
svn path=/trunk/; revision=46097
2012-11-20 03:17:46 +00:00
Guy Harris 85b5a71c73 Clean up white space.
Clarify that the other "friendly name" is NDIS's idea of a "friendly
name".

svn path=/trunk/; revision=46096
2012-11-20 01:15:00 +00:00
Guy Harris fbaac1330a 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
2012-11-20 01:12:57 +00:00
Bill Meier b604e9c4cc Including config.h causes compile errors; Comment out for now...
svn path=/trunk/; revision=46094
2012-11-19 23:48:07 +00:00
Bill Meier 463f50d5b3 HAVE_CONFIG_H no longer req'd
svn path=/trunk/; revision=46093
2012-11-19 23:21:54 +00:00
Jeff Morriss e1b2eda268 Attempt to fix the Windows Qt builds.
svn path=/trunk/; revision=46092
2012-11-19 22:16:39 +00:00
Jeff Morriss f9fc9a2a20 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
2012-11-19 22:11:07 +00:00
Jeff Morriss 5681aa0fda Put a line of code on its own line (instead of following a comment).
svn path=/trunk/; revision=46090
2012-11-19 22:01:07 +00:00
Jeff Morriss 92aff2d548 Failure to find the interface should cause *shark to exit with a status of 1, not 2.
svn path=/trunk/; revision=46089
2012-11-19 21:41:40 +00:00
Jeff Morriss 89c33a8266 As suggested by Evan: just make the variable a size_t instead of casting away the warning.
svn path=/trunk/; revision=46088
2012-11-19 21:32:39 +00:00
Jeff Morriss 06efe50e5f 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
2012-11-19 21:00:44 +00:00
Jeff Morriss e8e7ba68da 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
2012-11-19 20:56:20 +00:00
Anders Broman c9e72f9241 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
2012-11-19 20:20:34 +00:00
Anders Broman 1c22a075a8 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
2012-11-19 20:13:57 +00:00
Anders Broman 28474fe8ef 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
2012-11-19 20:07:27 +00:00
Anders Broman 64c46ea482 Make it easier to switch between GTK2 and GTK3.
svn path=/trunk/; revision=46082
2012-11-19 19:29:36 +00:00
Anders Broman 66c34f3c7b 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
2012-11-19 18:59:09 +00:00
Jeff Morriss 2e487add27 If tshark doesn't fail when building the tree, try again without -V.
svn path=/trunk/; revision=46080
2012-11-19 00:04:08 +00:00
Martin Mathieson f4c90e138d Was not allocating a large enough element array for tput graphs.
svn path=/trunk/; revision=46079
2012-11-18 19:52:48 +00:00
Stig Bjørlykke a875f6a6e8 Added check for missing/empty ProtoField abbrev.
svn path=/trunk/; revision=46078
2012-11-18 19:15:34 +00:00
Anders Broman 94fb28dfa1 Check if we have a filter name.
svn path=/trunk/; revision=46077
2012-11-18 18:12:50 +00:00
Anders Broman 45e9735b09 Enhance error output.
svn path=/trunk/; revision=46076
2012-11-18 18:10:48 +00:00
Martin Kaiser 0e2f874a24 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
2012-11-18 17:52:55 +00:00
Martin Mathieson 1a1e7f38b7 - 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
2012-11-18 15:56:29 +00:00
Gerald Combs 5b8bf9669f [Automatic manuf, services and enterprise-numbers update for 2012-11-18]
svn path=/trunk/; revision=46070
2012-11-18 15:03:31 +00:00
Guy Harris 5788ca7c88 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
2012-11-18 08:03:05 +00:00
Guy Harris 2f9292c1ea 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
2012-11-18 04:30:10 +00:00
Guy Harris 06ce5d1571 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
2012-11-18 01:59:05 +00:00
Guy Harris e5c2f19eab 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
2012-11-18 01:39:32 +00:00
Martin Mathieson de2aa05555 Support the older format of SR failure for a while longer.
svn path=/trunk/; revision=46065
2012-11-18 01:33:43 +00:00
Guy Harris 2254dcaa00 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
2012-11-18 01:32:31 +00:00
Martin Mathieson ae41031fa4 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
2012-11-17 23:41:07 +00:00
Guy Harris bdb30c63bf Squelch another warning.
svn path=/trunk/; revision=46062
2012-11-17 23:05:03 +00:00
Guy Harris 8b2de024bf 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
2012-11-17 22:35:13 +00:00
Guy Harris 7ef91b394d 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
stack).

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
heuristics.)

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
2012-11-17 22:12:37 +00:00
Guy Harris 9aaa01039b Fix tpyoes.
svn path=/trunk/; revision=46059
2012-11-17 19:46:33 +00:00
Evan Huus 0d46c5a82b 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
2012-11-17 13:58:02 +00:00
Jaap Keuter a803419321 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
2012-11-17 12:16:05 +00:00