aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-reload.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-03-28 03:17:48 -0700
committerGuy Harris <guy@alum.mit.edu>2017-03-28 10:18:36 +0000
commit8f515b1a99d0043966a8d287cee38fe67e06d189 (patch)
tree54d04853c002a25fe255addccc345e856203affe /epan/dissectors/packet-reload.c
parent721182b09ba7212e6c4c2c182d67fb8762a5919d (diff)
Fix up time encodings.
Add some new encodings for absolute time stamps, and use them as appropriate; this fixes some cases where the time stamps in question were being dissected incorrectly. For the encodings with seconds and 1/2^32s of a second, don't arbitrarily give only microsecond resolution; 2^32 is greater than 1 million, and, in fact, at least some NTP RFCs explicitly talk about time resolution greater than 1 microsecond. Update references in the RELOAD dissector to reflect the documents in question having been updated and published as RFCs. Change-Id: Icbe0b696d65eb622978eb71e99ddf699b84e4fca Reviewed-on: https://code.wireshark.org/review/20759 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-reload.c')
-rw-r--r--epan/dissectors/packet-reload.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c
index 2eebdf735d..0268e1fc88 100644
--- a/epan/dissectors/packet-reload.c
+++ b/epan/dissectors/packet-reload.c
@@ -22,12 +22,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please refer to the following specs for protocol detail:
- * - draft-ietf-p2psip-base-18
- * - draft-ietf-p2psip-sip-06
- * - draft-ietf-p2psip-service-discovery-03
- * - draft-ietf-p2psip-self-tuning-04
- * - draft-ietf-p2psip-diagnostics-10
- * - draft-zong-p2psip-drr-01
+ * - RFC 6940
+ * - RFC 7904
+ * - RFC 7374
+ * - RFC 7363
+ * - RFC 7851
+ * - RFC 7263
*/
#include "config.h"
@@ -2967,10 +2967,10 @@ static int dissect_diagnosticrequest(int anchor, tvbuff_t *tvb, packet_info *pin
ti_local = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA);
local_tree = proto_item_add_subtree(ti_local, ett_reload_diagnosticrequest);
- proto_tree_add_item(local_tree, hf_reload_diagnostic_expiration, tvb, offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN);
+ proto_tree_add_item(local_tree, hf_reload_diagnostic_expiration, tvb, offset, 8, ENC_TIME_MSECS|ENC_BIG_ENDIAN);
local_offset += 8;
proto_tree_add_item(local_tree, hf_reload_diagnosticrequest_timestampinitiated, tvb,
- offset+local_offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN);
+ offset+local_offset, 8, ENC_TIME_MSECS|ENC_BIG_ENDIAN);
local_offset += 8;
local_offset += dissect_dmflag(tvb, local_tree, offset+local_offset);
local_length = tvb_get_ntohl(tvb, offset+local_offset);
@@ -3202,10 +3202,10 @@ static int dissect_diagnosticresponse(int anchor, tvbuff_t *tvb, packet_info *pi
ti_local = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA);
local_tree = proto_item_add_subtree(ti_local, ett_reload_diagnosticresponse);
- proto_tree_add_item(local_tree, hf_reload_diagnostic_expiration, tvb, offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN);
+ proto_tree_add_item(local_tree, hf_reload_diagnostic_expiration, tvb, offset, 8, ENC_TIME_MSECS|ENC_BIG_ENDIAN);
local_offset += 8;
proto_tree_add_item(local_tree, hf_reload_diagnosticresponse_timestampreceived,
- tvb, offset+local_offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN);
+ tvb, offset+local_offset, 8, ENC_TIME_MSECS|ENC_BIG_ENDIAN);
local_offset += 8;
proto_tree_add_item(local_tree, hf_reload_diagnosticresponse_hopcounter, tvb, offset+local_offset, 1, ENC_BIG_ENDIAN);