Commit graph

45714 commits

Author SHA1 Message Date
Guy Harris
f3e5fa224c Put items into the protocol tree as we extract them, so that the header
fields that were captured show up even if the packet was cut short by a
snapshot length.  Advance the offset variable as we do so.

Be a little clearer in some comments.

svn path=/trunk/; revision=48537
2013-03-24 18:51:27 +00:00
Guy Harris
5947200d55 Don't cast away constness.
svn path=/trunk/; revision=48536
2013-03-24 18:28:40 +00:00
Guy Harris
557df88def Thanks to a ton of patches from Ed Beroset and some other changes,
Wireshark compiles with -Wc++-compat and -Werror, at least on my machine
with llvm-gcc 4.2.1.  Make that a standard -W flag, to keep code that
won't pass a C++ compiler from sneaking back in (except in the files
that can't currently be compiled with -Werror for various reasons).

svn path=/trunk/; revision=48535
2013-03-24 18:24:29 +00:00
Guy Harris
7a9158418c Replace implicit conversions with explicit casts.
svn path=/trunk/; revision=48534
2013-03-24 18:22:07 +00:00
Guy Harris
986d423b5b Replace implicit conversions with explicit casts.
svn path=/trunk/; revision=48533
2013-03-24 18:17:21 +00:00
Guy Harris
7113707672 Replace implicit conversion with explicit cast.
svn path=/trunk/; revision=48532
2013-03-24 18:14:58 +00:00
Jaap Keuter
0090d11212 Forget about the show and hide dance.
svn path=/trunk/; revision=48531
2013-03-24 17:23:37 +00:00
Evan Huus
cd502e4dcd From Tyson Key via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8514
Device->Host detection of ISO 7816 commands in PN532 packets.

From me: clean up indentation a bit in that section of the code.

svn path=/trunk/; revision=48530
2013-03-24 17:22:08 +00:00
Jaap Keuter
07b2125538 Set the height to fit the interfaces actually shown.
svn path=/trunk/; revision=48529
2013-03-24 17:19:15 +00:00
Evan Huus
c4a36c513f Redissect extra packet windows in all cases (that I know of) where we
redissect normal packet list.

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

svn path=/trunk/; revision=48528
2013-03-24 16:47:38 +00:00
Jakub Zawadzki
ace8a9cb6a [NPL] another weekend work.
svn path=/trunk/; revision=48527
2013-03-24 16:38:57 +00:00
Anders Broman
8677c1f42f Don't load the hosts file in epan_init, it's loaded when opening a file
in cf_open().

svn path=/trunk/; revision=48526
2013-03-24 14:39:19 +00:00
Anders Broman
912814ac0f From beroset:
allow flexible resizing of graph_analysis.c items

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

svn path=/trunk/; revision=48525
2013-03-24 14:10:43 +00:00
Gerald Combs
833a1bddfd [Automatic manuf, services and enterprise-numbers update for 2013-03-24]
svn path=/trunk/; revision=48524
2013-03-24 14:03:32 +00:00
Anders Broman
5abba34e9c make local functions static.
svn path=/trunk/; revision=48523
2013-03-24 14:03:12 +00:00
Evan Huus
d30dbcbf9e Fix a few small bugs in the block allocator and add some more assertions to it
that run during normal usage. Simplify, expand and enable the test coverage,
since what's there now passes.

svn path=/trunk/; revision=48522
2013-03-24 12:53:22 +00:00
Anders Broman
bd61beffaa Add const casts and make local functions static.
svn path=/trunk/; revision=48521
2013-03-24 10:53:31 +00:00
Pascal Quantin
92dce1c3f0 Do not initialize ett_tree and dtap_msg_fcn when match_strval_idx does not find a match
svn path=/trunk/; revision=48520
2013-03-24 10:09:16 +00:00
Evan Huus
8ccea72f10 Initial simple block allocator tests, not being run by default because they're
failing. I suspect it has to do with my lack of understanding of glib's unit
test framework, not the code being tested.

svn path=/trunk/; revision=48519
2013-03-24 00:45:32 +00:00
Guy Harris
fc5b86f6d4 Correctly label checksums not checked due to the packet in question
being incorporated inside an ICMP error packet.

svn path=/trunk/; revision=48518
2013-03-24 00:39:44 +00:00
Evan Huus
4ba4e1df70 Add wmem unit test binary (still empty) to nmake build and to
the unit test part of the test suite. Once I know it's building and
running properly on the buildbots then I'll actually start writing tests.

svn path=/trunk/; revision=48517
2013-03-23 23:51:07 +00:00
Guy Harris
65a6e05827 Add exntest.c and tvbtest.c to the set of test program source files.
svn path=/trunk/; revision=48515
2013-03-23 22:05:24 +00:00
Guy Harris
31a61c521f Build reassembly_test.c *without* -DWS_BUILD_DLL, as it's not part of
the library, it's a test program that links with the library and imports
stuff from the library.

svn path=/trunk/; revision=48514
2013-03-23 21:02:39 +00:00
Guy Harris
4af1baba7a Get rid of the DCE RPC stuff; these tests should test the code path for
all types of keys.

Make the tables in main static, so we don't initialize them at run time;
perhaps that'll help figure out why reassemble_test is crashing on
Windows apparently before even calling emem_init().

svn path=/trunk/; revision=48513
2013-03-23 19:38:54 +00:00
Jaap Keuter
f925e9a6a2 Extend dissection of TLVs.
svn path=/trunk/; revision=48512
2013-03-23 17:16:02 +00:00
Alexis La Goutte
4a9ad55295 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48511
2013-03-23 13:09:35 +00:00
Alexis La Goutte
b96aaabca4 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48510
2013-03-23 13:09:27 +00:00
Alexis La Goutte
4f179e4bb2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48509
2013-03-23 13:09:17 +00:00
Alexis La Goutte
1420f4276d Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48508
2013-03-23 13:09:09 +00:00
Alexis La Goutte
202b6e7435 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48507
2013-03-23 13:08:56 +00:00
Alexis La Goutte
4633fb157a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48506
2013-03-23 13:08:48 +00:00
Alexis La Goutte
22620ca12e Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48505
2013-03-23 13:08:39 +00:00
Alexis La Goutte
41c65b4eed Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48504
2013-03-23 13:08:30 +00:00
Alexis La Goutte
03370667f5 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48503
2013-03-23 13:08:21 +00:00
Alexis La Goutte
4cb56bae95 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48502
2013-03-23 13:08:12 +00:00
Alexis La Goutte
cc13aa780a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48501
2013-03-23 13:08:03 +00:00
Alexis La Goutte
6c863f1b0a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48500
2013-03-23 13:07:53 +00:00
Alexis La Goutte
b9b8a72200 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48499
2013-03-23 13:07:45 +00:00
Alexis La Goutte
6d5591f9f4 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48498
2013-03-23 13:07:36 +00:00
Alexis La Goutte
3dc9623939 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48497
2013-03-23 13:07:27 +00:00
Anders Broman
52d9bd8bd5 Change an URI.
svn path=/trunk/; revision=48496
2013-03-23 08:18:44 +00:00
Evan Huus
6ad3aeb3d9 From Hadriel Kaplan and myself via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8496
Iterate backwards through the linked list of identically-named fields in the lua
bindings since the list is, in fact, created backwards by
proto_register_field_init(). There is some question about whether that is
actually intended, but the rest of the code seems to assume it's normal so we
will too. It was possibly a performance consideration, though that's not
well-documented if so.

Either way, this is the simplest and safest method of fixing the issue with the
lua bindings. See the bug for more analysis.

svn path=/trunk/; revision=48495
2013-03-23 02:53:41 +00:00
Evan Huus
b8ae49755d From Prafulla Harpanhalli via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8513
Add support for encapsulation 136, Juniper service PIC cookie.

svn path=/trunk/; revision=48494
2013-03-23 02:42:12 +00:00
Guy Harris
3850405411 Update to match the changes made to the reassembly code APIs.
svn path=/trunk/; revision=48493
2013-03-23 02:41:43 +00:00
Guy Harris
eee846b9c6 Make reassembly_table_destroy() clear the function pointers and empty
and destroy the reassembled table.

svn path=/trunk/; revision=48492
2013-03-23 02:40:37 +00:00
Guy Harris
a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Guy Harris
3295912210 Try to handle lines with NULs in them. They aren't valid lines, but at
least one fuzzed capture contains them, and using ep_strndup() to copy
the line means that the actual amount of memory allocated for the copy
will be less than the length of the line, and code that parses the line
assuming that there are value_len+1 bytes in the buffer (including the
terminating NUL), such as the current parsing code, will break.

We should really have code in Wireshark to handle counted strings, and
have those be what we extract from packets.  (And we should handle
non-UTF-8/non-UTF-16 encodings, and octet sequences that aren't valid
strings for their encoding, and handle display of invalid strings and
non-printable characters, and....).

Use g_ascii_ versions of various isXXX() and to{upper,lower}(), so we
don't get surprised by the behavior of the user's locale.

svn path=/trunk/; revision=48490
2013-03-22 23:18:30 +00:00
Jeff Morriss
100b208c9a Fix up indentation.
svn path=/trunk/; revision=48489
2013-03-22 22:11:22 +00:00
Jeff Morriss
5c39978e35 And it happens again...
In Yet Another Protocol, implementation A neglected to set the padding bytes
to 0 and implementation B barfed on said padding (interestingly this
protocol's spec does not include the IETF-normal "receiver MUST ignore the
padding" blurb).

So:

Add the AVP to the dissection tree and add an expert info for when it's not
zero.

Also re-order a few of the hfs and remove a couple unneeded temporary
variables.

svn path=/trunk/; revision=48488
2013-03-22 18:13:31 +00:00
Alexis La Goutte
1b5350b10a Add Modelines Info (and remove some tabs)
svn path=/trunk/; revision=48487
2013-03-22 17:37:34 +00:00