mpeg-pes: don't modify source and destination address colums

the mpeg-pes dissector replaced source or destination address with
decoding timestamp, presentation timestamp or pack data rate
these values don't belong into address columns and erase the IP
addresses when mpeg-pes is transmitted over IP

the timestamps etc can be displayed in a user-defined column if required

this patch is part of
Bug: 10505

Change-Id: I1bf561648f848eb18818862edd138724abfc8e88
Reviewed-on: https://code.wireshark.org/review/4472
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
This commit is contained in:
Martin Kaiser 2014-10-05 12:18:49 +02:00
parent ad6134bb4b
commit 9e776a1ed1
2 changed files with 6 additions and 32 deletions

View File

@ -194,7 +194,7 @@ static guint64 decode_clock_reference(tvbuff_t *tvb, gint offset,
}
static int
dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *root, unsigned int flags)
{
proto_item *item = proto_tree_add_item(root, hf_mpeg_pes_header_data, tvb,
@ -208,11 +208,6 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_time(tree, hf_mpeg_pes_pts, tvb,
offset, 5, &nst);
offset += 5;
SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_DST,
"PTS %ld.%09u",
(long) nst.secs, nst.nsecs);
}
if (flags & DTS_FLAG) {
nstime_t nst;
@ -220,11 +215,6 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_time(tree, hf_mpeg_pes_dts, tvb,
offset, 5, &nst);
offset += 5;
SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_SRC,
"DTS %ld.%09u",
(long) nst.secs, nst.nsecs);
}
if (flags & ESCR_FLAG) {
nstime_t nst;
@ -344,7 +334,7 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
static gint
dissect_mpeg_pes_pack_header(tvbuff_t *tvb, gint offset,
packet_info *pinfo, proto_tree *root)
packet_info *pinfo _U_, proto_tree *root)
{
unsigned int program_mux_rate, stuffing_length;
@ -362,9 +352,6 @@ dissect_mpeg_pes_pack_header(tvbuff_t *tvb, gint offset,
program_mux_rate);
offset += 3 * 8;
SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "%u B/s", program_mux_rate);
stuffing_length = tvb_get_guint8(tvb, offset / 8) & 0x07;
proto_tree_add_item(tree, hf_mpeg_pes_stuffing_length, tvb,
offset / 8, 1, ENC_BIG_ENDIAN);

View File

@ -635,7 +635,7 @@ static guint64 decode_clock_reference(tvbuff_t *tvb, gint offset,
}
static int
dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *root, unsigned int flags)
{
proto_item *item = proto_tree_add_item(root, hf_mpeg_pes_header_data, tvb,
@ -649,11 +649,6 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_time(tree, hf_mpeg_pes_pts, tvb,
offset, 5, &nst);
offset += 5;
SET_ADDRESS(&pinfo->dst, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_DST,
"PTS %ld.%09u",
(long) nst.secs, nst.nsecs);
}
if (flags & DTS_FLAG) {
nstime_t nst;
@ -661,11 +656,6 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_time(tree, hf_mpeg_pes_dts, tvb,
offset, 5, &nst);
offset += 5;
SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_SRC,
"DTS %ld.%09u",
(long) nst.secs, nst.nsecs);
}
if (flags & ESCR_FLAG) {
nstime_t nst;
@ -785,7 +775,7 @@ dissect_mpeg_pes_header_data(tvbuff_t *tvb, packet_info *pinfo,
static gint
dissect_mpeg_pes_pack_header(tvbuff_t *tvb, gint offset,
packet_info *pinfo, proto_tree *root)
packet_info *pinfo _U_, proto_tree *root)
{
unsigned int program_mux_rate, stuffing_length;
@ -803,9 +793,6 @@ dissect_mpeg_pes_pack_header(tvbuff_t *tvb, gint offset,
program_mux_rate);
offset += 3 * 8;
SET_ADDRESS(&pinfo->src, AT_NONE, 0, NULL);
col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "%u B/s", program_mux_rate);
stuffing_length = tvb_get_guint8(tvb, offset / 8) & 0x07;
proto_tree_add_item(tree, hf_mpeg_pes_stuffing_length, tvb,
offset / 8, 1, ENC_BIG_ENDIAN);
@ -1204,7 +1191,7 @@ proto_register_mpeg_pes(void)
"BIT_STRING_SIZE_16", HFILL }},
/*--- End of included file: packet-mpeg-pes-hfarr.c ---*/
#line 562 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c"
#line 549 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c"
{ &hf_mpeg_pes_pack_header,
{ "Pack header", "mpeg-pes.pack",
FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
@ -1322,7 +1309,7 @@ proto_register_mpeg_pes(void)
&ett_mpeg_pes_Picture,
/*--- End of included file: packet-mpeg-pes-ettarr.c ---*/
#line 669 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c"
#line 656 "../../asn1/mpeg-pes/packet-mpeg-pes-template.c"
&ett_mpeg_pes_pack_header,
&ett_mpeg_pes_header_data,
&ett_mpeg_pes_trick_mode