diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-02-27 19:01:27 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-02-27 19:01:27 +0000 |
commit | 500eb99cd9ae9503344998b811e4856a2bb6bfb2 (patch) | |
tree | f1ed4387361e37904198aac2f5e80833d74011b0 /epan/dissectors/packet-dhcp-failover.c | |
parent | 9dd11bb90eb4bca3f03f0f547da9be901a56f996 (diff) |
Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
date as YYYY/DDD, where DDD is a 1-origin day of year. Move the formats
to a "time_fmt.h" file, included by the headers that use it. Have
abs_time_to_str() and abs_time_secs_to_str() take the date format value,
rather than a Boolean "show this as UTC" flag, as an argument. Document
the ABSOLUTE_TIME_ formats a bit better. Use that format in the CCSDS
and VCDU dissectors, rather than having those dissectors do the
formatting themselves.
svn path=/trunk/; revision=32034
Diffstat (limited to 'epan/dissectors/packet-dhcp-failover.c')
-rw-r--r-- | epan/dissectors/packet-dhcp-failover.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c index 1508ea6e37..19f6de062e 100644 --- a/epan/dissectors/packet-dhcp-failover.c +++ b/epan/dissectors/packet-dhcp-failover.c @@ -446,7 +446,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) timex.nsecs = 0; proto_tree_add_time_format_value(dhcpfo_tree, hf_dhcpfo_time, tvb, offset, 4, &timex, "%s", - abs_time_secs_to_str(timex.secs, FALSE)); + abs_time_secs_to_str(timex.secs, ABSOLUTE_TIME_LOCAL)); } offset += 4; @@ -669,7 +669,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) lease_expiration_time = tvb_get_ntohl(tvb, offset); lease_expiration_time_str = - abs_time_secs_to_str(lease_expiration_time, FALSE); + abs_time_secs_to_str(lease_expiration_time, ABSOLUTE_TIME_LOCAL); proto_item_append_text(oi, ", %s", lease_expiration_time_str); @@ -693,7 +693,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_get_ntohl(tvb, offset); potential_expiration_time_str = - abs_time_secs_to_str(potential_expiration_time, FALSE); + abs_time_secs_to_str(potential_expiration_time, ABSOLUTE_TIME_LOCAL); proto_item_append_text(oi, ", %s", potential_expiration_time_str); @@ -717,7 +717,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_get_ntohl(tvb, offset); grace_expiration_time_str = - abs_time_secs_to_str(grace_expiration_time, FALSE); + abs_time_secs_to_str(grace_expiration_time, ABSOLUTE_TIME_LOCAL); proto_item_append_text(oi, ", %s", grace_expiration_time_str); @@ -740,7 +740,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) client_last_transaction_time = tvb_get_ntohl(tvb, offset); client_last_transaction_time_str = - abs_time_secs_to_str(client_last_transaction_time, FALSE); + abs_time_secs_to_str(client_last_transaction_time, ABSOLUTE_TIME_LOCAL); proto_item_append_text(oi, ", %s", client_last_transaction_time_str); @@ -750,7 +750,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, option_length, client_last_transaction_time, "%s", - abs_time_secs_to_str(client_last_transaction_time, FALSE)); + abs_time_secs_to_str(client_last_transaction_time, ABSOLUTE_TIME_LOCAL)); break; case DHCP_FO_PD_START_TIME_OF_STATE: @@ -763,7 +763,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) start_time_of_state = tvb_get_ntohl(tvb, offset); start_time_of_state_str = - abs_time_secs_to_str(start_time_of_state, FALSE); + abs_time_secs_to_str(start_time_of_state, ABSOLUTE_TIME_LOCAL); proto_item_append_text(oi, ", %s", start_time_of_state_str); @@ -773,7 +773,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, option_length, start_time_of_state, "%s", - abs_time_secs_to_str(start_time_of_state, FALSE)); + abs_time_secs_to_str(start_time_of_state, ABSOLUTE_TIME_LOCAL)); break; case DHCP_FO_PD_SERVERSTATE: |