ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] [PATCH] packet-pktc.c: SP lifetime

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Thomas Anders <thomas.anders@xxxxxxxxxxxxx>
Date: Fri, 18 Jun 2004 17:04:12 +0200
With the attached patch (against CVS) packet-pktc.c displays the Security
Parameter Lifetime as a relative time string rather than raw seconds,
thereby making it more readable, hopefully.

Please review and apply.


+Thomas

--
Thomas Anders (thomas.anders at blue-cable.de)
--- packet-pktc.c.v18	2004-06-18 16:38:28.000000000 +0200
+++ packet-pktc.c	2004-06-18 16:56:53.000000000 +0200
@@ -369,7 +369,10 @@
     offset=dissect_pktc_list_of_ciphersuites(pinfo, tree, tvb, offset, doi);
 
     /* sec param lifetime */
-    proto_tree_add_item(tree, hf_pktc_sec_param_lifetime, tvb, offset, 4, FALSE);
+    proto_tree_add_uint_format(tree, hf_pktc_sec_param_lifetime, tvb, offset, 4,
+                               tvb_get_ntohl(tvb, offset), "%s: %s",
+                               proto_registrar_get_name(hf_pktc_sec_param_lifetime),
+                               time_secs_to_str(tvb_get_ntohl(tvb, offset)));
     offset+=4;
 
     /* grace period */