diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-03-13 08:57:04 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-03-13 08:57:04 +0000 |
commit | 45c342dfdb999404e356724ca8b594af3529a0a7 (patch) | |
tree | 2ecfd3bf12ce2d4a345ab9280a92db6066f6719c /epan/dissectors/packet-mpeg-pat.c | |
parent | bb611755e98a63e40357723cfa53b2cbd263dd3f (diff) |
From Weston Schmidt:
Update packet-mpeg-sect to support CRCs & simpler header processing for subdissectors.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6941
svn path=/trunk/; revision=41523
Diffstat (limited to 'epan/dissectors/packet-mpeg-pat.c')
-rw-r--r-- | epan/dissectors/packet-mpeg-pat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-mpeg-pat.c b/epan/dissectors/packet-mpeg-pat.c index e6dd6daf05..8fd77a976e 100644 --- a/epan/dissectors/packet-mpeg-pat.c +++ b/epan/dissectors/packet-mpeg-pat.c @@ -31,6 +31,7 @@ #include <epan/packet.h> #include <epan/prefs.h> +#include <epan/dissectors/packet-mpeg-sect.h> static int proto_mpeg_pat = -1; static int hf_mpeg_pat_transport_stream_id = -1; @@ -48,7 +49,7 @@ static int hf_mpeg_pat_program_map_pid = -1; static gint ett_mpeg_pat = -1; static gint ett_mpeg_pat_prog = -1; -#define MPEG_PAT_TID 0x00 +#define MPEG_PAT_TID 0x00 #define MPEG_PAT_RESERVED_MASK 0xC0 #define MPEG_PAT_VERSION_NUMBER_MASK 0x3E @@ -86,7 +87,8 @@ dissect_mpeg_pat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!tree) return; - length = tvb_reported_length_remaining(tvb, offset); + offset += packet_mpeg_sect_header(tvb, offset, mpeg_pat_tree, &length, NULL); + length -= 4; proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; @@ -124,8 +126,7 @@ dissect_mpeg_pat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } - return; - + packet_mpeg_sect_crc(tvb, pinfo, mpeg_pat_tree, 0, offset); } |