Commit Graph

27 Commits

Author SHA1 Message Date
Chris Maynard 0693606010 Avoid potential midday problems by narrowing the midnight rollover test.
svn path=/trunk/; revision=38171
2011-07-23 00:30:24 +00:00
Chris Maynard 0506627c30 Apply some endian heuristics when dissecting ICMP originate, receive and transmit timestamps. Fixes bug 6114.
Ref: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6114

svn path=/trunk/; revision=38129
2011-07-20 00:22:31 +00:00
Sake Blok 950646b751 * If first 8 bytes in icmp data do not look like a timestamp in BE, try LE representation.
* Change field title to not confuse people when the clocks of the pinging system and the capturing system are not in sync.


svn path=/trunk/; revision=38041
2011-07-15 08:57:59 +00:00
Chris Maynard 78d9816855 Fix "comparison between signed and unsigned" warning.
svn path=/trunk/; revision=38039
2011-07-15 04:40:03 +00:00
Chris Maynard 0ffe6deac1 Be sure there's enough bytes in the ICMP payload before trying to access it in
order to try to determine if it contains a timestamp.  Added some FIXME notes.

svn path=/trunk/; revision=38038
2011-07-15 02:39:53 +00:00
Sake Blok 0eacf5ab26 Make windows buildbot happy (hopefully!)
svn path=/trunk/; revision=38030
2011-07-14 22:03:13 +00:00
Sake Blok 43116e9a0b If the first 8 bytes of the icmp echo/echo-reply data look like a timestamp, dissect it as a timestmap and calculate the time since the icmp packet was created.
svn path=/trunk/; revision=38028
2011-07-14 21:27:17 +00:00
Chris Maynard 595e5e1c1d Add ICMP tap support, and add a tshark tap to measure such things as:
* Number of ICMP echo requests, replies, lost replies and percent loss.
  * Min, Max, Average SRT (Service Response Time), and standard deviation.
(This is my first tap, so hopefully I didn't miss something, but we'll see ...)
TODO: Add a Wireshark tap.


svn path=/trunk/; revision=36480
2011-04-05 20:21:59 +00:00
Stephen Fisher df50d409fb Only display the 3 digits of precision after the decimal that we have
from the ICMP conversation response time tracking. 


svn path=/trunk/; revision=36316
2011-03-24 21:22:07 +00:00
Chris Maynard 9493ebe8e9 Display the value of the ICMP echo request/reply response time in milliseconds.
svn path=/trunk/; revision=36313
2011-03-24 18:05:10 +00:00
Chris Maynard 276e9cced3 Add ICMP echo request/reply conversation tracking. Closes bug 5770.
svn path=/trunk/; revision=36298
2011-03-23 20:20:40 +00:00
Stephen Fisher 1fc46d7c4d Don't verify the checksum of an ICMP packet when it the payload of an
error packet (pinfo->in_error_pkt), such as an ICMP destination
unreachable, because we probably don't have the whole original packet.


svn path=/trunk/; revision=36193
2011-03-14 19:58:02 +00:00
Jeff Morriss 6cfdeed280 Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str().

There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s.

Replace some memcpy()+tvb_get_ptr() with tvb_memcpy().

svn path=/trunk/; revision=35529
2011-01-14 03:44:58 +00:00
Guy Harris b711e23baa Don't use g_warning() - either you have a dissector bug, and should use
one of the macros to report that, or you have a problem with the packet,
in which case you should note that in the protocol tree, or you have
something you don't understand, in which case you should dissect
whatever of it you do understand and put something appropriate, if
possible, into the protocol tree for the rest.

(And, if the length isn't right, there's not much you can do about it -
you have to trust the length, and manage to fail somewhere else.)

svn path=/trunk/; revision=35408
2011-01-06 22:52:40 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jaap Keuter b7920c07c5 From Alexis La Goutte:
Replace all *_min()/*_max() by MIN() and MAX().

svn path=/trunk/; revision=34767
2010-11-04 06:36:33 +00:00
Stephen Fisher 034f2739d2 Add "(BE)" to the big endian representations of the ICMP identifier and
sequence number fields to match the "(LE)" ones.


svn path=/trunk/; revision=34136
2010-09-16 18:22:45 +00:00
Stephen Fisher 0583c64d8f Clean up the icmp info column per discussion in bug #4014.
Change to using new ENC_[BIG|LITTLE]_ENDIAN instead of FALSE and TRUE
in the proto_tree_add_item() calls for the identifier and sequence numbers.


svn path=/trunk/; revision=34119
2010-09-14 21:38:54 +00:00
Stephen Fisher 139d2e3af2 Clarify that the "Sequence number" is given in big endian representation and the "Sequence number (LE)" is little endian.
svn path=/trunk/; revision=33822
2010-08-16 22:28:23 +00:00
Gerald Combs 1bac7c2610 From Chris Maynard via bug 4014:
This trivial patch merely displays the ICMP ID and sequence # in the Info
column.

svn path=/trunk/; revision=33056
2010-06-02 18:13:00 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Kovarththanan Rajaratnam 82778b3f86 Use val_to_str_const() since we intend on passing the string to col_set_str (which expects a constant string)
svn path=/trunk/; revision=30112
2009-09-24 13:36:02 +00:00
Stig Bjørlykke 99fbe23445 Cleanup code for type and code, do not show empty "()" when code is unused.
Use hex values for bitmasks in header_field_info.

svn path=/trunk/; revision=29790
2009-09-08 13:44:34 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Stig Bjørlykke 8af0d42c47 Cleanup handling of ICMP type and code:
- Use value_string to convert strings
- Added more types and codes from IANA

Removed use of check_col()
Check checksum also if no tree
Some white space cleanup

svn path=/trunk/; revision=29050
2009-07-10 09:09:11 +00:00
Stig Bjørlykke 046a329a66 Split packet-ip into packet-ip and packet-icmp.
Some cleanup in handles and ett entries.

svn path=/trunk/; revision=29035
2009-07-09 11:32:50 +00:00