Commit graph

178 commits

Author SHA1 Message Date
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
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
Anders Broman
c3a054e6c1 Don't calculate checksum for ICMP packsets with a partial IP packet.
svn path=/trunk/; revision=48423
2013-03-19 18:51:36 +00:00
Anders Broman
55c498169d From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48400
2013-03-18 21:16:23 +00:00
Evan Huus
ae17fffd38 Convert IPv4 dissector to wmem - much bigger canarie in the coal mine, since
IPv4 is *everywhere*.

svn path=/trunk/; revision=46471
2012-12-08 21:36:14 +00:00
Guy Harris
8b3de820ee Fix uninitialized-variable bug.
svn path=/trunk/; revision=46199
2012-11-26 03:45:55 +00:00
Guy Harris
83da3483cd If TSO support is enabled and, as a result, we assume an IP packet with
zero as the total length is the result of TSO, report that specially, so
that it's clearer why the we're reporting the length as non-zero when
it's zero in the packet data.

See

	http://ask.wireshark.org/questions/16279/why-are-the-bytes-00-00-but-wireshark-shows-an-ip-total-length-of-2016

svn path=/trunk/; revision=46198
2012-11-26 03:14:02 +00:00
Martin Mathieson
0aebd579e3 Show SACK information in TCP graphs. Also add a generated field for the
number of SACK ranges found in the SACK option.

This involved extending the IP options framework to include an extra
void* data field, which in the case of TCP is filled in with the tap
struct - other users currently pass NULL.

I first implemented the graph to sort the SACK ranges and show (in red)
the unacknowledged regions between them, but this became confusing where
the number of ranges is limited by TCP padding bytes. i.e. you can't
tell how many SACKs could have been encoded, so some of the gaps between
ranges may already have been received.

svn path=/trunk/; revision=46006
2012-11-12 03:55:46 +00:00
Jakub Zawadzki
da00b4089e Continuation of r43335
- ipv6.traffic_class.dscp use ext string so and need BASE_EXT_STRING flag (fix SIGSEGV)
- dscp_vals was removed from .h file, so make it static
- export dscp_vals_ext

svn path=/trunk/; revision=45380
2012-10-08 09:50:47 +00:00
Jeff Morriss
2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Anders Broman
8e74cd8d16 Fix errors in the packet length checks.
svn path=/trunk/; revision=44939
2012-09-17 12:13:34 +00:00
Anders Broman
9db969ded1 Add IPv6 heuristic.
svn path=/trunk/; revision=44938
2012-09-17 10:46:56 +00:00
Anders Broman
ebda6f06b7 Try to make the buildbot happy.
svn path=/trunk/; revision=44901
2012-09-14 14:40:47 +00:00
Anders Broman
ffbacb51d2 Heuristically dissect TIPC IP payloads.
svn path=/trunk/; revision=44900
2012-09-14 14:14:46 +00:00
Jeff Morriss
aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Guy Harris
307e13d9f2 Move the list of AX.25 protocol IDs to epan/ax25_pids.h. Use it in
packet-ax25.c and packet-arp.c.

Add an "ax25.pid" dissector table for those protocol IDs, use it in the
AX.25 dissector, and have dissectors register in that table with their
protocol IDs.

Get rid of some unneeded includes.

Clean up some "AX25"s in user-visible strings - say "AX.25" instead.

Clean up some indentation.

svn path=/trunk/; revision=44235
2012-08-03 01:58:12 +00:00
Evan Huus
a234b68ff0 Fix some system header files that were #included with "" instead of <>.
They made cppcheck unhappy.

svn path=/trunk/; revision=43779
2012-07-18 02:47:56 +00:00
Jakub Zawadzki
bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jakub Zawadzki
85aad38347 Add proto_tree_add_unicode_string() to add UTF-8 string to tree.
Convert some proto_tree_add_string_format_value(..., val, "%s", val); to use new function.

svn path=/trunk/; revision=43363
2012-06-19 14:32:24 +00:00
Jörg Mayer
f679b89649 Revert r41952
BACKPORT to 1.8

svn path=/trunk/; revision=43222
2012-06-12 10:44:57 +00:00
Jörg Mayer
9228ece476 Manually revert r41953
BACKPORT to 1.8

svn path=/trunk/; revision=43221
2012-06-12 10:38:22 +00:00
Bill Meier
bdebbb9bdf Re-order 2 value_string arrays so that entries are in ascending order by value.
svn path=/trunk/; revision=43216
2012-06-11 20:35:00 +00:00
Bill Meier
70cc6362fe Don't define value_string arrays in a .h file (included in multiple places).
Also:
 - don't use val_to_str_const() with a "format" default string;
 - rename 'opt_len_type' enumeration  identifiers to be less generic.

svn path=/trunk/; revision=43210
2012-06-11 18:47:42 +00:00
Bill Meier
df07bfeba4 Create dscp_vals_ext value_str_ext (based upon dscp_vals); Use it as appropriate.
Also:
 - use val_to_str_const() [instead of val_to_str()] in a few cases;
 - do some trivial formatting cleanup.

svn path=/trunk/; revision=43204
2012-06-11 15:47:50 +00:00
Chris Maynard
0b44e6f99b Mention that dissect_ip_tcp_options() is used by more protocols than just IP and TCP.
svn path=/trunk/; revision=42533
2012-05-10 01:26:53 +00:00
Chris Maynard
fd1174b5a5 Remove unused variable not found by MSVC2010EE but found by OSX buildbot.
svn path=/trunk/; revision=42360
2012-04-30 20:38:13 +00:00
Chris Maynard
bda12a5882 Add Selective Directed Broadcast (RFC 1770) IP option dissection support.
svn path=/trunk/; revision=42359
2012-04-30 20:24:33 +00:00
Chris Maynard
19fe681849 Add MTU probe, MTU reply and Traceroute IP option dissection support.
svn path=/trunk/; revision=42353
2012-04-30 17:32:33 +00:00
Chris Maynard
e936265168 Add missing RFC791 PROG security definition. Reorder ipopts[] so it matches the order at http://www.iana.org/assignments/ip-parameters, which is ordered by 'Number'. Use the descriptions as they appear there as well. Add TODO placeholders in ipopt[] for the yet-to-be-implemented options.
svn path=/trunk/; revision=42348
2012-04-30 14:29:54 +00:00
pascal
d39ae2d807 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7064 :
Dissect basic security option according to RFC 791 or RFC 1108 depending on the option length and the first two bytes content.
Also dissect the extended security option.

svn path=/trunk/; revision=42342
2012-04-30 08:21:09 +00:00
Jakub Zawadzki
68ec58d385 Fix some: 'cast discards qualifiers from pointer target type' warnings
- Add const qualifier
- Remove some strange casts

svn path=/trunk/; revision=42131
2012-04-18 12:35:36 +00:00
Anders Broman
bb562d518a From Jakub Zawadzki: fix, which changes types from FT_STRING to FT_DOUBLE. Fixes GeoIP: Display Filter comparisons operators do not seem to work for negative latitude or longitude values... https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5077
svn path=/trunk/; revision=42103
2012-04-17 04:51:07 +00:00
Chris Maynard
1e6301fa8b Set the minimum length of the Internet Timestamp option to 4 bytes instead of 5. RFC 791 only states that the smallest legal value of the pointer is 5, not the smallest size for the option itself. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7043
Since backporting must be manually applied anyway, other changes include fixing the displaying of the EOOL and NOP options, as well as other options without a dissect routine associated with them.

svn path=/trunk/; revision=41994
2012-04-09 18:17:33 +00:00
Anders Broman
3f4d248357 Use common code to have the same hf field for DSCP in IPv4 and IPv6.
svn path=/trunk/; revision=41953
2012-04-05 10:35:39 +00:00
Anders Broman
60c4bd3eeb Use common code to add ip version to the tree.
svn path=/trunk/; revision=41952
2012-04-05 08:38:26 +00:00
Bill Meier
ca3e8b5d8b 'tab-width/tabstop/tabSize' in editor modelines should really always be 8;
Also: In some cases do some whitespace cleanup and some minor reformatting.

svn path=/trunk/; revision=41724
2012-03-21 18:20:44 +00:00
Alexis La Goutte
fa68273f40 Add Quick Start IPv6 Option ( And shared Quick Start option between IPv4/IPv6/TCP )
svn path=/trunk/; revision=41681
2012-03-20 08:51:05 +00:00
Bill Meier
b2102cc092 FT_BOOLEAN hf[] entries with a 0 'bitmask' should have 'display' = BASE_NONE;
svn path=/trunk/; revision=41582
2012-03-15 23:26:40 +00:00
Chris Maynard
f88e871171 Fix some typos.
svn path=/trunk/; revision=40786
2012-02-01 01:41:11 +00:00
Chris Maynard
5cfa297971 Don't pass 'len' to the dissect routine since we know there's only 1 byte present. This fixes the buildbot complaint about using 'len' uninitialized.
svn path=/trunk/; revision=40008
2011-11-26 04:45:49 +00:00
Chris Maynard
6dc3290d68 Add a few casts to try to make the buildbots happy.
svn path=/trunk/; revision=40007
2011-11-26 04:31:40 +00:00
Chris Maynard
d51167076a IP option improvements. While fixing bug 6561, I noticed some deficiencies in the IP options dissection capabilities. Testing of these changes primarily used the capture file attached to that bug report as there were several IP options present. Packet 222 is an interesting packet that illustrates some of the new filters available. Further work is needed, but hopefully this is a good first step. Fuzz testing was performed using my own "menagerie".
svn path=/trunk/; revision=40006
2011-11-26 04:16:11 +00:00
Chris Maynard
1f513638e0 Display protocol ID consistently in decimal throughout. Append each IP option to top-level Options field. Whitespace cleanup - the majority of the dissector used 2-space indentation, so that's the format chosen. Added modelines to match.
svn path=/trunk/; revision=39994
2011-11-23 18:33:45 +00:00
Chris Maynard
db39b3da06 For now, display the protocol in hexadecimal again so displaying it in decimal doesn't get backported to the 1.6 and 1.4 trunks at the request of Joerg.
svn path=/trunk/; revision=39986
2011-11-22 15:18:20 +00:00
Chris Maynard
f2e8579ba3 Fix potential infinite loop introduced with r39961 and find by the buildbot. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6599
svn path=/trunk/; revision=39963
2011-11-21 02:01:59 +00:00
Chris Maynard
3c8e31e055 Fix bug 6561: IPv4 UDP/TCP Checksum incorrect if routing header present.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6561

svn path=/trunk/; revision=39961
2011-11-20 15:47:14 +00:00
Bill Meier
54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00
Bill Meier
794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Gerald Combs
583ac864c0 Enable GeoIP lookups by default. Don't add GeoIP subtrees if we didn't
find any databases.

svn path=/trunk/; revision=39363
2011-10-11 17:57:09 +00:00
Bill Meier
4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00