From: Evan Huus Date: Thu, 19 Dec 2013 16:28:39 +0000 (-0000) Subject: Rename more to_str functions to have ep_ in the name if they return ephemeral X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=2ae8edccea07234fa916d0fb7193f28fb0783ab4;p=metze%2Fwireshark%2Fwip.git Rename more to_str functions to have ep_ in the name if they return ephemeral buffers. Remove two unused functions. svn path=/trunk/; revision=54250 --- diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index 2f09a95e04..7981578f5a 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -1227,7 +1227,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len) ts.nsecs = 0; proto_tree_add_time_format_value(tree, hf_snmp_engineid_time, tvb, offset+4, 4, &ts, "%s", - abs_time_secs_to_str(seconds, ABSOLUTE_TIME_LOCAL, TRUE)); + abs_time_secs_to_ep_str(seconds, ABSOLUTE_TIME_LOCAL, TRUE)); offset+=8; len_remain=0; } diff --git a/epan/dissectors/packet-acn.c b/epan/dissectors/packet-acn.c index ca3fc8b7c3..e3c43c2120 100644 --- a/epan/dissectors/packet-acn.c +++ b/epan/dissectors/packet-acn.c @@ -2640,10 +2640,10 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of /* get Header (CID) 16 bytes */ tvb_get_guid(tvb, header_offset, &guid, ENC_BIG_ENDIAN); - proto_item_append_text(ti, ", Src: %s", guid_to_str(&guid)); + proto_item_append_text(ti, ", Src: %s", guid_to_ep_str(&guid)); /* add cid to info */ - col_add_fstr(pinfo->cinfo,COL_INFO, "CID %s", guid_to_str(&guid)); + col_add_fstr(pinfo->cinfo,COL_INFO, "CID %s", guid_to_ep_str(&guid)); proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, header_offset, 16, ENC_BIG_ENDIAN); /*header_offset += 16;*/ @@ -2689,7 +2689,7 @@ dissect_acn_root_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of /* get Header (CID) 16 bytes */ tvb_get_guid(tvb, header_offset, &guid, ENC_BIG_ENDIAN); - proto_item_append_text(ti, ", Src: %s", guid_to_str(&guid)); + proto_item_append_text(ti, ", Src: %s", guid_to_ep_str(&guid)); proto_tree_add_item(pdu_tree, hf_acn_cid, tvb, header_offset, 16, ENC_BIG_ENDIAN); /*header_offset += 16;*/ diff --git a/epan/dissectors/packet-adwin-config.c b/epan/dissectors/packet-adwin-config.c index de786052e9..ffa6417db4 100644 --- a/epan/dissectors/packet-adwin-config.c +++ b/epan/dissectors/packet-adwin-config.c @@ -357,11 +357,11 @@ dissect_TCPFlashUpdate(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, offset += 4; tmp_time.secs = tvb_get_ntohl(tvb, offset); proto_tree_add_text(adwin_tree, tvb, offset, 4, - "File time: %s", abs_time_to_str(&tmp_time, ABSOLUTE_TIME_LOCAL, TRUE)); + "File time: %s", abs_time_to_ep_str(&tmp_time, ABSOLUTE_TIME_LOCAL, TRUE)); offset += 4; tmp_time.secs = tvb_get_ntohl(tvb, offset); proto_tree_add_text(adwin_tree, tvb, offset, 4, - "Update time: %s", abs_time_to_str(&tmp_time, ABSOLUTE_TIME_LOCAL, TRUE)); + "Update time: %s", abs_time_to_ep_str(&tmp_time, ABSOLUTE_TIME_LOCAL, TRUE)); offset += 4; proto_tree_add_item(adwin_tree, hf_adwin_config_unused, tvb, offset, 128, ENC_BIG_ENDIAN); offset += 128; diff --git a/epan/dissectors/packet-agentx.c b/epan/dissectors/packet-agentx.c index 9eaff52650..a05600c483 100644 --- a/epan/dissectors/packet-agentx.c +++ b/epan/dissectors/packet-agentx.c @@ -479,7 +479,7 @@ dissect_response_pdu(tvbuff_t *tvb, proto_tree *tree, int offset, int len, guint NORLEL(flags, r_uptime, tvb, offset); proto_tree_add_uint_format(subtree, hf_resp_uptime, tvb, offset, 4, r_uptime, - "sysUptime: %s", time_msecs_to_str(r_uptime)); + "sysUptime: %s", time_msecs_to_ep_str(r_uptime)); proto_tree_add_item(subtree, hf_resp_error, tvb, offset + 4, 2, encoding); proto_tree_add_item(subtree, hf_resp_index, tvb, offset + 6, 2, encoding); offset += 8; diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index 31b1fc6c6c..f9c82aac5f 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -1402,7 +1402,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, if (hf != NULL) { time_s_secs = (gint32) tvb_get_ntohl(tvb, offset); proto_tree_add_int_format_value(tree, *hf, - tvb, offset, 4, time_s_secs, "(%ds) %s", time_s_secs, time_secs_to_str(time_s_secs)); + tvb, offset, 4, time_s_secs, "(%ds) %s", time_s_secs, time_secs_to_ep_str(time_s_secs)); } else if (hf_default->time_in_s_secs != NULL) proto_tree_add_item(tree, *hf_default->time_in_s_secs, tvb, offset, 4, ENC_BIG_ENDIAN); @@ -1420,7 +1420,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, time_u_secs = tvb_get_ntohl(tvb, offset); proto_tree_add_uint_format_value(tree, *hf, tvb, offset, 4, time_u_secs, "(%us) %s", time_u_secs, - ((time_u_secs == 0xffffffff) ? "infinity" : time_secs_to_str_unsigned(time_u_secs))); + ((time_u_secs == 0xffffffff) ? "infinity" : time_secs_to_ep_str_unsigned(time_u_secs))); } else if (hf_default->time_in_u_secs != NULL) proto_tree_add_item(tree, *hf_default->time_in_u_secs, tvb, offset, 4, ENC_BIG_ENDIAN); diff --git a/epan/dissectors/packet-ccsds.c b/epan/dissectors/packet-ccsds.c index 1cf8259b5e..59860ffaef 100644 --- a/epan/dissectors/packet-ccsds.c +++ b/epan/dissectors/packet-ccsds.c @@ -288,7 +288,7 @@ static const char* embedded_time_to_string ( int coarse_time, int fine_time ) fraction = ( multiplier * ( (int)fine_time & 0xff ) ) / 256; t.nsecs = fraction*1000000; /* msecs to nsecs */ - return abs_time_to_str(&t, ABSOLUTE_TIME_DOY_UTC, TRUE); + return abs_time_to_ep_str(&t, ABSOLUTE_TIME_DOY_UTC, TRUE); } diff --git a/epan/dissectors/packet-collectd.c b/epan/dissectors/packet-collectd.c index f67ee9fa6a..376f9e8385 100644 --- a/epan/dissectors/packet-collectd.c +++ b/epan/dissectors/packet-collectd.c @@ -487,7 +487,7 @@ dissect_collectd_integer (tvbuff_t *tvb, packet_info *pinfo, gint type_hf, gchar *strtime; nstime = collectd_time_to_nstime (*ret_value); - strtime = abs_time_to_str (&nstime, ABSOLUTE_TIME_LOCAL, /* show_zone = */ TRUE); + strtime = abs_time_to_ep_str (&nstime, ABSOLUTE_TIME_LOCAL, /* show_zone = */ TRUE); pi = proto_tree_add_text (tree_root, tvb, offset, length, "collectd %s segment: %s", val_to_str_const (type, part_names, "UNKNOWN"), @@ -499,7 +499,7 @@ dissect_collectd_integer (tvbuff_t *tvb, packet_info *pinfo, gint type_hf, gchar *strtime; nstime = collectd_time_to_nstime (*ret_value); - strtime = rel_time_to_str (&nstime); + strtime = rel_time_to_ep_str (&nstime); pi = proto_tree_add_text (tree_root, tvb, offset, length, "collectd %s segment: %s", val_to_str_const (type, part_names, "UNKNOWN"), diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 3182cf0732..316bce42a1 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -3296,7 +3296,7 @@ dissect_dcerpc_cn_bind(tvbuff_t *tvb, gint offset, packet_info *pinfo, iface_item = proto_tree_add_item(ctx_tree, hf_dcerpc_cn_bind_abstract_syntax, tvb, offset, 0, ENC_NA); iface_tree = proto_item_add_subtree(iface_item, ett_dcerpc_cn_iface); - uuid_str = guid_to_str((e_guid_t*)&if_id); + uuid_str = guid_to_ep_str((e_guid_t*)&if_id); uuid_name = guids_get_uuid_name(&if_id); if (uuid_name) { proto_tree_add_guid_format(iface_tree, hf_dcerpc_cn_bind_if_id, tvb, @@ -3341,7 +3341,7 @@ dissect_dcerpc_cn_bind(tvbuff_t *tvb, gint offset, packet_info *pinfo, trans_item = proto_tree_add_item(ctx_tree, hf_dcerpc_cn_bind_trans_syntax, tvb, offset, 0, ENC_NA); trans_tree = proto_item_add_subtree(trans_item, ett_dcerpc_cn_trans_syntax); - uuid_str = guid_to_str((e_guid_t *) &trans_id); + uuid_str = guid_to_ep_str((e_guid_t *) &trans_id); uuid_name = guids_get_uuid_name(&trans_id); if (uuid_name) { @@ -3497,7 +3497,7 @@ dissect_dcerpc_cn_bind_ack(tvbuff_t *tvb, gint offset, packet_info *pinfo, dcerpc_tvb_get_uuid(tvb, offset, hdr->drep, &trans_id); uuid_name = guids_get_uuid_name(&trans_id); if (! uuid_name) { - uuid_name = guid_to_str((e_guid_t *) &trans_id); + uuid_name = guid_to_ep_str((e_guid_t *) &trans_id); } proto_tree_add_guid_format(ctx_tree, hf_dcerpc_cn_ack_trans_id, tvb, offset, 16, (e_guid_t *) &trans_id, "Transfer Syntax: %s", @@ -3847,7 +3847,7 @@ dissect_dcerpc_cn_rqst(tvbuff_t *tvb, gint offset, packet_info *pinfo, if (dcerpc_tree) { proto_tree_add_guid_format(dcerpc_tree, hf_dcerpc_obj_id, tvb, offset, 16, (e_guid_t *) &obj_id, "Object UUID: %s", - guid_to_str((e_guid_t *) &obj_id)); + guid_to_ep_str((e_guid_t *) &obj_id)); } offset += 16; } @@ -4077,7 +4077,7 @@ dissect_dcerpc_cn_resp(tvbuff_t *tvb, gint offset, packet_info *pinfo, if (dcerpc_tree && (memcmp(&value->object_uuid, &obj_id_null, sizeof(obj_id_null)) != 0)) { pi = proto_tree_add_guid_format(dcerpc_tree, hf_dcerpc_obj_id, tvb, offset, 0, (e_guid_t *) &value->object_uuid, "Object UUID: %s", - guid_to_str((e_guid_t *) &value->object_uuid)); + guid_to_ep_str((e_guid_t *) &value->object_uuid)); PROTO_ITEM_SET_GENERATED(pi); } @@ -5726,12 +5726,12 @@ dissect_dcerpc_dg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat if (tree) { proto_tree_add_guid_format(dcerpc_tree, hf_dcerpc_obj_id, tvb, offset, 16, (e_guid_t *) &hdr.obj_id, "Object UUID: %s", - guid_to_str((e_guid_t *) &hdr.obj_id)); + guid_to_ep_str((e_guid_t *) &hdr.obj_id)); } offset += 16; if (tree) { - uuid_str = guid_to_str((e_guid_t*)&hdr.if_id); + uuid_str = guid_to_ep_str((e_guid_t*)&hdr.if_id); uuid_name = guids_get_uuid_name(&hdr.if_id); if (uuid_name) { proto_tree_add_guid_format(dcerpc_tree, hf_dcerpc_dg_if_id, tvb, @@ -5746,7 +5746,7 @@ dissect_dcerpc_dg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat if (tree) { proto_tree_add_guid_format(dcerpc_tree, hf_dcerpc_dg_act_id, tvb, offset, 16, (e_guid_t *) &hdr.act_id, "Activity: %s", - guid_to_str((e_guid_t *) &hdr.act_id)); + guid_to_ep_str((e_guid_t *) &hdr.act_id)); } offset += 16; diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c index 101cf6ac9a..74f809cb87 100644 --- a/epan/dissectors/packet-dhcp-failover.c +++ b/epan/dissectors/packet-dhcp-failover.c @@ -454,7 +454,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da 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, ABSOLUTE_TIME_LOCAL, TRUE)); + abs_time_secs_to_ep_str(timex.secs, ABSOLUTE_TIME_LOCAL, TRUE)); } offset += 4; @@ -650,7 +650,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da lease_expiration_time = tvb_get_ntohl(tvb, offset); lease_expiration_time_str = - abs_time_secs_to_str(lease_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE); + abs_time_secs_to_ep_str(lease_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE); proto_item_append_text(oi, ", %s", lease_expiration_time_str); @@ -672,7 +672,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da tvb_get_ntohl(tvb, offset); potential_expiration_time_str = - abs_time_secs_to_str(potential_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE); + abs_time_secs_to_ep_str(potential_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE); proto_item_append_text(oi, ", %s", potential_expiration_time_str); @@ -694,7 +694,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da tvb_get_ntohl(tvb, offset); grace_expiration_time_str = - abs_time_secs_to_str(grace_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE); + abs_time_secs_to_ep_str(grace_expiration_time, ABSOLUTE_TIME_LOCAL, TRUE); proto_item_append_text(oi, ", %s", grace_expiration_time_str); @@ -715,7 +715,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da client_last_transaction_time = tvb_get_ntohl(tvb, offset); client_last_transaction_time_str = - abs_time_secs_to_str(client_last_transaction_time, ABSOLUTE_TIME_LOCAL, TRUE); + abs_time_secs_to_ep_str(client_last_transaction_time, ABSOLUTE_TIME_LOCAL, TRUE); proto_item_append_text(oi, ", %s", client_last_transaction_time_str); @@ -725,7 +725,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da offset, option_length, client_last_transaction_time, "%s", - abs_time_secs_to_str(client_last_transaction_time, ABSOLUTE_TIME_LOCAL, TRUE)); + abs_time_secs_to_ep_str(client_last_transaction_time, ABSOLUTE_TIME_LOCAL, TRUE)); break; case DHCP_FO_PD_START_TIME_OF_STATE: @@ -736,7 +736,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da start_time_of_state = tvb_get_ntohl(tvb, offset); start_time_of_state_str = - abs_time_secs_to_str(start_time_of_state, ABSOLUTE_TIME_LOCAL, TRUE); + abs_time_secs_to_ep_str(start_time_of_state, ABSOLUTE_TIME_LOCAL, TRUE); proto_item_append_text(oi, ", %s", start_time_of_state_str); @@ -746,7 +746,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da offset, option_length, start_time_of_state, "%s", - abs_time_secs_to_str(start_time_of_state, ABSOLUTE_TIME_LOCAL, TRUE)); + abs_time_secs_to_ep_str(start_time_of_state, ABSOLUTE_TIME_LOCAL, TRUE)); break; case DHCP_FO_PD_SERVERSTATE: diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index 4ee60a8260..ea716f8378 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -2923,7 +2923,7 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo, "%s", (subm_time & 0x7FFF) >= 0x7FF8 ? "Reserved" : - abs_time_secs_to_str (dmp.subm_time, ABSOLUTE_TIME_LOCAL, TRUE)); + abs_time_secs_to_ep_str (dmp.subm_time, ABSOLUTE_TIME_LOCAL, TRUE)); field_tree = proto_item_add_subtree (tf, ett_envelope_subm_time); proto_tree_add_item (field_tree, hf_envelope_time_diff_present, tvb, offset, 2, ENC_BIG_ENDIAN); proto_tree_add_item (field_tree, hf_envelope_subm_time_value, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -2941,7 +2941,7 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo, if (secs == DMP_TIME_RESERVED) { proto_item_append_text (tf, "Reserved (0x%2.2x)", time_diff); } else { - proto_item_append_text (tf, "%s", time_secs_to_str (secs)); + proto_item_append_text (tf, "%s", time_secs_to_ep_str (secs)); } offset += 1; } @@ -3253,9 +3253,9 @@ static gint dissect_dmp_report (tvbuff_t *tvb, packet_info *pinfo, proto_item_append_text (tf, "Reserved (0x%2.2x)", report); proto_item_append_text (ei, " (Reserved)"); } else { - proto_item_append_text (tf, "%s (%s)", time_secs_to_str (secs), - abs_time_secs_to_str (dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE)); - proto_item_append_text (ei, " (%s from submission time)", time_secs_to_str (secs)); + proto_item_append_text (tf, "%s (%s)", time_secs_to_ep_str (secs), + abs_time_secs_to_ep_str (dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_item_append_text (ei, " (%s from submission time)", time_secs_to_ep_str (secs)); } } else { dmp.ndr = TRUE; @@ -3367,9 +3367,9 @@ static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_, proto_item_append_text (tf, "Reserved (0x%2.2x)", rec_time); proto_item_append_text (ei, " (Reserved)"); } else { - proto_item_append_text (tf, "%s (%s)", time_secs_to_str (secs), - abs_time_secs_to_str (dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE)); - proto_item_append_text (ei, " (%s from submission time)", time_secs_to_str (secs)); + proto_item_append_text (tf, "%s (%s)", time_secs_to_ep_str (secs), + abs_time_secs_to_ep_str (dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_item_append_text (ei, " (%s from submission time)", time_secs_to_ep_str (secs)); } offset += 1; @@ -3768,9 +3768,9 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo, proto_item_append_text (tf, "Reserved (0x%2.2x)", exp_time); proto_item_append_text (ei, " (Reserved)"); } else { - proto_item_append_text (tf, "%s (%s)", time_secs_to_str (secs), - abs_time_secs_to_str (dmp.subm_time + secs, ABSOLUTE_TIME_LOCAL, TRUE)); - proto_item_append_text (ei, " (%s from submission time)", time_secs_to_str (secs)); + proto_item_append_text (tf, "%s (%s)", time_secs_to_ep_str (secs), + abs_time_secs_to_ep_str (dmp.subm_time + secs, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_item_append_text (ei, " (%s from submission time)", time_secs_to_ep_str (secs)); } offset += 1; } @@ -3790,13 +3790,13 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo, proto_item_append_text (tf, "0 minutes in the %s (%s)", (dtg & 0x80) ? dtg_sign.true_string : dtg_sign.false_string, - abs_time_secs_to_str (dmp.subm_time, ABSOLUTE_TIME_LOCAL, TRUE)); + abs_time_secs_to_ep_str (dmp.subm_time, ABSOLUTE_TIME_LOCAL, TRUE)); } else { - proto_item_append_text (tf, "%s in the %s (%s)", time_secs_to_str(secs), + proto_item_append_text (tf, "%s in the %s (%s)", time_secs_to_ep_str(secs), (dtg & 0x80) ? dtg_sign.true_string : dtg_sign.false_string, (dtg & 0x80) ? - abs_time_secs_to_str (dmp.subm_time + secs, ABSOLUTE_TIME_LOCAL, TRUE) : - abs_time_secs_to_str (dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE)); + abs_time_secs_to_ep_str (dmp.subm_time + secs, ABSOLUTE_TIME_LOCAL, TRUE) : + abs_time_secs_to_ep_str (dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE)); } offset += 1; } diff --git a/epan/dissectors/packet-dnp.c b/epan/dissectors/packet-dnp.c index c7e10473fb..38ed175873 100644 --- a/epan/dissectors/packet-dnp.c +++ b/epan/dissectors/packet-dnp.c @@ -2035,7 +2035,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset, al_bit = (al_ptflags & AL_OBJ_BI_FLAG7) >> 7; /* bit shift 1xxxxxxx -> xxxxxxx1 */ proto_item_append_text(point_item, ", Value: %u, Timestamp: %s", - al_bit, abs_time_to_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); + al_bit, abs_time_to_ep_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); proto_item_set_len(point_item, data_pos - offset); offset = data_pos; @@ -2056,7 +2056,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset, al_2bit = (al_ptflags >> 6) & 3; /* bit shift 11xxxxxx -> 00000011 */ proto_item_append_text(point_item, ", Value: %u, Timestamp: %s", - al_2bit, abs_time_to_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); + al_2bit, abs_time_to_ep_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); proto_item_set_len(point_item, data_pos - offset); offset = data_pos; @@ -2080,7 +2080,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset, al_bit = (al_ptflags & AL_OBJ_BI_FLAG7) >> 7; /* bit shift 1xxxxxxx -> xxxxxxx1 */ proto_item_append_text(point_item, ", Value: %u, Timestamp: %s", - al_bit, abs_time_to_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); + al_bit, abs_time_to_ep_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); proto_item_set_len(point_item, data_pos - offset); offset = data_pos; @@ -2318,7 +2318,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset, case AL_OBJ_FDCTRC_32T: case AL_OBJ_FDCTRC_16T: dnp3_al_get_timestamp(&al_abstime, tvb, data_pos); - proto_item_append_text(point_item, ", Timestamp: %s", abs_time_to_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); + proto_item_append_text(point_item, ", Timestamp: %s", abs_time_to_ep_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); proto_tree_add_time(point_tree, hf_dnp3_al_timestamp, tvb, data_pos, 6, &al_abstime); data_pos += 6; break; @@ -2434,7 +2434,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset, case AL_OBJ_AIFC_FLTT: case AL_OBJ_AIFC_DBLT: dnp3_al_get_timestamp(&al_abstime, tvb, data_pos); - proto_item_append_text(point_item, ", Timestamp: %s", abs_time_to_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); + proto_item_append_text(point_item, ", Timestamp: %s", abs_time_to_ep_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); proto_tree_add_time(point_tree, hf_dnp3_al_timestamp, tvb, data_pos, 6, &al_abstime); data_pos += 6; break; @@ -2514,7 +2514,7 @@ dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset, case AL_OBJ_AOC_FLTT: case AL_OBJ_AOC_DBLT: dnp3_al_get_timestamp(&al_abstime, tvb, data_pos); - proto_item_append_text(point_item, ", Timestamp: %s", abs_time_to_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); + proto_item_append_text(point_item, ", Timestamp: %s", abs_time_to_ep_str(&al_abstime, ABSOLUTE_TIME_UTC, FALSE)); proto_tree_add_time(point_tree, hf_dnp3_al_timestamp, tvb, data_pos, 6, &al_abstime); data_pos += 6; break; diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 4204b8d9d8..a93fb9ebc7 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -1796,19 +1796,19 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, cur_offset += 4; ti_soa = proto_tree_add_item(rr_tree, hf_dns_soa_refresh_interval, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti_soa, " (%s)", time_secs_to_str(tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti_soa, " (%s)", time_secs_to_ep_str(tvb_get_ntohl(tvb, cur_offset))); cur_offset += 4; ti_soa = proto_tree_add_item(rr_tree, hf_dns_soa_retry_interval, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti_soa, " (%s)", time_secs_to_str(tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti_soa, " (%s)", time_secs_to_ep_str(tvb_get_ntohl(tvb, cur_offset))); cur_offset += 4; ti_soa = proto_tree_add_item(rr_tree, hf_dns_soa_expire_limit, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti_soa, " (%s)", time_secs_to_str(tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti_soa, " (%s)", time_secs_to_ep_str(tvb_get_ntohl(tvb, cur_offset))); cur_offset += 4; ti_soa = proto_tree_add_item(rr_tree, hf_dns_soa_minimum_ttl, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti_soa, " (%s)", time_secs_to_str(tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti_soa, " (%s)", time_secs_to_ep_str(tvb_get_ntohl(tvb, cur_offset))); } break; @@ -2871,7 +2871,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, rr_len -= 1; ti = proto_tree_add_item(rr_tree, hf_dns_rrsig_original_ttl, tvb, cur_offset, 4, ENC_BIG_ENDIAN); - proto_item_append_text(ti, " (%s)", time_secs_to_str(tvb_get_ntohl(tvb, cur_offset))); + proto_item_append_text(ti, " (%s)", time_secs_to_ep_str(tvb_get_ntohl(tvb, cur_offset))); cur_offset += 4; rr_len -= 4; diff --git a/epan/dissectors/packet-dtpt.c b/epan/dissectors/packet-dtpt.c index 9ff1b5aca1..99e880ce5b 100644 --- a/epan/dissectors/packet-dtpt.c +++ b/epan/dissectors/packet-dtpt.c @@ -285,7 +285,7 @@ dissect_dtpt_guid(tvbuff_t *tvb, guint offset, proto_tree *tree, int hfindex) guid_name = guids_get_guid_name(&guid); if (guid_name != NULL) proto_item_set_text(dtpt_guid_item, "%s: %s (%s)", - proto_registrar_get_name(hfindex), guid_name, guid_to_str(&guid)); + proto_registrar_get_name(hfindex), guid_name, guid_to_ep_str(&guid)); dtpt_guid_tree = proto_item_add_subtree(dtpt_guid_item, ett_dtpt_guid); } if (dtpt_guid_tree) { @@ -299,7 +299,7 @@ dissect_dtpt_guid(tvbuff_t *tvb, guint offset, proto_tree *tree, int hfindex) if (guid_name != NULL && dtpt_guid_data_item != NULL) { proto_item_set_text(dtpt_guid_data_item, "%s: %s (%s)", proto_registrar_get_name(hf_dtpt_guid_data), - guid_name, guid_to_str(&guid)); + guid_name, guid_to_ep_str(&guid)); } } } diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c index cad347c2ed..46881ce60b 100644 --- a/epan/dissectors/packet-dvbci.c +++ b/epan/dissectors/packet-dvbci.c @@ -2777,7 +2777,7 @@ dissect_dvbci_payload_dt(guint32 tag, gint len_field, } else { col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, - "update every %s", rel_time_to_str(&resp_intv)); + "update every %s", rel_time_to_ep_str(&resp_intv)); } } else if (tag==T_DATE_TIME) { @@ -2797,7 +2797,7 @@ dissect_dvbci_payload_dt(guint32 tag, gint len_field, proto_tree_add_time(tree, hf_dvbci_utc_time, tvb, offset, time_field_len, &utc_time); col_append_sep_fstr(pinfo->cinfo, COL_INFO, ": ", "%s UTC", - abs_time_to_str(&utc_time, ABSOLUTE_TIME_UTC, FALSE)); + abs_time_to_ep_str(&utc_time, ABSOLUTE_TIME_UTC, FALSE)); offset += time_field_len; if (len_field==7) { @@ -3263,7 +3263,7 @@ dissect_dvbci_payload_cc(guint32 tag, gint len_field _U_, break; } else { - /* abs_time_to_str() never returns NULL */ + /* abs_time_to_ep_str() never returns NULL */ proto_tree_add_time(tree, hf_dvbci_pin_chg_time, tvb, offset, UTC_TIME_LEN, &utc_time); } diff --git a/epan/dissectors/packet-glusterfs.c b/epan/dissectors/packet-glusterfs.c index b87a5d542b..b152465e64 100644 --- a/epan/dissectors/packet-glusterfs.c +++ b/epan/dissectors/packet-glusterfs.c @@ -547,7 +547,7 @@ gluster_rpc_dissect_dict(proto_tree *tree, tvbuff_t *tvb, int hfindex, int offse /* Gluster is not very endianness friendly */ tvb_get_letohguid(tvb, offset, &gfid); - gfid_s = guid_to_str(&gfid); + gfid_s = guid_to_ep_str(&gfid); proto_item_append_text(dict_item, "%s", gfid_s); /* this is a changelog in binary format */ } else if (value_len == 12 && !strncmp("trusted.afr.", key, 12)) { diff --git a/epan/dissectors/packet-goose.c b/epan/dissectors/packet-goose.c index 81f12879a2..eea9d0bc84 100644 --- a/epan/dissectors/packet-goose.c +++ b/epan/dissectors/packet-goose.c @@ -504,7 +504,7 @@ dissect_goose_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ ts.secs = seconds; ts.nsecs = nanoseconds; - ptime = abs_time_to_str(&ts, ABSOLUTE_TIME_UTC, TRUE); + ptime = abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, TRUE); if(hf_index >= 0) { diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index c0895fb5fa..6f04211e0c 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -1466,7 +1466,7 @@ dissect_icmp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data) "Address entry size: %u", addr_entry_size); proto_tree_add_text(icmp_tree, tvb, 6, 2, "Lifetime: %s", - time_secs_to_str(tvb_get_ntohs + time_secs_to_ep_str(tvb_get_ntohs (tvb, 6))); break; @@ -1693,16 +1693,16 @@ dissect_icmp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data) get_best_guess_mstimeofday(tvb, 8, frame_ts); proto_tree_add_text(icmp_tree, tvb, 8, 4, "Originate timestamp: %s after midnight UTC", - time_msecs_to_str(orig_ts)); + time_msecs_to_ep_str(orig_ts)); proto_tree_add_text(icmp_tree, tvb, 12, 4, "Receive timestamp: %s after midnight UTC", - time_msecs_to_str + time_msecs_to_ep_str (get_best_guess_mstimeofday (tvb, 12, orig_ts))); proto_tree_add_text(icmp_tree, tvb, 16, 4, "Transmit timestamp: %s after midnight UTC", - time_msecs_to_str + time_msecs_to_ep_str (get_best_guess_mstimeofday (tvb, 16, orig_ts))); } diff --git a/epan/dissectors/packet-icq.c b/epan/dissectors/packet-icq.c index e0adfb01d2..114150e6ab 100644 --- a/epan/dissectors/packet-icq.c +++ b/epan/dissectors/packet-icq.c @@ -726,7 +726,7 @@ icqv5_cmd_login(proto_tree* tree, tvbuff_t *tvb, int offset) if (tree) { theTime = tvb_get_letohl(tvb, offset + CMD_LOGIN_TIME); - aTime = abs_time_secs_to_str(theTime, ABSOLUTE_TIME_LOCAL, TRUE); + aTime = abs_time_secs_to_ep_str(theTime, ABSOLUTE_TIME_LOCAL, TRUE); proto_tree_add_text(subtree, tvb, offset + CMD_LOGIN_TIME, 4, "Time: %ld = %s", (long)theTime, aTime); port = tvb_get_letohl(tvb, offset + CMD_LOGIN_PORT); diff --git a/epan/dissectors/packet-ipmi.c b/epan/dissectors/packet-ipmi.c index d31b3a0f1b..e71731125c 100644 --- a/epan/dissectors/packet-ipmi.c +++ b/epan/dissectors/packet-ipmi.c @@ -766,10 +766,10 @@ ipmi_add_timestamp(proto_tree *tree, gint hf, tvbuff_t *tvb, guint offset) } else if (ts <= 0x20000000) { proto_tree_add_uint_format_value(tree, hf, tvb, offset, 4, ts, "%s since SEL device's initialization", - time_secs_to_str_unsigned(ts)); + time_secs_to_ep_str_unsigned(ts)); } else { proto_tree_add_uint_format_value(tree, hf, tvb, offset, 4, - ts, "%s", abs_time_secs_to_str(ts, ABSOLUTE_TIME_UTC, TRUE)); + ts, "%s", abs_time_secs_to_ep_str(ts, ABSOLUTE_TIME_UTC, TRUE)); } } diff --git a/epan/dissectors/packet-ipp.c b/epan/dissectors/packet-ipp.c index d57502063b..3b6d6915a6 100644 --- a/epan/dissectors/packet-ipp.c +++ b/epan/dissectors/packet-ipp.c @@ -506,7 +506,7 @@ add_integer_tree(proto_tree *tree, tvbuff_t *tvb, int offset, 1 + 2 + name_length + 2 + value_length, "%s: %s", format_text(name_val, name_length), - abs_time_secs_to_str(tvb_get_ntohl(tvb, offset + 1 + 2 + name_length + 2), + abs_time_secs_to_ep_str(tvb_get_ntohl(tvb, offset + 1 + 2 + name_length + 2), ABSOLUTE_TIME_LOCAL, TRUE)); diff --git a/epan/dissectors/packet-kismet.c b/epan/dissectors/packet-kismet.c index b3502a86bf..7f72ee9682 100644 --- a/epan/dissectors/packet-kismet.c +++ b/epan/dissectors/packet-kismet.c @@ -245,7 +245,7 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * da /* * Format ascii representaion of time */ - ptr = abs_time_secs_to_str(t, ABSOLUTE_TIME_LOCAL, TRUE); + ptr = abs_time_secs_to_ep_str(t, ABSOLUTE_TIME_LOCAL, TRUE); proto_tree_add_text(reqresp_tree, tvb, offset, tokenlen, "Time: %s", ptr); } diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index e6fce7ce2c..c1150cb8f4 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -8483,8 +8483,8 @@ dissect_lte_rrc_T_synchronousSystemTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ bits = tvb_get_bits64(sync_system_time_tvb, 0, 39, ENC_BIG_ENDIAN); ts.secs = (time_t)(bits/100) + 315964800; /* CDMA2000 epoch is 00:00:00 (midnight) UTC on 1980-01-06 */ ts.nsecs = (int)(bits%100)*10000000; - proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_str(&ts, ABSOLUTE_TIME_UTC, FALSE)); - proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, FALSE)); + proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE)); } return offset; @@ -8508,8 +8508,8 @@ dissect_lte_rrc_T_asynchronousSystemTime(tvbuff_t *tvb _U_, int offset _U_, asn1 bits = tvb_get_bits64(async_system_time_tvb, 0, 49, ENC_BIG_ENDIAN); ts.secs = (time_t)((bits*8)/1228800) + 315964800; /* CDMA2000 epoch is 00:00:00 (midnight) UTC on 1980-01-06 */ ts.nsecs = (int)(((bits%153600)*8*1000000000)/1228800); - proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_str(&ts, ABSOLUTE_TIME_UTC, FALSE)); - proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, FALSE)); + proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE)); } return offset; @@ -10186,9 +10186,9 @@ dissect_lte_rrc_T_timeInfoUTC_r11(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t ts.secs = (time_t)(timeInfo/100)-2208988800U; /* epoch is 00:00:00 (midnight) UTC on 1900-01-01 */ ts.nsecs = (int)(timeInfo%100)*10000000; proto_tree_add_text(subtree, tvb, old_offset>>3, (old_offset&0x07) ? 6 : 5, - "UTC time: %s", abs_time_to_str(&ts, ABSOLUTE_TIME_UTC, FALSE)); + "UTC time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, FALSE)); proto_tree_add_text(subtree, tvb, old_offset>>3, (old_offset&0x07) ? 6 : 5, - "Local time: %s", abs_time_to_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE)); + "Local time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE)); return offset; } diff --git a/epan/dissectors/packet-mbim.c b/epan/dissectors/packet-mbim.c index 8f6cc11f68..d17493ab20 100644 --- a/epan/dissectors/packet-mbim.c +++ b/epan/dissectors/packet-mbim.c @@ -1639,7 +1639,7 @@ mbim_dissect_service_id_uuid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * } } proto_tree_add_guid_format_value(tree, hf, tvb, *offset, 16, &uuid, "%s (%s)", - val_to_str_const(i, mbim_service_id_vals, "Unknown"), guid_to_str(&uuid)); + val_to_str_const(i, mbim_service_id_vals, "Unknown"), guid_to_ep_str(&uuid)); *offset += 16; return i; @@ -2147,7 +2147,7 @@ mbim_dissect_context_type_uuid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree } } proto_tree_add_guid_format_value(tree, hf_mbim_context_type, tvb, *offset, 16, &uuid, "%s (%s)", - val_to_str_const(i, mbim_context_type_vals, "Unknown"), guid_to_str(&uuid)); + val_to_str_const(i, mbim_context_type_vals, "Unknown"), guid_to_ep_str(&uuid)); *offset += 16; return i; diff --git a/epan/dissectors/packet-mms.c b/epan/dissectors/packet-mms.c index d4552556a2..3052e3720c 100644 --- a/epan/dissectors/packet-mms.c +++ b/epan/dissectors/packet-mms.c @@ -1847,7 +1847,7 @@ dissect_mms_TimeOfDay(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ if(len == 4) { milliseconds = tvb_get_ntohl(tvb, offset); - ptime = time_msecs_to_str(milliseconds); + ptime = time_msecs_to_ep_str(milliseconds); if(hf_index >= 0) { @@ -1867,7 +1867,7 @@ dissect_mms_TimeOfDay(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ ts.secs = (days + 5113) * 86400 + milliseconds / 1000; ts.nsecs = (milliseconds % 1000) * 1000000U; - ptime = abs_time_to_str(&ts, ABSOLUTE_TIME_UTC, TRUE); + ptime = abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, TRUE); if(hf_index >= 0) { proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime); @@ -1943,7 +1943,7 @@ dissect_mms_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ ts.secs = seconds; ts.nsecs = nanoseconds; - ptime = abs_time_to_str(&ts, ABSOLUTE_TIME_UTC, TRUE); + ptime = abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, TRUE); if(hf_index >= 0) { diff --git a/epan/dissectors/packet-mmse.c b/epan/dissectors/packet-mmse.c index 1e66d22603..340de610b2 100644 --- a/epan/dissectors/packet-mmse.c +++ b/epan/dissectors/packet-mmse.c @@ -1201,7 +1201,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut, &count2); tmptime.secs = tval; tmptime.nsecs = 0; - strval = abs_time_to_str(&tmptime, ABSOLUTE_TIME_LOCAL, + strval = abs_time_to_ep_str(&tmptime, ABSOLUTE_TIME_LOCAL, TRUE); /* Now render the fields */ tvb_ensure_bytes_exist(tvb, offset - 1, length + count + 1); diff --git a/epan/dissectors/packet-nbns.c b/epan/dissectors/packet-nbns.c index 161060d6b3..dc284c40be 100644 --- a/epan/dissectors/packet-nbns.c +++ b/epan/dissectors/packet-nbns.c @@ -300,7 +300,7 @@ add_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset, proto_tree_add_text(rr_tree, tvb, offset, 2, "Class: %s", class_description); offset += 2; proto_tree_add_text(rr_tree, tvb, offset, 4, "Time to live: %s", - time_secs_to_str(ttl)); + time_secs_to_ep_str(ttl)); offset += 4; proto_tree_add_text(rr_tree, tvb, offset, 2, "Data length: %u", data_len); return rr_tree; diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index ee5ae7986e..75e96d83fe 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -3403,7 +3403,7 @@ print_nds_values(proto_tree *vtree, tvbuff_t *tvb, guint32 syntax_type, nds_val voffset = voffset+4; ns.secs = tvb_get_letohl(tvb, voffset); ns.nsecs = 0; - proto_tree_add_time_format(nvtree, hf_nds_ds_time, tvb, voffset, 4, &ns, "Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_tree_add_time_format(nvtree, hf_nds_ds_time, tvb, voffset, 4, &ns, "Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); voffset = voffset + 4; rnum = tvb_get_letohs(tvb, voffset); /* replica number */ proto_tree_add_uint_format(nvtree, hf_nds_rnum, tvb, voffset, @@ -3437,7 +3437,7 @@ print_nds_values(proto_tree *vtree, tvbuff_t *tvb, guint32 syntax_type, nds_val voffset += 4; /* This is the length of the time data no need to decode, always 4 bytes */ ns.secs = tvb_get_letohl(tvb, voffset); ns.nsecs = 0; - proto_tree_add_time_format(nvtree, hf_nds_ds_time, tvb, voffset, 4, &ns, "Time: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_tree_add_time_format(nvtree, hf_nds_ds_time, tvb, voffset, 4, &ns, "Time: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); voffset = voffset + 4; break; case 0x00000019: /* Typed Name */ @@ -3648,7 +3648,7 @@ print_es_type(proto_tree *estree, tvbuff_t *tvb, nds_val *values, guint32 vtype, ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(nestree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(nestree, hf_nds_replica_num, tvb, ioffset, @@ -3730,7 +3730,7 @@ print_es_type(proto_tree *estree, tvbuff_t *tvb, nds_val *values, guint32 vtype, ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(nestree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(nestree, hf_nds_replica_num, tvb, ioffset, @@ -3870,7 +3870,7 @@ print_es_type(proto_tree *estree, tvbuff_t *tvb, nds_val *values, guint32 vtype, ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(nestree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(nestree, hf_nds_replica_num, tvb, ioffset, @@ -3922,7 +3922,7 @@ print_es_type(proto_tree *estree, tvbuff_t *tvb, nds_val *values, guint32 vtype, ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(sub2tree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(sub2tree, hf_nds_replica_num, tvb, ioffset, @@ -4444,14 +4444,14 @@ process_entry_info(proto_tree *it_tree, tvbuff_t *tvb, nds_val *values) ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(it_tree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Modification Time: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Modification Time: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; } if (iter_flags & DSI_MODIFICATION_TIMESTAMP) { /* Modification Timestamp */ ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(it_tree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Modification Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Modification Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(it_tree, hf_nds_replica_num, tvb, ioffset, @@ -4466,7 +4466,7 @@ process_entry_info(proto_tree *it_tree, tvbuff_t *tvb, nds_val *values) ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(it_tree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Creation Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Creation Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(it_tree, hf_nds_replica_num, tvb, ioffset, @@ -5136,7 +5136,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(atree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(atree, hf_nds_replica_num, tvb, ioffset, @@ -5224,7 +5224,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Creation Time: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Creation Time: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, @@ -5362,7 +5362,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Modification Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Modification Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, @@ -5796,14 +5796,14 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Modification Time: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Modification Time: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; break; case 0x0000020: /* Modification Timestamp */ ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Modification Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Modification Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, @@ -5818,7 +5818,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Creation Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Creation Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, @@ -5903,7 +5903,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Purge Time: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Purge Time: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; break; case 0x00020000: /* Dereference Base Class */ @@ -6169,7 +6169,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(sub1tree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Creation Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Creation Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(sub1tree, hf_nds_replica_num, tvb, ioffset, @@ -6182,7 +6182,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(sub1tree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Modification Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Modification Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset = ioffset + 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(sub1tree, hf_nds_replica_num, tvb, ioffset, @@ -6398,7 +6398,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Creation Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Creation Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset += 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, @@ -6430,7 +6430,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ns.secs = tvb_get_letohl(tvb, ioffset); /* Seconds */ ns.nsecs = 0; proto_tree_add_time_format(sub2tree, hf_es_seconds, tvb, ioffset, - 4, &ns, "Timestamp: %s", abs_time_secs_to_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); + 4, &ns, "Timestamp: %s", abs_time_secs_to_ep_str(ns.secs, ABSOLUTE_TIME_LOCAL, TRUE)); ioffset += 4; replica_num = tvb_get_letohs(tvb, ioffset); /* Replica */ proto_tree_add_item(sub2tree, hf_nds_replica_num, tvb, ioffset, diff --git a/epan/dissectors/packet-pktc.c b/epan/dissectors/packet-pktc.c index fd9b90b205..b984ca0184 100644 --- a/epan/dissectors/packet-pktc.c +++ b/epan/dissectors/packet-pktc.c @@ -386,7 +386,7 @@ dissect_pktc_ap_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int o 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))); + time_secs_to_ep_str(tvb_get_ntohl(tvb, offset))); offset+=4; /* grace period */ diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index c18c239ae7..d505035ec2 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -824,7 +824,7 @@ void radius_date(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_ time_ptr.nsecs = 0; proto_tree_add_time(tree, a->hf, tvb, offset, len, &time_ptr); - proto_item_append_text(avp_item, "%s", abs_time_to_str(&time_ptr, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_item_append_text(avp_item, "%s", abs_time_to_ep_str(&time_ptr, ABSOLUTE_TIME_LOCAL, TRUE)); } /* diff --git a/epan/dissectors/packet-rtmpt.c b/epan/dissectors/packet-rtmpt.c index 6a8cc2f57f..e9fd13cde3 100644 --- a/epan/dissectors/packet-rtmpt.c +++ b/epan/dissectors/packet-rtmpt.c @@ -1064,9 +1064,9 @@ dissect_amf0_value_type(tvbuff_t *tvb, gint offset, proto_tree *tree, gboolean * t.nsecs = (int)((iDoubleValue - 1000*(double)t.secs) * 1000000); proto_tree_add_time(val_tree, hf_amf_date, tvb, iValueOffset, 8, &t); iValueOffset += 8; - proto_item_append_text(ti, " %s", abs_time_to_str(&t, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_item_append_text(ti, " %s", abs_time_to_ep_str(&t, ABSOLUTE_TIME_LOCAL, TRUE)); if (parent_ti != NULL) - proto_item_append_text(parent_ti, " %s", abs_time_to_str(&t, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_item_append_text(parent_ti, " %s", abs_time_to_ep_str(&t, ABSOLUTE_TIME_LOCAL, TRUE)); /* time-zone */ iValueOffset += 2; break; @@ -1289,9 +1289,9 @@ dissect_amf3_value_type(tvbuff_t *tvb, gint offset, proto_tree *tree, proto_item t.nsecs = (int)((iDoubleValue - 1000*(double)t.secs) * 1000000); proto_tree_add_time(val_tree, hf_amf_date, tvb, iValueOffset, 8, &t); iValueOffset += 8; - proto_item_append_text(ti, "%s", abs_time_to_str(&t, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_item_append_text(ti, "%s", abs_time_to_ep_str(&t, ABSOLUTE_TIME_LOCAL, TRUE)); if (parent_ti != NULL) - proto_item_append_text(parent_ti, "%s", abs_time_to_str(&t, ABSOLUTE_TIME_LOCAL, TRUE)); + proto_item_append_text(parent_ti, "%s", abs_time_to_ep_str(&t, ABSOLUTE_TIME_LOCAL, TRUE)); } else { /* the upper 28 bits of the integer value are an object reference index */ proto_tree_add_uint(val_tree, hf_amf_object_reference, tvb, iValueOffset, iValueLength, iIntegerValue >> 1); diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index 717d132f8c..0282fe465a 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -1006,7 +1006,7 @@ tsn_tree(sctp_tsn_t *t, proto_item *tsn_item, packet_info *pinfo, (*r)->framenum, "This TSN was retransmitted in frame %u (%s seconds after this frame)", (*r)->framenum, - rel_time_to_secs_str(&rto)); + rel_time_to_secs_ep_str(&rto)); PROTO_ITEM_SET_GENERATED(pi); r = &(*r)->next; } diff --git a/epan/dissectors/packet-selfm.c b/epan/dissectors/packet-selfm.c index 86f094286c..35b09734be 100644 --- a/epan/dissectors/packet-selfm.c +++ b/epan/dissectors/packet-selfm.c @@ -1970,7 +1970,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o proto_tree_add_item(fastser_tree, hf_selfm_fastser_unsresp_doy, tvb, offset, 2, ENC_BIG_ENDIAN); proto_tree_add_item(fastser_tree, hf_selfm_fastser_unsresp_year, tvb, offset+2, 2, ENC_BIG_ENDIAN); proto_tree_add_item(fastser_tree, hf_selfm_fastser_unsresp_todms, tvb, offset+4, 4, ENC_BIG_ENDIAN); - proto_tree_add_text(fastser_tree, tvb, offset+4, 4, "Time of Day (decoded): %s", time_msecs_to_str(tod_ms)); + proto_tree_add_text(fastser_tree, tvb, offset+4, 4, "Time of Day (decoded): %s", time_msecs_to_ep_str(tod_ms)); offset += 8; /* Build element tree */ @@ -2011,7 +2011,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o proto_tree_add_item(fastser_element_tree, hf_selfm_fastser_unsresp_elmt_idx, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(fastser_element_tree, hf_selfm_fastser_unsresp_elmt_ts_ofs, tvb, offset+1, 3, ENC_NA); proto_tree_add_text(fastser_element_tree, tvb, offset+1, 3, - "SER Element Timestamp Offset (decoded): %s", time_msecs_to_str(tod_ms + (elmt_ts_offset/1000))); + "SER Element Timestamp Offset (decoded): %s", time_msecs_to_ep_str(tod_ms + (elmt_ts_offset/1000))); proto_tree_add_uint(fastser_element_tree, hf_selfm_fastser_unsresp_elmt_status, tvb, elmt_status32_ofs, 4, elmt_status); offset += 4; diff --git a/epan/dissectors/packet-smb-browse.c b/epan/dissectors/packet-smb-browse.c index 66841e5bfb..d6aef19663 100644 --- a/epan/dissectors/packet-smb-browse.c +++ b/epan/dissectors/packet-smb-browse.c @@ -619,7 +619,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr proto_tree_add_uint_format_value(tree, hf_periodicity, tvb, offset, 4, periodicity, "%s", - time_msecs_to_str(periodicity)); + time_msecs_to_ep_str(periodicity)); offset += 4; /* server name */ @@ -726,7 +726,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr proto_tree_add_uint_format_value(tree, hf_server_uptime, tvb, offset, 4, uptime, "%s", - time_msecs_to_str(uptime)); + time_msecs_to_ep_str(uptime)); offset += 4; /* next 4 bytes must be zero */ @@ -886,7 +886,7 @@ dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr proto_tree_add_uint_format_value(tree, hf_periodicity, tvb, offset, 2, periodicity, "%s", - time_msecs_to_str(periodicity)); + time_msecs_to_ep_str(periodicity)); offset += 2; /* server name */ diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c index 9b3f3bc3c8..3e13112064 100644 --- a/epan/dissectors/packet-smb-pipe.c +++ b/epan/dissectors/packet-smb-pipe.c @@ -514,7 +514,7 @@ add_reltime(tvbuff_t *tvb, int offset, int count _U_, packet_info *pinfo _U_, nstime.nsecs = 0; proto_tree_add_time_format_value(tree, hf_index, tvb, offset, 4, &nstime, "%s", - time_secs_to_str( (gint32) nstime.secs)); + time_secs_to_ep_str( (gint32) nstime.secs)); offset += 4; return offset; } @@ -648,11 +648,11 @@ add_tzoffset(tvbuff_t *tvb, int offset, int count _U_, packet_info *pinfo _U_, if (tzoffset < 0) { proto_tree_add_int_format_value(tree, hf_tzoffset, tvb, offset, 2, tzoffset, "%s east of UTC", - time_secs_to_str(-tzoffset*60)); + time_secs_to_ep_str(-tzoffset*60)); } else if (tzoffset > 0) { proto_tree_add_int_format_value(tree, hf_tzoffset, tvb, offset, 2, tzoffset, "%s west of UTC", - time_secs_to_str(tzoffset*60)); + time_secs_to_ep_str(tzoffset*60)); } else { proto_tree_add_int_format_value(tree, hf_tzoffset, tvb, offset, 2, tzoffset, "at UTC"); diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c index c29789740d..cac70eb19f 100644 --- a/epan/dissectors/packet-smb.c +++ b/epan/dissectors/packet-smb.c @@ -4980,7 +4980,7 @@ smbext20_timeout_msecs_to_str(gint32 timeout) return buf; } - return time_msecs_to_str(timeout); + return time_msecs_to_ep_str(timeout); } static int diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index 585b6a0e84..72c95098ea 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -1329,7 +1329,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len) ts.nsecs = 0; proto_tree_add_time_format_value(tree, hf_snmp_engineid_time, tvb, offset+4, 4, &ts, "%s", - abs_time_secs_to_str(seconds, ABSOLUTE_TIME_LOCAL, TRUE)); + abs_time_secs_to_ep_str(seconds, ABSOLUTE_TIME_LOCAL, TRUE)); offset+=8; len_remain=0; } diff --git a/epan/dissectors/packet-sv.c b/epan/dissectors/packet-sv.c index 6c74711b0e..3743950ed3 100644 --- a/epan/dissectors/packet-sv.c +++ b/epan/dissectors/packet-sv.c @@ -306,7 +306,7 @@ dissect_sv_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, ts.secs = seconds; ts.nsecs = nanoseconds; - ptime = abs_time_to_str(&ts, ABSOLUTE_TIME_UTC, TRUE); + ptime = abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, TRUE); if(hf_index >= 0) { diff --git a/epan/dissectors/packet-time.c b/epan/dissectors/packet-time.c index 694773939d..22255e0b66 100644 --- a/epan/dissectors/packet-time.c +++ b/epan/dissectors/packet-time.c @@ -70,7 +70,7 @@ dissect_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint32 delta_seconds = tvb_get_ntohl(tvb, 0); proto_tree_add_uint_format(time_tree, hf_time_time, tvb, 0, 4, delta_seconds, "%s", - abs_time_secs_to_str(delta_seconds-2208988800U, time_display_type, TRUE)); + abs_time_secs_to_ep_str(delta_seconds-2208988800U, time_display_type, TRUE)); } } diff --git a/epan/dissectors/packet-vcdu.c b/epan/dissectors/packet-vcdu.c index ec6bf6efca..f6533745f4 100644 --- a/epan/dissectors/packet-vcdu.c +++ b/epan/dissectors/packet-vcdu.c @@ -245,7 +245,7 @@ smex_time_to_string (int pb5_days_since_midnight_9_10_oct_1995, int pb5_seconds, t.secs = (pb5_days_since_midnight_9_10_oct_1995 * 86400) + pb5_seconds + utcdiff; t.nsecs = pb5_milliseconds*1000000; /* msecs to nsecs */ - return abs_time_to_str(&t, ABSOLUTE_TIME_DOY_UTC, TRUE); + return abs_time_to_ep_str(&t, ABSOLUTE_TIME_DOY_UTC, TRUE); } diff --git a/epan/dissectors/packet-who.c b/epan/dissectors/packet-who.c index 07b82a8a59..7459b5f471 100644 --- a/epan/dissectors/packet-who.c +++ b/epan/dissectors/packet-who.c @@ -218,7 +218,7 @@ dissect_whoent(tvbuff_t *tvb, int offset, proto_tree *tree) idle_secs = tvb_get_ntohl(tvb, line_offset); proto_tree_add_uint_format(whoent_tree, hf_who_idle, tvb, line_offset, 4, idle_secs, "Idle: %s", - time_secs_to_str(idle_secs)); + time_secs_to_ep_str(idle_secs)); line_offset += 4; whoent_num++; diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c index 487ca583ef..4284000acc 100644 --- a/epan/dissectors/packet-wsp.c +++ b/epan/dissectors/packet-wsp.c @@ -1811,7 +1811,7 @@ add_headers (proto_tree *tree, tvbuff_t *tvb, int hf, packet_info *pinfo) tvb, hdr_start, hdr_len + val_len, "Requesting Time Of Day"); } else { - val_str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE); + val_str = abs_time_secs_to_ep_str(val, ABSOLUTE_TIME_LOCAL, TRUE); ti = proto_tree_add_string (wsp_headers, hf_hdr_x_wap_tod, tvb, hdr_start, hdr_len + val_len, val_str); @@ -2856,12 +2856,12 @@ wkh_ ## underscored(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, packet_i if (val_id <= 4) { /* Length field already parsed by macro! */ \ get_date_value(val, tvb, off, len, ok); \ if (ok) { \ - str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \ + str = abs_time_secs_to_ep_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \ tvb_ensure_bytes_exist(tvb, hdr_start, offset - hdr_start); \ ti = proto_tree_add_string(tree, hf_hdr_ ## underscored, \ tvb, hdr_start, offset - hdr_start, str); \ /* BEHOLD: do NOT try to free str, as \ - * abs_time_secs_to_str() returns wmem_allocated data */ \ + * abs_time_secs_to_ep_str() returns wmem_allocated data */ \ } \ } \ wkh_4_End(hf_hdr_ ## underscored); \ @@ -2891,12 +2891,12 @@ wkh_ ## underscored(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, packet_i if (val_id <= 4) { /* Length field already parsed by macro! */ \ get_date_value(val, tvb, off, len, ok); \ if (ok) { \ - str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \ + str = abs_time_secs_to_ep_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \ tvb_ensure_bytes_exist(tvb, hdr_start, offset - hdr_start); \ ti = proto_tree_add_string(tree, hf_hdr_ ## underscored, \ tvb, hdr_start, offset - hdr_start, str); \ /* BEHOLD: do NOT try to free str, as \ - * abs_time_secs_to_str() returns wmem_allocated data */ \ + * abs_time_secs_to_ep_str() returns wmem_allocated data */ \ } \ } \ wkh_4_End(hf_hdr_ ## underscored); \ @@ -2944,7 +2944,7 @@ wkh_ ## underscored(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, packet_i tvb, hdr_start, offset - hdr_start, \ "Requesting Time Of Day"); \ } else { \ - str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \ + str = abs_time_secs_to_ep_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \ tvb_ensure_bytes_exist(tvb, hdr_start, offset - hdr_start); \ ti = proto_tree_add_string(tree, hf_hdr_ ## underscored, \ tvb, hdr_start, offset - hdr_start, str); \ @@ -3592,11 +3592,11 @@ wkh_profile_warning(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, packet_i get_date_value(val, tvb, off, len, ok); if (ok) { /* Valid warn-text string */ off += len; - val_str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE); + val_str = abs_time_secs_to_ep_str(val, ABSOLUTE_TIME_LOCAL, TRUE); str = wmem_strdup_printf(wmem_packet_scope(), "; date=%s", val_str); proto_item_append_string(ti, str); /* BEHOLD: do NOT try to free str, as \ - * abs_time_secs_to_str() returns wmem_allocated data */ \ + * abs_time_secs_to_ep_str() returns wmem_allocated data */ \ } } } diff --git a/epan/dissectors/packet-zbee-zcl-ha.c b/epan/dissectors/packet-zbee-zcl-ha.c index 5c4f5e8b65..5964e6d9e1 100644 --- a/epan/dissectors/packet-zbee-zcl-ha.c +++ b/epan/dissectors/packet-zbee-zcl-ha.c @@ -1485,7 +1485,7 @@ decode_zcl_appl_stats_utc_time(gchar *s, guint32 value) g_snprintf(s, ITEM_LABEL_LENGTH, "Invalid UTC Time"); else { value += ZBEE_ZCL_NSTIME_UTC_OFFSET; - g_snprintf(s, ITEM_LABEL_LENGTH, "%s", abs_time_secs_to_str (value, ABSOLUTE_TIME_LOCAL, TRUE)); + g_snprintf(s, ITEM_LABEL_LENGTH, "%s", abs_time_secs_to_ep_str (value, ABSOLUTE_TIME_LOCAL, TRUE)); } } /* decode_zcl_appl_stats_utc_time */ diff --git a/epan/dissectors/packet-zbee-zcl-se.c b/epan/dissectors/packet-zbee-zcl-se.c index ef803ae995..f366574784 100644 --- a/epan/dissectors/packet-zbee-zcl-se.c +++ b/epan/dissectors/packet-zbee-zcl-se.c @@ -406,7 +406,7 @@ decode_zcl_msg_start_time(gchar *s, guint32 value) g_snprintf(s, ITEM_LABEL_LENGTH, "Now"); else { value += ZBEE_ZCL_NSTIME_UTC_OFFSET; - g_snprintf(s, ITEM_LABEL_LENGTH, "%s", abs_time_secs_to_str (value, ABSOLUTE_TIME_LOCAL, TRUE)); + g_snprintf(s, ITEM_LABEL_LENGTH, "%s", abs_time_secs_to_ep_str (value, ABSOLUTE_TIME_LOCAL, TRUE)); } } /* decode_zcl_msg_start_time */ diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c index e32a482173..16a946f646 100644 --- a/epan/ftypes/ftype-time.c +++ b/epan/ftypes/ftype-time.c @@ -330,7 +330,7 @@ absolute_val_repr_len(fvalue_t *fv, ftrepr_t rtype _U_) { gchar *rep; - rep = abs_time_to_str(&fv->value.time, ABSOLUTE_TIME_LOCAL, + rep = abs_time_to_ep_str(&fv->value.time, ABSOLUTE_TIME_LOCAL, rtype == FTREPR_DISPLAY); return (int)strlen(rep) + 2; /* 2 for opening and closing quotes */ } @@ -339,7 +339,7 @@ static void absolute_val_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf) { sprintf(buf, "\"%s\"", - abs_time_to_str(&fv->value.time, ABSOLUTE_TIME_LOCAL, + abs_time_to_ep_str(&fv->value.time, ABSOLUTE_TIME_LOCAL, rtype == FTREPR_DISPLAY)); } @@ -348,14 +348,14 @@ relative_val_repr_len(fvalue_t *fv, ftrepr_t rtype _U_) { gchar *rep; - rep = rel_time_to_secs_str(&fv->value.time); + rep = rel_time_to_secs_ep_str(&fv->value.time); return (int)strlen(rep); } static void relative_val_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf) { - strcpy(buf, rel_time_to_secs_str(&fv->value.time)); + strcpy(buf, rel_time_to_secs_ep_str(&fv->value.time)); } void diff --git a/epan/guid-utils.h b/epan/guid-utils.h index 63d875535d..456b5c2860 100644 --- a/epan/guid-utils.h +++ b/epan/guid-utils.h @@ -49,7 +49,7 @@ WS_DLL_PUBLIC void guids_add_guid(const e_guid_t *guid, const gchar *name); WS_DLL_PUBLIC const gchar *guids_get_guid_name(const e_guid_t *guid); /* resolve GUID to name (or if unknown to hex string) */ -/* (if you need hex string only, use guid_to_str instead) */ +/* (if you need hex string only, use guid_to_ep_str instead) */ WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(const e_guid_t *guid); /* add a UUID (dcerpc_init_uuid() will call this too) */ @@ -59,7 +59,7 @@ WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(const e_guid_t *guid); #define guids_get_uuid_name(uuid) guids_get_guid_name((e_guid_t *) (uuid)) /* resolve UUID to name (or if unknown to hex string) */ -/* (if you need hex string only, use guid_to_str instead) */ +/* (if you need hex string only, use guid_to_ep_str instead) */ #define guids_resolve_uuid_to_str(uuid) guids_resolve_guid_to_str((e_guid_t *) (uuid)) #endif /* __GUID_UTILS_H__ */ diff --git a/epan/print.c b/epan/print.c index 5a45d58fdc..f1952e3a65 100644 --- a/epan/print.c +++ b/epan/print.c @@ -615,7 +615,7 @@ print_pdml_geninfo(proto_tree *tree, FILE *fh) /* Print geninfo.timestamp */ fprintf(fh, " \n", - abs_time_to_str(timestamp, ABSOLUTE_TIME_LOCAL, TRUE), (int) timestamp->secs, timestamp->nsecs, frame_finfo->length); + abs_time_to_ep_str(timestamp, ABSOLUTE_TIME_LOCAL, TRUE), (int) timestamp->secs, timestamp->nsecs, frame_finfo->length); /* Print geninfo end */ fprintf(fh, diff --git a/epan/proto.c b/epan/proto.c index 2aa22cc802..e822dde31a 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -3884,14 +3884,14 @@ proto_custom_set(proto_tree* tree, const int field_id, gint occurrence, case FT_ABSOLUTE_TIME: offset_r += protoo_strlcpy(result+offset_r, - abs_time_to_str((const nstime_t *)fvalue_get(&finfo->value), + abs_time_to_ep_str((const nstime_t *)fvalue_get(&finfo->value), (absolute_time_display_e)hfinfo->display, TRUE), size-offset_r); break; case FT_RELATIVE_TIME: offset_r += protoo_strlcpy(result+offset_r, - rel_time_to_secs_str((const nstime_t *)fvalue_get(&finfo->value)), + rel_time_to_secs_ep_str((const nstime_t *)fvalue_get(&finfo->value)), size-offset_r); break; @@ -4003,7 +4003,7 @@ proto_custom_set(proto_tree* tree, const int field_id, gint occurrence, case FT_GUID: offset_r += protoo_strlcpy(result+offset_r, - guid_to_str((e_guid_t *)fvalue_get(&finfo->value)), + guid_to_ep_str((e_guid_t *)fvalue_get(&finfo->value)), size-offset_r); break; @@ -5520,14 +5520,14 @@ proto_item_fill_label(field_info *fi, gchar *label_str) case FT_ABSOLUTE_TIME: label_fill(label_str, 0, hfinfo, - abs_time_to_str((const nstime_t *)fvalue_get(&fi->value), + abs_time_to_ep_str((const nstime_t *)fvalue_get(&fi->value), (absolute_time_display_e)hfinfo->display, TRUE)); break; case FT_RELATIVE_TIME: g_snprintf(label_str, ITEM_LABEL_LENGTH, "%s: %s seconds", hfinfo->name, - rel_time_to_secs_str((const nstime_t *)fvalue_get(&fi->value))); + rel_time_to_secs_ep_str((const nstime_t *)fvalue_get(&fi->value))); break; case FT_IPXNET: @@ -5578,7 +5578,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str) case FT_GUID: guid = (e_guid_t *)fvalue_get(&fi->value); - label_fill(label_str, 0, hfinfo, guid_to_str(guid)); + label_fill(label_str, 0, hfinfo, guid_to_ep_str(guid)); break; case FT_OID: diff --git a/epan/to_str.c b/epan/to_str.c index 676c97d14e..885d9fb124 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -313,16 +313,6 @@ guint32_to_str_buf(guint32 u, gchar *buf, int buf_len) { uint_to_str_back(bp, u); } -gchar * -guint32_to_str(const guint32 u) { - int str_len = 16; /* guint32_to_str_buf_len(u)+1; */ - - gchar *bp = (gchar *)ep_alloc(str_len); - guint32_to_str_buf(u, bp, str_len); - - return bp; -} - #define PLURALIZE(n) (((n) > 1) ? "s" : "") #define COMMA(do_it) ((do_it) ? ", " : "") @@ -343,7 +333,7 @@ guint32_to_str(const guint32 u) { * If time is negative, add a '-' to all non-null components. */ static void -time_secs_to_str_buf(gint32 time_val, const guint32 frac, const gboolean is_nsecs, +time_secs_to_ep_str_buf(gint32 time_val, const guint32 frac, const gboolean is_nsecs, emem_strbuf_t *buf) { int hours, mins, secs; @@ -394,7 +384,7 @@ time_secs_to_str_buf(gint32 time_val, const guint32 frac, const gboolean is_nsec } gchar * -time_secs_to_str(const gint32 time_val) +time_secs_to_ep_str(const gint32 time_val) { emem_strbuf_t *buf; @@ -405,12 +395,12 @@ time_secs_to_str(const gint32 time_val) return buf->str; } - time_secs_to_str_buf(time_val, 0, FALSE, buf); + time_secs_to_ep_str_buf(time_val, 0, FALSE, buf); return buf->str; } static void -time_secs_to_str_buf_unsigned(guint32 time_val, const guint32 frac, const gboolean is_nsecs, +time_secs_to_ep_str_buf_unsigned(guint32 time_val, const guint32 frac, const gboolean is_nsecs, emem_strbuf_t *buf) { int hours, mins, secs; @@ -447,7 +437,7 @@ time_secs_to_str_buf_unsigned(guint32 time_val, const guint32 frac, const gboole } gchar * -time_secs_to_str_unsigned(const guint32 time_val) +time_secs_to_ep_str_unsigned(const guint32 time_val) { emem_strbuf_t *buf; @@ -458,13 +448,13 @@ time_secs_to_str_unsigned(const guint32 time_val) return buf->str; } - time_secs_to_str_buf_unsigned(time_val, 0, FALSE, buf); + time_secs_to_ep_str_buf_unsigned(time_val, 0, FALSE, buf); return buf->str; } gchar * -time_msecs_to_str(gint32 time_val) +time_msecs_to_ep_str(gint32 time_val) { emem_strbuf_t *buf; int msecs; @@ -487,7 +477,7 @@ time_msecs_to_str(gint32 time_val) time_val /= 1000; } - time_secs_to_str_buf(time_val, msecs, FALSE, buf); + time_secs_to_ep_str_buf(time_val, msecs, FALSE, buf); return buf->str; } @@ -557,7 +547,7 @@ static const gchar *get_zonename(struct tm *tmp) { } gchar * -abs_time_to_str(const nstime_t *abs_time, const absolute_time_display_e fmt, +abs_time_to_ep_str(const nstime_t *abs_time, const absolute_time_display_e fmt, gboolean show_zone) { struct tm *tmp = NULL; @@ -641,7 +631,7 @@ abs_time_to_str(const nstime_t *abs_time, const absolute_time_display_e fmt, } gchar * -abs_time_secs_to_str(const time_t abs_time, const absolute_time_display_e fmt, +abs_time_secs_to_ep_str(const time_t abs_time, const absolute_time_display_e fmt, gboolean show_zone) { struct tm *tmp = NULL; @@ -825,7 +815,7 @@ display_epoch_time(gchar *buf, int buflen, const time_t sec, gint32 frac, * Display a relative time as days/hours/minutes/seconds. */ gchar * -rel_time_to_str(const nstime_t *rel_time) +rel_time_to_ep_str(const nstime_t *rel_time) { emem_strbuf_t *buf; gint32 time_val; @@ -855,7 +845,7 @@ rel_time_to_str(const nstime_t *rel_time) time_val = (gint) -rel_time->secs; } - time_secs_to_str_buf(time_val, nsec, TRUE, buf); + time_secs_to_ep_str_buf(time_val, nsec, TRUE, buf); return buf->str; } @@ -865,7 +855,7 @@ rel_time_to_str(const nstime_t *rel_time) * Display a relative time as seconds. */ gchar * -rel_time_to_secs_str(const nstime_t *rel_time) +rel_time_to_secs_ep_str(const nstime_t *rel_time) { gchar *buf; @@ -983,24 +973,6 @@ decode_bitfield_value(char *buf, const guint32 val, const guint32 mask, const in return p; } -/* Generate a string describing a Boolean bitfield (a one-bit field that - says something is either true or false). */ -const char * -decode_boolean_bitfield(const guint32 val, const guint32 mask, const int width, - const char *truedesc, const char *falsedesc) -{ - char *buf; - char *p; - - buf=(char *)ep_alloc(1025); /* is this a bit overkill? */ - p = decode_bitfield_value(buf, val, mask, width); - if (val & mask) - strcpy(p, truedesc); - else - strcpy(p, falsedesc); - return buf; -} - /* Generate a string describing a numeric bitfield (an N-bit field whose value is just a number). */ const char * @@ -1066,7 +1038,7 @@ ip_to_str_buf(const guint8 *ad, gchar *buf, const int buf_len) *b=0; } -gchar* guid_to_str(const e_guid_t *guid) { +gchar* guid_to_ep_str(const e_guid_t *guid) { gchar *buf; buf=(gchar *)ep_alloc(GUID_STR_LEN); diff --git a/epan/to_str.h b/epan/to_str.h index cdb1adda58..cf081c763f 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -75,22 +75,21 @@ extern gchar* ipxnet_to_str_punct(const guint32 ad, const char punct); extern gchar* tvb_vines_addr_to_str(tvbuff_t *tvb, const gint offset); WS_DLL_PUBLIC gchar* eui64_to_str(const guint64 ad); WS_DLL_PUBLIC gchar* tvb_eui64_to_str(tvbuff_t *tvb, const gint offset, const guint encoding); -WS_DLL_PUBLIC gchar* time_secs_to_str(const gint32 time_val); -gchar* time_secs_to_str_unsigned(const guint32); -WS_DLL_PUBLIC gchar* time_msecs_to_str(gint32 time_val); -WS_DLL_PUBLIC gchar* abs_time_to_str(const nstime_t*, const absolute_time_display_e fmt, +WS_DLL_PUBLIC gchar* time_secs_to_ep_str(const gint32 time_val); +gchar* time_secs_to_ep_str_unsigned(const guint32); +WS_DLL_PUBLIC gchar* time_msecs_to_ep_str(gint32 time_val); +WS_DLL_PUBLIC gchar* abs_time_to_ep_str(const nstime_t*, const absolute_time_display_e fmt, gboolean show_zone); -WS_DLL_PUBLIC gchar* abs_time_secs_to_str(const time_t, const absolute_time_display_e fmt, +WS_DLL_PUBLIC gchar* abs_time_secs_to_ep_str(const time_t, const absolute_time_display_e fmt, gboolean show_zone); WS_DLL_PUBLIC void display_signed_time(gchar *, int, const gint32, gint32, const to_str_time_res_t); WS_DLL_PUBLIC void display_epoch_time(gchar *, int, const time_t, gint32, const to_str_time_res_t); -extern gchar* guint32_to_str(const guint32 u); extern void guint32_to_str_buf(guint32 u, gchar *buf, int buf_len); -WS_DLL_PUBLIC gchar* rel_time_to_str(const nstime_t*); -WS_DLL_PUBLIC gchar* rel_time_to_secs_str(const nstime_t*); -WS_DLL_PUBLIC gchar* guid_to_str(const e_guid_t*); +WS_DLL_PUBLIC gchar* rel_time_to_ep_str(const nstime_t*); +WS_DLL_PUBLIC gchar* rel_time_to_secs_ep_str(const nstime_t*); +WS_DLL_PUBLIC gchar* guid_to_ep_str(const e_guid_t*); gchar* guid_to_str_buf(const e_guid_t*, gchar*, int); WS_DLL_PUBLIC char *decode_bits_in_field(const guint bit_offset, const gint no_of_bits, const guint64 value); @@ -99,8 +98,6 @@ WS_DLL_PUBLIC char *other_decode_bitfield_value(char *buf, const guint32 val, co const int width); WS_DLL_PUBLIC char *decode_bitfield_value(char *buf, const guint32 val, const guint32 mask, const int width); -WS_DLL_PUBLIC const char *decode_boolean_bitfield(const guint32 val, const guint32 mask, const int width, - const char *truedesc, const char *falsedesc); WS_DLL_PUBLIC const char *decode_numeric_bitfield(const guint32 val, const guint32 mask, const int width, const char *fmt); diff --git a/epan/wslua/wslua_util.c b/epan/wslua/wslua_util.c index 50d3e04f58..b2658828bb 100644 --- a/epan/wslua/wslua_util.c +++ b/epan/wslua/wslua_util.c @@ -85,7 +85,7 @@ WSLUA_FUNCTION wslua_format_date(lua_State* LS) { /* Formats an absolute timesta then.secs = (guint32)floor(timestamp); then.nsecs = (guint32) ( (timestamp-(double)(then.secs))*1000000000); - str = abs_time_to_str(&then, ABSOLUTE_TIME_LOCAL, TRUE); + str = abs_time_to_ep_str(&then, ABSOLUTE_TIME_LOCAL, TRUE); lua_pushstring(LS,str); WSLUA_RETURN(1); /* A string with the formated date */ @@ -99,7 +99,7 @@ WSLUA_FUNCTION wslua_format_time(lua_State* LS) { /* Formats a relative timestam then.secs = (guint32)floor(timestamp); then.nsecs = (guint32) ( (timestamp-(double)(then.secs))*1000000000); - str = rel_time_to_str(&then); + str = rel_time_to_ep_str(&then); lua_pushstring(LS,str); WSLUA_RETURN(1); /* A string with the formated time */ diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c index 5a6b2f3839..d84cceb70f 100644 --- a/plugins/profinet/packet-dcerpc-pn-io.c +++ b/plugins/profinet/packet-dcerpc-pn-io.c @@ -2607,7 +2607,7 @@ pnio_ar_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pnio_ar_t *ar) sub_item = proto_tree_add_text(tree, tvb, 0, 0, "ARUUID:%s ContrMAC:%s ContrAlRef:0x%x DevMAC:%s DevAlRef:0x%x InCR:0x%x OutCR=0x%x", - guid_to_str((const e_guid_t*) &ar->aruuid), + guid_to_ep_str((const e_guid_t*) &ar->aruuid), ether_to_str((const guint8 *)ar->controllermac), ar->controlleralarmref, ether_to_str((const guint8 *)ar->devicemac), ar->devicealarmref, ar->inputframeid, ar->outputframeid); @@ -6274,7 +6274,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset, u32ARDataStart = offset; offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_ar_uuid, &aruuid); - proto_item_append_text(ar_item, "ARUUID:%s", guid_to_str((const e_guid_t*) &aruuid)); + proto_item_append_text(ar_item, "ARUUID:%s", guid_to_ep_str((const e_guid_t*) &aruuid)); offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_ar_type, &u16ARType); offset = dissect_ARProperties(tvb, offset, pinfo, ar_tree, item, drep); @@ -6392,7 +6392,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset, u32ARDataStart = offset; /*ARUUID */ offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_ar_uuid, &aruuid); - proto_item_append_text(ar_item, "ARUUID:%s", guid_to_str((const e_guid_t*) &aruuid)); + proto_item_append_text(ar_item, "ARUUID:%s", guid_to_ep_str((const e_guid_t*) &aruuid)); /* CMInitiatorObjectUUID */ offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_cminitiator_objectuuid, &uuid); /* ParameterServerObjectUUID */ @@ -9437,7 +9437,7 @@ pn_io_ar_conv_filter(packet_info *pinfo) "pn_io.ar_uuid == %s || " /* ARUUID */ "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */ "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */ - guid_to_str((const e_guid_t*) &ar->aruuid), + guid_to_ep_str((const e_guid_t*) &ar->aruuid), ar->controlleralarmref, ether_to_str((const guint8 *)ar->controllermac), ar->devicealarmref, ether_to_str((const guint8 *)ar->devicemac)); return buf; @@ -9459,7 +9459,7 @@ pn_io_ar_conv_data_filter(packet_info *pinfo) "(pn_rt.frame_id == 0x%x) || (pn_rt.frame_id == 0x%x) || " "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */ "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */ - guid_to_str((const e_guid_t*) &ar->aruuid), + guid_to_ep_str((const e_guid_t*) &ar->aruuid), ar->inputframeid, ar->outputframeid, ar->controlleralarmref, ether_to_str((const guint8 *)ar->controllermac), ar->devicealarmref, ether_to_str((const guint8 *)ar->devicemac)); @@ -9472,7 +9472,7 @@ pn_io_ar_conv_data_filter(packet_info *pinfo) "(pn_rt.frame_id == 0x%x && eth.src == %s && eth.dst == %s) || " /* Output CR && contr MAC -> dev MAC */ "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */ "(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */ - guid_to_str((const e_guid_t*) &ar->aruuid), + guid_to_ep_str((const e_guid_t*) &ar->aruuid), ar->inputframeid, ether_to_str((const guint8 *)ar->devicemac), ether_to_str((const guint8 *)ar->controllermac), ar->outputframeid, ether_to_str((const guint8 *)ar->controllermac), ether_to_str((const guint8 *)ar->devicemac), ar->controlleralarmref, ether_to_str((const guint8 *)ar->controllermac), diff --git a/ui/gtk/voip_calls_dlg.c b/ui/gtk/voip_calls_dlg.c index 49c4ec3a6e..57b07098c0 100644 --- a/ui/gtk/voip_calls_dlg.c +++ b/ui/gtk/voip_calls_dlg.c @@ -266,7 +266,7 @@ voip_calls_on_filter(GtkButton *button _U_, gpointer user_data _U_) h323info = (h323_calls_info_t *)listinfo->prot_info; g_string_append_printf(filter_string_fwd, "((h225.guid == %s || q931.call_ref == %x:%x || q931.call_ref == %x:%x)", - guid_to_str(&h323info->guid[0]), + guid_to_ep_str(&h323info->guid[0]), (guint8) (h323info->q931_crv & 0x00ff), (guint8)((h323info->q931_crv & 0xff00)>>8), (guint8) (h323info->q931_crv2 & 0x00ff),